diff --git a/gio/gactiongroup.c b/gio/gactiongroup.c index 735f016be..00e14846f 100644 --- a/gio/gactiongroup.c +++ b/gio/gactiongroup.c @@ -141,7 +141,9 @@ g_action_group_default_init (GActionGroupInterface *class) g_action_group_signals[SIGNAL_ACTION_STATE_CHANGED] = g_signal_new (I_("action-state-changed"), G_TYPE_ACTION_GROUP, - G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, + G_SIGNAL_RUN_LAST | + G_SIGNAL_DETAILED | + G_SIGNAL_MUST_COLLECT, G_STRUCT_OFFSET (GActionGroupInterface, action_state_changed), NULL, NULL, diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c index e9e7ecf4c..215992875 100644 --- a/gio/gdbusproxy.c +++ b/gio/gdbusproxy.c @@ -497,7 +497,7 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass) */ signals[PROPERTIES_CHANGED_SIGNAL] = g_signal_new ("g-properties-changed", G_TYPE_DBUS_PROXY, - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_LAST | G_SIGNAL_MUST_COLLECT, G_STRUCT_OFFSET (GDBusProxyClass, g_properties_changed), NULL, NULL, @@ -520,7 +520,7 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass) */ signals[SIGNAL_SIGNAL] = g_signal_new ("g-signal", G_TYPE_DBUS_PROXY, - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_LAST | G_SIGNAL_MUST_COLLECT, G_STRUCT_OFFSET (GDBusProxyClass, g_signal), NULL, NULL, @@ -1029,14 +1029,13 @@ on_name_owner_changed (GDBusConnection *connection, g_hash_table_size (proxy->priv->properties) > 0) { GVariantBuilder builder; - GVariant *changed_properties; GPtrArray *invalidated_properties; GHashTableIter iter; const gchar *key; /* Build changed_properties (always empty) and invalidated_properties ... */ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - changed_properties = g_variant_builder_end (&builder); + invalidated_properties = g_ptr_array_new_with_free_func (g_free); g_hash_table_iter_init (&iter, proxy->priv->properties); while (g_hash_table_iter_next (&iter, (gpointer) &key, NULL)) @@ -1049,9 +1048,8 @@ on_name_owner_changed (GDBusConnection *connection, /* ... and finally emit the ::g-properties-changed signal */ g_signal_emit (proxy, signals[PROPERTIES_CHANGED_SIGNAL], 0, - changed_properties, + g_variant_builder_end (&builder) /* consumed */, (const gchar* const *) invalidated_properties->pdata); - g_variant_unref (changed_properties); g_ptr_array_unref (invalidated_properties); } g_object_notify (G_OBJECT (proxy), "g-name-owner"); diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c index 388ead3de..2b06f2df8 100644 --- a/gio/gsimpleaction.c +++ b/gio/gsimpleaction.c @@ -323,7 +323,7 @@ g_simple_action_class_init (GSimpleActionClass *class) g_simple_action_signals[SIGNAL_ACTIVATE] = g_signal_new (I_("activate"), G_TYPE_SIMPLE_ACTION, - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_LAST | G_SIGNAL_MUST_COLLECT, G_STRUCT_OFFSET (GSimpleActionClass, activate), NULL, NULL, g_cclosure_marshal_VOID__VARIANT,