diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-03-19 14:46:55 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-03-19 14:46:55 -0500 |
commit | 909ef6f91edbadeae2823ba7fc6be8fe888f596a (patch) | |
tree | 4bad825f2717b123d12fd56cc1f629369020476d | |
parent | d2c9e397565f3be00a564107b6466d01250c0dbe (diff) | |
parent | ddd26808cecb8050db7438ee59b3bab3f6ba4612 (diff) | |
download | ayatana-indicator-session-909ef6f91edbadeae2823ba7fc6be8fe888f596a.tar.gz ayatana-indicator-session-909ef6f91edbadeae2823ba7fc6be8fe888f596a.tar.bz2 ayatana-indicator-session-909ef6f91edbadeae2823ba7fc6be8fe888f596a.zip |
Merge lp:~charlesk/indicator-session/lp-957342 to fix a pair of indicator-session memory leaks.
-rw-r--r-- | src/device-menu-mgr.c | 7 | ||||
-rw-r--r-- | src/indicator-session.c | 12 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index cfdb55d..d081937 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -166,11 +166,12 @@ keybinding_changed (GSettings *settings, } if (g_strcmp0 (key, KEY_LOCK_SCREEN) == 0) { - g_debug("Keybinding changed to: %s", g_settings_get_string(settings, key)); + gchar * val = g_settings_get_string(settings, key); + g_debug("Keybinding changed to: %s", val); if (lock_menuitem != NULL) { - dbusmenu_menuitem_property_set_shortcut_string (lock_menuitem, - g_settings_get_string(settings, key)); + dbusmenu_menuitem_property_set_shortcut_string (lock_menuitem, val); } + g_free (val); } return; } diff --git a/src/indicator-session.c b/src/indicator-session.c index 0051af1..c6f4d9c 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -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)); - } } |