diff options
author | Don Scorgie <dscorgie@git.gnome.org> | 2009-04-28 19:15:21 +0100 |
---|---|---|
committer | Don Scorgie <dscorgie@git.gnome.org> | 2009-04-28 19:15:21 +0100 |
commit | 96dd47d7281dcefc87319c676a6f410e62f367e7 (patch) | |
tree | 83fbd3e7d80a24befb04fb92632e04fa091c8786 | |
parent | e0150ca8d75e6b844ed11a2ca04cdd0e68ad0b74 (diff) | |
download | yelp-96dd47d7281dcefc87319c676a6f410e62f367e7.tar.gz |
2009-04-27 Don Scorgie <dscorgie@svn.gnome.org>
* src/yelp-window.c:
Replacing syncronous spawn functions by a simple
gtk_show_uri (fixes bug #561404 - patch from
Lincon de Sousa)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/yelp-window.c | 19 |
2 files changed, 10 insertions, 16 deletions
@@ -1,3 +1,10 @@ +2009-04-27 Don Scorgie <dscorgie@svn.gnome.org> + + * src/yelp-window.c: + Replacing syncronous spawn functions by a simple + gtk_show_uri (fixes bug #561404 - patch from + Lincon de Sousa) + 2009-04-08 Shaun McCance <shaunm@gnome.org> * src/yelp-transform.c: diff --git a/src/yelp-window.c b/src/yelp-window.c index 8f5c4056..deb36fd9 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -1051,10 +1051,6 @@ yelp_window_load (YelpWindow *window, const gchar *uri) break; case YELP_RRN_TYPE_EXTERNAL: { - gchar *str_stdout = NULL; - gchar *str_stderr = NULL; - gchar *cmd = NULL; - gint status = 0; GError *error = NULL; priv->base_uri = old_base_uri; @@ -1069,20 +1065,11 @@ yelp_window_load (YelpWindow *window, const gchar *uri) return; } - cmd = g_strdup_printf ("gnome-open %s", uri); - if (!g_spawn_command_line_sync (cmd, &str_stdout, &str_stderr, &status, &error)) { - g_free (error); - error = NULL; - g_free (cmd); - cmd = g_strdup_printf ("xdg-open %s", uri); - if (!g_spawn_command_line_sync (cmd, &str_stdout, &str_stderr, &status, &error)) { - window_error(window, _("Error executing \"gnome-open\""), error->message, FALSE); - return; - } - } - if (status) { + if (!gtk_show_uri (NULL, trace_uri, gtk_get_current_event_time (), &error)) { gchar *message = g_strdup_printf (_("The requested URI \"%s\" is invalid"), trace_uri); window_error (window, _("Unable to load page"), message, FALSE); + g_free (error); + error = NULL; return; } } |