[glade3] Fix shortcuts to devhelper documentation



commit 22788e3f90e2285fd9db92e60cbadac5cc6d62ee
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Jan 20 13:07:31 2010 +0100

    Fix shortcuts to devhelper documentation
    
    Remove the trailing whitespace of the string passed to devhelp
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=576477

 gladeui/glade-utils.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gladeui/glade-utils.c b/gladeui/glade-utils.c
index 276c656..fc4454f 100644
--- a/gladeui/glade-utils.c
+++ b/gladeui/glade-utils.c
@@ -1655,18 +1655,19 @@ glade_util_search_devhelp (const gchar *book,
 			   const gchar *search)
 {
 	GError *error = NULL;
-	gchar  *book_comm = NULL, *page_comm = NULL;
+	gchar  *book_comm = NULL, *page_comm = NULL, *search_comm = NULL;
 	gchar  *string;
 
 	g_return_if_fail (glade_util_have_devhelp ());
 
-	if (book) book_comm = g_strdup_printf ("book:%s ", book);
-	if (page) page_comm = g_strdup_printf ("page:%s ", page);
+	if (book) book_comm = g_strdup_printf ("book:%s", book);
+	if (page) page_comm = g_strdup_printf (" page:%s", page);
+	if (search) search_comm = g_strdup_printf (" %s", search);
 
 	string = g_strdup_printf ("devhelp -s \"%s%s%s\"", 
 				   book_comm ? book_comm : "",
 				   page_comm ? page_comm : "",
-				   search ? search : "");
+				   search_comm ? search_comm : "");
 
 	if (g_spawn_command_line_async (string, &error) == FALSE)
 	{
@@ -1677,6 +1678,7 @@ glade_util_search_devhelp (const gchar *book,
 	g_free (string);
 	if (book_comm) g_free (book_comm);
 	if (page_comm) g_free (page_comm);
+	if (search_comm) g_free (search_comm);
 }
 
 GtkWidget *



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