After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 584612 - Use gtk_show_uri instead of gnome_help
Use gtk_show_uri instead of gnome_help
Status: RESOLVED FIXED
Product: gok
Classification: Deprecated
Component: general
2.27.x
Other Linux
: Normal trivial
: ---
Assigned To: Gerd Kohlberger
David Bolter
Depends on:
Blocks:
 
 
Reported: 2009-06-02 13:14 UTC by Javier Jardón (IRC: jjardon)
Modified: 2009-07-06 07:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use gtk_show_uri (5.59 KB, patch)
2009-06-13 09:20 UTC, Gerd Kohlberger
accepted-commit_now Details | Review

Description Javier Jardón (IRC: jjardon) 2009-06-02 13:14:00 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
Comment 1 Gerd Kohlberger 2009-06-13 09:20:13 UTC
Created attachment 136491 [details] [review]
Use gtk_show_uri

The patch also changes the link_ids to match the section ids in the docs.
Comment 2 André Klapper 2009-06-21 16:38:16 UTC
David, can this get a review?
Comment 3 David Bolter 2009-06-30 23:23:09 UTC
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).
Comment 4 Gerd Kohlberger 2009-07-06 07:08:09 UTC
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