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

Proposed by Ted Gould
Status: Merged
Merged at revision: 138
Proposed branch: lp:~dbusmenu-team/libdbusmenu/ubuntu
Merge into: lp:~ubuntu-desktop/libdbusmenu/ubuntu
Diff against target: 536 lines (+196/-38)
14 files modified
ChangeLog (+72/-0)
configure (+11/-11)
configure.ac (+3/-3)
debian/changelog (+14/-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 (+11/-3)
libdbusmenu-glib/menuitem.c (+1/-1)
libdbusmenu-gtk/Makefile.am (+0/-2)
libdbusmenu-gtk/Makefile.in (+0/-2)
libdbusmenu-gtk/client.c (+42/-12)
libdbusmenu-gtk/parser.c (+38/-0)
To merge this branch: bzr merge lp:~dbusmenu-team/libdbusmenu/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+56789@code.launchpad.net

Description of the change

0.4.2

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

releasing version 0.4.2-0ubuntu1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2011-03-31 18:48:12 +0000
+++ ChangeLog 2011-04-07 15:38:25 +0000
@@ -1,5 +1,77 @@
1# Generated by Makefile. Do not edit.1# Generated by Makefile. Do not edit.
22
32011-04-07 Ted Gould <ted@gould.cx>
4
5 0.4.2
6
72011-04-07 Ted Gould <ted@gould.cx>
8
9 Build menus based on teh child-display property
10
112011-04-05 Ted Gould <ted@gould.cx>
12
13 Make check to send about-to-show look for properties as well.
14
152011-04-05 Ted Gould <ted@gould.cx>
16
17 Attching a bug number
18
192011-04-05 Ted Gould <ted@gould.cx>
20
21 Making the debug message better
22
232011-04-05 Ted Gould <ted@gould.cx>
24
25 We don't need the parent, cut-and-paste confusion here.
26
272011-04-05 Ted Gould <ted@gould.cx>
28
29 Handle the case of the variant being NULL
30
312011-04-05 Ted Gould <ted@gould.cx>
32
33 Now that we're using the child-display variable more, let's grab it in the first pass.
34
352011-04-05 Ted Gould <ted@gould.cx>
36
37 Then menu should get created when processing the property, so let's warn and exit here if it's not available
38
392011-04-05 Ted Gould <ted@gould.cx>
40
41 Passing in the client so that I can get the menuitem in all cases
42
432011-04-05 Ted Gould <ted@gould.cx>
44
45 Setting up the shell to handle the children display prop
46
472011-04-05 Ted Gould <ted@gould.cx>
48
49 Add a handler for the open/close events and pass them up to GTK
50
512011-04-05 Michael Terry <mike@mterry.name>
52
53 respond to opened and closed events for the benefit of any watching application
54
552011-04-05 Ted Gould <ted@gould.cx>
56
57 Keep refs to the client and makes sure to disconnect all handlers.
58
592011-04-05 Michael Terry <mike@mterry.name>
60
61 fix typo
62
632011-04-05 Michael Terry <mike@mterry.name>
64
65 be a little more careful with asynchronous callbacks
66
672011-04-05 Ted Gould <ted@gould.cx>
68
69 Don't duplicate flags
70
712011-04-04 Ted Gould <ted@gould.cx>
72
73 Don't need SCANNERFLAGS and INTROSPECTION_SCANNER_ARGS both so they dup'd the parameters.
74
32011-03-31 Ted Gould <ted@gould.cx>752011-03-31 Ted Gould <ted@gould.cx>
476
5 0.4.177 0.4.1
678
=== modified file 'configure'
--- configure 2011-03-31 18:50:13 +0000
+++ configure 2011-04-07 15:38:25 +0000
@@ -1,6 +1,6 @@
1#! /bin/sh1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for libdbusmenu 0.4.1.3# Generated by GNU Autoconf 2.67 for libdbusmenu 0.4.2.
4#4#
5# Report bugs to <ted@canonical.com>.5# Report bugs to <ted@canonical.com>.
6#6#
@@ -703,8 +703,8 @@
703# Identity of this package.703# Identity of this package.
704PACKAGE_NAME='libdbusmenu'704PACKAGE_NAME='libdbusmenu'
705PACKAGE_TARNAME='libdbusmenu'705PACKAGE_TARNAME='libdbusmenu'
706PACKAGE_VERSION='0.4.1'706PACKAGE_VERSION='0.4.2'
707PACKAGE_STRING='libdbusmenu 0.4.1'707PACKAGE_STRING='libdbusmenu 0.4.2'
708PACKAGE_BUGREPORT='ted@canonical.com'708PACKAGE_BUGREPORT='ted@canonical.com'
709PACKAGE_URL=''709PACKAGE_URL=''
710710
@@ -1541,7 +1541,7 @@
1541 # Omit some internal or obsolete options to make the list less imposing.1541 # Omit some internal or obsolete options to make the list less imposing.
1542 # This message is too long to be a string in the A/UX 3.1 sh.1542 # This message is too long to be a string in the A/UX 3.1 sh.
1543 cat <<_ACEOF1543 cat <<_ACEOF
1544\`configure' configures libdbusmenu 0.4.1 to adapt to many kinds of systems.1544\`configure' configures libdbusmenu 0.4.2 to adapt to many kinds of systems.
15451545
1546Usage: $0 [OPTION]... [VAR=VALUE]...1546Usage: $0 [OPTION]... [VAR=VALUE]...
15471547
@@ -1611,7 +1611,7 @@
16111611
1612if test -n "$ac_init_help"; then1612if test -n "$ac_init_help"; then
1613 case $ac_init_help in1613 case $ac_init_help in
1614 short | recursive ) echo "Configuration of libdbusmenu 0.4.1:";;1614 short | recursive ) echo "Configuration of libdbusmenu 0.4.2:";;
1615 esac1615 esac
1616 cat <<\_ACEOF1616 cat <<\_ACEOF
16171617
@@ -1751,7 +1751,7 @@
1751test -n "$ac_init_help" && exit $ac_status1751test -n "$ac_init_help" && exit $ac_status
1752if $ac_init_version; then1752if $ac_init_version; then
1753 cat <<\_ACEOF1753 cat <<\_ACEOF
1754libdbusmenu configure 0.4.11754libdbusmenu configure 0.4.2
1755generated by GNU Autoconf 2.671755generated by GNU Autoconf 2.67
17561756
1757Copyright (C) 2010 Free Software Foundation, Inc.1757Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2122,7 +2122,7 @@
2122This file contains any messages produced by compilers while2122This file contains any messages produced by compilers while
2123running configure, to aid debugging if configure makes a mistake.2123running configure, to aid debugging if configure makes a mistake.
21242124
2125It was created by libdbusmenu $as_me 0.4.1, which was2125It was created by libdbusmenu $as_me 0.4.2, which was
2126generated by GNU Autoconf 2.67. Invocation command line was2126generated by GNU Autoconf 2.67. Invocation command line was
21272127
2128 $ $0 $@2128 $ $0 $@
@@ -2943,7 +2943,7 @@
29432943
2944# Define the identity of the package.2944# Define the identity of the package.
2945 PACKAGE=libdbusmenu2945 PACKAGE=libdbusmenu
2946 VERSION=0.4.12946 VERSION=0.4.2
29472947
29482948
2949# Some tools Automake needs.2949# Some tools Automake needs.
@@ -13294,7 +13294,7 @@
13294###########################13294###########################
1329513295
13296LIBDBUSMENU_CURRENT=313296LIBDBUSMENU_CURRENT=3
13297LIBDBUSMENU_REVISION=1213297LIBDBUSMENU_REVISION=13
13298LIBDBUSMENU_AGE=013298LIBDBUSMENU_AGE=0
1329913299
1330013300
@@ -14616,7 +14616,7 @@
14616# report actual input values of CONFIG_FILES etc. instead of their14616# report actual input values of CONFIG_FILES etc. instead of their
14617# values after options handling.14617# values after options handling.
14618ac_log="14618ac_log="
14619This file was extended by libdbusmenu $as_me 0.4.1, which was14619This file was extended by libdbusmenu $as_me 0.4.2, which was
14620generated by GNU Autoconf 2.67. Invocation command line was14620generated by GNU Autoconf 2.67. Invocation command line was
1462114621
14622 CONFIG_FILES = $CONFIG_FILES14622 CONFIG_FILES = $CONFIG_FILES
@@ -14682,7 +14682,7 @@
14682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=114682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14683ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"14683ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14684ac_cs_version="\\14684ac_cs_version="\\
14685libdbusmenu config.status 0.4.114685libdbusmenu config.status 0.4.2
14686configured by $0, generated by GNU Autoconf 2.67,14686configured by $0, generated by GNU Autoconf 2.67,
14687 with options \\"\$ac_cs_config\\"14687 with options \\"\$ac_cs_config\\"
1468814688
1468914689
=== modified file 'configure.ac'
--- configure.ac 2011-03-31 18:50:13 +0000
+++ configure.ac 2011-04-07 15:38:25 +0000
@@ -1,11 +1,11 @@
11
2AC_INIT(libdbusmenu, 0.4.1, ted@canonical.com)2AC_INIT(libdbusmenu, 0.4.2, ted@canonical.com)
3AC_COPYRIGHT([Copyright 2009,2010 Canonical])3AC_COPYRIGHT([Copyright 2009,2010 Canonical])
44
5AC_PREREQ(2.62)5AC_PREREQ(2.62)
66
7AM_CONFIG_HEADER(config.h)7AM_CONFIG_HEADER(config.h)
8AM_INIT_AUTOMAKE(libdbusmenu, 0.4.1, [-Wno-portability])8AM_INIT_AUTOMAKE(libdbusmenu, 0.4.2, [-Wno-portability])
99
10AM_MAINTAINER_MODE10AM_MAINTAINER_MODE
1111
@@ -134,7 +134,7 @@
134###########################134###########################
135135
136LIBDBUSMENU_CURRENT=3136LIBDBUSMENU_CURRENT=3
137LIBDBUSMENU_REVISION=12137LIBDBUSMENU_REVISION=13
138LIBDBUSMENU_AGE=0138LIBDBUSMENU_AGE=0
139139
140AC_SUBST(LIBDBUSMENU_CURRENT)140AC_SUBST(LIBDBUSMENU_CURRENT)
141141
=== modified file 'debian/changelog'
--- debian/changelog 2011-03-31 19:33:18 +0000
+++ debian/changelog 2011-04-07 15:38:25 +0000
@@ -1,3 +1,17 @@
1libdbusmenu (0.4.2-0ubuntu1~ppa1) natty; urgency=low
2
3 * New upstream release.
4 ∘ Fix GIR scan to not include duplicate namespaces (LP: #750575)
5 ∘ Keep refs to the client and makes sure to disconnect all handlers.
6 (LP: #749609)
7 ∘ Add GTK side handlers for the open/close events to ensure GTK apps
8 can use those events still (LP: #750588)
9 ∘ Create submenus for menuitems that don't have children but still
10 have told us they need them with the child-display property.
11 (LP: #619811)
12
13 -- Ted Gould <ted@ubuntu.com> Thu, 07 Apr 2011 10:32:51 -0500
14
1libdbusmenu (0.4.1-0ubuntu1) natty; urgency=low15libdbusmenu (0.4.1-0ubuntu1) natty; urgency=low
216
3 * New upstream release.17 * New upstream release.
418
=== modified file 'docs/libdbusmenu-glib/reference/html/ch01.html'
--- docs/libdbusmenu-glib/reference/html/ch01.html 2011-03-31 18:48:12 +0000
+++ docs/libdbusmenu-glib/reference/html/ch01.html 2011-04-07 15:38:25 +0000
@@ -21,7 +21,7 @@
21</tr></table>21</tr></table>
22<div class="chapter">22<div class="chapter">
23<div class="titlepage"><div><div><h2 class="title">23<div class="titlepage"><div><div><h2 class="title">
24<a name="id471000"></a>API</h2></div></div></div>24<a name="id552681"></a>API</h2></div></div></div>
25<div class="toc"><dl>25<div class="toc"><dl>
26<dt>26<dt>
27<span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"> — The server signals changed and27<span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"> — The server signals changed and
2828
=== modified file 'docs/libdbusmenu-glib/reference/version.xml'
--- docs/libdbusmenu-glib/reference/version.xml 2011-03-31 18:50:13 +0000
+++ docs/libdbusmenu-glib/reference/version.xml 2011-04-07 15:38:25 +0000
@@ -1,1 +1,1 @@
10.4.110.4.2
22
=== modified file 'docs/libdbusmenu-gtk/reference/html/ch01.html'
--- docs/libdbusmenu-gtk/reference/html/ch01.html 2011-03-31 18:48:12 +0000
+++ docs/libdbusmenu-gtk/reference/html/ch01.html 2011-04-07 15:38:25 +0000
@@ -21,7 +21,7 @@
21</tr></table>21</tr></table>
22<div class="chapter">22<div class="chapter">
23<div class="titlepage"><div><div><h2 class="title">23<div class="titlepage"><div><div><h2 class="title">
24<a name="id520868"></a>API</h2></div></div></div>24<a name="id463422"></a>API</h2></div></div></div>
25<div class="toc"><dl>25<div class="toc"><dl>
26<dt>26<dt>
27<span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"> — A GTK Menu Object that syncronizes over DBus</span>27<span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"> — A GTK Menu Object that syncronizes over DBus</span>
2828
=== modified file 'docs/libdbusmenu-gtk/reference/version.xml'
--- docs/libdbusmenu-gtk/reference/version.xml 2011-03-31 18:50:13 +0000
+++ docs/libdbusmenu-gtk/reference/version.xml 2011-04-07 15:38:25 +0000
@@ -1,1 +1,1 @@
10.4.110.4.2
22
=== modified file 'libdbusmenu-glib/client.c'
--- libdbusmenu-glib/client.c 2011-03-31 18:47:46 +0000
+++ libdbusmenu-glib/client.c 2011-04-07 15:38:25 +0000
@@ -331,6 +331,8 @@
331 return;331 return;
332}332}
333333
334#define LAYOUT_PROPS_COUNT 5
335
334static void336static void
335dbusmenu_client_init (DbusmenuClient *self)337dbusmenu_client_init (DbusmenuClient *self)
336{338{
@@ -351,13 +353,14 @@
351353
352 priv->layoutcall = NULL;354 priv->layoutcall = NULL;
353355
354 gchar * layout_props[5];356 gchar * layout_props[LAYOUT_PROPS_COUNT + 1];
355 layout_props[0] = DBUSMENU_MENUITEM_PROP_TYPE;357 layout_props[0] = DBUSMENU_MENUITEM_PROP_TYPE;
356 layout_props[1] = DBUSMENU_MENUITEM_PROP_LABEL;358 layout_props[1] = DBUSMENU_MENUITEM_PROP_LABEL;
357 layout_props[2] = DBUSMENU_MENUITEM_PROP_VISIBLE;359 layout_props[2] = DBUSMENU_MENUITEM_PROP_VISIBLE;
358 layout_props[3] = DBUSMENU_MENUITEM_PROP_ENABLED;360 layout_props[3] = DBUSMENU_MENUITEM_PROP_ENABLED;
359 layout_props[4] = NULL;361 layout_props[4] = DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY;
360 priv->layout_props = g_variant_new_strv((const gchar * const *)layout_props, 4);362 layout_props[LAYOUT_PROPS_COUNT] = NULL;
363 priv->layout_props = g_variant_new_strv((const gchar * const *)layout_props, LAYOUT_PROPS_COUNT);
361 g_variant_ref_sink(priv->layout_props);364 g_variant_ref_sink(priv->layout_props);
362365
363 priv->current_revision = 0;366 priv->current_revision = 0;
@@ -441,6 +444,9 @@
441 priv->menuproxy_cancel = NULL;444 priv->menuproxy_cancel = NULL;
442 }445 }
443 if (priv->menuproxy != NULL) {446 if (priv->menuproxy != NULL) {
447 g_signal_handlers_disconnect_matched(priv->menuproxy,
448 G_SIGNAL_MATCH_DATA,
449 0, 0, NULL, NULL, object);
444 g_object_unref(G_OBJECT(priv->menuproxy));450 g_object_unref(G_OBJECT(priv->menuproxy));
445 priv->menuproxy = NULL;451 priv->menuproxy = NULL;
446 }452 }
@@ -1494,6 +1500,7 @@
1494 g_variant_unref(edata->variant);1500 g_variant_unref(edata->variant);
1495 g_free(edata->event);1501 g_free(edata->event);
1496 g_object_unref(edata->menuitem);1502 g_object_unref(edata->menuitem);
1503 g_object_unref(edata->client);
1497 g_free(edata);1504 g_free(edata);
14981505
1499 if (G_UNLIKELY(error != NULL)) {1506 if (G_UNLIKELY(error != NULL)) {
@@ -1528,6 +1535,7 @@
15281535
1529 event_data_t * edata = g_new0(event_data_t, 1);1536 event_data_t * edata = g_new0(event_data_t, 1);
1530 edata->client = client;1537 edata->client = client;
1538 g_object_ref(client);
1531 edata->menuitem = mi;1539 edata->menuitem = mi;
1532 g_object_ref(edata->menuitem);1540 g_object_ref(edata->menuitem);
1533 edata->event = g_strdup(name);1541 edata->event = g_strdup(name);
15341542
=== modified file 'libdbusmenu-glib/menuitem.c'
--- libdbusmenu-glib/menuitem.c 2011-03-16 19:02:13 +0000
+++ libdbusmenu-glib/menuitem.c 2011-04-07 15:38:25 +0000
@@ -446,7 +446,7 @@
446{446{
447 g_return_if_fail(DBUSMENU_IS_MENUITEM(mi));447 g_return_if_fail(DBUSMENU_IS_MENUITEM(mi));
448448
449 if (dbusmenu_menuitem_get_children(mi) == NULL) {449 if (dbusmenu_menuitem_get_children(mi) == NULL && g_strcmp0(DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU, dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY)) != 0) {
450 g_warning("About to Show called on an item wihtout submenus. We're ignoring it.");450 g_warning("About to Show called on an item wihtout submenus. We're ignoring it.");
451 } else {451 } else {
452 gboolean dummy;452 gboolean dummy;
453453
=== modified file 'libdbusmenu-gtk/Makefile.am'
--- libdbusmenu-gtk/Makefile.am 2011-02-24 18:40:30 +0000
+++ libdbusmenu-gtk/Makefile.am 2011-04-07 15:38:25 +0000
@@ -103,7 +103,6 @@
103DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la103DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la
104DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))104DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))
105DbusmenuGtk_0_4_gir_NAMESPACE = DbusmenuGtk$(VER)105DbusmenuGtk_0_4_gir_NAMESPACE = DbusmenuGtk$(VER)
106DbusmenuGtk_0_4_gir_SCANNERFLAGS = $(INTROSPECTION_SCANNER_ARGS)
107DbusmenuGtk_0_4_gir_EXPORT_PACKAGES = dbusmenu-gtk$(VER)-0.4106DbusmenuGtk_0_4_gir_EXPORT_PACKAGES = dbusmenu-gtk$(VER)-0.4
108107
109# We duplicate these for the same reason as libdbusmenu_gtk3includedir above108# We duplicate these for the same reason as libdbusmenu_gtk3includedir above
@@ -112,7 +111,6 @@
112DbusmenuGtk3_0_4_gir_LIBS = $(DbusmenuGtk_0_4_gir_LIBS)111DbusmenuGtk3_0_4_gir_LIBS = $(DbusmenuGtk_0_4_gir_LIBS)
113DbusmenuGtk3_0_4_gir_FILES = $(DbusmenuGtk_0_4_gir_FILES)112DbusmenuGtk3_0_4_gir_FILES = $(DbusmenuGtk_0_4_gir_FILES)
114DbusmenuGtk3_0_4_gir_NAMESPACE = $(DbusmenuGtk_0_4_gir_NAMESPACE)113DbusmenuGtk3_0_4_gir_NAMESPACE = $(DbusmenuGtk_0_4_gir_NAMESPACE)
115DbusmenuGtk3_0_4_gir_SCANNERFLAGS = $(DbusmenuGtk_0_4_gir_SCANNERFLAGS)
116DbusmenuGtk3_0_4_gir_EXPORT_PACKAGES = $(DbusmenuGtk_0_4_gir_EXPORT_PACKAGES)114DbusmenuGtk3_0_4_gir_EXPORT_PACKAGES = $(DbusmenuGtk_0_4_gir_EXPORT_PACKAGES)
117115
118INTROSPECTION_GIRS += DbusmenuGtk$(VER)-0.4.gir116INTROSPECTION_GIRS += DbusmenuGtk$(VER)-0.4.gir
119117
=== modified file 'libdbusmenu-gtk/Makefile.in'
--- libdbusmenu-gtk/Makefile.in 2011-03-10 17:05:16 +0000
+++ libdbusmenu-gtk/Makefile.in 2011-04-07 15:38:25 +0000
@@ -401,7 +401,6 @@
401@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la401@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la
402@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))402@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))
403@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_NAMESPACE = DbusmenuGtk$(VER)403@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_NAMESPACE = DbusmenuGtk$(VER)
404@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_SCANNERFLAGS = $(INTROSPECTION_SCANNER_ARGS)
405@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_EXPORT_PACKAGES = dbusmenu-gtk$(VER)-0.4404@HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_EXPORT_PACKAGES = dbusmenu-gtk$(VER)-0.4
406405
407# We duplicate these for the same reason as libdbusmenu_gtk3includedir above406# We duplicate these for the same reason as libdbusmenu_gtk3includedir above
@@ -410,7 +409,6 @@
410@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_LIBS = $(DbusmenuGtk_0_4_gir_LIBS)409@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_LIBS = $(DbusmenuGtk_0_4_gir_LIBS)
411@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_FILES = $(DbusmenuGtk_0_4_gir_FILES)410@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_FILES = $(DbusmenuGtk_0_4_gir_FILES)
412@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_NAMESPACE = $(DbusmenuGtk_0_4_gir_NAMESPACE)411@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_NAMESPACE = $(DbusmenuGtk_0_4_gir_NAMESPACE)
413@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_SCANNERFLAGS = $(DbusmenuGtk_0_4_gir_SCANNERFLAGS)
414@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_EXPORT_PACKAGES = $(DbusmenuGtk_0_4_gir_EXPORT_PACKAGES)412@HAVE_INTROSPECTION_TRUE@DbusmenuGtk3_0_4_gir_EXPORT_PACKAGES = $(DbusmenuGtk_0_4_gir_EXPORT_PACKAGES)
415@HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0413@HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0
416@HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS)414@HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS)
417415
=== modified file 'libdbusmenu-gtk/client.c'
--- libdbusmenu-gtk/client.c 2011-03-16 15:27:00 +0000
+++ libdbusmenu-gtk/client.c 2011-04-07 15:38:25 +0000
@@ -551,11 +551,43 @@
551 return;551 return;
552}552}
553553
554/* Submenu processing */
555static void
556process_submenu (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, DbusmenuGtkClient * gtkclient)
557{
558 const gchar * submenu = NULL;
559 if (variant != NULL) {
560 submenu = g_variant_get_string(variant, NULL);
561 }
562
563 if (g_strcmp0(submenu, DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU) != 0) {
564 /* This is the only case we're really supporting right now,
565 so if it's not this, we want to clean up. */
566 /* We're just going to warn for now. */
567 gpointer pmenu = g_object_get_data(G_OBJECT(mi), data_menu);
568 if (pmenu != NULL) {
569 g_warning("The child-display variable is set to '%s' but there's a menu, odd?", submenu);
570 }
571 } else {
572 /* We need to build a menu for these guys to live in. */
573 GtkMenu * menu = GTK_MENU(gtk_menu_new());
574 g_object_set_data(G_OBJECT(mi), data_menu, menu);
575
576 gtk_menu_item_set_submenu(gmi, GTK_WIDGET(menu));
577
578 g_signal_connect(menu, "notify::visible", G_CALLBACK(submenu_notify_visible_cb), mi);
579 }
580
581 return;
582}
583
554/* Whenever we have a property change on a DbusmenuMenuitem584/* Whenever we have a property change on a DbusmenuMenuitem
555 we need to be responsive to that. */585 we need to be responsive to that. */
556static void586static void
557menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, GtkMenuItem * gmi)587menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, DbusmenuGtkClient * gtkclient)
558{588{
589 GtkMenuItem * gmi = dbusmenu_gtkclient_menuitem_get(gtkclient, mi);
590
559 if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_LABEL)) {591 if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_LABEL)) {
560 gtk_menu_item_set_label(gmi, variant == NULL ? NULL : g_variant_get_string(variant, NULL));592 gtk_menu_item_set_label(gmi, variant == NULL ? NULL : g_variant_get_string(variant, NULL));
561 } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_VISIBLE)) {593 } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_VISIBLE)) {
@@ -566,6 +598,8 @@
566 process_toggle_type(mi, gmi, variant);598 process_toggle_type(mi, gmi, variant);
567 } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE)) {599 } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE)) {
568 process_toggle_state(mi, gmi, variant);600 process_toggle_state(mi, gmi, variant);
601 } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY)) {
602 process_submenu(mi, gmi, variant, gtkclient);
569 }603 }
570604
571 return;605 return;
@@ -704,7 +738,7 @@
704 #endif738 #endif
705739
706 /* DbusmenuMenuitem signals */740 /* DbusmenuMenuitem signals */
707 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_change_cb), gmi);741 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_change_cb), client);
708 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_shortcut_change_cb), client);742 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_shortcut_change_cb), client);
709 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(delete_child), client);743 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(delete_child), client);
710 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(move_child), client);744 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(move_child), client);
@@ -720,6 +754,7 @@
720 process_sensitive(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_ENABLED));754 process_sensitive(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_ENABLED));
721 process_toggle_type(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE));755 process_toggle_type(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE));
722 process_toggle_state(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE));756 process_toggle_state(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE));
757 process_submenu(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY), client);
723 refresh_shortcut(client, item);758 refresh_shortcut(client, item);
724759
725 /* Oh, we're a child, let's deal with that */760 /* Oh, we're a child, let's deal with that */
@@ -741,17 +776,12 @@
741 if (g_strcmp0(dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_TYPE), DBUSMENU_CLIENT_TYPES_SEPARATOR) == 0) { return; }776 if (g_strcmp0(dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_TYPE), DBUSMENU_CLIENT_TYPES_SEPARATOR) == 0) { return; }
742777
743 gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);778 gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);
779 if (ann_menu == NULL) {
780 g_warning("Children but no menu, someone's been naughty with their '" DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "' property: '%s'", dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY));
781 return;
782 }
783
744 GtkMenu * menu = GTK_MENU(ann_menu);784 GtkMenu * menu = GTK_MENU(ann_menu);
745 if (menu == NULL) {
746 /* Oh, we don't have a submenu, build one! */
747 menu = GTK_MENU(gtk_menu_new());
748 g_object_set_data(G_OBJECT(mi), data_menu, menu);
749
750 GtkMenuItem * parent = dbusmenu_gtkclient_menuitem_get(gtkclient, mi);
751 gtk_menu_item_set_submenu(parent, GTK_WIDGET(menu));
752
753 g_signal_connect(menu, "notify::visible", G_CALLBACK(submenu_notify_visible_cb), mi);
754 }
755785
756 GtkMenuItem * childmi = dbusmenu_gtkclient_menuitem_get(gtkclient, child);786 GtkMenuItem * childmi = dbusmenu_gtkclient_menuitem_get(gtkclient, child);
757 gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), position);787 gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), position);
758788
=== modified file 'libdbusmenu-gtk/parser.c'
--- libdbusmenu-gtk/parser.c 2011-03-31 18:50:13 +0000
+++ libdbusmenu-gtk/parser.c 2011-04-07 15:38:25 +0000
@@ -79,6 +79,11 @@
79 gpointer user_data);79 gpointer user_data);
80static gboolean item_about_to_show (DbusmenuMenuitem * item,80static gboolean item_about_to_show (DbusmenuMenuitem * item,
81 gpointer user_data);81 gpointer user_data);
82static gboolean item_handle_event (DbusmenuMenuitem * item,
83 const gchar * name,
84 GVariant * variant,
85 guint timestamp,
86 GtkWidget * widget);
82static void widget_notify_cb (GtkWidget * widget,87static void widget_notify_cb (GtkWidget * widget,
83 GParamSpec * pspec,88 GParamSpec * pspec,
84 gpointer data);89 gpointer data);
@@ -580,6 +585,11 @@
580 DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW,585 DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW,
581 G_CALLBACK (item_about_to_show),586 G_CALLBACK (item_about_to_show),
582 widget);587 widget);
588
589 g_signal_connect (G_OBJECT (mi),
590 DBUSMENU_MENUITEM_SIGNAL_EVENT,
591 G_CALLBACK (item_handle_event),
592 widget);
583 }593 }
584594
585 dbusmenu_menuitem_property_set_bool (mi,595 dbusmenu_menuitem_property_set_bool (mi,
@@ -924,6 +934,34 @@
924 return TRUE;934 return TRUE;
925}935}
926936
937static gboolean
938item_handle_event (DbusmenuMenuitem *item, const gchar *name,
939 GVariant *variant, guint timestamp, GtkWidget *widget)
940{
941 if (g_strcmp0 (name, DBUSMENU_MENUITEM_EVENT_OPENED) == 0)
942 {
943 GtkWidget *submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget));
944 if (submenu != NULL)
945 {
946 // Show the submenu so the app can notice and futz with the menus as
947 // desired (empathy and geany do this)
948 gtk_widget_show (submenu);
949 }
950 }
951 else if (g_strcmp0 (name, DBUSMENU_MENUITEM_EVENT_CLOSED) == 0)
952 {
953 GtkWidget *submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget));
954 if (submenu != NULL)
955 {
956 // Hide the submenu so the app can notice and futz with the menus as
957 // desired (empathy and geany do this)
958 gtk_widget_hide (submenu);
959 }
960 }
961
962 return FALSE; // just pass through on everything
963}
964
927static void965static void
928widget_notify_cb (GtkWidget *widget,966widget_notify_cb (GtkWidget *widget,
929 GParamSpec *pspec,967 GParamSpec *pspec,

Subscribers

People subscribed via source and target branches

to all changes: