Merge lp:~dbusmenu-team/ubuntu/precise/libdbusmenu/upstream into lp:~ubuntu-desktop/libdbusmenu/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: 178
Proposed branch: lp:~dbusmenu-team/ubuntu/precise/libdbusmenu/upstream
Merge into: lp:~ubuntu-desktop/libdbusmenu/ubuntu
Diff against target: 417 lines (+88/-78)
12 files modified
AUTHORS (+1/-0)
ChangeLog (+36/-0)
configure (+11/-11)
configure.ac (+3/-3)
debian/changelog (+9/-0)
docs/libdbusmenu-glib/reference/html/ch01.html (+1/-1)
docs/libdbusmenu-glib/reference/version.xml (+1/-1)
docs/libdbusmenu-gtk/reference/html/ch01.html (+1/-1)
docs/libdbusmenu-gtk/reference/version.xml (+1/-1)
libdbusmenu-glib/client.c (+12/-0)
libdbusmenu-gtk/client.c (+12/-9)
libdbusmenu-gtk/parser.c (+0/-51)
To merge this branch: bzr merge lp:~dbusmenu-team/ubuntu/precise/libdbusmenu/upstream
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+98716@code.launchpad.net

Description of the change

0.5.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 'AUTHORS'
2--- AUTHORS 2012-02-23 06:00:41 +0000
3+++ AUTHORS 2012-03-21 19:38:20 +0000
4@@ -5,6 +5,7 @@
5 Ara Pulido
6 Aurelien Gateau
7 Aurélien Gâteau
8+ Charles Kerr
9 Chris Coulson
10 Cody Russell
11 David Barth
12
13=== modified file 'ChangeLog'
14--- ChangeLog 2012-03-09 20:21:04 +0000
15+++ ChangeLog 2012-03-21 19:38:20 +0000
16@@ -1,5 +1,41 @@
17 # Generated by Makefile. Do not edit.
18
19+2012-03-21 Ted Gould <ted@gould.cx>
20+
21+ 0.5.95
22+
23+2012-03-21 Charles Kerr <charles.kerr@canonical.com>
24+
25+ merge lp:~charlesk/dbusmenu/lp-953509 to fix a crash in dbusmenu-gtk's handling of menu icon theme changes
26+
27+2012-03-21 Charles Kerr <charles.kerr@canonical.com>
28+
29+ Don't listen for "changed" events from the screen's default GtkIconTheme. Fixes lp bug #953509
30+
31+ The crash in #953509 was being caused by the last two lines of theme_changed_cb() (a) leaving a dangling handler id in priv.theme_changed_sig, and (b) not remembering the handler id of its own signal connection. However after testing I don't see any reason to keep any of the theme handling code at all.
32+
33+ "But wait," you say. "How will our menu icons follow the theme changes?" It works in practice anyway because we always listen for property changes to our reference GtkImage, **and** we listen for property changes to its GtkImageMenuItem parent so that if the GtkImageMenuItem changes GtkImages we can stop listening to the old one and start listening to the new one.
34+
35+2012-03-20 Charles Kerr <charles.kerr@canonical.com>
36+
37+ merge lp:~ted/dbusmenu/regex_merge to fix a warning that comes up a lot with unity-panel-service about not having a label.
38+
39+2012-03-20 Ted Gould <ted@gould.cx>
40+
41+ Fix string leak
42+
43+2012-03-20 Ted Gould <ted@gould.cx>
44+
45+ Handle the case of the label being NULL which can happen on custom items
46+
47+2012-03-20 Ted Gould <ted@gould.cx>
48+
49+ Don't ask for a reply if no one cares
50+
51+2012-03-16 Ryan Lortie <desrt@desrt.ca>
52+
53+ glib client: don't request a reply on send_event() if nobody is listening for it
54+
55 2012-03-09 Ted Gould <ted@gould.cx>
56
57 0.5.94
58
59=== modified file 'configure'
60--- configure 2012-03-09 20:25:35 +0000
61+++ configure 2012-03-21 19:38:20 +0000
62@@ -1,6 +1,6 @@
63 #! /bin/sh
64 # Guess values for system-dependent variables and create Makefiles.
65-# Generated by GNU Autoconf 2.68 for libdbusmenu 0.5.94.
66+# Generated by GNU Autoconf 2.68 for libdbusmenu 0.5.95.
67 #
68 # Report bugs to <ted@canonical.com>.
69 #
70@@ -572,8 +572,8 @@
71 # Identity of this package.
72 PACKAGE_NAME='libdbusmenu'
73 PACKAGE_TARNAME='libdbusmenu'
74-PACKAGE_VERSION='0.5.94'
75-PACKAGE_STRING='libdbusmenu 0.5.94'
76+PACKAGE_VERSION='0.5.95'
77+PACKAGE_STRING='libdbusmenu 0.5.95'
78 PACKAGE_BUGREPORT='ted@canonical.com'
79 PACKAGE_URL=''
80
81@@ -1437,7 +1437,7 @@
82 # Omit some internal or obsolete options to make the list less imposing.
83 # This message is too long to be a string in the A/UX 3.1 sh.
84 cat <<_ACEOF
85-\`configure' configures libdbusmenu 0.5.94 to adapt to many kinds of systems.
86+\`configure' configures libdbusmenu 0.5.95 to adapt to many kinds of systems.
87
88 Usage: $0 [OPTION]... [VAR=VALUE]...
89
90@@ -1507,7 +1507,7 @@
91
92 if test -n "$ac_init_help"; then
93 case $ac_init_help in
94- short | recursive ) echo "Configuration of libdbusmenu 0.5.94:";;
95+ short | recursive ) echo "Configuration of libdbusmenu 0.5.95:";;
96 esac
97 cat <<\_ACEOF
98
99@@ -1656,7 +1656,7 @@
100 test -n "$ac_init_help" && exit $ac_status
101 if $ac_init_version; then
102 cat <<\_ACEOF
103-libdbusmenu configure 0.5.94
104+libdbusmenu configure 0.5.95
105 generated by GNU Autoconf 2.68
106
107 Copyright (C) 2010 Free Software Foundation, Inc.
108@@ -2027,7 +2027,7 @@
109 This file contains any messages produced by compilers while
110 running configure, to aid debugging if configure makes a mistake.
111
112-It was created by libdbusmenu $as_me 0.5.94, which was
113+It was created by libdbusmenu $as_me 0.5.95, which was
114 generated by GNU Autoconf 2.68. Invocation command line was
115
116 $ $0 $@
117@@ -2848,7 +2848,7 @@
118
119 # Define the identity of the package.
120 PACKAGE=libdbusmenu
121- VERSION=0.5.94
122+ VERSION=0.5.95
123
124
125 # Some tools Automake needs.
126@@ -14423,7 +14423,7 @@
127 ###########################
128
129 LIBDBUSMENU_CURRENT=4
130-LIBDBUSMENU_REVISION=11
131+LIBDBUSMENU_REVISION=12
132 LIBDBUSMENU_AGE=0
133
134
135@@ -15777,7 +15777,7 @@
136 # report actual input values of CONFIG_FILES etc. instead of their
137 # values after options handling.
138 ac_log="
139-This file was extended by libdbusmenu $as_me 0.5.94, which was
140+This file was extended by libdbusmenu $as_me 0.5.95, which was
141 generated by GNU Autoconf 2.68. Invocation command line was
142
143 CONFIG_FILES = $CONFIG_FILES
144@@ -15843,7 +15843,7 @@
145 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
146 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
147 ac_cs_version="\\
148-libdbusmenu config.status 0.5.94
149+libdbusmenu config.status 0.5.95
150 configured by $0, generated by GNU Autoconf 2.68,
151 with options \\"\$ac_cs_config\\"
152
153
154=== modified file 'configure.ac'
155--- configure.ac 2012-03-09 20:25:35 +0000
156+++ configure.ac 2012-03-21 19:38:20 +0000
157@@ -1,11 +1,11 @@
158
159-AC_INIT(libdbusmenu, 0.5.94, ted@canonical.com)
160+AC_INIT(libdbusmenu, 0.5.95, ted@canonical.com)
161 AC_COPYRIGHT([Copyright 2009,2010 Canonical])
162
163 AC_PREREQ(2.62)
164
165 AM_CONFIG_HEADER(config.h)
166-AM_INIT_AUTOMAKE(libdbusmenu, 0.5.94, [-Wno-portability])
167+AM_INIT_AUTOMAKE(libdbusmenu, 0.5.95, [-Wno-portability])
168
169 AM_MAINTAINER_MODE
170
171@@ -165,7 +165,7 @@
172 ###########################
173
174 LIBDBUSMENU_CURRENT=4
175-LIBDBUSMENU_REVISION=11
176+LIBDBUSMENU_REVISION=12
177 LIBDBUSMENU_AGE=0
178
179 AC_SUBST(LIBDBUSMENU_CURRENT)
180
181=== modified file 'debian/changelog'
182--- debian/changelog 2012-03-12 14:07:56 +0000
183+++ debian/changelog 2012-03-21 19:38:20 +0000
184@@ -1,3 +1,12 @@
185+libdbusmenu (0.5.95-0ubuntu1~ppa1) precise; urgency=low
186+
187+ * New upstream release.
188+ * Fix theme change bug (LP: #953509)
189+ * Don't request event responses if no one is listening
190+ * Fix a warning on custom menu items without labels
191+
192+ -- Ted Gould <ted@ubuntu.com> Wed, 21 Mar 2012 14:33:32 -0500
193+
194 libdbusmenu (0.5.94-0ubuntu1) precise; urgency=low
195
196 * New upstream release.
197
198=== modified file 'docs/libdbusmenu-glib/reference/html/ch01.html'
199--- docs/libdbusmenu-glib/reference/html/ch01.html 2012-03-09 20:21:04 +0000
200+++ docs/libdbusmenu-glib/reference/html/ch01.html 2012-03-21 19:38:20 +0000
201@@ -21,7 +21,7 @@
202 </tr></table>
203 <div class="chapter">
204 <div class="titlepage"><div><div><h2 class="title">
205-<a name="idp3882768"></a>API</h2></div></div></div>
206+<a name="idp5150560"></a>API</h2></div></div></div>
207 <div class="toc"><dl>
208 <dt>
209 <span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"> — The server signals changed and
210
211=== modified file 'docs/libdbusmenu-glib/reference/version.xml'
212--- docs/libdbusmenu-glib/reference/version.xml 2012-03-09 20:25:35 +0000
213+++ docs/libdbusmenu-glib/reference/version.xml 2012-03-21 19:38:20 +0000
214@@ -1,1 +1,1 @@
215-0.5.94
216+0.5.95
217
218=== modified file 'docs/libdbusmenu-gtk/reference/html/ch01.html'
219--- docs/libdbusmenu-gtk/reference/html/ch01.html 2012-03-09 20:21:04 +0000
220+++ docs/libdbusmenu-gtk/reference/html/ch01.html 2012-03-21 19:38:20 +0000
221@@ -21,7 +21,7 @@
222 </tr></table>
223 <div class="chapter">
224 <div class="titlepage"><div><div><h2 class="title">
225-<a name="idp3527472"></a>API</h2></div></div></div>
226+<a name="idp2311712"></a>API</h2></div></div></div>
227 <div class="toc"><dl>
228 <dt>
229 <span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"> — A GTK Menu Object that syncronizes over DBus</span>
230
231=== modified file 'docs/libdbusmenu-gtk/reference/version.xml'
232--- docs/libdbusmenu-gtk/reference/version.xml 2012-03-09 20:25:35 +0000
233+++ docs/libdbusmenu-gtk/reference/version.xml 2012-03-21 19:38:20 +0000
234@@ -1,1 +1,1 @@
235-0.5.94
236+0.5.95
237
238=== modified file 'libdbusmenu-glib/client.c'
239--- libdbusmenu-glib/client.c 2012-03-08 16:01:54 +0000
240+++ libdbusmenu-glib/client.c 2012-03-21 19:38:20 +0000
241@@ -1540,6 +1540,18 @@
242 variant = g_variant_new_int32(0);
243 }
244
245+ /* Don't bother with the reply handling if nobody is watching... */
246+ if (!g_signal_has_handler_pending (client, signals[EVENT_RESULT], 0, TRUE)) {
247+ g_dbus_proxy_call(priv->menuproxy,
248+ "Event",
249+ g_variant_new("(isvu)", id, name, variant, timestamp),
250+ G_DBUS_CALL_FLAGS_NONE,
251+ 1000, /* timeout */
252+ NULL, /* cancellable */
253+ NULL, NULL);
254+ return;
255+ }
256+
257 event_data_t * edata = g_new0(event_data_t, 1);
258 edata->client = client;
259 g_object_ref(client);
260
261=== modified file 'libdbusmenu-gtk/client.c'
262--- libdbusmenu-gtk/client.c 2012-03-09 20:25:35 +0000
263+++ libdbusmenu-gtk/client.c 2012-03-21 19:38:20 +0000
264@@ -738,24 +738,27 @@
265
266 if (variant != NULL) {
267 const gchar * setname = NULL;
268- setname = g_variant_dup_string(variant, NULL);
269+ setname = g_variant_get_string(variant, NULL);
270 atk_object_set_name(aobj, setname);
271 } else {
272 /* The atk docs advise to set the name of the atk object to an empty
273 * string, but GTK doesn't yet do the same, and setting the name to NULL
274 * causes tests to fail.
275 */
276- gchar * setname = NULL;
277 const gchar * label = NULL;
278- /* We don't want the underscore for mnewmonics */
279 label = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL);
280
281- GRegex * regex = g_regex_new ("_", 0, 0, NULL);
282- setname = g_regex_replace_literal (regex, label, -1, 0, "", 0, NULL);
283- g_regex_unref(regex);
284-
285- atk_object_set_name(aobj, setname);
286- g_free(setname);
287+ if (label != NULL) {
288+ gchar * setname = NULL;
289+
290+ /* We don't want the underscore for mnewmonics */
291+ GRegex * regex = g_regex_new ("_", 0, 0, NULL);
292+ setname = g_regex_replace_literal (regex, label, -1, 0, "", 0, NULL);
293+ g_regex_unref(regex);
294+
295+ atk_object_set_name(aobj, setname);
296+ g_free(setname);
297+ }
298 }
299
300 return;
301
302=== modified file 'libdbusmenu-gtk/parser.c'
303--- libdbusmenu-gtk/parser.c 2012-03-09 20:25:35 +0000
304+++ libdbusmenu-gtk/parser.c 2012-03-21 19:38:20 +0000
305@@ -45,7 +45,6 @@
306 GtkWidget *image;
307 AtkObject *accessible;
308
309- guint theme_changed_sig;
310 } ParserData;
311
312 typedef struct _RecurseContext
313@@ -86,8 +85,6 @@
314 static void item_removed_cb (GtkContainer * menu,
315 GtkWidget * widget,
316 gpointer data);
317-static void theme_changed_cb (GtkIconTheme * theme,
318- gpointer data);
319 static void item_activated (DbusmenuMenuitem * item,
320 guint timestamp,
321 gpointer user_data);
322@@ -216,29 +213,11 @@
323 g_object_remove_weak_pointer(G_OBJECT(pdata->accessible), (gpointer*)&pdata->accessible);
324 }
325
326- if (pdata != NULL && pdata->theme_changed_sig != 0) {
327- g_signal_handler_disconnect(gtk_icon_theme_get_default(), pdata->theme_changed_sig);
328- pdata->theme_changed_sig = 0;
329- }
330-
331 g_free(pdata);
332
333 return;
334 }
335
336-static void
337-widget_freed (gpointer data, GObject * obj)
338-{
339- ParserData * pdata = (ParserData *)data;
340-
341- if (pdata->theme_changed_sig != 0) {
342- g_signal_handler_disconnect(gtk_icon_theme_get_default(), pdata->theme_changed_sig);
343- pdata->theme_changed_sig = 0;
344- }
345-
346- return;
347-}
348-
349 /* Called when the dbusmenu item that we're keeping around
350 is finalized */
351 static void
352@@ -247,12 +226,7 @@
353 ParserData *pdata = (ParserData *)g_object_get_data(G_OBJECT(obj), PARSER_DATA);
354
355 if (pdata != NULL && pdata->widget != NULL) {
356- if (pdata->theme_changed_sig != 0) {
357- g_signal_handler_disconnect(gtk_icon_theme_get_default(), pdata->theme_changed_sig);
358- pdata->theme_changed_sig = 0;
359- }
360 g_object_steal_data(G_OBJECT(pdata->widget), CACHED_MENUITEM);
361- g_object_weak_unref(G_OBJECT(pdata->widget), widget_freed, pdata);
362 }
363 }
364
365@@ -294,7 +268,6 @@
366 g_object_set_data_full(G_OBJECT(item), PARSER_DATA, pdata, parse_data_free);
367
368 g_object_weak_ref(G_OBJECT(item), dbusmenu_item_freed, NULL);
369- g_object_weak_ref(G_OBJECT(widget), widget_freed, pdata);
370
371 pdata->widget = widget;
372 g_object_add_weak_pointer(G_OBJECT (widget), (gpointer*)&pdata->widget);
373@@ -757,10 +730,6 @@
374 we can't get it easily, and those mean it's not changed just the icon
375 underneith, so we can ignore these larger impacts */
376 if (image != GTK_IMAGE(pdata->image) && gmenuitem != NULL) {
377- if (pdata->theme_changed_sig != 0) {
378- g_signal_handler_disconnect(gtk_icon_theme_get_default(), pdata->theme_changed_sig);
379- pdata->theme_changed_sig = 0;
380- }
381
382 if (pdata->image != NULL) {
383 g_signal_handlers_disconnect_by_func(pdata->image, G_CALLBACK(image_notify_cb), menuitem);
384@@ -770,8 +739,6 @@
385 pdata->image = GTK_WIDGET(image);
386
387 if (pdata->image != NULL) {
388- pdata->theme_changed_sig = g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()),
389- "changed", G_CALLBACK(theme_changed_cb), gmenuitem);
390 g_signal_connect (G_OBJECT (pdata->image),
391 "notify",
392 G_CALLBACK (image_notify_cb),
393@@ -1287,24 +1254,6 @@
394 return;
395 }
396
397-static void
398-theme_changed_cb (GtkIconTheme *theme, gpointer data)
399-{
400- GtkWidget *image;
401-
402- image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (data));
403-
404- gpointer pmi = g_object_get_data(G_OBJECT(data), CACHED_MENUITEM);
405- if (pmi != NULL) {
406- ParserData *pdata = (ParserData *)g_object_get_data(G_OBJECT(pmi), PARSER_DATA);
407- update_icon(DBUSMENU_MENUITEM(pmi), pdata, NULL, GTK_IMAGE(image));
408- }
409-
410- /* Switch signal to new theme */
411- g_signal_handlers_disconnect_by_func(theme, G_CALLBACK(theme_changed_cb), data);
412- g_signal_connect(gtk_icon_theme_get_default(), "changed", G_CALLBACK(theme_changed_cb), data);
413-}
414-
415 static gboolean
416 should_show_image (GtkImage *image)
417 {

Subscribers

People subscribed via source and target branches

to all changes: