[monkey-bubble: 753/753] port the code towards gtk_show_uri()



commit 1d8bd042d680b79e8fc61a30c8db8651dcd4c283
Author: Sven Herzberg <herzi gnome-de org>
Date:   Wed Jul 14 23:33:09 2010 +0200

    port the code towards gtk_show_uri()
    
    * configure.in: depend on GTK+ 2.14 for gtk_show_uri()
    * help/C/monkey-bubble.xml: fix the name of the document so yelp can
      actually find it
    * src/ui/ui-main.c: replace the old code for opening the help

 configure.in             |    2 +-
 help/C/monkey-bubble.xml |    2 +-
 src/ui/ui-main.c         |   24 ++++++++++++------------
 3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/configure.in b/configure.in
index 0c72e19..a9ad161 100644
--- a/configure.in
+++ b/configure.in
@@ -80,7 +80,7 @@ dnl | library dependencies |--------------------------------------------------
 dnl  ----------------------
 
 dnl Versions shared with the (upcoming) .spec file.
-dnl GTK+ 2.12 comes with GtkBuilder support
+dnl GTK+ 2.14 comes with gtk_show_uri() support
 GTK_REQUIRED=2.12.0
 G_THREAD_REQUIRED=2.0.0
 
diff --git a/help/C/monkey-bubble.xml b/help/C/monkey-bubble.xml
index a7a91de..55b3a58 100644
--- a/help/C/monkey-bubble.xml
+++ b/help/C/monkey-bubble.xml
@@ -12,7 +12,7 @@
   Template last modified Jan 2, 2002 
     
   -->
-<article id="index" lang="en"> 
+<article id="monkey-bubble" lang="en"> 
   <articleinfo> 
     <title>&app; Manual V&manrevision;</title> 
     <copyright> 
diff --git a/src/ui/ui-main.c b/src/ui/ui-main.c
index 6085cba..27bb2f7 100644
--- a/src/ui/ui-main.c
+++ b/src/ui/ui-main.c
@@ -38,7 +38,6 @@
 #include <libgnomeui/gnome-scores.h>
 #include <libgnome/gnome-score.h>
 #include <libgnome/gnome-sound.h>
-#include <libgnome/gnome-help.h>
 #endif
 #include <gdk/gdkkeysyms.h>
 #include <glib/gi18n.h>
@@ -790,19 +789,20 @@ about (GtkAction* action,
 
 static void
 show_help_content (GtkAction* action,
-		   UiMain   * ui_main)
+                   UiMain   * ui_main)
 {
-        GError *err = NULL;
-
-        gnome_help_display ("monkey-bubble", NULL, &err);
+  GError* error = NULL;
 
-        if (err) {
-                ui_main = ui_main_get_instance();
-                show_error_dialog (GTK_WINDOW (PRIVATE(ui_main)->window),
-                                   _("There was an error displaying help: %s"),
-                                   err->message);
-                g_error_free (err);
-        }
+  if (!gtk_show_uri (gtk_widget_get_screen (PRIVATE (ui_main)->window),
+                     "ghelp:monkey-bubble",
+                     GDK_CURRENT_TIME,
+                     &error))
+    {
+      show_error_dialog (GTK_WINDOW (PRIVATE(ui_main)->window),
+                         _("There was an error displaying help: %s"),
+                         error->message);
+      g_error_free (error);
+    }
 }
 
 static void show_error_dialog (GtkWindow *transient_parent,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]