gnome-control-center r9094 - in trunk: . capplets/accessibility/at-properties capplets/appearance capplets/common capplets/default-applications capplets/keybindings capplets/keyboard capplets/mouse capplets/network capplets/sound capplets/windows



Author: ssp
Date: Fri Oct 24 19:42:26 2008
New Revision: 9094
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9094&view=rev

Log:
Fri Oct 24 15:42:11 2008  SÃren Sandmann  <sandmann redhat com>

	* Use gtk_show_uri() instead of gnome_help_display_desktop()



Modified:
   trunk/ChangeLog
   trunk/capplets/accessibility/at-properties/main.c
   trunk/capplets/appearance/appearance-font.c
   trunk/capplets/appearance/appearance-main.c
   trunk/capplets/appearance/appearance-style.c
   trunk/capplets/common/capplet-util.c
   trunk/capplets/common/capplet-util.h
   trunk/capplets/default-applications/gnome-da-capplet.c
   trunk/capplets/keybindings/gnome-keybinding-properties.c
   trunk/capplets/keyboard/gnome-keyboard-properties.c
   trunk/capplets/mouse/gnome-mouse-properties.c
   trunk/capplets/network/gnome-network-preferences.c
   trunk/capplets/sound/sound-properties-capplet.c
   trunk/capplets/windows/gnome-window-properties.c

Modified: trunk/capplets/accessibility/at-properties/main.c
==============================================================================
--- trunk/capplets/accessibility/at-properties/main.c	(original)
+++ trunk/capplets/accessibility/at-properties/main.c	Fri Oct 24 19:42:26 2008
@@ -84,7 +84,6 @@
 	GnomeClient *client;
 	if (response_id == GTK_RESPONSE_HELP)
 		capplet_help (GTK_WINDOW (dialog),
-			      "user-guide.xml",
 			      "goscustaccess-11");
 	else if (response_id == GTK_RESPONSE_CLOSE || response_id == GTK_RESPONSE_DELETE_EVENT)
 		gtk_main_quit ();

Modified: trunk/capplets/appearance/appearance-font.c
==============================================================================
--- trunk/capplets/appearance/appearance-font.c	(original)
+++ trunk/capplets/appearance/appearance-font.c	Fri Oct 24 19:42:26 2008
@@ -804,7 +804,6 @@
 {
   if (response_id == GTK_RESPONSE_HELP) {
     capplet_help (GTK_WINDOW (dialog),
-		  "user-guide.xml",
 		  "goscustdesk-38");
   } else
     gtk_widget_hide (GTK_WIDGET (dialog));

Modified: trunk/capplets/appearance/appearance-main.c
==============================================================================
--- trunk/capplets/appearance/appearance-main.c	(original)
+++ trunk/capplets/appearance/appearance-main.c	Fri Oct 24 19:42:26 2008
@@ -96,24 +96,19 @@
       switch (pindex)
       {
         case 0: /* theme */
-          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
-                                    "goscustdesk-12"); 
+          capplet_help (GTK_WINDOW (widget), "goscustdesk-12"); 
           break;
         case 1: /* background */
-          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
-                                    "goscustdesk-7"); 
+          capplet_help (GTK_WINDOW (widget), "goscustdesk-7"); 
           break;
         case 2: /* fonts */
-          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
-                                    "goscustdesk-38"); 
+          capplet_help (GTK_WINDOW (widget), "goscustdesk-38"); 
           break;
         case 3: /* interface */
-          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
-                                    "goscustuserinter-2"); 
+          capplet_help (GTK_WINDOW (widget), "goscustuserinter-2"); 
           break;
         default:
-          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
-                                    "prefs-look-and-feel"); 
+          capplet_help (GTK_WINDOW (widget), "prefs-look-and-feel"); 
           break;
        }
   }

Modified: trunk/capplets/appearance/appearance-style.c
==============================================================================
--- trunk/capplets/appearance/appearance-style.c	(original)
+++ trunk/capplets/appearance/appearance-style.c	Fri Oct 24 19:42:26 2008
@@ -393,7 +393,7 @@
 style_response_cb (GtkDialog *dialog, gint response_id)
 {
   if (response_id == GTK_RESPONSE_HELP) {
-    capplet_help (GTK_WINDOW (dialog), "user-guide.xml", "goscustdesk-61");
+    capplet_help (GTK_WINDOW (dialog), "goscustdesk-61");
   } else {
     gtk_widget_hide (GTK_WIDGET (dialog));
   }

Modified: trunk/capplets/common/capplet-util.c
==============================================================================
--- trunk/capplets/common/capplet-util.c	(original)
+++ trunk/capplets/common/capplet-util.c	Fri Oct 24 19:42:26 2008
@@ -31,6 +31,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include <glib/gi18n.h>
 
 #include "capplet-util.h"
 
@@ -65,20 +66,32 @@
  * Havoc happy way.
  **/
 void
-capplet_help (GtkWindow *parent, char const *helpfile, char const *section)
+capplet_help (GtkWindow *parent, char const *section)
 {
 	GError *error = NULL;
+	char *uri;
+	GError *err = NULL;
+	GdkScreen *screen;
 
-	g_return_if_fail (helpfile != NULL);
 	g_return_if_fail (section != NULL);
 
-	gnome_help_display_desktop (NULL,
-		"user-guide",
-		helpfile, section, &error);
-	if (error != NULL)
-		capplet_error_dialog (parent, 
+	if (!parent)
+		screen = gdk_screen_get_default();
+	else
+		screen = gtk_widget_get_screen (GTK_WIDGET (parent));
+	
+	uri = g_strdup_printf ("ghelp:user-guide#%s", section);
+	
+	if (!gtk_show_uri (screen, uri, gtk_get_current_event_time(), &err)) {
+		capplet_error_dialog (
+			parent, 
 			_("There was an error displaying help: %s"),
 			error);
+		
+		g_error_free (err);
+	}
+
+	g_free (uri);
 }
 
 /**

Modified: trunk/capplets/common/capplet-util.h
==============================================================================
--- trunk/capplets/common/capplet-util.h	(original)
+++ trunk/capplets/common/capplet-util.h	Fri Oct 24 19:42:26 2008
@@ -45,7 +45,7 @@
 
 /* Some miscellaneous functions useful to all capplets */
 
-void capplet_help (GtkWindow *parent, char const *helpfile, char const *section);
+void capplet_help (GtkWindow *parent, char const *section);
 void capplet_set_icon (GtkWidget *window, char const *icon_file_name);
 gboolean capplet_file_delete_recursive (GFile *directory, GError **error);
 

Modified: trunk/capplets/default-applications/gnome-da-capplet.c
==============================================================================
--- trunk/capplets/default-applications/gnome-da-capplet.c	(original)
+++ trunk/capplets/default-applications/gnome-da-capplet.c	Fri Oct 24 19:42:26 2008
@@ -44,7 +44,7 @@
 close_cb (GtkWidget *window, gint response, gpointer user_data)
 {
     if (response == GTK_RESPONSE_HELP) {
-	capplet_help (GTK_WINDOW (window), "user-guide.xml", "prefs-preferredapps");
+	capplet_help (GTK_WINDOW (window), "prefs-preferredapps");
     }
     else {
 	gtk_widget_destroy (window);

Modified: trunk/capplets/keybindings/gnome-keybinding-properties.c
==============================================================================
--- trunk/capplets/keybindings/gnome-keybinding-properties.c	(original)
+++ trunk/capplets/keybindings/gnome-keybinding-properties.c	Fri Oct 24 19:42:26 2008
@@ -1377,7 +1377,6 @@
 	if (response_id == GTK_RESPONSE_HELP)
           {
             capplet_help (GTK_WINDOW (widget),
-                          "user-guide.xml",
                           "goscustdesk-39");
           }
 	else

Modified: trunk/capplets/keyboard/gnome-keyboard-properties.c
==============================================================================
--- trunk/capplets/keyboard/gnome-keyboard-properties.c	(original)
+++ trunk/capplets/keyboard/gnome-keyboard-properties.c	Fri Oct 24 19:42:26 2008
@@ -118,8 +118,7 @@
 		 gint response_id, GConfChangeSet * changeset)
 {
 	if (response_id == GTK_RESPONSE_HELP)
-		capplet_help (GTK_WINDOW (widget),
-			      "user-guide.xml", "goscustperiph-2");
+		capplet_help (GTK_WINDOW (widget), "goscustperiph-2");
 	else
 		gtk_main_quit ();
 }

Modified: trunk/capplets/mouse/gnome-mouse-properties.c
==============================================================================
--- trunk/capplets/mouse/gnome-mouse-properties.c	(original)
+++ trunk/capplets/mouse/gnome-mouse-properties.c	Fri Oct 24 19:42:26 2008
@@ -419,7 +419,6 @@
 {
 	if (response_id == GTK_RESPONSE_HELP)
 		capplet_help (GTK_WINDOW (dialog),
-			      "user-guide.xml",
 			      "goscustperiph-5");
 	else
 		gtk_main_quit ();

Modified: trunk/capplets/network/gnome-network-preferences.c
==============================================================================
--- trunk/capplets/network/gnome-network-preferences.c	(original)
+++ trunk/capplets/network/gnome-network-preferences.c	Fri Oct 24 19:42:26 2008
@@ -178,7 +178,6 @@
 {
 	if (response_id == GTK_RESPONSE_HELP)
 		capplet_help (GTK_WINDOW (dialog),
-			"user-guide.xml",
 			"goscustdesk-50");
 	else
 	{
@@ -196,7 +195,6 @@
 {
 	if (response_id == GTK_RESPONSE_HELP)
 		capplet_help (GTK_WINDOW (dialog),
-			      "user-guide.xml",
 			      "goscustdesk-50");
 	else {
 		gtk_widget_destroy (GTK_WIDGET (dialog));

Modified: trunk/capplets/sound/sound-properties-capplet.c
==============================================================================
--- trunk/capplets/sound/sound-properties-capplet.c	(original)
+++ trunk/capplets/sound/sound-properties-capplet.c	Fri Oct 24 19:42:26 2008
@@ -1163,7 +1163,6 @@
 {
 	if (response_id == GTK_RESPONSE_HELP) {
 		capplet_help (GTK_WINDOW (dialog),
-			"user-guide.xml",
 			"goscustmulti-2");
 		return;
 	}

Modified: trunk/capplets/windows/gnome-window-properties.c
==============================================================================
--- trunk/capplets/windows/gnome-window-properties.c	(original)
+++ trunk/capplets/windows/gnome-window-properties.c	Fri Oct 24 19:42:26 2008
@@ -318,7 +318,6 @@
 
         if (response_id == GTK_RESPONSE_HELP) {
 		capplet_help (GTK_WINDOW (dialog_win),
-			      "user-guide.xml",
 			      "goscustdesk-58");
         } else {
                 gtk_widget_destroy (dialog_win);



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