Debian Codegraph @

src/af/xap/gtk/xap_UnixAppImpl.cpp

raw
1 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
2
3 /* AbiSource Application Framework
4 * Copyright (C) 1998-2000 AbiSource, Inc.
5 * Copyright (C) 2004 Hubert Figuiere
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301 USA.
21 */
22
23 #include <glib.h>
24
25 #include "xap_UnixAppImpl.h"
26 #include "ut_string_class.h"
27 #include "ut_files.h"
28 #include "ut_go_file.h"
29
30 UT_String XAP_UnixAppImpl::localizeHelpUrl (const char * pathBefore,
31 const char * pathAfter,
32 const char * remoteURLbase)
33 {
34 return XAP_AppImpl::localizeHelpUrl (pathBefore, pathAfter, remoteURLbase);
35 }
36
37 bool XAP_UnixAppImpl::openHelpURL(const char * url)
38 {
39 return openURL(url);
40 }
41
42 bool XAP_UnixAppImpl::openURL(const char * url)
43 {
44 // Need this to make AbiGimp Load!!!!!
45 if (progExists("foo")) {}
46
47 GError * err = NULL;
48 err = UT_go_url_show (url);
49 if (err) {
50 g_warning ("%s", err->message);
51 g_error_free (err);
52 return FALSE;
53 }
54 return TRUE;
55 }