Commit ca7743a6 authored by Cosimo Cecchi's avatar Cosimo Cecchi
Browse files

proxy: don't emit connected/added signals at object creation

It's unnecessary to emit those signals when the object is created, and
it can cause weird side-effects if applications e.g. play a sound on
signal emission.
parent 7c0308fd
......@@ -955,6 +955,7 @@ g_proxy_volume_monitor_constructor (GType type,
GObjectClass *parent_class;
GError *error;
const char *dbus_name;
gchar *name_owner;
G_LOCK (proxy_vm);
......@@ -1018,7 +1019,12 @@ g_proxy_volume_monitor_constructor (GType type,
/* listen to when the owner of the service appears/disappears */
g_signal_connect (monitor->proxy, "notify::g-name-owner", G_CALLBACK (name_owner_changed), monitor);
/* initially seed drives/volumes/mounts if we have an owner */
name_owner_changed (G_OBJECT (monitor->proxy), NULL, monitor);
name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY (monitor->proxy));
if (name_owner != NULL)
seed_monitor (monitor);
g_free (name_owner);
g_hash_table_insert (the_volume_monitors, (gpointer) type, object);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment