[glib/portal: 4/17] Revert "Take the parent window id from the environment"



commit 4c24fab1babbf00efd5a7e5805d49231b262d39a
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 21 08:19:09 2016 -0400

    Revert "Take the parent window id from the environment"
    
    This reverts commit 4b44094309efe9a86bc0f3e6e687059ee55a90ab.

 gio/gdesktopappinfo.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index cd6abc2..9a2c784 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2907,19 +2907,12 @@ g_desktop_app_info_launch_uris_internal (GAppInfo                   *appinfo,
 
   session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
 
+  g_print ("show uris %s, have bus: %d, want portal %d\n",
+           uris ? (char *)uris->data : "", session_bus != NULL, should_use_portal ());
   if (session_bus && uris && should_use_portal ())
     {
       GDBusMessage *message;
       GVariantBuilder opt_builder;
-      const char *parent_window = NULL;
-
-      if (launch_context)
-        {
-          char **env;
-          env = g_app_launch_context_get_environment (launch_context);
-          parent_window = g_environ_getenv (env, "PARENT_WINDOW_ID");
-          g_strfreev (env);
-        }
 
       g_variant_builder_init (&opt_builder, G_VARIANT_TYPE_VARDICT);
 
@@ -2931,7 +2924,7 @@ g_desktop_app_info_launch_uris_internal (GAppInfo                   *appinfo,
       g_variant_builder_init (&opt_builder, G_VARIANT_TYPE_VARDICT);
 
       g_dbus_message_set_body (message, g_variant_new ("(ss a{sv})",
-                                                       parent_window ? parent_window : "",
+                                                       "", /*TODO find parent window */
                                                        (const char *)uris->data,
                                                        g_variant_builder_end (&opt_builder)));
 


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