gucharmap r1864 - trunk/gucharmap



Author: chpe
Date: Thu Aug 28 19:51:20 2008
New Revision: 1864
URL: http://svn.gnome.org/viewvc/gucharmap?rev=1864&view=rev

Log:
Use gtk_show_uri here.

Modified:
   trunk/gucharmap/gucharmap-window.c

Modified: trunk/gucharmap/gucharmap-window.c
==============================================================================
--- trunk/gucharmap/gucharmap-window.c	(original)
+++ trunk/gucharmap/gucharmap-window.c	Thu Aug 28 19:51:20 2008
@@ -394,21 +394,15 @@
           const char *uri,
           guint32 user_time)
 {
-  GdkAppLaunchContext *context;
+  GdkScreen *screen;
   GError *error = NULL;
 
-  context = gdk_app_launch_context_new ();
-  gdk_app_launch_context_set_timestamp (context, user_time);
-
   if (parent)
-    gdk_app_launch_context_set_screen (context, gtk_widget_get_screen (GTK_WIDGET (parent)));
+    screen = gtk_widget_get_screen (GTK_WIDGET (parent));
   else
-    gdk_app_launch_context_set_screen (context, gdk_screen_get_default ());
-
-  g_app_info_launch_default_for_uri (uri, G_APP_LAUNCH_CONTEXT (context), &error);
-  g_object_unref (context);
+    screen = gdk_screen_get_default ();
 
-  if (error) {
+  if (!gtk_show_uri (screen, uri, user_time, &error)) {
     show_error_dialog (parent, error);
     g_error_free (error);
   }



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