diff options
author | Ray Strode <rstrode@redhat.com> | 2010-03-15 14:21:56 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2010-06-10 18:47:54 -0400 |
commit | 6a6f244f1a6e02c9f28903d2f4762019ffa161d9 (patch) | |
tree | 84b4bb91d7facde65add25ee5cb32a1314093f99 /gui/user-switch-applet | |
parent | e6f7e8643aeb45857c152ea71932be87cfcaad80 (diff) | |
download | gdm-6a6f244f1a6e02c9f28903d2f4762019ffa161d9.tar.gz |
Drop user properties in favor of a "changed" signal
This is less specific, but good enough, and will make
changing out the backend easier.
https://bugzilla.gnome.org/show_bug.cgi?id=610179
Diffstat (limited to 'gui/user-switch-applet')
-rw-r--r-- | gui/user-switch-applet/applet.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/gui/user-switch-applet/applet.c b/gui/user-switch-applet/applet.c index 8480e52d..411a1294 100644 --- a/gui/user-switch-applet/applet.c +++ b/gui/user-switch-applet/applet.c @@ -81,7 +81,6 @@ typedef struct _GdmAppletData guint client_notify_lockdown_id; guint current_status; - guint user_icon_changed_id; guint user_notify_id; gint8 pixel_size; gint panel_size; @@ -483,7 +482,6 @@ gdm_applet_data_free (GdmAppletData *adata) gconf_client_notify_remove (adata->client, adata->client_notify_lockdown_id); g_signal_handler_disconnect (adata->user, adata->user_notify_id); - g_signal_handler_disconnect (adata->user, adata->user_icon_changed_id); #ifdef BUILD_PRESENSE_STUFF if (adata->presence_proxy != NULL) { @@ -584,11 +582,12 @@ menuitem_style_set_cb (GtkWidget *menuitem, } static void -user_notify_display_name_cb (GObject *object, - GParamSpec *pspec, - GdmAppletData *adata) +on_user_changed (GdmUser *user, + GdmAppletData *adata) { + g_debug ("user changed"); update_label (adata); + reset_icon (adata); } /* Called every time the menu is displayed (and also for some reason @@ -1287,14 +1286,6 @@ reset_icon (GdmAppletData *adata) } static void -on_user_icon_changed (GdmUser *user, - GdmAppletData *adata) -{ - g_debug ("User icon changed"); - reset_icon (adata); -} - -static void setup_current_user (GdmAppletData *adata) { const char *name; @@ -1322,16 +1313,11 @@ setup_current_user (GdmAppletData *adata) if (adata->user != NULL) { reset_icon (adata); - adata->user_icon_changed_id = - g_signal_connect (adata->user, - "icon-changed", - G_CALLBACK (on_user_icon_changed), - adata); adata->user_notify_id = g_signal_connect (adata->user, - "notify::display-name", - G_CALLBACK (user_notify_display_name_cb), - adata); + "changed", + G_CALLBACK (on_user_changed), + adata); } } |