]> www.fi.muni.cz Git - evince.git/commitdiff
Use g_app_info_launch_uris() instead of g_app_info_launch()
authorDennis Sheil <dennis-evince@vartmp.com>
Fri, 18 Mar 2011 05:30:34 +0000 (01:30 -0400)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 20 Mar 2011 10:20:52 +0000 (11:20 +0100)
The g_app_info_launch() call munges the URI.  Fixes bug #644604.

shell/ev-application.c

index 0c65eec286f809d040d850b7d7ba2f240c99fb35..21f7a3a285dfa1420ae25d70f2211e8f0053d9f3 100644 (file)
@@ -283,18 +283,20 @@ ev_spawn (const char     *uri,
                break;
        }
 
-       g_string_append_printf (cmd, " %s", uri);
-
        cmdline = g_string_free (cmd, FALSE);
        app = g_app_info_create_from_commandline (cmdline, NULL, 0, &error);
 
        if (app != NULL) {
+                GList uri_list;
+
                ctx = gdk_display_get_app_launch_context (gdk_screen_get_display (screen));
                gdk_app_launch_context_set_screen (ctx, screen);
                gdk_app_launch_context_set_timestamp (ctx, timestamp);
 
-               g_app_info_launch (app, NULL,
-                                  G_APP_LAUNCH_CONTEXT (ctx), &error);
+                uri_list.data = (gchar *)uri;
+                uri_list.prev = uri_list.next = NULL;
+               g_app_info_launch_uris (app, &uri_list,
+                                        G_APP_LAUNCH_CONTEXT (ctx), &error);
 
                g_object_unref (app);
                g_object_unref (ctx);