GNOME Bugzilla – Bug 584612
Use gtk_show_uri instead of gnome_help
Last modified: 2009-07-06 07:08:09 UTC
http://live.gnome.org/GnomeGoals/RemoveGnomeOpenGnomeHelp proposes to get rid of gnome-open in favour of the gtk_show_uri API, available in GTK+ since 2.14
Created attachment 136491 [details] [review] Use gtk_show_uri The patch also changes the link_ids to match the section ids in the docs.
David, can this get a review?
Comment on attachment 136491 [details] [review] Use gtk_show_uri Looks good Gerd, one comment below: >+ if (error) >+ { >+ GtkWidget *dialog; >+ >+ dialog = gtk_message_dialog_new (NULL, 0, >+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, >+ "%s", _("Unable to open help file")); >+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), >+ "%s", error->message); >+ >+ gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_NORMAL); >+ gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); >+ >+ g_signal_connect_swapped (dialog, "response", >+ G_CALLBACK (gtk_widget_destroy), dialog); >+ >+ gtk_widget_show_all (dialog); >+ g_error_free (error); >+ } At your discretion -- please consider using gok_main_display_error (revamping it if necessary).
gok_main_display_error is for fatal errors and doesn't really fit in this case. I've renamed it to gok_main_display_fatal_error and added a new gok_main_display_error that doesn't use a modal dialog. The patch is in master. http://git.gnome.org/cgit/gok/commit/?id=46ca9986da042bbeccacfbdefce7ea1afed4cfa0