Merge lp:~alecu/ubuntuone-client/the-other-signal into lp:ubuntuone-client

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Natalia Bidart
Approved revision: 960
Merged at revision: 961
Proposed branch: lp:~alecu/ubuntuone-client/the-other-signal
Merge into: lp:ubuntuone-client
Prerequisite: lp:~alecu/ubuntuone-client/revert-dbus-interface-change
Diff against target: 51 lines (+27/-1)
1 file modified
libsyncdaemon/syncdaemon-authentication.c (+27/-1)
To merge this branch: bzr merge lp:~alecu/ubuntuone-client/the-other-signal
Reviewer Review Type Date Requested Status
Roman Yepishev (community) fieldtest Approve
Natalia Bidart (community) Approve
Review via email: mp+58190@code.launchpad.net

Commit message

Listen to the same DBus interface that Syncdaemon uses (LP: #759197)

Description of the change

Listen to the same DBus interface that Syncdaemon uses (LP: #759197)

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) wrote :

This is a simpler way to fix Bug #759197, because the previous one broke a few things and had to be reverted.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

To test this branch: create a new desktop user, log as it, check that there's no "Ubuntu One" bookmark on nautilus; then log into Ubuntu One (using a new or an existing user) and after logging into Ubuntu One the bookmark should be created.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

It works, code looks good.

review: Approve
Revision history for this message
Alejandro J. Cura (alecu) wrote :
Revision history for this message
Roman Yepishev (rye) wrote :

Works properly

review: Approve (fieldtest)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libsyncdaemon/syncdaemon-authentication.c'
--- libsyncdaemon/syncdaemon-authentication.c 2011-04-18 20:39:30 +0000
+++ libsyncdaemon/syncdaemon-authentication.c 2011-04-18 20:39:30 +0000
@@ -31,6 +31,7 @@
31struct _SyncdaemonAuthenticationPrivate {31struct _SyncdaemonAuthenticationPrivate {
32 DBusGConnection *bus;32 DBusGConnection *bus;
33 DBusGProxy *proxy;33 DBusGProxy *proxy;
34 DBusGProxy *newer_proxy;
34 gboolean has_credentials;35 gboolean has_credentials;
35 SyncdaemonCredentials *credentials;36 SyncdaemonCredentials *credentials;
36};37};
@@ -55,6 +56,8 @@
55 g_object_unref (G_OBJECT (auth->priv->credentials));56 g_object_unref (G_OBJECT (auth->priv->credentials));
56 if (auth->priv->proxy != NULL)57 if (auth->priv->proxy != NULL)
57 g_object_unref (G_OBJECT (auth->priv->proxy));58 g_object_unref (G_OBJECT (auth->priv->proxy));
59 if (auth->priv->newer_proxy != NULL)
60 g_object_unref (G_OBJECT (auth->priv->newer_proxy));
58 if (auth->priv->bus != NULL)61 if (auth->priv->bus != NULL)
59 dbus_g_connection_unref (auth->priv->bus);62 dbus_g_connection_unref (auth->priv->bus);
6063
@@ -192,7 +195,30 @@
192 dbus_g_proxy_connect_signal (auth->priv->proxy, "CredentialsError",195 dbus_g_proxy_connect_signal (auth->priv->proxy, "CredentialsError",
193 G_CALLBACK (credentials_error_cb), auth, NULL);196 G_CALLBACK (credentials_error_cb), auth, NULL);
194 } else197 } else
195 g_warning ("Couldn't get proxy for com.ubuntu.sso");198 g_warning ("Couldn't get proxy for com.ubuntu.sso.ApplicationCredentials");
199
200 auth->priv->newer_proxy = dbus_g_proxy_new_for_name (auth->priv->bus, "com.ubuntu.sso",
201 "/com/ubuntu/sso/credentials", "com.ubuntu.sso.CredentialsManagement");
202 if (auth->priv->newer_proxy != NULL) {
203 dbus_g_object_register_marshaller (_syncdaemon_marshal_VOID__STRING_POINTER,
204 G_TYPE_NONE,
205 G_TYPE_STRING,
206 dbus_g_type_get_map ("GHashTable",
207 G_TYPE_STRING,
208 G_TYPE_STRING),
209 G_TYPE_INVALID);
210
211 dbus_g_proxy_add_signal (auth->priv->newer_proxy, "CredentialsFound",
212 G_TYPE_STRING,
213 dbus_g_type_get_map ("GHashTable",
214 G_TYPE_STRING,
215 G_TYPE_STRING),
216 G_TYPE_INVALID);
217 dbus_g_proxy_connect_signal (auth->priv->newer_proxy, "CredentialsFound",
218 G_CALLBACK (credentials_found_cb), auth, NULL);
219 } else
220 g_warning ("Couldn't get proxy for com.ubuntu.sso.CredentialsManagement");
221
196 }222 }
197}223}
198224

Subscribers

People subscribed via source and target branches