[libgda] Fixed some help problems in GdaBrowser



commit 0f4f57d0d73564ff02ee79ff4bc697605bf59a9f
Author: Vivien Malerba <malerba gnome-db org>
Date:   Fri Apr 16 21:44:43 2010 +0200

    Fixed some help problems in GdaBrowser

 tools/browser/browser-window.c |    2 ++
 tools/browser/support.c        |   20 +++++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/tools/browser/browser-window.c b/tools/browser/browser-window.c
index 26ff4c7..bd2b692 100644
--- a/tools/browser/browser-window.c
+++ b/tools/browser/browser-window.c
@@ -289,7 +289,9 @@ static const gchar *ui_actions_info =
         "    </menu>"
 	"    <placeholder name='MenuExtension'/>"
         "    <menu name='Help' action='Help'>"
+#ifdef HAVE_GDU
         "      <menuitem name='HelpManual' action= 'HelpManual'/>"
+#endif
         "      <menuitem name='HelpAbout' action= 'HelpAbout'/>"
         "    </menu>"
         "  </menubar>"
diff --git a/tools/browser/support.c b/tools/browser/support.c
index f476556..675c706 100644
--- a/tools/browser/support.c
+++ b/tools/browser/support.c
@@ -244,13 +244,19 @@ browser_show_help (GtkWindow *parent, const gchar *topic)
 
 		uri = gda_gbr_get_file_path (GDA_DATA_DIR, "gnome", "help", "gda-browser", lang, NULL);
 
+		/*g_print ("TST URI [%s]\n", uri);*/
 		if (g_file_test (uri, G_FILE_TEST_EXISTS)) {
-			if (topic) {
-				gchar *tmp;
-				tmp = g_strdup_printf ("%s?%s", uri, topic);
-				g_free (uri);
-				uri = tmp;
-			}
+			/* terminate URI with a '/' for images to load properly,
+			 * see http://mail.gnome.org/archives/gnome-doc-list/2009-August/msg00058.html
+			 */
+			gchar *tmp;
+			if (topic)
+				tmp = g_strdup_printf ("%s/?%s", uri, topic);
+			else
+				tmp = g_strdup_printf ("%s/", uri);
+			g_free (uri);
+			uri = tmp;
+
 			break;
 		}
 		g_free (uri);
@@ -258,7 +264,7 @@ browser_show_help (GtkWindow *parent, const gchar *topic)
 	}
 	/*g_print ("URI [%s]\n", uri);*/
 	if (uri == NULL) {
-		browser_show_error (NULL,  _("Unable to display help. Please make sure the  "
+		browser_show_error (NULL,  _("Unable to display help. Please make sure the "
 					     "documentation package is installed."));
 		return;
 	}



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