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

Proposed by Ted Gould
Status: Merged
Merged at revision: 137
Proposed branch: lp:~dbusmenu-team/libdbusmenu/ubuntu
Merge into: lp:~ubuntu-desktop/libdbusmenu/ubuntu
Diff against target: 572 lines (+229/-47)
13 files modified
ChangeLog (+78/-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 (+23/-5)
libdbusmenu-glib/defaults.c (+2/-2)
libdbusmenu-gtk/menuitem.c (+16/-5)
libdbusmenu-gtk/parser.c (+81/-15)
ltmain.sh (+2/-2)
To merge this branch: bzr merge lp:~dbusmenu-team/libdbusmenu/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+55811@code.launchpad.net

Description of the change

Release 0.4.1

To post a comment you must log in.
lp:~dbusmenu-team/libdbusmenu/ubuntu updated
137. By Ken VanDine

releasing version 0.4.1-0ubuntu1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-03-23 19:46:23 +0000
3+++ ChangeLog 2011-03-31 18:59:23 +0000
4@@ -1,5 +1,83 @@
5 # Generated by Makefile. Do not edit.
6
7+2011-03-31 Ted Gould <ted@gould.cx>
8+
9+ 0.4.1
10+
11+2011-03-31 Ted Gould <ted@gould.cx>
12+
13+ Ensuring that our iterators have variants to reference and ref'ing them correctly.
14+
15+2011-03-29 Ted Gould <ted@gould.cx>
16+
17+ Be more specific about the shortcut type
18+
19+2011-03-29 Ted Gould <ted@gould.cx>
20+
21+ Split out into another variable
22+
23+2011-03-28 Ted Gould <ted@gould.cx>
24+
25+ Use loop instead of next
26+
27+2011-03-28 Ted Gould <ted@gould.cx>
28+
29+ Putting in some protections from NULL parameters.
30+
31+2011-03-28 Ted Gould <ted@gould.cx>
32+
33+ Don't unref a variant we didn't have a ref to on error
34+
35+2011-03-31 Ted Gould <ted@gould.cx>
36+
37+ Turning GTK Menuitems without labels into separators.
38+
39+2011-03-30 Chris Coulson <chrisccoulson@ubuntu.com>
40+
41+ Remove some code duplication introduced in this branch
42+
43+2011-03-30 Chris Coulson <chrisccoulson@ubuntu.com>
44+
45+ - Don't change the type of existing menu items in the server. This
46+ isn't handled in the client too well
47+ - Handle a GtkMenuItem's GtkLabel being removed too
48+
49+2011-03-30 Chris Coulson <chrisccoulson@ubuntu.com>
50+
51+ Remove the now unneeded null pointer check on label in construct_dbusmenu_for_widget.
52+ Also, don't use a strcmp in widget_notify_cb for checking if the menuitem is a separator. Just do a null pointer
53+ check on pdata->label instead
54+
55+2011-03-30 Chris Coulson <chrisccoulson@ubuntu.com>
56+
57+ Revert the last commit and handle the same problem in the parser instead
58+
59+2011-03-29 Chris Coulson <chrisccoulson@ubuntu.com>
60+
61+ Don't set a default label for menuitems. Some applications (eg, xchat and pidgin) do silly things like
62+ creating GtkMenuItems's without a label for separators (rather than using the GtkSeparatorMenuItem class).
63+ GTK correctly renders these as separators, so we need to handle it too by not setting a default label on these
64+
65+2011-03-28 Ted Gould <ted@gould.cx>
66+
67+ Ensure the parent stays ref'd
68+
69+2011-03-25 Michael Terry <mike@mterry.name>
70+
71+ fix some potential memory issues in hopes of fixing a reported crash
72+
73+2011-03-28 Ted Gould <ted@gould.cx>
74+
75+ Protect our properties parsing a bit more.
76+
77+2011-03-24 Ted Gould <ted@gould.cx>
78+
79+ Attaching bug
80+
81+2011-03-24 Ted Gould <ted@gould.cx>
82+
83+ Put in some more protections on the types for property variants and generate some errors
84+
85 2011-03-23 Ted Gould <ted@gould.cx>
86
87 0.4.0
88
89=== modified file 'configure'
90--- configure 2011-03-23 19:48:54 +0000
91+++ configure 2011-03-31 18:59:23 +0000
92@@ -1,6 +1,6 @@
93 #! /bin/sh
94 # Guess values for system-dependent variables and create Makefiles.
95-# Generated by GNU Autoconf 2.67 for libdbusmenu 0.4.0.
96+# Generated by GNU Autoconf 2.67 for libdbusmenu 0.4.1.
97 #
98 # Report bugs to <ted@canonical.com>.
99 #
100@@ -703,8 +703,8 @@
101 # Identity of this package.
102 PACKAGE_NAME='libdbusmenu'
103 PACKAGE_TARNAME='libdbusmenu'
104-PACKAGE_VERSION='0.4.0'
105-PACKAGE_STRING='libdbusmenu 0.4.0'
106+PACKAGE_VERSION='0.4.1'
107+PACKAGE_STRING='libdbusmenu 0.4.1'
108 PACKAGE_BUGREPORT='ted@canonical.com'
109 PACKAGE_URL=''
110
111@@ -1541,7 +1541,7 @@
112 # Omit some internal or obsolete options to make the list less imposing.
113 # This message is too long to be a string in the A/UX 3.1 sh.
114 cat <<_ACEOF
115-\`configure' configures libdbusmenu 0.4.0 to adapt to many kinds of systems.
116+\`configure' configures libdbusmenu 0.4.1 to adapt to many kinds of systems.
117
118 Usage: $0 [OPTION]... [VAR=VALUE]...
119
120@@ -1611,7 +1611,7 @@
121
122 if test -n "$ac_init_help"; then
123 case $ac_init_help in
124- short | recursive ) echo "Configuration of libdbusmenu 0.4.0:";;
125+ short | recursive ) echo "Configuration of libdbusmenu 0.4.1:";;
126 esac
127 cat <<\_ACEOF
128
129@@ -1751,7 +1751,7 @@
130 test -n "$ac_init_help" && exit $ac_status
131 if $ac_init_version; then
132 cat <<\_ACEOF
133-libdbusmenu configure 0.4.0
134+libdbusmenu configure 0.4.1
135 generated by GNU Autoconf 2.67
136
137 Copyright (C) 2010 Free Software Foundation, Inc.
138@@ -2122,7 +2122,7 @@
139 This file contains any messages produced by compilers while
140 running configure, to aid debugging if configure makes a mistake.
141
142-It was created by libdbusmenu $as_me 0.4.0, which was
143+It was created by libdbusmenu $as_me 0.4.1, which was
144 generated by GNU Autoconf 2.67. Invocation command line was
145
146 $ $0 $@
147@@ -2943,7 +2943,7 @@
148
149 # Define the identity of the package.
150 PACKAGE=libdbusmenu
151- VERSION=0.4.0
152+ VERSION=0.4.1
153
154
155 # Some tools Automake needs.
156@@ -13294,7 +13294,7 @@
157 ###########################
158
159 LIBDBUSMENU_CURRENT=3
160-LIBDBUSMENU_REVISION=11
161+LIBDBUSMENU_REVISION=12
162 LIBDBUSMENU_AGE=0
163
164
165@@ -14616,7 +14616,7 @@
166 # report actual input values of CONFIG_FILES etc. instead of their
167 # values after options handling.
168 ac_log="
169-This file was extended by libdbusmenu $as_me 0.4.0, which was
170+This file was extended by libdbusmenu $as_me 0.4.1, which was
171 generated by GNU Autoconf 2.67. Invocation command line was
172
173 CONFIG_FILES = $CONFIG_FILES
174@@ -14682,7 +14682,7 @@
175 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
176 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
177 ac_cs_version="\\
178-libdbusmenu config.status 0.4.0
179+libdbusmenu config.status 0.4.1
180 configured by $0, generated by GNU Autoconf 2.67,
181 with options \\"\$ac_cs_config\\"
182
183
184=== modified file 'configure.ac'
185--- configure.ac 2011-03-23 19:48:54 +0000
186+++ configure.ac 2011-03-31 18:59:23 +0000
187@@ -1,11 +1,11 @@
188
189-AC_INIT(libdbusmenu, 0.4.0, ted@canonical.com)
190+AC_INIT(libdbusmenu, 0.4.1, ted@canonical.com)
191 AC_COPYRIGHT([Copyright 2009,2010 Canonical])
192
193 AC_PREREQ(2.62)
194
195 AM_CONFIG_HEADER(config.h)
196-AM_INIT_AUTOMAKE(libdbusmenu, 0.4.0, [-Wno-portability])
197+AM_INIT_AUTOMAKE(libdbusmenu, 0.4.1, [-Wno-portability])
198
199 AM_MAINTAINER_MODE
200
201@@ -134,7 +134,7 @@
202 ###########################
203
204 LIBDBUSMENU_CURRENT=3
205-LIBDBUSMENU_REVISION=11
206+LIBDBUSMENU_REVISION=12
207 LIBDBUSMENU_AGE=0
208
209 AC_SUBST(LIBDBUSMENU_CURRENT)
210
211=== modified file 'debian/changelog'
212--- debian/changelog 2011-03-28 19:15:29 +0000
213+++ debian/changelog 2011-03-31 18:59:23 +0000
214@@ -1,3 +1,12 @@
215+libdbusmenu (0.4.1-0ubuntu1~ppa1) natty; urgency=low
216+
217+ * New upstream release.
218+ * Managed variant iterators better to stop crash when dealing
219+ with apps that have multiple shortcuts (LP: #741726)
220+ * Handled GtkMenuItems with no labels as separators (LP: #729187)
221+
222+ -- Ted Gould <ted@ubuntu.com> Thu, 31 Mar 2011 13:56:54 -0500
223+
224 libdbusmenu (0.4.0-0ubuntu2) natty; urgency=low
225
226 * Cherry picked fix for potential memory issues to fix unity-panel-service
227
228=== modified file 'docs/libdbusmenu-glib/reference/html/ch01.html'
229--- docs/libdbusmenu-glib/reference/html/ch01.html 2011-03-23 19:46:23 +0000
230+++ docs/libdbusmenu-glib/reference/html/ch01.html 2011-03-31 18:59:23 +0000
231@@ -21,7 +21,7 @@
232 </tr></table>
233 <div class="chapter">
234 <div class="titlepage"><div><div><h2 class="title">
235-<a name="id440860"></a>API</h2></div></div></div>
236+<a name="id471000"></a>API</h2></div></div></div>
237 <div class="toc"><dl>
238 <dt>
239 <span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"> — The server signals changed and
240
241=== modified file 'docs/libdbusmenu-glib/reference/version.xml'
242--- docs/libdbusmenu-glib/reference/version.xml 2011-03-23 19:48:54 +0000
243+++ docs/libdbusmenu-glib/reference/version.xml 2011-03-31 18:59:23 +0000
244@@ -1,1 +1,1 @@
245-0.4.0
246+0.4.1
247
248=== modified file 'docs/libdbusmenu-gtk/reference/html/ch01.html'
249--- docs/libdbusmenu-gtk/reference/html/ch01.html 2011-03-23 19:46:23 +0000
250+++ docs/libdbusmenu-gtk/reference/html/ch01.html 2011-03-31 18:59:23 +0000
251@@ -21,7 +21,7 @@
252 </tr></table>
253 <div class="chapter">
254 <div class="titlepage"><div><div><h2 class="title">
255-<a name="id331770"></a>API</h2></div></div></div>
256+<a name="id520868"></a>API</h2></div></div></div>
257 <div class="toc"><dl>
258 <dt>
259 <span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"> — A GTK Menu Object that syncronizes over DBus</span>
260
261=== modified file 'docs/libdbusmenu-gtk/reference/version.xml'
262--- docs/libdbusmenu-gtk/reference/version.xml 2011-03-23 19:48:54 +0000
263+++ docs/libdbusmenu-gtk/reference/version.xml 2011-03-31 18:59:23 +0000
264@@ -1,1 +1,1 @@
265-0.4.0
266+0.4.1
267
268=== modified file 'libdbusmenu-glib/client.c'
269--- libdbusmenu-glib/client.c 2011-03-28 19:15:29 +0000
270+++ libdbusmenu-glib/client.c 2011-03-31 18:59:23 +0000
271@@ -1334,8 +1334,16 @@
272
273 if (error != NULL) {
274 g_warning("Error getting properties on a menuitem: %s", error->message);
275- g_object_unref(data);
276- return;
277+ goto out;
278+ }
279+
280+ if (properties == NULL) {
281+ goto out;
282+ }
283+
284+ if (!g_variant_is_of_type(properties, G_VARIANT_TYPE("a{sv}"))) {
285+ g_warning("Properties are of type '%s' instead of type '%s'", g_variant_get_type_string(properties), "a{sv}");
286+ goto out;
287 }
288
289 GVariantIter iter;
290@@ -1348,6 +1356,7 @@
291 dbusmenu_menuitem_property_set_variant(item, key, value);
292 }
293
294+out:
295 g_object_unref(data);
296
297 return;
298@@ -1366,12 +1375,16 @@
299 g_warning("Unable to replace properties on %d: %s", dbusmenu_menuitem_get_id(DBUSMENU_MENUITEM(data)), error->message);
300 have_error = TRUE;
301 }
302+
303+ if (properties == NULL) {
304+ have_error = TRUE;
305+ }
306
307 /* Get the list of the current properties */
308 GList * current_props = dbusmenu_menuitem_properties_list(DBUSMENU_MENUITEM(data));
309 GList * tmp = NULL;
310
311- if (properties != NULL && have_error == FALSE) {
312+ if (!have_error && g_variant_is_of_type(properties, G_VARIANT_TYPE("a{sv}"))) {
313 GVariantIter iter;
314 g_variant_iter_init(&iter, properties);
315 gchar * name; GVariant * value;
316@@ -1415,8 +1428,12 @@
317
318 if (error != NULL) {
319 g_warning("Error getting properties on a new menuitem: %s", error->message);
320- g_object_unref(propdata->item);
321- return;
322+ goto out;
323+ }
324+
325+ if (properties == NULL) {
326+ g_warning("Not realizing new item as properties for it were unavailable");
327+ goto out;
328 }
329
330 DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(propdata->client);
331@@ -1450,6 +1467,7 @@
332 g_signal_emit(G_OBJECT(propdata->client), signals[NEW_MENUITEM], 0, propdata->item, TRUE);
333 }
334
335+out:
336 g_object_unref(propdata->item);
337 g_free(propdata);
338
339
340=== modified file 'libdbusmenu-glib/defaults.c'
341--- libdbusmenu-glib/defaults.c 2011-02-25 14:47:56 +0000
342+++ libdbusmenu-glib/defaults.c 2011-03-31 18:59:23 +0000
343@@ -81,11 +81,11 @@
344 /* Standard defaults */
345 dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_VISIBLE, G_VARIANT_TYPE_BOOLEAN, g_variant_new_boolean(TRUE));
346 dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_ENABLED, G_VARIANT_TYPE_BOOLEAN, g_variant_new_boolean(TRUE));
347- dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_LABEL, G_VARIANT_TYPE_STRING, g_variant_new_string(_("Label Empty")));
348+ dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_LABEL, G_VARIANT_TYPE_STRING, g_variant_new_string(_("Label Empty")));
349 dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_ICON_NAME, G_VARIANT_TYPE_STRING, NULL);
350 dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, G_VARIANT_TYPE_STRING, NULL);
351 dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, G_VARIANT_TYPE_INT32, NULL);
352- dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_SHORTCUT, G_VARIANT_TYPE_ARRAY, NULL);
353+ dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_SHORTCUT, G_VARIANT_TYPE("aas"), NULL);
354 dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY, G_VARIANT_TYPE_STRING, NULL);
355
356 /* Separator defaults */
357
358=== modified file 'libdbusmenu-gtk/menuitem.c'
359--- libdbusmenu-gtk/menuitem.c 2011-03-21 16:06:57 +0000
360+++ libdbusmenu-gtk/menuitem.c 2011-03-31 18:59:23 +0000
361@@ -275,6 +275,17 @@
362 void
363 dbusmenu_menuitem_property_get_shortcut (DbusmenuMenuitem * menuitem, guint * key, GdkModifierType * modifier)
364 {
365+ guint dummykey;
366+ GdkModifierType dummymodifier;
367+
368+ if (key == NULL) {
369+ key = &dummykey;
370+ }
371+
372+ if (modifier == NULL) {
373+ modifier = &dummymodifier;
374+ }
375+
376 *key = 0;
377 *modifier = 0;
378
379@@ -287,15 +298,15 @@
380
381 if (g_variant_n_children(wrapper) != 1) {
382 g_warning("Unable to parse shortcut, too many keys");
383- g_variant_unref(wrapper);
384 return;
385 }
386
387 GVariantIter iter;
388- g_variant_iter_init(&iter, g_variant_get_child_value(wrapper, 0));
389+ GVariant * child = g_variant_get_child_value(wrapper, 0);
390+ g_variant_iter_init(&iter, child);
391 gchar * string;
392
393- while(g_variant_iter_next(&iter, "s", &string)) {
394+ while(g_variant_iter_loop(&iter, "s", &string)) {
395 if (g_strcmp0(string, DBUSMENU_MENUITEM_SHORTCUT_CONTROL) == 0) {
396 *modifier |= GDK_CONTROL_MASK;
397 } else if (g_strcmp0(string, DBUSMENU_MENUITEM_SHORTCUT_ALT) == 0) {
398@@ -308,10 +319,10 @@
399 GdkModifierType tempmod;
400 gtk_accelerator_parse(string, key, &tempmod);
401 }
402-
403- g_free(string);
404 }
405
406+ g_variant_unref(child);
407+
408 return;
409 }
410
411
412=== modified file 'libdbusmenu-gtk/parser.c'
413--- libdbusmenu-gtk/parser.c 2011-03-21 14:03:18 +0000
414+++ libdbusmenu-gtk/parser.c 2011-03-31 18:59:23 +0000
415@@ -454,7 +454,7 @@
416
417 gboolean visible = FALSE;
418 gboolean sensitive = FALSE;
419- if (GTK_IS_SEPARATOR_MENU_ITEM (widget))
420+ if (GTK_IS_SEPARATOR_MENU_ITEM (widget) || !find_menu_label (widget))
421 {
422 dbusmenu_menuitem_property_set (mi,
423 "type",
424@@ -512,21 +512,18 @@
425
426 GtkWidget *label = find_menu_label (widget);
427
428- if (label)
429- {
430- // Sometimes, an app will directly find and modify the label
431- // (like empathy), so watch the label especially for that.
432- gchar * text = sanitize_label (GTK_LABEL (label));
433- dbusmenu_menuitem_property_set (mi, "label", text);
434- g_free (text);
435+ // Sometimes, an app will directly find and modify the label
436+ // (like empathy), so watch the label especially for that.
437+ gchar * text = sanitize_label (GTK_LABEL (label));
438+ dbusmenu_menuitem_property_set (mi, "label", text);
439+ g_free (text);
440
441- pdata->label = label;
442- g_signal_connect (G_OBJECT (label),
443- "notify",
444- G_CALLBACK (label_notify_cb),
445- mi);
446- g_object_add_weak_pointer(G_OBJECT (label), (gpointer*)&pdata->label);
447- }
448+ pdata->label = label;
449+ g_signal_connect (G_OBJECT (label),
450+ "notify",
451+ G_CALLBACK (label_notify_cb),
452+ mi);
453+ g_object_add_weak_pointer(G_OBJECT (label), (gpointer*)&pdata->label);
454
455 if (GTK_IS_ACTIVATABLE (widget))
456 {
457@@ -760,11 +757,48 @@
458 }
459
460 static void
461+recreate_menu_item (DbusmenuMenuitem * parent, DbusmenuMenuitem * child)
462+{
463+ if (parent == NULL)
464+ {
465+ /* We need a parent */
466+ return;
467+ }
468+ ParserData * pdata = g_object_get_data (G_OBJECT (child), PARSER_DATA);
469+ /* Keep a pointer to the GtkMenuItem, as pdata->widget might be
470+ * invalidated when we delete the DbusmenuMenuitem
471+ */
472+ GtkWidget * menuitem = pdata->widget;
473+
474+ dbusmenu_menuitem_child_delete (parent, child);
475+
476+ RecurseContext recurse = {0};
477+ recurse.toplevel = gtk_widget_get_toplevel(menuitem);
478+ recurse.parent = parent;
479+
480+ parse_menu_structure_helper(menuitem, &recurse);
481+}
482+
483+static gboolean
484+recreate_menu_item_in_idle_cb (gpointer data)
485+{
486+ DbusmenuMenuitem * child = (DbusmenuMenuitem *)data;
487+ DbusmenuMenuitem * parent = dbusmenu_menuitem_get_parent (child);
488+ g_object_unref (child);
489+ recreate_menu_item (parent, child);
490+ return FALSE;
491+}
492+
493+static void
494 label_notify_cb (GtkWidget *widget,
495 GParamSpec *pspec,
496 gpointer data)
497 {
498 DbusmenuMenuitem *child = (DbusmenuMenuitem *)data;
499+ GValue prop_value = {0};
500+
501+ g_value_init (&prop_value, pspec->value_type);
502+ g_object_get_property (G_OBJECT (widget), pspec->name, &prop_value);
503
504 if (pspec->name == g_intern_static_string ("label"))
505 {
506@@ -774,6 +808,24 @@
507 text);
508 g_free (text);
509 }
510+ else if (pspec->name == g_intern_static_string ("parent"))
511+ {
512+ if (GTK_WIDGET (g_value_get_object (&prop_value)) == NULL)
513+ {
514+ /* This label is being removed from its GtkMenuItem. The
515+ * menuitem becomes a separator now. As the client doesn't handle
516+ * changing types so well, we remove the current DbusmenuMenuitem
517+ * and add a new one.
518+ *
519+ * Note, we have to defer this to idle, as we are called before
520+ * bin->child member of our old parent is invalidated. If we go ahead
521+ * and call parse_menu_structure_helper now, the GtkMenuItem will
522+ * still appear to have a label and we never convert it to a separator
523+ */
524+ g_object_ref (child);
525+ g_idle_add ((GSourceFunc)recreate_menu_item_in_idle_cb, child);
526+ }
527+ }
528 }
529
530 static void
531@@ -891,6 +943,20 @@
532 }
533 else if (pspec->name == g_intern_static_string ("label"))
534 {
535+ ParserData *pdata = g_object_get_data (G_OBJECT (child), PARSER_DATA);
536+ if (!pdata->label)
537+ {
538+ /* GtkMenuItem's can start life as a separator if they have no child
539+ * GtkLabel. In this case, we need to convert the DbusmenuMenuitem from
540+ * a separator to a normal menuitem if the application adds a label.
541+ * As changing types isn't handled too well by the client, we delete
542+ * this menuitem for now and then recreate it
543+ */
544+ DbusmenuMenuitem * parent = dbusmenu_menuitem_get_parent (child);
545+ recreate_menu_item (parent, child);
546+ return;
547+ }
548+
549 dbusmenu_menuitem_property_set (child,
550 DBUSMENU_MENUITEM_PROP_LABEL,
551 g_value_get_string (&prop_value));
552
553=== modified file 'ltmain.sh'
554--- ltmain.sh 2011-02-17 17:04:40 +0000
555+++ ltmain.sh 2011-03-31 18:59:23 +0000
556@@ -65,7 +65,7 @@
557 # compiler: $LTCC
558 # compiler flags: $LTCFLAGS
559 # linker: $LD (gnu? $with_gnu_ld)
560-# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu2
561+# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
562 # automake: $automake_version
563 # autoconf: $autoconf_version
564 #
565@@ -73,7 +73,7 @@
566
567 PROGRAM=ltmain.sh
568 PACKAGE=libtool
569-VERSION="2.2.6b Debian-2.2.6b-2ubuntu2"
570+VERSION="2.2.6b Debian-2.2.6b-2ubuntu3"
571 TIMESTAMP=""
572 package_revision=1.3017
573

Subscribers

People subscribed via source and target branches

to all changes: