[giggle] Use gtk_show_uri() to show uris
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [giggle] Use gtk_show_uri() to show uris
- Date: Thu, 22 Apr 2010 01:46:12 +0000 (UTC)
commit 03b40243611a8173b52e480a863cda836d7ebc82
Author: Javier Jardón <jjardon gnome org>
Date: Thu Apr 22 01:31:01 2010 +0200
Use gtk_show_uri() to show uris
Instead the low level function g_app_info_launch_default_for_uri()
directly.
src/giggle-window.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/giggle-window.c b/src/giggle-window.c
index cdbc15f..7d1cad6 100644
--- a/src/giggle-window.c
+++ b/src/giggle-window.c
@@ -891,17 +891,16 @@ static void
window_visit_uri (GiggleWindow *window,
const char *uri)
{
- GAppLaunchContext *context;
GError *error = NULL;
- context = giggle_create_app_launch_context (GTK_WIDGET (window));
+ gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)),
+ uri, gtk_get_current_event_time (),
+ &error);
- if (!g_app_info_launch_default_for_uri (uri, context, &error)) {
+ if (error != NULL) {
g_warning ("%s: %s", G_STRFUNC, error->message);
g_clear_error (&error);
}
-
- g_object_unref (context);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]