Merge lp:~indicator-applet-developers/ubuntu/precise/indicator-session/upstream into lp:~ubuntu-desktop/indicator-session/ubuntu

Proposed by Charles Kerr
Status: Merged
Merged at revision: 194
Proposed branch: lp:~indicator-applet-developers/ubuntu/precise/indicator-session/upstream
Merge into: lp:~ubuntu-desktop/indicator-session/ubuntu
Diff against target: 135 lines (+42/-16)
6 files modified
ChangeLog (+24/-0)
configure (+1/-1)
configure.ac (+1/-1)
debian/changelog (+7/-0)
src/device-menu-mgr.c (+4/-3)
src/indicator-session.c (+5/-11)
To merge this branch: bzr merge lp:~indicator-applet-developers/ubuntu/precise/indicator-session/upstream
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+98688@code.launchpad.net

Description of the change

0.3.95

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-03-14 18:34:16 +0000
3+++ ChangeLog 2012-03-21 17:33:21 +0000
4@@ -1,5 +1,29 @@
5 # Generated by Makefile. Do not edit.
6
7+2012-03-21 Charles Kerr <charles.kerr@canonical.com>
8+
9+ 0.3.95
10+
11+2012-03-19 Charles Kerr <charles.kerr@canonical.com>
12+
13+ Merge lp:~charlesk/indicator-session/lp-957342 to fix a pair of indicator-session memory leaks.
14+
15+2012-03-16 Charles Kerr <charles.kerr@canonical.com>
16+
17+ fix memory leak updating the username label -- gtk_label_set_text() takes a const char*, we don't need to g_strdup() the string before passing it in
18+
19+2012-03-16 Charles Kerr <charles.kerr@canonical.com>
20+
21+ plug two more memory leaks. g_variant_get("s") makes a newly-allocated duplicated string, g_variant_get("&s") returns the internal const string.
22+
23+2012-03-16 Charles Kerr <charles.kerr@canonical.com>
24+
25+ plug two leaked strings in keybinding_changed()
26+
27+2012-03-16 Charles Kerr <charles.kerr@canonical.com>
28+
29+ to pull a const string from g_variant_get(), use a format string "&s", not "s"
30+
31 2012-03-14 Charles Kerr <charles.kerr@canonical.com>
32
33 0.3.94
34
35=== modified file 'configure'
36--- configure 2012-03-14 18:34:16 +0000
37+++ configure 2012-03-21 17:33:21 +0000
38@@ -2774,7 +2774,7 @@
39
40 # Define the identity of the package.
41 PACKAGE=indicator-session
42- VERSION=0.3.94
43+ VERSION=0.3.95
44
45
46 cat >>confdefs.h <<_ACEOF
47
48=== modified file 'configure.ac'
49--- configure.ac 2012-03-14 18:38:20 +0000
50+++ configure.ac 2012-03-21 17:33:21 +0000
51@@ -4,7 +4,7 @@
52 AC_PREREQ(2.53)
53
54 AM_CONFIG_HEADER(config.h)
55-AM_INIT_AUTOMAKE(indicator-session, 0.3.94)
56+AM_INIT_AUTOMAKE(indicator-session, 0.3.95)
57
58 AM_MAINTAINER_MODE
59
60
61=== modified file 'debian/changelog'
62--- debian/changelog 2012-03-14 18:38:30 +0000
63+++ debian/changelog 2012-03-21 17:33:21 +0000
64@@ -1,3 +1,10 @@
65+indicator-session (0.3.95-0ubuntu1~ppa1) precise; urgency=low
66+
67+ * New upstream release.
68+ * Fix small memory leaks (lp: #957342)
69+
70+ -- Charles Kerr <charles.kerr@canonical.com> Wed, 21 Mar 2012 12:28:43 -0500
71+
72 indicator-session (0.3.94-0ubuntu1) precise; urgency=low
73
74 * New upstream release.
75
76=== removed directory 'debian/patches'
77=== modified file 'src/device-menu-mgr.c'
78--- src/device-menu-mgr.c 2012-02-23 14:40:17 +0000
79+++ src/device-menu-mgr.c 2012-03-21 17:33:21 +0000
80@@ -166,11 +166,12 @@
81 }
82
83 if (g_strcmp0 (key, KEY_LOCK_SCREEN) == 0) {
84- g_debug("Keybinding changed to: %s", g_settings_get_string(settings, key));
85+ gchar * val = g_settings_get_string(settings, key);
86+ g_debug("Keybinding changed to: %s", val);
87 if (lock_menuitem != NULL) {
88- dbusmenu_menuitem_property_set_shortcut_string (lock_menuitem,
89- g_settings_get_string(settings, key));
90+ dbusmenu_menuitem_property_set_shortcut_string (lock_menuitem, val);
91 }
92+ g_free (val);
93 }
94 return;
95 }
96
97=== modified file 'src/indicator-session.c'
98--- src/indicator-session.c 2012-02-23 15:17:10 +0000
99+++ src/indicator-session.c 2012-03-21 17:33:21 +0000
100@@ -428,7 +428,7 @@
101 }
102
103 const gchar* username = NULL;
104- g_variant_get (result, "(s)", &username);
105+ g_variant_get (result, "(&s)", &username);
106 indicator_session_update_users_label (self, username);
107 return;
108 }
109@@ -481,7 +481,7 @@
110
111 if (g_strcmp0(signal_name, "UserRealNameUpdated") == 0) {
112 const gchar* username = NULL;
113- g_variant_get (parameters, "(s)", &username);
114+ g_variant_get (parameters, "(&s)", &username);
115 indicator_session_update_users_label (self, username);
116 }
117 else if (g_strcmp0(signal_name, "UserMenuIsVisible") == 0) {
118@@ -713,14 +713,8 @@
119 }
120
121 GSettings* settings = g_settings_new ("com.canonical.indicator.session");
122- gboolean use_name = g_settings_get_boolean (settings,
123- "show-real-name-on-panel");
124+ const gboolean use_name = g_settings_get_boolean (settings, "show-real-name-on-panel");
125+ gtk_label_set_text (self->users.label, name);
126+ gtk_widget_set_visible (GTK_WIDGET(self->users.label), use_name);
127 g_object_unref (settings);
128- gtk_label_set_text (self->users.label, g_strdup(name));
129- if (use_name){
130- gtk_widget_show(GTK_WIDGET(self->users.label));
131- }
132- else{
133- gtk_widget_hide(GTK_WIDGET(self->users.label));
134- }
135 }

Subscribers

People subscribed via source and target branches