[vinagre] Added a section parameter in vinagre_utils_help_contents()



commit 8dc55a6f75c7bab3f2f7e598ab3c8031bc27985d
Author: Jonh Wendell <jwendell gnome org>
Date:   Wed Jan 27 10:39:26 2010 -0300

    Added a section parameter in vinagre_utils_help_contents()

 vinagre/vinagre-applet.c   |    2 +-
 vinagre/vinagre-commands.c |    2 +-
 vinagre/vinagre-utils.c    |   10 ++++++++--
 vinagre/vinagre-utils.h    |    2 +-
 4 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/vinagre/vinagre-applet.c b/vinagre/vinagre-applet.c
index 0f5928c..be32a42 100644
--- a/vinagre/vinagre-applet.c
+++ b/vinagre/vinagre-applet.c
@@ -402,7 +402,7 @@ vinagre_applet_help_cb (BonoboUIComponent *ui_container,
 			gpointer           data,
 			const gchar       *cname)
 {
-  vinagre_utils_help_contents (NULL);
+  vinagre_utils_help_contents (NULL, NULL);
 }
 
 static void
diff --git a/vinagre/vinagre-commands.c b/vinagre/vinagre-commands.c
index 9e1d308..0309ae5 100644
--- a/vinagre/vinagre-commands.c
+++ b/vinagre/vinagre-commands.c
@@ -345,7 +345,7 @@ void
 vinagre_cmd_help_contents (GtkAction     *action,
 			   VinagreWindow *window)
 {
-  vinagre_utils_help_contents (GTK_WINDOW (window));
+  vinagre_utils_help_contents (GTK_WINDOW (window), NULL);
 }
 
 void
diff --git a/vinagre/vinagre-utils.c b/vinagre/vinagre-utils.c
index 1579e1a..da4b9e3 100644
--- a/vinagre/vinagre-utils.c
+++ b/vinagre/vinagre-utils.c
@@ -446,19 +446,25 @@ vinagre_about_dialog_handle_url (GtkAboutDialog *about,
 }
 
 void
-vinagre_utils_help_contents (GtkWindow *window)
+vinagre_utils_help_contents (GtkWindow *window, const gchar *section)
 {
   GError    *error;
   GdkScreen *screen;
+  gchar     *uri;
 
   screen = GTK_IS_WINDOW (window) ? gtk_window_get_screen (GTK_WINDOW (window)) : NULL;
   error = NULL;
+  if (section)
+    uri = g_strdup_printf ("ghelp:vinagre?%s", section);
+  else
+    uri = g_strdup ("ghelp:vinagre");
 
   gtk_show_uri (screen,
-		"ghelp:vinagre",
+		uri,
 		GDK_CURRENT_TIME,
 		&error);
 
+  g_free (uri);
   if (error != NULL) 
     {
       vinagre_utils_show_error (NULL, error->message, GTK_IS_WINDOW (window) ? window : NULL);
diff --git a/vinagre/vinagre-utils.h b/vinagre/vinagre-utils.h
index 7e84f8d..e651fd6 100644
--- a/vinagre/vinagre-utils.h
+++ b/vinagre/vinagre-utils.h
@@ -59,7 +59,7 @@ void		vinagre_utils_get_current_viewport	(GdkScreen    *screen,
 							 gint         *x,
 							 gint         *y);
 
-void		vinagre_utils_help_contents		(GtkWindow *window);
+void		vinagre_utils_help_contents		(GtkWindow *window, const gchar *section);
 void		vinagre_utils_help_about		(GtkWindow *window);
 
 gboolean	vinagre_utils_parse_boolean		(const gchar* value);



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