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

Proposed by Ted Gould
Status: Merged
Merged at revision: 93
Proposed branch: lp:~dbusmenu-team/libdbusmenu/ubuntu
Merge into: lp:~ubuntu-desktop/libdbusmenu/ubuntu
Diff against target: 1260 lines (+492/-59)
31 files modified
configure (+11/-11)
configure.ac (+3/-3)
debian/changelog (+9/-0)
debian/control (+4/-1)
debian/rules (+1/-0)
docs/libdbusmenu-glib/reference/html/ch01.html (+1/-1)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html (+8/-6)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html (+4/-3)
docs/libdbusmenu-glib/reference/tmpl/client.sgml (+2/-1)
docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml (+2/-1)
docs/libdbusmenu-glib/reference/version.xml (+1/-1)
docs/libdbusmenu-glib/reference/xml/client.xml (+7/-5)
docs/libdbusmenu-glib/reference/xml/menuitem.xml (+4/-3)
docs/libdbusmenu-gtk/reference/html/ch01.html (+1/-1)
docs/libdbusmenu-gtk/reference/version.xml (+1/-1)
libdbusmenu-glib/Makefile.am (+15/-0)
libdbusmenu-glib/Makefile.in (+25/-0)
libdbusmenu-glib/client-marshal.c (+131/-0)
libdbusmenu-glib/client-marshal.h (+28/-0)
libdbusmenu-glib/client-marshal.list (+2/-0)
libdbusmenu-glib/client.c (+105/-3)
libdbusmenu-glib/client.h (+8/-4)
libdbusmenu-glib/dbusmenu-server.h (+2/-3)
libdbusmenu-glib/menuitem-marshal.c (+2/-0)
libdbusmenu-glib/menuitem.c (+36/-0)
libdbusmenu-glib/menuitem.h (+6/-5)
libdbusmenu-glib/server.c (+2/-2)
libdbusmenu-gtk/client.c (+47/-0)
tests/test-gtk-label-client.c (+0/-2)
tests/test-gtk-submenu-client.c (+8/-1)
tests/test-gtk-submenu-server.c (+16/-1)
To merge this branch: bzr merge lp:~dbusmenu-team/libdbusmenu/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+33837@code.launchpad.net

Description of the change

0.3.12

To post a comment you must log in.
lp:~dbusmenu-team/libdbusmenu/ubuntu updated
93. By Sebastien Bacher

releasing version 0.3.12-0ubuntu1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure'
--- configure 2010-08-19 18:41:19 +0000
+++ configure 2010-08-26 20:37:39 +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.3.11.3# Generated by GNU Autoconf 2.67 for libdbusmenu 0.3.12.
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.3.11'706PACKAGE_VERSION='0.3.12'
707PACKAGE_STRING='libdbusmenu 0.3.11'707PACKAGE_STRING='libdbusmenu 0.3.12'
708PACKAGE_BUGREPORT='ted@canonical.com'708PACKAGE_BUGREPORT='ted@canonical.com'
709PACKAGE_URL=''709PACKAGE_URL=''
710710
@@ -1533,7 +1533,7 @@
1533 # Omit some internal or obsolete options to make the list less imposing.1533 # Omit some internal or obsolete options to make the list less imposing.
1534 # This message is too long to be a string in the A/UX 3.1 sh.1534 # This message is too long to be a string in the A/UX 3.1 sh.
1535 cat <<_ACEOF1535 cat <<_ACEOF
1536\`configure' configures libdbusmenu 0.3.11 to adapt to many kinds of systems.1536\`configure' configures libdbusmenu 0.3.12 to adapt to many kinds of systems.
15371537
1538Usage: $0 [OPTION]... [VAR=VALUE]...1538Usage: $0 [OPTION]... [VAR=VALUE]...
15391539
@@ -1603,7 +1603,7 @@
16031603
1604if test -n "$ac_init_help"; then1604if test -n "$ac_init_help"; then
1605 case $ac_init_help in1605 case $ac_init_help in
1606 short | recursive ) echo "Configuration of libdbusmenu 0.3.11:";;1606 short | recursive ) echo "Configuration of libdbusmenu 0.3.12:";;
1607 esac1607 esac
1608 cat <<\_ACEOF1608 cat <<\_ACEOF
16091609
@@ -1741,7 +1741,7 @@
1741test -n "$ac_init_help" && exit $ac_status1741test -n "$ac_init_help" && exit $ac_status
1742if $ac_init_version; then1742if $ac_init_version; then
1743 cat <<\_ACEOF1743 cat <<\_ACEOF
1744libdbusmenu configure 0.3.111744libdbusmenu configure 0.3.12
1745generated by GNU Autoconf 2.671745generated by GNU Autoconf 2.67
17461746
1747Copyright (C) 2010 Free Software Foundation, Inc.1747Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2112,7 +2112,7 @@
2112This file contains any messages produced by compilers while2112This file contains any messages produced by compilers while
2113running configure, to aid debugging if configure makes a mistake.2113running configure, to aid debugging if configure makes a mistake.
21142114
2115It was created by libdbusmenu $as_me 0.3.11, which was2115It was created by libdbusmenu $as_me 0.3.12, which was
2116generated by GNU Autoconf 2.67. Invocation command line was2116generated by GNU Autoconf 2.67. Invocation command line was
21172117
2118 $ $0 $@2118 $ $0 $@
@@ -2933,7 +2933,7 @@
29332933
2934# Define the identity of the package.2934# Define the identity of the package.
2935 PACKAGE=libdbusmenu2935 PACKAGE=libdbusmenu
2936 VERSION=0.3.112936 VERSION=0.3.12
29372937
29382938
2939# Some tools Automake needs.2939# Some tools Automake needs.
@@ -13065,7 +13065,7 @@
13065###########################13065###########################
1306613066
13067LIBDBUSMENU_CURRENT=113067LIBDBUSMENU_CURRENT=1
13068LIBDBUSMENU_REVISION=1313068LIBDBUSMENU_REVISION=14
13069LIBDBUSMENU_AGE=013069LIBDBUSMENU_AGE=0
1307013070
1307113071
@@ -14379,7 +14379,7 @@
14379# report actual input values of CONFIG_FILES etc. instead of their14379# report actual input values of CONFIG_FILES etc. instead of their
14380# values after options handling.14380# values after options handling.
14381ac_log="14381ac_log="
14382This file was extended by libdbusmenu $as_me 0.3.11, which was14382This file was extended by libdbusmenu $as_me 0.3.12, which was
14383generated by GNU Autoconf 2.67. Invocation command line was14383generated by GNU Autoconf 2.67. Invocation command line was
1438414384
14385 CONFIG_FILES = $CONFIG_FILES14385 CONFIG_FILES = $CONFIG_FILES
@@ -14445,7 +14445,7 @@
14445cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=114445cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14446ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"14446ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14447ac_cs_version="\\14447ac_cs_version="\\
14448libdbusmenu config.status 0.3.1114448libdbusmenu config.status 0.3.12
14449configured by $0, generated by GNU Autoconf 2.67,14449configured by $0, generated by GNU Autoconf 2.67,
14450 with options \\"\$ac_cs_config\\"14450 with options \\"\$ac_cs_config\\"
1445114451
1445214452
=== modified file 'configure.ac'
--- configure.ac 2010-08-19 18:41:19 +0000
+++ configure.ac 2010-08-26 20:37:39 +0000
@@ -1,11 +1,11 @@
11
2AC_INIT(libdbusmenu, 0.3.11, ted@canonical.com)2AC_INIT(libdbusmenu, 0.3.12, 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.3.11, [-Wno-portability])8AM_INIT_AUTOMAKE(libdbusmenu, 0.3.12, [-Wno-portability])
99
10AM_MAINTAINER_MODE10AM_MAINTAINER_MODE
1111
@@ -99,7 +99,7 @@
99###########################99###########################
100100
101LIBDBUSMENU_CURRENT=1101LIBDBUSMENU_CURRENT=1
102LIBDBUSMENU_REVISION=13102LIBDBUSMENU_REVISION=14
103LIBDBUSMENU_AGE=0103LIBDBUSMENU_AGE=0
104104
105AC_SUBST(LIBDBUSMENU_CURRENT)105AC_SUBST(LIBDBUSMENU_CURRENT)
106106
=== modified file 'debian/changelog'
--- debian/changelog 2010-08-19 20:18:01 +0000
+++ debian/changelog 2010-08-26 20:37:39 +0000
@@ -1,3 +1,12 @@
1libdbusmenu (0.3.12-0ubuntu1~ppa1) maverick; urgency=low
2
3 * New upstream release.
4 * Support activation of menus client side
5 * Increase layout XML size (LP: #621238)
6 * Display an event for the status of the signal to the server
7
8 -- Ted Gould <ted@ubuntu.com> Thu, 26 Aug 2010 15:35:19 -0500
9
1libdbusmenu (0.3.11-0ubuntu1) maverick; urgency=low10libdbusmenu (0.3.11-0ubuntu1) maverick; urgency=low
211
3 * New upstream release.12 * New upstream release.
413
=== modified file 'debian/control'
--- debian/control 2010-08-19 19:40:46 +0000
+++ debian/control 2010-08-26 20:37:39 +0000
@@ -20,7 +20,10 @@
20 gir1.0-glib-2.0,20 gir1.0-glib-2.0,
21 gir1.0-gtk-2.0,21 gir1.0-gtk-2.0,
22 libx11-dev (>= 1.3), 22 libx11-dev (>= 1.3),
23 valac23 valac,
24# Check dependencies
25 xvfb,
26 dbus-test-runner
24Standards-Version: 3.9.127Standards-Version: 3.9.1
25Homepage: https://launchpad.net/dbusmenu28Homepage: https://launchpad.net/dbusmenu
26Vcs-Bzr: https://code.launchpad.net/~dbusmenu-team/dbusmenu/ubuntu29Vcs-Bzr: https://code.launchpad.net/~dbusmenu-team/dbusmenu/ubuntu
2730
=== modified file 'debian/rules'
--- debian/rules 2010-08-19 20:18:01 +0000
+++ debian/rules 2010-08-26 20:37:39 +0000
@@ -3,6 +3,7 @@
3include /usr/share/cdbs/1/rules/debhelper.mk3include /usr/share/cdbs/1/rules/debhelper.mk
4include /usr/share/cdbs/1/class/gnome.mk4include /usr/share/cdbs/1/class/gnome.mk
55
6DEB_MAKE_CHECK_TARGET := check
6DEB_CONFIGURE_EXTRA_FLAGS += --disable-scrollkeeper --enable-gtk-doc7DEB_CONFIGURE_EXTRA_FLAGS += --disable-scrollkeeper --enable-gtk-doc
7LDFLAGS += -Wl,-z,defs -Wl,--as-needed8LDFLAGS += -Wl,-z,defs -Wl,--as-needed
89
910
=== modified file 'docs/libdbusmenu-glib/reference/html/ch01.html'
--- docs/libdbusmenu-glib/reference/html/ch01.html 2010-08-12 16:22:27 +0000
+++ docs/libdbusmenu-glib/reference/html/ch01.html 2010-08-26 20:37:39 +0000
@@ -21,7 +21,7 @@
21</tr></table>21</tr></table>
22<div class="chapter" title="API">22<div class="chapter" title="API">
23<div class="titlepage"><div><div><h2 class="title">23<div class="titlepage"><div><div><h2 class="title">
24<a name="id404092"></a>API</h2></div></div></div>24<a name="id579504"></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"></span>27<span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"></span>
2828
=== modified file 'docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html'
--- docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html 2010-08-12 16:22:27 +0000
+++ docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html 2010-08-26 20:37:39 +0000
@@ -188,12 +188,13 @@
188 void (*layout_updated)(void);188 void (*layout_updated)(void);
189 void (*root_changed) (DbusmenuMenuitem * newroot);189 void (*root_changed) (DbusmenuMenuitem * newroot);
190 void (*new_menuitem) (DbusmenuMenuitem * newitem);190 void (*new_menuitem) (DbusmenuMenuitem * newitem);
191 void (*item_activate) (DbusmenuMenuitem * item, guint timestamp);
191192
192 /* Reserved for future use */193 /* Reserved for future use */
193 void (*reserved1) (void);194 void (*reserved1) (void);
194 void (*reserved2) (void);195 void (*reserved2) (void);
195 void (*reserved3) (void);196 void (*reserved3) (void);
196 void (*reserved4) (void);197 /* void (*reserved4) (void); */
197} DbusmenuClientClass;198} DbusmenuClientClass;
198</pre>199</pre>
199<p>200<p>
@@ -226,6 +227,11 @@
226</td>227</td>
227</tr>228</tr>
228<tr>229<tr>
230<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.item-activate"></a>item_activate</code></em> ()</span></p></td>
231<td>Slote for <span class="type">"item-activate"</span>.
232</td>
233</tr>
234<tr>
229<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.reserved1"></a>reserved1</code></em> ()</span></p></td>235<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.reserved1"></a>reserved1</code></em> ()</span></p></td>
230<td>Reserved for future use.236<td>Reserved for future use.
231</td>237</td>
@@ -240,11 +246,6 @@
240<td>Reserved for future use.246<td>Reserved for future use.
241</td>247</td>
242</tr>248</tr>
243<tr>
244<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.reserved4"></a>reserved4</code></em> ()</span></p></td>
245<td>Reserved for future use.
246</td>
247</tr>
248</tbody>249</tbody>
249</table></div>250</table></div>
250</div>251</div>
@@ -457,6 +458,7 @@
457<em class="parameter"><code>gpointer</code></em> user_data:458<em class="parameter"><code>gpointer</code></em> user_data:
458<em class="parameter"><code>gpointer</code></em> user_data:459<em class="parameter"><code>gpointer</code></em> user_data:
459<em class="parameter"><code>gpointer</code></em> user_data:460<em class="parameter"><code>gpointer</code></em> user_data:
461<em class="parameter"><code>gpointer</code></em> user_data:
460</td>462</td>
461</tr>463</tr>
462<tr>464<tr>
463465
=== modified file 'docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html'
--- docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html 2010-08-12 16:21:29 +0000
+++ docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html 2010-08-26 20:37:39 +0000
@@ -435,7 +435,8 @@
435 void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);435 void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);
436 void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);436 void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);
437437
438 void (*reserved1) (void);438 void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data);
439 /* void (*reserved1) (void); */
439 /* void (*reserved2) (void); */440 /* void (*reserved2) (void); */
440 /* void (*reserved3) (void); */441 /* void (*reserved3) (void); */
441 /* void (*reserved4) (void); -- realized, realloc when bumping lib version */442 /* void (*reserved4) (void); -- realized, realloc when bumping lib version */
@@ -495,8 +496,8 @@
495</td>496</td>
496</tr>497</tr>
497<tr>498<tr>
498<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuMenuitemClass.reserved1"></a>reserved1</code></em> ()</span></p></td>499<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuMenuitemClass.show-to-user"></a>show_to_user</code></em> ()</span></p></td>
499<td>Reserved for future use.500<td>Slot for <span class="type">"show-to-user"</span>.
500</td>501</td>
501</tr>502</tr>
502</tbody>503</tbody>
503504
=== modified file 'docs/libdbusmenu-glib/reference/tmpl/client.sgml'
--- docs/libdbusmenu-glib/reference/tmpl/client.sgml 2010-08-12 16:22:27 +0000
+++ docs/libdbusmenu-glib/reference/tmpl/client.sgml 2010-08-26 20:37:39 +0000
@@ -92,10 +92,10 @@
92@layout_updated: 92@layout_updated:
93@root_changed: 93@root_changed:
94@new_menuitem: 94@new_menuitem:
95@item_activate:
95@reserved1: 96@reserved1:
96@reserved2: 97@reserved2:
97@reserved3: 98@reserved3:
98@reserved4:
9999
100<!-- ##### USER_FUNCTION DbusmenuClientTypeHandler ##### -->100<!-- ##### USER_FUNCTION DbusmenuClientTypeHandler ##### -->
101<para>101<para>
@@ -159,6 +159,7 @@
159@id: 159@id:
160@gpointer user_data:160@gpointer user_data:
161@gpointer user_data:161@gpointer user_data:
162@gpointer user_data:
162@gpointer user_data: 163@gpointer user_data:
163@cb_data: 164@cb_data:
164165
165166
=== modified file 'docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml'
--- docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml 2010-08-12 16:22:27 +0000
+++ docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml 2010-08-26 20:37:39 +0000
@@ -221,7 +221,7 @@
221@buildxml: 221@buildxml:
222@handle_event: 222@handle_event:
223@send_about_to_show: 223@send_about_to_show:
224@reserved1: 224@show_to_user:
225225
226<!-- ##### FUNCTION dbusmenu_menuitem_new ##### -->226<!-- ##### FUNCTION dbusmenu_menuitem_new ##### -->
227<para>227<para>
@@ -507,6 +507,7 @@
507@mi: 507@mi:
508@DbusmenuMenuitem * mi, gpointer data:508@DbusmenuMenuitem * mi, gpointer data:
509@DbusmenuMenuitem * mi, gpointer data:509@DbusmenuMenuitem * mi, gpointer data:
510@DbusmenuMenuitem * mi, gpointer data:
510@DbusmenuMenuitem * mi, gpointer data: 511@DbusmenuMenuitem * mi, gpointer data:
511@data: 512@data:
512513
513514
=== modified file 'docs/libdbusmenu-glib/reference/version.xml'
--- docs/libdbusmenu-glib/reference/version.xml 2010-08-19 18:41:19 +0000
+++ docs/libdbusmenu-glib/reference/version.xml 2010-08-26 20:37:39 +0000
@@ -1,1 +1,1 @@
10.3.1110.3.12
22
=== modified file 'docs/libdbusmenu-glib/reference/xml/client.xml'
--- docs/libdbusmenu-glib/reference/xml/client.xml 2010-08-12 16:22:27 +0000
+++ docs/libdbusmenu-glib/reference/xml/client.xml 2010-08-26 20:37:39 +0000
@@ -160,12 +160,13 @@
160 void (*layout_updated)(void);160 void (*layout_updated)(void);
161 void (*root_changed) (DbusmenuMenuitem * newroot);161 void (*root_changed) (DbusmenuMenuitem * newroot);
162 void (*new_menuitem) (DbusmenuMenuitem * newitem);162 void (*new_menuitem) (DbusmenuMenuitem * newitem);
163 void (*item_activate) (DbusmenuMenuitem * item, guint timestamp);
163164
164 /* Reserved for future use */165 /* Reserved for future use */
165 void (*reserved1) (void);166 void (*reserved1) (void);
166 void (*reserved2) (void);167 void (*reserved2) (void);
167 void (*reserved3) (void);168 void (*reserved3) (void);
168 void (*reserved4) (void);169 /* void (*reserved4) (void); */
169} DbusmenuClientClass;170} DbusmenuClientClass;
170</programlisting>171</programlisting>
171<para>172<para>
@@ -189,6 +190,10 @@
189<listitem><simpara>Slot for <link linkend="DbusmenuClient-new-menuitem"><type>"new-menuitem"</type></link>.190<listitem><simpara>Slot for <link linkend="DbusmenuClient-new-menuitem"><type>"new-menuitem"</type></link>.
190</simpara></listitem>191</simpara></listitem>
191</varlistentry>192</varlistentry>
193<varlistentry><term><structfield id="DbusmenuClientClass.item-activate">item_activate</structfield>&#160;()</term>
194<listitem><simpara>Slote for <link linkend="DbusmenuClient-item-activate"><type>"item-activate"</type></link>.
195</simpara></listitem>
196</varlistentry>
192<varlistentry><term><structfield id="DbusmenuClientClass.reserved1">reserved1</structfield>&#160;()</term>197<varlistentry><term><structfield id="DbusmenuClientClass.reserved1">reserved1</structfield>&#160;()</term>
193<listitem><simpara>Reserved for future use.198<listitem><simpara>Reserved for future use.
194</simpara></listitem>199</simpara></listitem>
@@ -201,10 +206,6 @@
201<listitem><simpara>Reserved for future use.206<listitem><simpara>Reserved for future use.
202</simpara></listitem>207</simpara></listitem>
203</varlistentry>208</varlistentry>
204<varlistentry><term><structfield id="DbusmenuClientClass.reserved4">reserved4</structfield>&#160;()</term>
205<listitem><simpara>Reserved for future use.
206</simpara></listitem>
207</varlistentry>
208</variablelist></refsect2>209</variablelist></refsect2>
209<refsect2 id="DbusmenuClientTypeHandler" role="function">210<refsect2 id="DbusmenuClientTypeHandler" role="function">
210<title>DbusmenuClientTypeHandler ()</title>211<title>DbusmenuClientTypeHandler ()</title>
@@ -344,6 +345,7 @@
344<parameter>gpointer</parameter> user_data:345<parameter>gpointer</parameter> user_data:
345<parameter>gpointer</parameter> user_data:346<parameter>gpointer</parameter> user_data:
346<parameter>gpointer</parameter> user_data:347<parameter>gpointer</parameter> user_data:
348<parameter>gpointer</parameter> user_data:
347</simpara></listitem></varlistentry>349</simpara></listitem></varlistentry>
348<varlistentry><term><parameter>cb_data</parameter>&#160;:</term>350<varlistentry><term><parameter>cb_data</parameter>&#160;:</term>
349<listitem><simpara>351<listitem><simpara>
350352
=== modified file 'docs/libdbusmenu-glib/reference/xml/menuitem.xml'
--- docs/libdbusmenu-glib/reference/xml/menuitem.xml 2010-08-12 16:22:27 +0000
+++ docs/libdbusmenu-glib/reference/xml/menuitem.xml 2010-08-26 20:37:39 +0000
@@ -375,7 +375,8 @@
375 void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);375 void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);
376 void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);376 void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);
377377
378 void (*reserved1) (void);378 void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data);
379 /* void (*reserved1) (void); */
379 /* void (*reserved2) (void); */380 /* void (*reserved2) (void); */
380 /* void (*reserved3) (void); */381 /* void (*reserved3) (void); */
381 /* void (*reserved4) (void); -- realized, realloc when bumping lib version */382 /* void (*reserved4) (void); -- realized, realloc when bumping lib version */
@@ -422,8 +423,8 @@
422<listitem><simpara>Virtual function that notifies server that the client is about to show a menu.423<listitem><simpara>Virtual function that notifies server that the client is about to show a menu.
423</simpara></listitem>424</simpara></listitem>
424</varlistentry>425</varlistentry>
425<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved1">reserved1</structfield>&#160;()</term>426<varlistentry><term><structfield id="DbusmenuMenuitemClass.show-to-user">show_to_user</structfield>&#160;()</term>
426<listitem><simpara>Reserved for future use.427<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-show-to-user"><type>"show-to-user"</type></link>.
427</simpara></listitem>428</simpara></listitem>
428</varlistentry>429</varlistentry>
429</variablelist></refsect2>430</variablelist></refsect2>
430431
=== modified file 'docs/libdbusmenu-gtk/reference/html/ch01.html'
--- docs/libdbusmenu-gtk/reference/html/ch01.html 2010-08-12 16:22:27 +0000
+++ docs/libdbusmenu-gtk/reference/html/ch01.html 2010-08-26 20:37:39 +0000
@@ -21,7 +21,7 @@
21</tr></table>21</tr></table>
22<div class="chapter" title="API">22<div class="chapter" title="API">
23<div class="titlepage"><div><div><h2 class="title">23<div class="titlepage"><div><div><h2 class="title">
24<a name="id373680"></a>API</h2></div></div></div>24<a name="id453927"></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"></span>27<span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"></span>
2828
=== modified file 'docs/libdbusmenu-gtk/reference/version.xml'
--- docs/libdbusmenu-gtk/reference/version.xml 2010-08-19 18:41:19 +0000
+++ docs/libdbusmenu-gtk/reference/version.xml 2010-08-26 20:37:39 +0000
@@ -1,1 +1,1 @@
10.3.1110.3.12
22
=== modified file 'libdbusmenu-glib/Makefile.am'
--- libdbusmenu-glib/Makefile.am 2010-05-21 18:37:36 +0000
+++ libdbusmenu-glib/Makefile.am 2010-08-26 20:37:39 +0000
@@ -4,6 +4,7 @@
4EXTRA_DIST = \4EXTRA_DIST = \
5 dbusmenu-glib.pc.in \5 dbusmenu-glib.pc.in \
6 dbus-menu.xml \6 dbus-menu.xml \
7 client-marshal.list \
7 menuitem-marshal.list \8 menuitem-marshal.list \
8 server-marshal.list9 server-marshal.list
910
@@ -32,6 +33,8 @@
32 server.c \33 server.c \
33 server-marshal.h \34 server-marshal.h \
34 server-marshal.c \35 server-marshal.c \
36 client-marshal.h \
37 client-marshal.c \
35 client-menuitem.h \38 client-menuitem.h \
36 client-menuitem.c \39 client-menuitem.c \
37 client.h \40 client.h \
@@ -54,6 +57,8 @@
54BUILT_SOURCES = \57BUILT_SOURCES = \
55 dbusmenu-client.h \58 dbusmenu-client.h \
56 dbusmenu-server.h \59 dbusmenu-server.h \
60 client-marshal.h \
61 client-marshal.c \
57 menuitem-marshal.h \62 menuitem-marshal.h \
58 menuitem-marshal.c \63 menuitem-marshal.c \
59 server-marshal.h \64 server-marshal.h \
@@ -73,6 +78,16 @@
73 --output=dbusmenu-client.h \78 --output=dbusmenu-client.h \
74 $(srcdir)/dbus-menu.xml79 $(srcdir)/dbus-menu.xml
7580
81client-marshal.h: $(srcdir)/client-marshal.list
82 glib-genmarshal --header \
83 --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \
84 > client-marshal.h
85
86client-marshal.c: $(srcdir)/client-marshal.list
87 glib-genmarshal --body \
88 --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \
89 > client-marshal.c
90
76server-marshal.h: $(srcdir)/server-marshal.list91server-marshal.h: $(srcdir)/server-marshal.list
77 glib-genmarshal --header \92 glib-genmarshal --header \
78 --prefix=_dbusmenu_server_marshal $(srcdir)/server-marshal.list \93 --prefix=_dbusmenu_server_marshal $(srcdir)/server-marshal.list \
7994
=== modified file 'libdbusmenu-glib/Makefile.in'
--- libdbusmenu-glib/Makefile.in 2010-08-12 16:22:27 +0000
+++ libdbusmenu-glib/Makefile.in 2010-08-26 20:37:39 +0000
@@ -83,6 +83,7 @@
83 libdbusmenu_glib_la-menuitem-proxy.lo \83 libdbusmenu_glib_la-menuitem-proxy.lo \
84 libdbusmenu_glib_la-server.lo \84 libdbusmenu_glib_la-server.lo \
85 libdbusmenu_glib_la-server-marshal.lo \85 libdbusmenu_glib_la-server-marshal.lo \
86 libdbusmenu_glib_la-client-marshal.lo \
86 libdbusmenu_glib_la-client-menuitem.lo \87 libdbusmenu_glib_la-client-menuitem.lo \
87 libdbusmenu_glib_la-client.lo88 libdbusmenu_glib_la-client.lo
88libdbusmenu_glib_la_OBJECTS = $(am_libdbusmenu_glib_la_OBJECTS)89libdbusmenu_glib_la_OBJECTS = $(am_libdbusmenu_glib_la_OBJECTS)
@@ -297,6 +298,7 @@
297EXTRA_DIST = \298EXTRA_DIST = \
298 dbusmenu-glib.pc.in \299 dbusmenu-glib.pc.in \
299 dbus-menu.xml \300 dbus-menu.xml \
301 client-marshal.list \
300 menuitem-marshal.list \302 menuitem-marshal.list \
301 server-marshal.list303 server-marshal.list
302304
@@ -324,6 +326,8 @@
324 server.c \326 server.c \
325 server-marshal.h \327 server-marshal.h \
326 server-marshal.c \328 server-marshal.c \
329 client-marshal.h \
330 client-marshal.c \
327 client-menuitem.h \331 client-menuitem.h \
328 client-menuitem.c \332 client-menuitem.c \
329 client.h \333 client.h \
@@ -345,6 +349,8 @@
345BUILT_SOURCES = \349BUILT_SOURCES = \
346 dbusmenu-client.h \350 dbusmenu-client.h \
347 dbusmenu-server.h \351 dbusmenu-server.h \
352 client-marshal.h \
353 client-marshal.c \
348 menuitem-marshal.h \354 menuitem-marshal.h \
349 menuitem-marshal.c \355 menuitem-marshal.c \
350 server-marshal.h \356 server-marshal.h \
@@ -452,6 +458,7 @@
452distclean-compile:458distclean-compile:
453 -rm -f *.tab.c459 -rm -f *.tab.c
454460
461@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client-marshal.Plo@am__quote@
455@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Plo@am__quote@462@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Plo@am__quote@
456@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client.Plo@am__quote@463@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client.Plo@am__quote@
457@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-menuitem-marshal.Plo@am__quote@464@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-menuitem-marshal.Plo@am__quote@
@@ -524,6 +531,14 @@
524@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@531@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
525@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_glib_la-server-marshal.lo `test -f 'server-marshal.c' || echo '$(srcdir)/'`server-marshal.c532@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_glib_la-server-marshal.lo `test -f 'server-marshal.c' || echo '$(srcdir)/'`server-marshal.c
526533
534libdbusmenu_glib_la-client-marshal.lo: client-marshal.c
535@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_glib_la-client-marshal.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_glib_la-client-marshal.Tpo -c -o libdbusmenu_glib_la-client-marshal.lo `test -f 'client-marshal.c' || echo '$(srcdir)/'`client-marshal.c
536@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_glib_la-client-marshal.Tpo $(DEPDIR)/libdbusmenu_glib_la-client-marshal.Plo
537@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
538@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='client-marshal.c' object='libdbusmenu_glib_la-client-marshal.lo' libtool=yes @AMDEPBACKSLASH@
539@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
540@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_glib_la-client-marshal.lo `test -f 'client-marshal.c' || echo '$(srcdir)/'`client-marshal.c
541
527libdbusmenu_glib_la-client-menuitem.lo: client-menuitem.c542libdbusmenu_glib_la-client-menuitem.lo: client-menuitem.c
528@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_glib_la-client-menuitem.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Tpo -c -o libdbusmenu_glib_la-client-menuitem.lo `test -f 'client-menuitem.c' || echo '$(srcdir)/'`client-menuitem.c543@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_glib_la-client-menuitem.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Tpo -c -o libdbusmenu_glib_la-client-menuitem.lo `test -f 'client-menuitem.c' || echo '$(srcdir)/'`client-menuitem.c
529@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Tpo $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Plo544@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Tpo $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Plo
@@ -876,6 +891,16 @@
876 --output=dbusmenu-client.h \891 --output=dbusmenu-client.h \
877 $(srcdir)/dbus-menu.xml892 $(srcdir)/dbus-menu.xml
878893
894client-marshal.h: $(srcdir)/client-marshal.list
895 glib-genmarshal --header \
896 --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \
897 > client-marshal.h
898
899client-marshal.c: $(srcdir)/client-marshal.list
900 glib-genmarshal --body \
901 --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \
902 > client-marshal.c
903
879server-marshal.h: $(srcdir)/server-marshal.list904server-marshal.h: $(srcdir)/server-marshal.list
880 glib-genmarshal --header \905 glib-genmarshal --header \
881 --prefix=_dbusmenu_server_marshal $(srcdir)/server-marshal.list \906 --prefix=_dbusmenu_server_marshal $(srcdir)/server-marshal.list \
882907
=== added file 'libdbusmenu-glib/client-marshal.c'
--- libdbusmenu-glib/client-marshal.c 1970-01-01 00:00:00 +0000
+++ libdbusmenu-glib/client-marshal.c 2010-08-26 20:37:39 +0000
@@ -0,0 +1,131 @@
1
2#include <glib-object.h>
3
4
5#ifdef G_ENABLE_DEBUG
6#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
7#define g_marshal_value_peek_char(v) g_value_get_char (v)
8#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
9#define g_marshal_value_peek_int(v) g_value_get_int (v)
10#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
11#define g_marshal_value_peek_long(v) g_value_get_long (v)
12#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
13#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
14#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
15#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
16#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
17#define g_marshal_value_peek_float(v) g_value_get_float (v)
18#define g_marshal_value_peek_double(v) g_value_get_double (v)
19#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
20#define g_marshal_value_peek_param(v) g_value_get_param (v)
21#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
22#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
23#define g_marshal_value_peek_object(v) g_value_get_object (v)
24#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
25#else /* !G_ENABLE_DEBUG */
26/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
27 * Do not access GValues directly in your code. Instead, use the
28 * g_value_get_*() functions
29 */
30#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
31#define g_marshal_value_peek_char(v) (v)->data[0].v_int
32#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
33#define g_marshal_value_peek_int(v) (v)->data[0].v_int
34#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
35#define g_marshal_value_peek_long(v) (v)->data[0].v_long
36#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
37#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
38#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
39#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
40#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
41#define g_marshal_value_peek_float(v) (v)->data[0].v_float
42#define g_marshal_value_peek_double(v) (v)->data[0].v_double
43#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
44#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
45#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
46#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
47#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
48#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
49#endif /* !G_ENABLE_DEBUG */
50
51
52/* VOID:OBJECT,UINT (./client-marshal.list:1) */
53void
54_dbusmenu_client_marshal_VOID__OBJECT_UINT (GClosure *closure,
55 GValue *return_value G_GNUC_UNUSED,
56 guint n_param_values,
57 const GValue *param_values,
58 gpointer invocation_hint G_GNUC_UNUSED,
59 gpointer marshal_data)
60{
61 typedef void (*GMarshalFunc_VOID__OBJECT_UINT) (gpointer data1,
62 gpointer arg_1,
63 guint arg_2,
64 gpointer data2);
65 register GMarshalFunc_VOID__OBJECT_UINT callback;
66 register GCClosure *cc = (GCClosure*) closure;
67 register gpointer data1, data2;
68
69 g_return_if_fail (n_param_values == 3);
70
71 if (G_CCLOSURE_SWAP_DATA (closure))
72 {
73 data1 = closure->data;
74 data2 = g_value_peek_pointer (param_values + 0);
75 }
76 else
77 {
78 data1 = g_value_peek_pointer (param_values + 0);
79 data2 = closure->data;
80 }
81 callback = (GMarshalFunc_VOID__OBJECT_UINT) (marshal_data ? marshal_data : cc->callback);
82
83 callback (data1,
84 g_marshal_value_peek_object (param_values + 1),
85 g_marshal_value_peek_uint (param_values + 2),
86 data2);
87}
88
89/* VOID:OBJECT,STRING,POINTER,UINT,POINTER (./client-marshal.list:2) */
90void
91_dbusmenu_client_marshal_VOID__OBJECT_STRING_POINTER_UINT_POINTER (GClosure *closure,
92 GValue *return_value G_GNUC_UNUSED,
93 guint n_param_values,
94 const GValue *param_values,
95 gpointer invocation_hint G_GNUC_UNUSED,
96 gpointer marshal_data)
97{
98 typedef void (*GMarshalFunc_VOID__OBJECT_STRING_POINTER_UINT_POINTER) (gpointer data1,
99 gpointer arg_1,
100 gpointer arg_2,
101 gpointer arg_3,
102 guint arg_4,
103 gpointer arg_5,
104 gpointer data2);
105 register GMarshalFunc_VOID__OBJECT_STRING_POINTER_UINT_POINTER callback;
106 register GCClosure *cc = (GCClosure*) closure;
107 register gpointer data1, data2;
108
109 g_return_if_fail (n_param_values == 6);
110
111 if (G_CCLOSURE_SWAP_DATA (closure))
112 {
113 data1 = closure->data;
114 data2 = g_value_peek_pointer (param_values + 0);
115 }
116 else
117 {
118 data1 = g_value_peek_pointer (param_values + 0);
119 data2 = closure->data;
120 }
121 callback = (GMarshalFunc_VOID__OBJECT_STRING_POINTER_UINT_POINTER) (marshal_data ? marshal_data : cc->callback);
122
123 callback (data1,
124 g_marshal_value_peek_object (param_values + 1),
125 g_marshal_value_peek_string (param_values + 2),
126 g_marshal_value_peek_pointer (param_values + 3),
127 g_marshal_value_peek_uint (param_values + 4),
128 g_marshal_value_peek_pointer (param_values + 5),
129 data2);
130}
131
0132
=== added file 'libdbusmenu-glib/client-marshal.h'
--- libdbusmenu-glib/client-marshal.h 1970-01-01 00:00:00 +0000
+++ libdbusmenu-glib/client-marshal.h 2010-08-26 20:37:39 +0000
@@ -0,0 +1,28 @@
1
2#ifndef ___dbusmenu_client_marshal_MARSHAL_H__
3#define ___dbusmenu_client_marshal_MARSHAL_H__
4
5#include <glib-object.h>
6
7G_BEGIN_DECLS
8
9/* VOID:OBJECT,UINT (./client-marshal.list:1) */
10extern void _dbusmenu_client_marshal_VOID__OBJECT_UINT (GClosure *closure,
11 GValue *return_value,
12 guint n_param_values,
13 const GValue *param_values,
14 gpointer invocation_hint,
15 gpointer marshal_data);
16
17/* VOID:OBJECT,STRING,POINTER,UINT,POINTER (./client-marshal.list:2) */
18extern void _dbusmenu_client_marshal_VOID__OBJECT_STRING_POINTER_UINT_POINTER (GClosure *closure,
19 GValue *return_value,
20 guint n_param_values,
21 const GValue *param_values,
22 gpointer invocation_hint,
23 gpointer marshal_data);
24
25G_END_DECLS
26
27#endif /* ___dbusmenu_client_marshal_MARSHAL_H__ */
28
029
=== added file 'libdbusmenu-glib/client-marshal.list'
--- libdbusmenu-glib/client-marshal.list 1970-01-01 00:00:00 +0000
+++ libdbusmenu-glib/client-marshal.list 2010-08-26 20:37:39 +0000
@@ -0,0 +1,2 @@
1VOID: OBJECT, UINT
2VOID: OBJECT, STRING, POINTER, UINT, POINTER
03
=== modified file 'libdbusmenu-glib/client.c'
--- libdbusmenu-glib/client.c 2010-08-19 18:41:19 +0000
+++ libdbusmenu-glib/client.c 2010-08-26 20:37:39 +0000
@@ -41,6 +41,7 @@
41#include "client-menuitem.h"41#include "client-menuitem.h"
42#include "dbusmenu-client.h"42#include "dbusmenu-client.h"
43#include "server-marshal.h"43#include "server-marshal.h"
44#include "client-marshal.h"
4445
45/* Properties */46/* Properties */
46enum {47enum {
@@ -54,6 +55,8 @@
54 LAYOUT_UPDATED,55 LAYOUT_UPDATED,
55 ROOT_CHANGED,56 ROOT_CHANGED,
56 NEW_MENUITEM,57 NEW_MENUITEM,
58 ITEM_ACTIVATE,
59 EVENT_RESULT,
57 LAST_SIGNAL60 LAST_SIGNAL
58};61};
5962
@@ -100,6 +103,16 @@
100 gboolean replied;103 gboolean replied;
101};104};
102105
106typedef struct _event_data_t event_data_t;
107struct _event_data_t {
108 DbusmenuClient * client;
109 DbusmenuMenuitem * menuitem;
110 gchar * event;
111 GValue data;
112 guint timestamp;
113};
114
115
103#define DBUSMENU_CLIENT_GET_PRIVATE(o) \116#define DBUSMENU_CLIENT_GET_PRIVATE(o) \
104(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_TYPE_CLIENT, DbusmenuClientPrivate))117(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_TYPE_CLIENT, DbusmenuClientPrivate))
105118
@@ -123,6 +136,7 @@
123static void menuitem_get_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * error, gpointer data);136static void menuitem_get_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * error, gpointer data);
124static void get_properties_globber (DbusmenuClient * client, gint id, const gchar ** properties, org_ayatana_dbusmenu_get_properties_reply callback, gpointer user_data);137static void get_properties_globber (DbusmenuClient * client, gint id, const gchar ** properties, org_ayatana_dbusmenu_get_properties_reply callback, gpointer user_data);
125static GQuark error_domain (void);138static GQuark error_domain (void);
139static void item_activated (DBusGProxy * proxy, gint id, guint timestamp, DbusmenuClient * client);
126140
127/* Build a type */141/* Build a type */
128G_DEFINE_TYPE (DbusmenuClient, dbusmenu_client, G_TYPE_OBJECT);142G_DEFINE_TYPE (DbusmenuClient, dbusmenu_client, G_TYPE_OBJECT);
@@ -187,6 +201,41 @@
187 NULL, NULL,201 NULL, NULL,
188 g_cclosure_marshal_VOID__OBJECT,202 g_cclosure_marshal_VOID__OBJECT,
189 G_TYPE_NONE, 1, G_TYPE_OBJECT);203 G_TYPE_NONE, 1, G_TYPE_OBJECT);
204 /**
205 DbusmenuClient::item-activate:
206 @arg0: The #DbusmenuClient object
207 @arg1: The #DbusmenuMenuitem activated
208 @arg2: A timestamp that the event happened at
209
210 Signaled when the server wants to activate an item in
211 order to display the menu.
212 */
213 signals[ITEM_ACTIVATE] = g_signal_new(DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE,
214 G_TYPE_FROM_CLASS (klass),
215 G_SIGNAL_RUN_LAST,
216 G_STRUCT_OFFSET (DbusmenuClientClass, item_activate),
217 NULL, NULL,
218 _dbusmenu_client_marshal_VOID__OBJECT_UINT,
219 G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_UINT);
220 /**
221 DbusmenuClient::event-error:
222 @arg0: The #DbusmenuClient object
223 @arg1: The #DbusmenuMenuitem sent an event
224 @arg2: The ID of the event sent
225 @arg3: The data sent along with the event
226 @arg4: A timestamp that the event happened at
227 @arg5: Possibly the error in sending the event (or NULL)
228
229 Signal sent to show that there was an error in sending the event
230 to the server.
231 */
232 signals[EVENT_RESULT] = g_signal_new(DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT,
233 G_TYPE_FROM_CLASS (klass),
234 G_SIGNAL_RUN_LAST,
235 G_STRUCT_OFFSET (DbusmenuClientClass, event_result),
236 NULL, NULL,
237 _dbusmenu_client_marshal_VOID__OBJECT_STRING_POINTER_UINT_POINTER,
238 G_TYPE_NONE, 5, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_POINTER);
190239
191 g_object_class_install_property (object_class, PROP_DBUSOBJECT,240 g_object_class_install_property (object_class, PROP_DBUSOBJECT,
192 g_param_spec_string(DBUSMENU_CLIENT_PROP_DBUS_OBJECT, "DBus Object we represent",241 g_param_spec_string(DBUSMENU_CLIENT_PROP_DBUS_OBJECT, "DBus Object we represent",
@@ -582,6 +631,30 @@
582 return;631 return;
583}632}
584633
634/* Called when a server item wants to activate the menu */
635static void
636item_activated (DBusGProxy * proxy, gint id, guint timestamp, DbusmenuClient * client)
637{
638 g_return_if_fail(DBUSMENU_IS_CLIENT(client));
639
640 DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
641
642 if (priv->root == NULL) {
643 g_warning("Asked to activate item %d when we don't have a menu structure.", id);
644 return;
645 }
646
647 DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id);
648 if (menuitem == NULL) {
649 g_warning("Unable to find menu item %d to activate.", id);
650 return;
651 }
652
653 g_signal_emit(G_OBJECT(client), signals[ITEM_ACTIVATE], 0, menuitem, timestamp, TRUE);
654
655 return;
656}
657
585/* Annoying little wrapper to make the right function update */658/* Annoying little wrapper to make the right function update */
586static void659static void
587layout_update (DBusGProxy * proxy, guint revision, gint parent, DbusmenuClient * client)660layout_update (DBusGProxy * proxy, guint revision, gint parent, DbusmenuClient * client)
@@ -821,6 +894,10 @@
821 dbus_g_proxy_add_signal(priv->menuproxy, "ItemUpdated", G_TYPE_INT, G_TYPE_INVALID);894 dbus_g_proxy_add_signal(priv->menuproxy, "ItemUpdated", G_TYPE_INT, G_TYPE_INVALID);
822 dbus_g_proxy_connect_signal(priv->menuproxy, "ItemUpdated", G_CALLBACK(id_update), client, NULL);895 dbus_g_proxy_connect_signal(priv->menuproxy, "ItemUpdated", G_CALLBACK(id_update), client, NULL);
823896
897 dbus_g_object_register_marshaller(_dbusmenu_server_marshal_VOID__INT_UINT, G_TYPE_NONE, G_TYPE_INT, G_TYPE_UINT, G_TYPE_INVALID);
898 dbus_g_proxy_add_signal(priv->menuproxy, "ItemActivationRequested", G_TYPE_INT, G_TYPE_UINT, G_TYPE_INVALID);
899 dbus_g_proxy_connect_signal(priv->menuproxy, "ItemActivationRequested", G_CALLBACK(item_activated), client, NULL);
900
824 update_layout(client);901 update_layout(client);
825902
826 return;903 return;
@@ -978,10 +1055,19 @@
978static void1055static void
979menuitem_call_cb (DBusGProxy * proxy, GError * error, gpointer userdata)1056menuitem_call_cb (DBusGProxy * proxy, GError * error, gpointer userdata)
980{1057{
1058 event_data_t * edata = (event_data_t *)userdata;
1059
981 if (error != NULL) {1060 if (error != NULL) {
982 g_warning("Unable to call menu item %d: %s", GPOINTER_TO_INT(userdata), error->message);1061 g_warning("Unable to call menu item %d: %s", GPOINTER_TO_INT(userdata), error->message);
983 }1062 }
9841063
1064 g_signal_emit(edata->client, signals[EVENT_RESULT], 0, edata->menuitem, edata->event, edata->data, edata->timestamp, error, TRUE);
1065
1066 g_value_unset(&edata->data);
1067 g_free(edata->event);
1068 g_object_unref(edata->menuitem);
1069 g_free(edata);
1070
985 return;1071 return;
986}1072}
9871073
@@ -994,6 +1080,13 @@
994 g_return_if_fail(id >= 0);1080 g_return_if_fail(id >= 0);
995 g_return_if_fail(name != NULL);1081 g_return_if_fail(name != NULL);
9961082
1083 DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
1084 DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, id);
1085 if (mi == NULL) {
1086 g_warning("Asked to activate a menuitem %d that we don't know about", id);
1087 return;
1088 }
1089
997 if (value == NULL) {1090 if (value == NULL) {
998 GValue internalval = {0};1091 GValue internalval = {0};
999 g_value_init(&internalval, G_TYPE_INT);1092 g_value_init(&internalval, G_TYPE_INT);
@@ -1001,8 +1094,16 @@
1001 value = &internalval;1094 value = &internalval;
1002 }1095 }
10031096
1004 DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);1097 event_data_t * edata = g_new0(event_data_t, 1);
1005 org_ayatana_dbusmenu_event_async (priv->menuproxy, id, name, value, timestamp, menuitem_call_cb, GINT_TO_POINTER(id));1098 edata->client = client;
1099 edata->menuitem = mi;
1100 g_object_ref(edata->menuitem);
1101 edata->event = g_strdup(name);
1102 g_value_init(&edata->data, G_VALUE_TYPE(value));
1103 g_value_copy(value, &edata->data);
1104 edata->timestamp = timestamp;
1105
1106 org_ayatana_dbusmenu_event_async (priv->menuproxy, id, name, value, timestamp, menuitem_call_cb, edata);
1006 return;1107 return;
1007}1108}
10081109
@@ -1225,7 +1326,8 @@
12251326
1226 xmlDocPtr xmldoc;1327 xmlDocPtr xmldoc;
12271328
1228 xmldoc = xmlReadMemory(layout, g_utf8_strlen(layout, 16*1024), "dbusmenu.xml", NULL, 0);1329 /* No one should need more characters than this! */
1330 xmldoc = xmlReadMemory(layout, g_utf8_strlen(layout, 1024*1024), "dbusmenu.xml", NULL, 0);
12291331
1230 xmlNodePtr root = xmlDocGetRootElement(xmldoc);1332 xmlNodePtr root = xmlDocGetRootElement(xmldoc);
12311333
12321334
=== modified file 'libdbusmenu-glib/client.h'
--- libdbusmenu-glib/client.h 2010-03-31 18:47:27 +0000
+++ libdbusmenu-glib/client.h 2010-08-26 20:37:39 +0000
@@ -46,6 +46,8 @@
46#define DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED "layout-updated"46#define DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED "layout-updated"
47#define DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED "root-changed"47#define DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED "root-changed"
48#define DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM "new-menuitem"48#define DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM "new-menuitem"
49#define DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE "item-activate"
50#define DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT "event-result"
4951
50#define DBUSMENU_CLIENT_PROP_DBUS_NAME "dbus-name"52#define DBUSMENU_CLIENT_PROP_DBUS_NAME "dbus-name"
51#define DBUSMENU_CLIENT_PROP_DBUS_OBJECT "dbus-object"53#define DBUSMENU_CLIENT_PROP_DBUS_OBJECT "dbus-object"
@@ -59,10 +61,10 @@
59 @parent_class: #GObjectClass61 @parent_class: #GObjectClass
60 @layout_updated: Slot for #DbusmenuClient::layout-updated.62 @layout_updated: Slot for #DbusmenuClient::layout-updated.
61 @new_menuitem: Slot for #DbusmenuClient::new-menuitem.63 @new_menuitem: Slot for #DbusmenuClient::new-menuitem.
64 @item_activate: Slot for #DbusmenuClient::item-activate.
65 @event_result: Slot for #DbusmenuClient::event-error.
62 @reserved1: Reserved for future use.66 @reserved1: Reserved for future use.
63 @reserved2: Reserved for future use.67 @reserved2: Reserved for future use.
64 @reserved3: Reserved for future use.
65 @reserved4: Reserved for future use.
6668
67 A simple class that takes all of the information from a69 A simple class that takes all of the information from a
68 #DbusmenuServer over DBus and makes the same set of 70 #DbusmenuServer over DBus and makes the same set of
@@ -75,12 +77,14 @@
75 void (*layout_updated)(void);77 void (*layout_updated)(void);
76 void (*root_changed) (DbusmenuMenuitem * newroot);78 void (*root_changed) (DbusmenuMenuitem * newroot);
77 void (*new_menuitem) (DbusmenuMenuitem * newitem);79 void (*new_menuitem) (DbusmenuMenuitem * newitem);
80 void (*item_activate) (DbusmenuMenuitem * item, guint timestamp);
81 void (*event_result) (DbusmenuMenuitem * item, gchar * event, GValue * data, guint timestamp, GError * error);
7882
79 /* Reserved for future use */83 /* Reserved for future use */
80 void (*reserved1) (void);84 void (*reserved1) (void);
81 void (*reserved2) (void);85 void (*reserved2) (void);
82 void (*reserved3) (void);86 /* void (*reserved3) (void); */
83 void (*reserved4) (void);87 /* void (*reserved4) (void); */
84};88};
8589
86/**90/**
8791
=== modified file 'libdbusmenu-glib/dbusmenu-server.h'
--- libdbusmenu-glib/dbusmenu-server.h 2010-07-30 17:44:33 +0000
+++ libdbusmenu-glib/dbusmenu-server.h 2010-08-26 20:37:39 +0000
@@ -376,12 +376,11 @@
376 { (GCallback) _dbusmenu_server_about_to_show, dbus_glib_marshal__dbusmenu_server_BOOLEAN__INT_POINTER_POINTER, 491 },376 { (GCallback) _dbusmenu_server_about_to_show, dbus_glib_marshal__dbusmenu_server_BOOLEAN__INT_POINTER_POINTER, 491 },
377};377};
378378
379const DBusGObjectInfo dbus_glib__dbusmenu_server_object_info = {379const DBusGObjectInfo dbus_glib__dbusmenu_server_object_info = { 1,
380 0,
381 dbus_glib__dbusmenu_server_methods,380 dbus_glib__dbusmenu_server_methods,
382 7,381 7,
383"org.ayatana.dbusmenu\0GetLayout\0S\0parentId\0I\0i\0revision\0O\0F\0N\0u\0layout\0O\0F\0N\0s\0\0org.ayatana.dbusmenu\0GetGroupProperties\0S\0ids\0I\0ai\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetChildren\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetProperty\0S\0id\0I\0i\0name\0I\0s\0value\0O\0F\0N\0v\0\0org.ayatana.dbusmenu\0GetProperties\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a{sv}\0\0org.ayatana.dbusmenu\0Event\0S\0id\0I\0i\0eventId\0I\0s\0data\0I\0v\0timestamp\0I\0u\0\0org.ayatana.dbusmenu\0AboutToShow\0S\0id\0I\0i\0needUpdate\0O\0F\0N\0b\0\0\0",382"org.ayatana.dbusmenu\0GetLayout\0S\0parentId\0I\0i\0revision\0O\0F\0N\0u\0layout\0O\0F\0N\0s\0\0org.ayatana.dbusmenu\0GetGroupProperties\0S\0ids\0I\0ai\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetChildren\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetProperty\0S\0id\0I\0i\0name\0I\0s\0value\0O\0F\0N\0v\0\0org.ayatana.dbusmenu\0GetProperties\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a{sv}\0\0org.ayatana.dbusmenu\0Event\0S\0id\0I\0i\0eventId\0I\0s\0data\0I\0v\0timestamp\0I\0u\0\0org.ayatana.dbusmenu\0AboutToShow\0S\0id\0I\0i\0needUpdate\0O\0F\0N\0b\0\0\0",
384"org.ayatana.dbusmenu\0ItemPropertyUpdated\0org.ayatana.dbusmenu\0ItemUpdated\0org.ayatana.dbusmenu\0LayoutUpdated\0org.ayatana.dbusmenu\0ItemActivationRequested\0\0",383"org.ayatana.dbusmenu\0ItemPropertyUpdated\0org.ayatana.dbusmenu\0ItemUpdated\0org.ayatana.dbusmenu\0LayoutUpdated\0org.ayatana.dbusmenu\0ItemActivationRequested\0\0",
385"org.ayatana.dbusmenu\0version\0\0"384"org.ayatana.dbusmenu\0version\0version\0read\0\0"
386};385};
387386
388387
=== modified file 'libdbusmenu-glib/menuitem-marshal.c'
--- libdbusmenu-glib/menuitem-marshal.c 2010-08-03 01:24:55 +0000
+++ libdbusmenu-glib/menuitem-marshal.c 2010-08-26 20:37:39 +0000
@@ -21,6 +21,7 @@
21#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)21#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
22#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)22#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
23#define g_marshal_value_peek_object(v) g_value_get_object (v)23#define g_marshal_value_peek_object(v) g_value_get_object (v)
24#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
24#else /* !G_ENABLE_DEBUG */25#else /* !G_ENABLE_DEBUG */
25/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.26/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
26 * Do not access GValues directly in your code. Instead, use the27 * Do not access GValues directly in your code. Instead, use the
@@ -44,6 +45,7 @@
44#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer45#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
45#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer46#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
46#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer47#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
48#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
47#endif /* !G_ENABLE_DEBUG */49#endif /* !G_ENABLE_DEBUG */
4850
4951
5052
=== modified file 'libdbusmenu-glib/menuitem.c'
--- libdbusmenu-glib/menuitem.c 2010-06-08 04:00:17 +0000
+++ libdbusmenu-glib/menuitem.c 2010-08-26 20:37:39 +0000
@@ -70,6 +70,7 @@
70 CHILD_REMOVED,70 CHILD_REMOVED,
71 CHILD_MOVED,71 CHILD_MOVED,
72 REALIZED,72 REALIZED,
73 SHOW_TO_USER,
73 LAST_SIGNAL74 LAST_SIGNAL
74};75};
7576
@@ -211,6 +212,22 @@
211 NULL, NULL,212 NULL, NULL,
212 _dbusmenu_menuitem_marshal_VOID__VOID,213 _dbusmenu_menuitem_marshal_VOID__VOID,
213 G_TYPE_NONE, 0, G_TYPE_NONE);214 G_TYPE_NONE, 0, G_TYPE_NONE);
215 /**
216 DbusmenuMenuitem::show-to-user:
217 @arg0: The #DbusmenuMenuitem which should be shown.
218 @arg1: Timestamp the event happened at
219
220 Signaled when the application would like the visualization
221 of this menu item shown to the user. This usually requires
222 going over the bus to get it done.
223 */
224 signals[SHOW_TO_USER] = g_signal_new(DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER,
225 G_TYPE_FROM_CLASS(klass),
226 G_SIGNAL_RUN_LAST,
227 G_STRUCT_OFFSET(DbusmenuMenuitemClass, show_to_user),
228 NULL, NULL,
229 g_cclosure_marshal_VOID__UINT,
230 G_TYPE_NONE, 1, G_TYPE_UINT, G_TYPE_NONE);
214231
215 g_object_class_install_property (object_class, PROP_ID,232 g_object_class_install_property (object_class, PROP_ID,
216 g_param_spec_int(PROP_ID_S, "ID for the menu item",233 g_param_spec_int(PROP_ID_S, "ID for the menu item",
@@ -1349,3 +1366,22 @@
13491366
1350 return;1367 return;
1351}1368}
1369
1370/**
1371 dbusmenu_menuitem_show_to_user:
1372 @mi: #DbusmenuMenuitem to show
1373 @timestamp: The time that the user requested it to be shown
1374
1375 Signals that this menu item should be shown to the user. If this is
1376 server side the server will then take it and send it over the
1377 bus.
1378*/
1379void
1380dbusmenu_menuitem_show_to_user (DbusmenuMenuitem * mi, guint timestamp)
1381{
1382 g_return_if_fail(DBUSMENU_IS_MENUITEM(mi));
1383
1384 g_signal_emit(G_OBJECT(mi), signals[SHOW_TO_USER], 0, timestamp, TRUE);
1385
1386 return;
1387}
13521388
=== modified file 'libdbusmenu-glib/menuitem.h'
--- libdbusmenu-glib/menuitem.h 2010-06-21 19:47:08 +0000
+++ libdbusmenu-glib/menuitem.h 2010-08-26 20:37:39 +0000
@@ -49,6 +49,7 @@
49#define DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED "child-moved"49#define DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED "child-moved"
50#define DBUSMENU_MENUITEM_SIGNAL_REALIZED "realized"50#define DBUSMENU_MENUITEM_SIGNAL_REALIZED "realized"
51#define DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID (g_signal_lookup(DBUSMENU_MENUITEM_SIGNAL_REALIZED, DBUSMENU_TYPE_MENUITEM))51#define DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID (g_signal_lookup(DBUSMENU_MENUITEM_SIGNAL_REALIZED, DBUSMENU_TYPE_MENUITEM))
52#define DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER "show-to-user"
5253
53#define DBUSMENU_MENUITEM_PROP_TYPE "type"54#define DBUSMENU_MENUITEM_PROP_TYPE "type"
54#define DBUSMENU_MENUITEM_PROP_VISIBLE "visible"55#define DBUSMENU_MENUITEM_PROP_VISIBLE "visible"
@@ -124,10 +125,7 @@
124 * @buildxml: Virtual function that appends the strings required to represent this menu item in the menu XML file.125 * @buildxml: Virtual function that appends the strings required to represent this menu item in the menu XML file.
125 * @handle_event: This function is to override how events are handled by subclasses. Look at #dbusmenu_menuitem_handle_event for lots of good information.126 * @handle_event: This function is to override how events are handled by subclasses. Look at #dbusmenu_menuitem_handle_event for lots of good information.
126 * @send_about_to_show: Virtual function that notifies server that the client is about to show a menu.127 * @send_about_to_show: Virtual function that notifies server that the client is about to show a menu.
127 * @reserved1: Reserved for future use.128 * @show_to_user: Slot for #DbusmenuMenuitem::show-to-user.
128 * @reserved2: Reserved for future use.
129 * @reserved3: Reserved for future use.
130 * @reserved4: Reserved for future use.
131 */129 */
132typedef struct _DbusmenuMenuitemClass DbusmenuMenuitemClass;130typedef struct _DbusmenuMenuitemClass DbusmenuMenuitemClass;
133struct _DbusmenuMenuitemClass131struct _DbusmenuMenuitemClass
@@ -147,7 +145,8 @@
147 void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);145 void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);
148 void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);146 void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);
149147
150 void (*reserved1) (void);148 void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data);
149 /* void (*reserved1) (void); */
151 /* void (*reserved2) (void); */150 /* void (*reserved2) (void); */
152 /* void (*reserved3) (void); */151 /* void (*reserved3) (void); */
153 /* void (*reserved4) (void); -- realized, realloc when bumping lib version */152 /* void (*reserved4) (void); -- realized, realloc when bumping lib version */
@@ -192,6 +191,8 @@
192void dbusmenu_menuitem_handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);191void dbusmenu_menuitem_handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);
193void dbusmenu_menuitem_send_about_to_show (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);192void dbusmenu_menuitem_send_about_to_show (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data);
194193
194void dbusmenu_menuitem_show_to_user (DbusmenuMenuitem * mi, guint timestamp);
195
195/**196/**
196 * SECTION:menuitem197 * SECTION:menuitem
197 * @short_description: A lowlevel represenation of a menuitem198 * @short_description: A lowlevel represenation of a menuitem
198199
=== modified file 'libdbusmenu-glib/server.c'
--- libdbusmenu-glib/server.c 2010-08-02 22:07:49 +0000
+++ libdbusmenu-glib/server.c 2010-08-26 20:37:39 +0000
@@ -410,7 +410,7 @@
410/* Called when a menu item emits its activated signal so it410/* Called when a menu item emits its activated signal so it
411 gets passed across the bus. */411 gets passed across the bus. */
412static void 412static void
413menuitem_activated (DbusmenuMenuitem * mi, guint timestamp, DbusmenuServer * server)413menuitem_shown (DbusmenuMenuitem * mi, guint timestamp, DbusmenuServer * server)
414{414{
415 g_signal_emit(G_OBJECT(server), signals[ITEM_ACTIVATION], 0, dbusmenu_menuitem_get_id(mi), timestamp, TRUE);415 g_signal_emit(G_OBJECT(server), signals[ITEM_ACTIVATION], 0, dbusmenu_menuitem_get_id(mi), timestamp, TRUE);
416 return;416 return;
@@ -425,7 +425,7 @@
425 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(menuitem_child_removed), data);425 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(menuitem_child_removed), data);
426 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(menuitem_child_moved), data);426 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(menuitem_child_moved), data);
427 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menuitem_property_changed), data);427 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menuitem_property_changed), data);
428 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(menuitem_activated), data);428 g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER, G_CALLBACK(menuitem_shown), data);
429 return;429 return;
430}430}
431431
432432
=== modified file 'libdbusmenu-gtk/client.c'
--- libdbusmenu-gtk/client.c 2010-07-22 08:44:33 +0000
+++ libdbusmenu-gtk/client.c 2010-08-26 20:37:39 +0000
@@ -54,6 +54,7 @@
54static void new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, DbusmenuGtkClient * gtkclient);54static void new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, DbusmenuGtkClient * gtkclient);
55static void delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient * gtkclient);55static void delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient * gtkclient);
56static void move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint old, DbusmenuGtkClient * gtkclient);56static void move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint old, DbusmenuGtkClient * gtkclient);
57static void item_activate (DbusmenuClient * client, DbusmenuMenuitem * mi, guint timestamp, gpointer userdata);
5758
58static gboolean new_item_normal (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client);59static gboolean new_item_normal (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client);
59static gboolean new_item_seperator (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client);60static gboolean new_item_seperator (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client);
@@ -91,7 +92,9 @@
91 dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(self), DBUSMENU_CLIENT_TYPES_DEFAULT, new_item_normal);92 dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(self), DBUSMENU_CLIENT_TYPES_DEFAULT, new_item_normal);
92 dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(self), DBUSMENU_CLIENT_TYPES_SEPARATOR, new_item_seperator);93 dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(self), DBUSMENU_CLIENT_TYPES_SEPARATOR, new_item_seperator);
9394
95 /* TODO: I think these can be handled in the class... */
94 g_signal_connect(G_OBJECT(self), DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM, G_CALLBACK(new_menuitem), NULL);96 g_signal_connect(G_OBJECT(self), DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM, G_CALLBACK(new_menuitem), NULL);
97 g_signal_connect(G_OBJECT(self), DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE, G_CALLBACK(item_activate), NULL);
9598
96 return;99 return;
97}100}
@@ -431,6 +434,50 @@
431 return;434 return;
432}435}
433436
437/* Goes through the tree of items and ensure's that all the items
438 above us are also displayed. */
439static void
440activate_helper (GtkMenuShell * shell)
441{
442 if (shell == NULL) {
443 return;
444 }
445
446 if (GTK_IS_MENU(shell)) {
447 GtkWidget * attach = gtk_menu_get_attach_widget(GTK_MENU(shell));
448
449 if (attach != NULL) {
450 GtkWidget * parent = gtk_widget_get_parent(GTK_WIDGET(attach));
451
452 if (parent != NULL) {
453 if (GTK_IS_MENU(parent)) {
454 activate_helper(GTK_MENU_SHELL(parent));
455 }
456 gtk_menu_shell_select_item(GTK_MENU_SHELL(parent), attach);
457 }
458 }
459 }
460
461 return;
462}
463
464/* Signaled when we should show a menuitem at request of the application
465 that it is in. */
466static void
467item_activate (DbusmenuClient * client, DbusmenuMenuitem * mi, guint timestamp, gpointer userdata)
468{
469 gpointer pmenu = g_object_get_data(G_OBJECT(mi), data_menu);
470 if (pmenu == NULL) {
471 g_warning("Activated menu item doesn't have a menu? ID: %d", dbusmenu_menuitem_get_id(mi));
472 return;
473 }
474
475 activate_helper(GTK_MENU_SHELL(pmenu));
476 gtk_menu_shell_select_first(GTK_MENU_SHELL(pmenu), FALSE);
477
478 return;
479}
480
434#ifdef MASSIVEDEBUGGING481#ifdef MASSIVEDEBUGGING
435static void482static void
436destroy_gmi (GtkMenuItem * gmi, DbusmenuMenuitem * mi)483destroy_gmi (GtkMenuItem * gmi, DbusmenuMenuitem * mi)
437484
=== modified file 'tests/test-gtk-label-client.c'
--- tests/test-gtk-label-client.c 2009-12-17 22:41:01 +0000
+++ tests/test-gtk-label-client.c 2010-08-26 20:37:39 +0000
@@ -22,7 +22,6 @@
22#include <gtk/gtk.h>22#include <gtk/gtk.h>
23#include <libdbusmenu-gtk/menu.h>23#include <libdbusmenu-gtk/menu.h>
2424
25static guint layouton = 0;
26static GMainLoop * mainloop = NULL;25static GMainLoop * mainloop = NULL;
27static gboolean passed = TRUE;26static gboolean passed = TRUE;
28static guint death_timer = 0;27static guint death_timer = 0;
@@ -105,7 +104,6 @@
105static gboolean104static gboolean
106timer_func (gpointer data)105timer_func (gpointer data)
107{106{
108 g_debug("Death timer. Oops. Got to: %d", layouton);
109 passed = TRUE;107 passed = TRUE;
110 g_main_loop_quit(mainloop);108 g_main_loop_quit(mainloop);
111 return FALSE;109 return FALSE;
112110
=== modified file 'tests/test-gtk-submenu-client.c'
--- tests/test-gtk-submenu-client.c 2010-07-22 08:44:33 +0000
+++ tests/test-gtk-submenu-client.c 2010-08-26 20:37:39 +0000
@@ -102,6 +102,12 @@
102 }102 }
103103
104 passed = TRUE;104 passed = TRUE;
105 return FALSE;
106}
107
108gboolean
109finished_func (gpointer user_data)
110{
105 g_main_loop_quit(mainloop);111 g_main_loop_quit(mainloop);
106 return FALSE;112 return FALSE;
107}113}
@@ -127,7 +133,8 @@
127 gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test");133 gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test");
128 gtk_widget_show(window);134 gtk_widget_show(window);
129135
130 g_timeout_add_seconds(1, timer_func, menuitem);136 g_timeout_add_seconds(2, timer_func, menuitem);
137 g_timeout_add_seconds(6, finished_func, menuitem);
131138
132 g_debug("Entering Mainloop");139 g_debug("Entering Mainloop");
133 mainloop = g_main_loop_new(NULL, FALSE);140 mainloop = g_main_loop_new(NULL, FALSE);
134141
=== modified file 'tests/test-gtk-submenu-server.c'
--- tests/test-gtk-submenu-server.c 2010-07-22 19:05:53 +0000
+++ tests/test-gtk-submenu-server.c 2010-08-26 20:37:39 +0000
@@ -39,6 +39,17 @@
39 return FALSE;39 return FALSE;
40}40}
4141
42static gboolean
43show_item (gpointer pmi)
44{
45 DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(pmi);
46 g_debug("Showing item");
47
48 dbusmenu_menuitem_show_to_user(mi, 0);
49
50 return FALSE;
51}
52
42DbusmenuMenuitem *53DbusmenuMenuitem *
43add_item(DbusmenuMenuitem * parent, const char * label)54add_item(DbusmenuMenuitem * parent, const char * label)
44{55{
@@ -81,12 +92,16 @@
81 add_item(item, "1.2");92 add_item(item, "1.2");
82 add_item(item, "1.3");93 add_item(item, "1.3");
8394
95 g_timeout_add_seconds(2, show_item, item);
96
84 item = add_item(root, "Folder 2");97 item = add_item(root, "Folder 2");
85 add_item(item, "2.1");98 add_item(item, "2.1");
86 add_item(item, "2.2");99 add_item(item, "2.2");
87 add_item(item, "2.3");100 add_item(item, "2.3");
88101
89 g_timeout_add_seconds(3, timer_func, NULL);102 g_timeout_add_seconds(4, show_item, item);
103
104 g_timeout_add_seconds(6, timer_func, NULL);
90105
91 mainloop = g_main_loop_new(NULL, FALSE);106 mainloop = g_main_loop_new(NULL, FALSE);
92 g_main_loop_run(mainloop);107 g_main_loop_run(mainloop);

Subscribers

People subscribed via source and target branches

to all changes: