genius r715 - in trunk: . src



Author: jirka
Date: Fri Feb 13 20:51:56 2009
New Revision: 715
URL: http://svn.gnome.org/viewvc/genius?rev=715&view=rev

Log:

Fri Feb 13 14:51:43 2009  Jiri (George) Lebl <jirka 5z com>

	* src/gnome-genius.c: use gtk_show_uri to show help
	  when gtk is high enough version



Modified:
   trunk/ChangeLog
   trunk/src/gnome-genius.c

Modified: trunk/src/gnome-genius.c
==============================================================================
--- trunk/src/gnome-genius.c	(original)
+++ trunk/src/gnome-genius.c	Fri Feb 13 20:51:56 2009
@@ -1325,6 +1325,28 @@
 static void
 actually_open_help (const char *id)
 {
+#if GTK_CHECK_VERSION(2,14,0)
+	GError *error = NULL;
+	char *str;
+
+	if (id != NULL) {
+		str = g_strdup_printf ("ghelp:genius?%s", id);
+	} else {
+		str = g_strdup ("ghelp:genius");
+	}
+
+	gtk_show_uri (NULL, str, GDK_CURRENT_TIME, &error);
+
+	g_free (str);
+
+	if (error != NULL) {
+		str = g_strdup_printf (_("<b>Cannot display help</b>\n\n%s"),
+				       error->message);
+		genius_display_error (NULL /* parent */, str);
+		g_free (str);
+		g_error_free (error);
+	}
+#else
 	char *xdgopen;
 	char *uri;
 	char *file = NULL;
@@ -1383,6 +1405,7 @@
 
 	g_free (xdgopen);
 	g_free (uri);
+#endif
 }
 
 void



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