gnome-control-center r9043 - trunk/capplets/appearance



Author: jensg
Date: Tue Oct  7 16:15:00 2008
New Revision: 9043
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9043&view=rev

Log:
2008-10-07  Jens Granseuer  <jensgr gmx net>

	Patch by: Matthias Clasen <mclasen redhat com>

	* appearance-main.c: (main_window_response):
	* appearance-style.c: (style_response_cb): connect the help buttons
	to the most appropriate sections in the user guide (bug #554957)


Modified:
   trunk/capplets/appearance/ChangeLog
   trunk/capplets/appearance/appearance-main.c
   trunk/capplets/appearance/appearance-style.c

Modified: trunk/capplets/appearance/appearance-main.c
==============================================================================
--- trunk/capplets/appearance/appearance-main.c	(original)
+++ trunk/capplets/appearance/appearance-main.c	Tue Oct  7 16:15:00 2008
@@ -85,6 +85,38 @@
     g_object_unref (data->client);
     g_object_unref (data->xml);
   }
+  else if (response_id == GTK_RESPONSE_HELP)
+  {
+      GtkNotebook *nb;
+      gint pindex;
+
+      nb = GTK_NOTEBOOK (glade_xml_get_widget (data->xml, "main_notebook"));
+      pindex = gtk_notebook_get_current_page (nb);
+
+      switch (pindex)
+      {
+        case 0: /* theme */
+          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
+                                    "goscustdesk-12"); 
+          break;
+        case 1: /* background */
+          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
+                                    "goscustdesk-7"); 
+          break;
+        case 2: /* fonts */
+          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
+                                    "goscustdesk-38"); 
+          break;
+        case 3: /* interface */
+          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
+                                    "goscustuserinter-2"); 
+          break;
+        default:
+          capplet_help (GTK_WINDOW (widget), "user-guide.xml", 
+                                    "prefs-look-and-feel"); 
+          break;
+       }
+  }
 }
 
 int

Modified: trunk/capplets/appearance/appearance-style.c
==============================================================================
--- trunk/capplets/appearance/appearance-style.c	(original)
+++ trunk/capplets/appearance/appearance-style.c	Tue Oct  7 16:15:00 2008
@@ -26,6 +26,7 @@
 #include "gtkrc-utils.h"
 #include "gconf-property-editor.h"
 #include "theme-thumbnail.h"
+#include "capplet-util.h"
 #include "gedit-message-area.h"
 
 typedef void (* ThumbnailGenFunc) (void               *type,
@@ -392,7 +393,7 @@
 style_response_cb (GtkDialog *dialog, gint response_id)
 {
   if (response_id == GTK_RESPONSE_HELP) {
-    /* FIXME: help */
+    capplet_help (GTK_WINDOW (dialog), "user-guide.xml", "goscustdesk-61");
   } else {
     gtk_widget_hide (GTK_WIDGET (dialog));
   }



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