diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-06-04 21:26:53 +0800 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-06-04 21:26:53 +0800 |
commit | b1c7419f38db35c1793e1e080c612cfdb7d68b6b (patch) | |
tree | 8a9377603fc88fe3bb47bf258218858fa613ac3d /src | |
parent | ea5fbd90e9e36f1081cab4a0d2d92bc9eef25696 (diff) | |
download | gsoc2013-empathy-b1c7419f38db35c1793e1e080c612cfdb7d68b6b.tar gsoc2013-empathy-b1c7419f38db35c1793e1e080c612cfdb7d68b6b.tar.gz gsoc2013-empathy-b1c7419f38db35c1793e1e080c612cfdb7d68b6b.tar.bz2 gsoc2013-empathy-b1c7419f38db35c1793e1e080c612cfdb7d68b6b.tar.lz gsoc2013-empathy-b1c7419f38db35c1793e1e080c612cfdb7d68b6b.tar.xz gsoc2013-empathy-b1c7419f38db35c1793e1e080c612cfdb7d68b6b.tar.zst gsoc2013-empathy-b1c7419f38db35c1793e1e080c612cfdb7d68b6b.zip |
Keep a ref to the TpDBusDaemon so the NameOwnerChanged cb gets called.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-debug-dialog.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/empathy-debug-dialog.c b/src/empathy-debug-dialog.c index df62fa6b4..745b22b19 100644 --- a/src/empathy-debug-dialog.c +++ b/src/empathy-debug-dialog.c @@ -79,6 +79,7 @@ typedef struct GtkWidget *view; /* Connection */ + TpDBusDaemon *dbus; TpProxy *proxy; TpProxySignalConnection *new_debug_message_signal; TpProxySignalConnection *name_owner_changed_signal; @@ -522,10 +523,9 @@ static void debug_dialog_fill_cm_chooser (EmpathyDebugDialog *debug_dialog) { EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog); - TpDBusDaemon *dbus; GError *error = NULL; - dbus = tp_dbus_daemon_dup (&error); + priv->dbus = tp_dbus_daemon_dup (&error); if (error != NULL) { @@ -534,14 +534,12 @@ debug_dialog_fill_cm_chooser (EmpathyDebugDialog *debug_dialog) return; } - tp_list_connection_names (dbus, debug_dialog_list_connection_names_cb, + tp_list_connection_names (priv->dbus, debug_dialog_list_connection_names_cb, debug_dialog, NULL, NULL); priv->name_owner_changed_signal = - tp_cli_dbus_daemon_connect_to_name_owner_changed (dbus, + tp_cli_dbus_daemon_connect_to_name_owner_changed (priv->dbus, debug_dialog_name_owner_changed_cb, debug_dialog, NULL, NULL, NULL); - - g_object_unref (dbus); } static void @@ -1161,6 +1159,9 @@ debug_dialog_dispose (GObject *object) if (priv->cms != NULL) g_object_unref (priv->cms); + if (priv->dbus != NULL) + g_object_unref (priv->dbus); + (G_OBJECT_CLASS (empathy_debug_dialog_parent_class)->dispose) (object); } |