brasero r824 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r824 - in trunk: . src
- Date: Tue, 20 May 2008 18:28:29 +0000 (UTC)
Author: philippr
Date: Tue May 20 18:28:29 2008
New Revision: 824
URL: http://svn.gnome.org/viewvc/brasero?rev=824&view=rev
Log:
fixed help file path
* src/brasero-app.h:
* src/main.c (on_help_cb), (main):
Modified:
trunk/ChangeLog
trunk/src/brasero-app.h
trunk/src/main.c
Modified: trunk/src/brasero-app.h
==============================================================================
--- trunk/src/brasero-app.h (original)
+++ trunk/src/brasero-app.h Tue May 20 18:28:29 2008
@@ -29,10 +29,7 @@
#include <gtk/gtkuimanager.h>
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
struct _BraseroApp {
GtkWidget *mainwin;
@@ -49,9 +46,7 @@
};
typedef struct _BraseroApp BraseroApp;
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif /* _BRASERO_APP_H */
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Tue May 20 18:28:29 2008
@@ -38,6 +38,7 @@
#include <gst/gst.h>
+#include <libgnome/gnome-help.h>
#include <libgnomeui/libgnomeui.h>
#include <gconf/gconf-client.h>
@@ -317,50 +318,22 @@
on_help_cb (GtkAction *action, BraseroApp *app)
{
GError *error = NULL;
- char *command;
- const char *lang;
- char *uri = NULL;
- GdkScreen *gscreen;
- int i;
- const char * const * langs = g_get_language_names ();
-
- for (i = 0; langs[i]; i++) {
- lang = langs[i];
- if (strchr (lang, '.')) {
- continue;
- }
-
- uri = g_build_filename(PACKAGE_DATA_DIR,
- "/gnome/help/brasero/",
- lang,
- "/brasero.xml",
- NULL);
+ gnome_help_display ("brasero.xml",
+ NULL,
+ &error);
+ if (error) {
+ GtkWidget *d;
- if (g_file_test (uri, G_FILE_TEST_EXISTS)) {
- break;
- }
- }
-
- command = g_strconcat ("gnome-open ghelp://", uri, NULL);
- gscreen = gdk_screen_get_default();
- gdk_spawn_command_line_on_screen (gscreen, command, &error);
- if (error) {
- GtkWidget *d;
-
- d = gtk_message_dialog_new(NULL,
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- error->message);
- gtk_dialog_run(GTK_DIALOG(d));
- gtk_widget_destroy(d);
- g_error_free(error);
- error = NULL;
- }
-
- g_free (command);
- g_free (uri);
-
+ d = gtk_message_dialog_new (GTK_WINDOW (app->mainwin),
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ error->message);
+ gtk_dialog_run (GTK_DIALOG(d));
+ gtk_widget_destroy (d);
+ g_error_free (error);
+ error = NULL;
+ }
}
static gboolean
@@ -794,6 +767,7 @@
program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PARAM_GOPTION_CONTEXT, context,
+ GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR,
GNOME_PARAM_HUMAN_READABLE_NAME, _("CD/DVD burning"),
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]