gnome-games r8018 - trunk/blackjack/src
- From: thomashpa svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8018 - trunk/blackjack/src
- Date: Tue, 14 Oct 2008 00:03:33 +0000 (UTC)
Author: thomashpa
Date: Tue Oct 14 00:03:33 2008
New Revision: 8018
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8018&view=rev
Log:
replace gnome_help_display with gtk_show_uri
Modified:
trunk/blackjack/src/menu.cpp
Modified: trunk/blackjack/src/menu.cpp
==============================================================================
--- trunk/blackjack/src/menu.cpp (original)
+++ trunk/blackjack/src/menu.cpp Tue Oct 14 00:03:33 2008
@@ -128,11 +128,27 @@
on_help_contents_activate (GtkAction *action,
gpointer data)
{
-#ifdef HAVE_GNOME
- GError *error = NULL;
- gnome_help_display_desktop_on_screen (NULL, "blackjack", "blackjack", NULL,
- gtk_widget_get_screen (toplevel_window), &error);
-#endif
+ GdkScreen *screen;
+ GError *error = NULL;
+
+ screen = gtk_widget_get_screen (GTK_WIDGET (toplevel_window));
+ gtk_show_uri (screen, "ghelp:blackjack", gtk_get_current_event_time (), &error);
+
+ if (error != NULL)
+ {
+ GtkWidget *d;
+
+ d = gtk_message_dialog_new (GTK_WINDOW (toplevel_window),
+ (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT),
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ "%s", _("Unable to open help file"));
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (d),
+ " %s", error->message);
+ g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ gtk_window_present (GTK_WINDOW (d));
+
+ g_error_free (error);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]