diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-03-21 12:24:44 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-03-21 12:24:44 -0500 |
commit | 4b9b0d04e5d800dc4927344c479f5d87c527fe4c (patch) | |
tree | bd07b01ba73362b642229f3cf5599b68d8f4b9f3 /src/indicator-session.c | |
parent | edd9186e435382b9f13d9c42a64c4778961814f5 (diff) | |
parent | 80f29374f243cd53e53bf662a0017cd4088d238a (diff) | |
download | ayatana-indicator-session-4b9b0d04e5d800dc4927344c479f5d87c527fe4c.tar.gz ayatana-indicator-session-4b9b0d04e5d800dc4927344c479f5d87c527fe4c.tar.bz2 ayatana-indicator-session-4b9b0d04e5d800dc4927344c479f5d87c527fe4c.zip |
Import upstream version 0.3.95
Diffstat (limited to 'src/indicator-session.c')
-rw-r--r-- | src/indicator-session.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c index 5d894e8..c6f4d9c 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -428,7 +428,7 @@ user_real_name_get_cb (GObject * obj, GAsyncResult * res, gpointer user_data) } const gchar* username = NULL; - g_variant_get (result, "(s)", &username); + g_variant_get (result, "(&s)", &username); indicator_session_update_users_label (self, username); return; } @@ -481,7 +481,7 @@ receive_signal (GDBusProxy * proxy, if (g_strcmp0(signal_name, "UserRealNameUpdated") == 0) { const gchar* username = NULL; - g_variant_get (parameters, "(s)", &username); + g_variant_get (parameters, "(&s)", &username); indicator_session_update_users_label (self, username); } else if (g_strcmp0(signal_name, "UserMenuIsVisible") == 0) { @@ -713,14 +713,8 @@ indicator_session_update_users_label (IndicatorSession* self, } GSettings* settings = g_settings_new ("com.canonical.indicator.session"); - gboolean use_name = g_settings_get_boolean (settings, - "show-real-name-on-panel"); + const gboolean use_name = g_settings_get_boolean (settings, "show-real-name-on-panel"); + gtk_label_set_text (self->users.label, name); + gtk_widget_set_visible (GTK_WIDGET(self->users.label), use_name); g_object_unref (settings); - gtk_label_set_text (self->users.label, g_strdup(name)); - if (use_name){ - gtk_widget_show(GTK_WIDGET(self->users.label)); - } - else{ - gtk_widget_hide(GTK_WIDGET(self->users.label)); - } } |