[gnome-builder/wip/chergert/dspy: 5/11] dspy: update Pid of activatable name upon NameOwnerChanged



commit 417544030c0133852673d0a9b5e4075824f77778
Author: Christian Hergert <chergert redhat com>
Date:   Fri Apr 12 01:54:13 2019 -0700

    dspy: update Pid of activatable name upon NameOwnerChanged

 src/plugins/dspy/dspy-connection-model.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/src/plugins/dspy/dspy-connection-model.c b/src/plugins/dspy/dspy-connection-model.c
index c89dedbe7..a0affcab4 100644
--- a/src/plugins/dspy/dspy-connection-model.c
+++ b/src/plugins/dspy/dspy-connection-model.c
@@ -335,6 +335,22 @@ dspy_connection_model_name_owner_changed_cb (GDBusConnection *connection,
           g_list_model_items_changed (G_LIST_MODEL (self), position, 1, 0);
         }
     }
+  else
+    {
+      DspyName *item = g_sequence_get (seq);
+
+      if (vnew_name[0] == ':')
+        dspy_name_set_owner (name, vnew_name);
+
+      g_dbus_proxy_call (self->bus_proxy,
+                         "GetConnectionUnixProcessID",
+                         g_variant_new ("(s)", vname),
+                         G_DBUS_CALL_FLAGS_NONE,
+                         -1,
+                         self->cancellable,
+                         dspy_connection_model_get_process_id_cb,
+                         g_object_ref (item));
+    }
 
 #if 0
   g_print ("%s %s %s %s %s\n",


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