diff options
author | Ted Gould <ted@gould.cx> | 2011-02-10 14:29:27 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-02-10 14:29:27 -0600 |
commit | df78fc4c1a098aa95fe530028b26a0f175bb4cf4 (patch) | |
tree | 5ae85175593cc41b0c50ddcba6c735ac58fe604c | |
parent | 61839709d922db8d78b316be40827bab25c86002 (diff) | |
parent | 5c1bbec8381af0246b813a095f816b55e2f8dc06 (diff) | |
download | libdbusmenu-df78fc4c1a098aa95fe530028b26a0f175bb4cf4.tar.gz libdbusmenu-df78fc4c1a098aa95fe530028b26a0f175bb4cf4.tar.bz2 libdbusmenu-df78fc4c1a098aa95fe530028b26a0f175bb4cf4.zip |
Import upstream version 0.3.97
-rw-r--r-- | ChangeLog | 28 | ||||
-rwxr-xr-x | configure | 22 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | docs/libdbusmenu-glib/reference/html/ch01.html | 2 | ||||
-rw-r--r-- | docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html | 3 | ||||
-rw-r--r-- | docs/libdbusmenu-glib/reference/version.xml | 2 | ||||
-rw-r--r-- | docs/libdbusmenu-glib/reference/xml/menuitem.xml | 3 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html | 32 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html | 6 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/html/object-tree.html | 10 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/version.xml | 2 | ||||
-rw-r--r-- | libdbusmenu-glib/Makefile.am | 26 | ||||
-rw-r--r-- | libdbusmenu-glib/Makefile.in | 26 | ||||
-rw-r--r-- | libdbusmenu-glib/menuitem.c | 4 | ||||
-rw-r--r-- | libdbusmenu-gtk/Makefile.am | 4 | ||||
-rw-r--r-- | libdbusmenu-gtk/Makefile.in | 4 | ||||
-rw-r--r-- | libdbusmenu-gtk/parser.c | 101 |
17 files changed, 194 insertions, 87 deletions
@@ -1,5 +1,33 @@ # Generated by Makefile. Do not edit. +2011-02-10 Ted Gould <ted@gould.cx> + + 0.3.97 + +2011-02-09 Ted Gould <ted@gould.cx> + + Fixing the naming of the Dbusmenu Glib GIR file + +2011-02-09 Ken VanDine <ken.vandine@canonical.com> + + Fix the name used for the Dbusmenu-Glib-0.4 typelib so it can be properly used with GI. It should be Dbusmenu-0.4 (LP: #713099) + +2011-02-06 Ted Gould <ted@gould.cx> + + Fixing take to not unref + +2011-02-04 Ted Gould <ted@gould.cx> + + take_children() shouldn't unref the items as they might get deleted before the caller would be abel to use them. Making sure to put those annotations in the docs. + +2011-02-04 Ted Gould <ted@gould.cx> + + Handle ChildAdded on GtkShell items and clean up the code so that it has single functions for doing common operations. + +2011-02-04 Michael Terry <mike@mterry.name> + + watch for new menu items being added to existing menu shells + 2011-02-03 Ted Gould <ted@gould.cx> 0.3.96 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for libdbusmenu 0.3.96. +# Generated by GNU Autoconf 2.67 for libdbusmenu 0.3.97. # # Report bugs to <ted@canonical.com>. # @@ -703,8 +703,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libdbusmenu' PACKAGE_TARNAME='libdbusmenu' -PACKAGE_VERSION='0.3.96' -PACKAGE_STRING='libdbusmenu 0.3.96' +PACKAGE_VERSION='0.3.97' +PACKAGE_STRING='libdbusmenu 0.3.97' PACKAGE_BUGREPORT='ted@canonical.com' PACKAGE_URL='' @@ -1540,7 +1540,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libdbusmenu 0.3.96 to adapt to many kinds of systems. +\`configure' configures libdbusmenu 0.3.97 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1610,7 +1610,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libdbusmenu 0.3.96:";; + short | recursive ) echo "Configuration of libdbusmenu 0.3.97:";; esac cat <<\_ACEOF @@ -1750,7 +1750,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libdbusmenu configure 0.3.96 +libdbusmenu configure 0.3.97 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2121,7 +2121,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libdbusmenu $as_me 0.3.96, which was +It was created by libdbusmenu $as_me 0.3.97, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2942,7 +2942,7 @@ fi # Define the identity of the package. PACKAGE=libdbusmenu - VERSION=0.3.96 + VERSION=0.3.97 # Some tools Automake needs. @@ -13280,7 +13280,7 @@ fi ########################### LIBDBUSMENU_CURRENT=3 -LIBDBUSMENU_REVISION=4 +LIBDBUSMENU_REVISION=5 LIBDBUSMENU_AGE=0 @@ -14602,7 +14602,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libdbusmenu $as_me 0.3.96, which was +This file was extended by libdbusmenu $as_me 0.3.97, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14668,7 +14668,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libdbusmenu config.status 0.3.96 +libdbusmenu config.status 0.3.97 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 381df76..4510b6d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.3.96, ted@canonical.com) +AC_INIT(libdbusmenu, 0.3.97, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.3.96, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.3.97, [-Wno-portability]) AM_MAINTAINER_MODE @@ -136,7 +136,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc]) ########################### LIBDBUSMENU_CURRENT=3 -LIBDBUSMENU_REVISION=4 +LIBDBUSMENU_REVISION=5 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) diff --git a/docs/libdbusmenu-glib/reference/html/ch01.html b/docs/libdbusmenu-glib/reference/html/ch01.html index bdf1fbc..fd2a26b 100644 --- a/docs/libdbusmenu-glib/reference/html/ch01.html +++ b/docs/libdbusmenu-glib/reference/html/ch01.html @@ -21,7 +21,7 @@ </tr></table> <div class="chapter"> <div class="titlepage"><div><div><h2 class="title"> -<a name="id450827"></a>API</h2></div></div></div> +<a name="id508273"></a>API</h2></div></div></div> <div class="toc"><dl> <dt> <span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"></span> diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html index 635bf00..de5a9e6 100644 --- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html +++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html @@ -624,7 +624,8 @@ While the name sounds devious that's exactly what this function </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of pointers to <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="struct DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> objects.</td> +<td>(transfer full) (array) (element-type Dbusmenu.Menuitem) +A <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of pointers to <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="struct DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> objects.</td> </tr> </tbody> </table></div> diff --git a/docs/libdbusmenu-glib/reference/version.xml b/docs/libdbusmenu-glib/reference/version.xml index 06cee8f..3f8ec80 100644 --- a/docs/libdbusmenu-glib/reference/version.xml +++ b/docs/libdbusmenu-glib/reference/version.xml @@ -1 +1 @@ -0.3.96 +0.3.97 diff --git a/docs/libdbusmenu-glib/reference/xml/menuitem.xml b/docs/libdbusmenu-glib/reference/xml/menuitem.xml index 9e32406..1fe29d1 100644 --- a/docs/libdbusmenu-glib/reference/xml/menuitem.xml +++ b/docs/libdbusmenu-glib/reference/xml/menuitem.xml @@ -499,7 +499,8 @@ While the name sounds devious that's exactly what this function </para><variablelist role="params"> <varlistentry><term><parameter>mi</parameter> :</term> <listitem><simpara>The <link linkend="DbusmenMenuitem"><type>DbusmenMenuitem</type></link> to take the children from.</simpara></listitem></varlistentry> -<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A <link linkend="GList"><type>GList</type></link> of pointers to <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects.</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>(transfer full) (array) (element-type Dbusmenu.Menuitem) +A <link linkend="GList"><type>GList</type></link> of pointers to <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects.</simpara></listitem></varlistentry> </variablelist></refsect2> <refsect2 id="dbusmenu-menuitem-get-position" role="function"> <title>dbusmenu_menuitem_get_position ()</title> diff --git a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html index f4c9e8f..2facae6 100644 --- a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html +++ b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html @@ -43,17 +43,17 @@ struct <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#DbusmenuGtkClientClass" title="struct DbusmenuGtkClientClass">DbusmenuGtkClientClass</a>; <span class="returnvalue">DbusmenuGtkClient</span> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-new" title="dbusmenu_gtkclient_new ()">dbusmenu_gtkclient_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_name</code></em>, <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_object</code></em>); -<a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="returnvalue">GtkMenuItem</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-menuitem-get" title="dbusmenu_gtkclient_menuitem_get ()">dbusmenu_gtkclient_menuitem_get</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, +<a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="returnvalue">GtkMenuItem</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-menuitem-get" title="dbusmenu_gtkclient_menuitem_get ()">dbusmenu_gtkclient_menuitem_get</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>); -<a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-menuitem-get-submenu" title="dbusmenu_gtkclient_menuitem_get_submenu ()">dbusmenu_gtkclient_menuitem_get_submenu</a> +<a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-menuitem-get-submenu" title="dbusmenu_gtkclient_menuitem_get_submenu ()">dbusmenu_gtkclient_menuitem_get_submenu</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>); <span class="returnvalue">void</span> <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-set-accel-group" title="dbusmenu_gtkclient_set_accel_group ()">dbusmenu_gtkclient_set_accel_group</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> *agroup</code></em>); -<a href="http://library.gnome.org/devel/gtk/unstable/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-get-accel-group" title="dbusmenu_gtkclient_get_accel_group ()">dbusmenu_gtkclient_get_accel_group</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>); + <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/2.22/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> *agroup</code></em>); +<a href="http://library.gnome.org/devel/gtk/2.22/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-get-accel-group" title="dbusmenu_gtkclient_get_accel_group ()">dbusmenu_gtkclient_get_accel_group</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>); <span class="returnvalue">void</span> <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-newitem-base" title="dbusmenu_gtkclient_newitem_base ()">dbusmenu_gtkclient_newitem_base</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *parent</code></em>); </pre> </div> @@ -168,10 +168,10 @@ Creates a new <span class="type">DbusmenuGtkClient</span> object and creates a < <hr> <div class="refsect2"> <a name="dbusmenu-gtkclient-menuitem-get"></a><h3>dbusmenu_gtkclient_menuitem_get ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="returnvalue">GtkMenuItem</span></a> * dbusmenu_gtkclient_menuitem_get (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, +<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="returnvalue">GtkMenuItem</span></a> * dbusmenu_gtkclient_menuitem_get (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>);</pre> <p> -This grabs the <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> that is associated with the +This grabs the <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> that is associated with the <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a>. </p> <div class="variablelist"><table border="0"> @@ -184,11 +184,11 @@ This grabs the <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem. <tr> <td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td> <td> -<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to get associated <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> on.</td> +<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to get associated <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> on.</td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>The <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> that can be played with.</td> +<td>The <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> that can be played with.</td> </tr> </tbody> </table></div> @@ -196,7 +196,7 @@ This grabs the <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem. <hr> <div class="refsect2"> <a name="dbusmenu-gtkclient-menuitem-get-submenu"></a><h3>dbusmenu_gtkclient_menuitem_get_submenu ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * dbusmenu_gtkclient_menuitem_get_submenu +<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * dbusmenu_gtkclient_menuitem_get_submenu (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>);</pre> <p> @@ -212,11 +212,11 @@ This grabs the submenu associated with the menuitem. <tr> <td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td> <td> -<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to get associated <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> on.</td> +<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to get associated <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="type">GtkMenu</span></a> on.</td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>The <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> if there is one.</td> +<td>The <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="type">GtkMenu</span></a> if there is one.</td> </tr> </tbody> </table></div> @@ -225,7 +225,7 @@ This grabs the submenu associated with the menuitem. <div class="refsect2"> <a name="dbusmenu-gtkclient-set-accel-group"></a><h3>dbusmenu_gtkclient_set_accel_group ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> dbusmenu_gtkclient_set_accel_group (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> *agroup</code></em>);</pre> + <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/2.22/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> *agroup</code></em>);</pre> <p> Sets the acceleration group for the menu items with accelerators on this client. @@ -247,7 +247,7 @@ Sets the acceleration group for the menu items with accelerators <hr> <div class="refsect2"> <a name="dbusmenu-gtkclient-get-accel-group"></a><h3>dbusmenu_gtkclient_get_accel_group ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> * dbusmenu_gtkclient_get_accel_group (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>);</pre> +<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/2.22/gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> * dbusmenu_gtkclient_get_accel_group (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>);</pre> <p> Gets the accel group for this client. </p> @@ -271,7 +271,7 @@ none set.</td> <a name="dbusmenu-gtkclient-newitem-base"></a><h3>dbusmenu_gtkclient_newitem_base ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> dbusmenu_gtkclient_newitem_base (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *parent</code></em>);</pre> <p> This function provides some of the basic connectivity for being in @@ -297,7 +297,7 @@ This function provides some of the basic connectivity for being in </tr> <tr> <td><p><span class="term"><em class="parameter"><code>gmi</code></em> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> representing the GTK world's view of this menuitem</td> +<td>A <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> representing the GTK world's view of this menuitem</td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td> diff --git a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html index 6e75384..1288725 100644 --- a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html +++ b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html @@ -53,7 +53,7 @@ <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *shortcut</code></em>); <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-set-shortcut-menuitem" title="dbusmenu_menuitem_property_set_shortcut_menuitem ()">dbusmenu_menuitem_property_set_shortcut_menuitem</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>); + <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>); <span class="returnvalue">void</span> <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-get-shortcut" title="dbusmenu_menuitem_property_get_shortcut ()">dbusmenu_menuitem_property_get_shortcut</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</code></em>, <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *key</code></em>, @@ -172,7 +172,7 @@ Takes the modifer described by <em class="parameter"><code>key</code></em> and < <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *shortcut</code></em>);</pre> <p> This function takes a GTK shortcut string as defined in - <a href="http://library.gnome.org/devel/gtk/unstable/gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse"><span class="type">gtk_accelerator_parse</span></a> and turns that into the information + <a href="http://library.gnome.org/devel/gtk/2.22/gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse"><span class="type">gtk_accelerator_parse</span></a> and turns that into the information required to send it over DBusmenu. </p> <div class="variablelist"><table border="0"> @@ -198,7 +198,7 @@ This function takes a GTK shortcut string as defined in <a name="dbusmenu-menuitem-property-set-shortcut-menuitem"></a><h3>dbusmenu_menuitem_property_set_shortcut_menuitem ()</h3> <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> dbusmenu_menuitem_property_set_shortcut_menuitem (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>);</pre> + <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>);</pre> <p> Takes the shortcut that is installed on a menu item and calls <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-set-shortcut" title="dbusmenu_menuitem_property_set_shortcut ()"><span class="type">dbusmenu_menuitem_property_set_shortcut</span></a> with it. It also sets diff --git a/docs/libdbusmenu-gtk/reference/html/object-tree.html b/docs/libdbusmenu-gtk/reference/html/object-tree.html index 9a49361..722eb7b 100644 --- a/docs/libdbusmenu-gtk/reference/html/object-tree.html +++ b/docs/libdbusmenu-gtk/reference/html/object-tree.html @@ -26,12 +26,12 @@ <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> <a href="http://library.gnome.org/devel/gtk/unstable/GtkObject.html">GtkObject</a> - <a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html">GtkWidget</a> - <a href="http://library.gnome.org/devel/gtk/unstable/GtkContainer.html">GtkContainer</a> - <a href="http://library.gnome.org/devel/gtk/unstable/GtkBin.html">GtkBin</a> + <a href="http://library.gnome.org/devel/gtk/2.22/GtkWidget.html">GtkWidget</a> + <a href="http://library.gnome.org/devel/gtk/2.22/GtkContainer.html">GtkContainer</a> + <a href="http://library.gnome.org/devel/gtk/2.22/GtkBin.html">GtkBin</a> <a href="http://library.gnome.org/devel/gtk/unstable/GtkItem.html">GtkItem</a> - <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html">GtkMenuItem</a> - <a href="http://library.gnome.org/devel/gtk/unstable/gtk3-gtkcheckmenuitem.html#GtkCheckMenuItem">GtkCheckMenuItem</a> + <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenuItem.html">GtkMenuItem</a> + <a href="http://library.gnome.org/devel/gtk/2.22/gtk3-gtkcheckmenuitem.html#GtkCheckMenuItem">GtkCheckMenuItem</a> Genericmenuitem </pre> </div> diff --git a/docs/libdbusmenu-gtk/reference/version.xml b/docs/libdbusmenu-gtk/reference/version.xml index 06cee8f..3f8ec80 100644 --- a/docs/libdbusmenu-gtk/reference/version.xml +++ b/docs/libdbusmenu-gtk/reference/version.xml @@ -1 +1 @@ -0.3.96 +0.3.97 diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am index a139f7c..e6877b6 100644 --- a/libdbusmenu-glib/Makefile.am +++ b/libdbusmenu-glib/Makefile.am @@ -138,18 +138,18 @@ if HAVE_INTROSPECTION introspection_sources = $(libdbusmenu_glibinclude_HEADERS) -Dbusmenu_Glib-0.4.gir: libdbusmenu-glib.la -Dbusmenu_Glib_0_4_gir_INCLUDES = \ +Dbusmenu-0.4.gir: libdbusmenu-glib.la +Dbusmenu_0_4_gir_INCLUDES = \ GObject-2.0 -Dbusmenu_Glib_0_4_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS) -I$(top_srcdir) -Dbusmenu_Glib_0_4_gir_LIBS = libdbusmenu-glib.la -Dbusmenu_Glib_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) -Dbusmenu_Glib_0_4_gir_NAMESPACE = Dbusmenu -Dbusmenu_Glib_0_4_gir_VERSION = Glib-0.4 -Dbusmenu_Glib_0_4_gir_EXPORT_PACKAGES = dbusmenu-glib-0.4 -Dbusmenu_Glib_0_4_gir_SCANNER_FLAGS = $(INTROSPECTION_SCANNER_ARGS) +Dbusmenu_0_4_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS) -I$(top_srcdir) +Dbusmenu_0_4_gir_LIBS = libdbusmenu-glib.la +Dbusmenu_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) +Dbusmenu_0_4_gir_NAMESPACE = Dbusmenu +Dbusmenu_0_4_gir_VERSION = 0.4 +Dbusmenu_0_4_gir_EXPORT_PACKAGES = dbusmenu-glib-0.4 +Dbusmenu_0_4_gir_SCANNER_FLAGS = $(INTROSPECTION_SCANNER_ARGS) -INTROSPECTION_GIRS += Dbusmenu-Glib-0.4.gir +INTROSPECTION_GIRS += Dbusmenu-0.4.gir girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) @@ -168,10 +168,10 @@ endif if HAVE_INTROSPECTION vapidir = $(datadir)/vala/vapi -vapi_DATA = Dbusmenu-Glib-0.4.vapi +vapi_DATA = Dbusmenu-0.4.vapi -Dbusmenu-Glib-0.4.vapi: Dbusmenu-Glib-0.4.gir - $(VALA_API_GEN) --library=Dbusmenu-Glib-0.4 $< +Dbusmenu-0.4.vapi: Dbusmenu-0.4.gir + $(VALA_API_GEN) --library=Dbusmenu-0.4 $< CLEANFILES += $(vapi_DATA) diff --git a/libdbusmenu-glib/Makefile.in b/libdbusmenu-glib/Makefile.in index 9cfe106..3da0dbd 100644 --- a/libdbusmenu-glib/Makefile.in +++ b/libdbusmenu-glib/Makefile.in @@ -36,7 +36,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@HAVE_INTROSPECTION_TRUE@am__append_1 = Dbusmenu-Glib-0.4.gir +@HAVE_INTROSPECTION_TRUE@am__append_1 = Dbusmenu-0.4.gir @HAVE_INTROSPECTION_TRUE@am__append_2 = $(gir_DATA) $(typelib_DATA) \ @HAVE_INTROSPECTION_TRUE@ $(vapi_DATA) subdir = libdbusmenu-glib @@ -376,16 +376,16 @@ INTROSPECTION_GIRS = $(am__append_1) INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) @HAVE_INTROSPECTION_TRUE@introspection_sources = $(libdbusmenu_glibinclude_HEADERS) -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_INCLUDES = \ +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_INCLUDES = \ @HAVE_INTROSPECTION_TRUE@ GObject-2.0 -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS) -I$(top_srcdir) -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_LIBS = libdbusmenu-glib.la -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_NAMESPACE = Dbusmenu -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_VERSION = Glib-0.4 -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_EXPORT_PACKAGES = dbusmenu-glib-0.4 -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib_0_4_gir_SCANNER_FLAGS = $(INTROSPECTION_SCANNER_ARGS) +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS) -I$(top_srcdir) +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_LIBS = libdbusmenu-glib.la +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_NAMESPACE = Dbusmenu +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_VERSION = 0.4 +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_EXPORT_PACKAGES = dbusmenu-glib-0.4 +@HAVE_INTROSPECTION_TRUE@Dbusmenu_0_4_gir_SCANNER_FLAGS = $(INTROSPECTION_SCANNER_ARGS) @HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0 @HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS) @HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0 @@ -395,7 +395,7 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) # VAPI Files ######################### @HAVE_INTROSPECTION_TRUE@vapidir = $(datadir)/vala/vapi -@HAVE_INTROSPECTION_TRUE@vapi_DATA = Dbusmenu-Glib-0.4.vapi +@HAVE_INTROSPECTION_TRUE@vapi_DATA = Dbusmenu-0.4.vapi all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -948,10 +948,10 @@ menuitem-marshal.c: $(srcdir)/menuitem-marshal.list -include $(INTROSPECTION_MAKEFILE) -@HAVE_INTROSPECTION_TRUE@Dbusmenu_Glib-0.4.gir: libdbusmenu-glib.la +@HAVE_INTROSPECTION_TRUE@Dbusmenu-0.4.gir: libdbusmenu-glib.la -@HAVE_INTROSPECTION_TRUE@Dbusmenu-Glib-0.4.vapi: Dbusmenu-Glib-0.4.gir -@HAVE_INTROSPECTION_TRUE@ $(VALA_API_GEN) --library=Dbusmenu-Glib-0.4 $< +@HAVE_INTROSPECTION_TRUE@Dbusmenu-0.4.vapi: Dbusmenu-0.4.gir +@HAVE_INTROSPECTION_TRUE@ $(VALA_API_GEN) --library=Dbusmenu-0.4 $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index b40195c..159463b 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -547,7 +547,6 @@ take_children_signal (gpointer data, gpointer user_data) g_debug("Menuitem %d (%s) signalling child removed %d (%s)", ID(user_data), LABEL(user_data), ID(data), LABEL(data)); #endif g_signal_emit(G_OBJECT(user_data), signals[CHILD_REMOVED], 0, DBUSMENU_MENUITEM(data), TRUE); - g_object_unref(G_OBJECT(data)); return; } @@ -561,7 +560,8 @@ take_children_signal (gpointer data, gpointer user_data) on the children it has taken. A lot of responsibility involved in taking children. - Return value: A #GList of pointers to #DbusmenuMenuitem objects. + Return value: (transfer full) (array) (element-type Dbusmenu.Menuitem) + A #GList of pointers to #DbusmenuMenuitem objects. */ GList * dbusmenu_menuitem_take_children (DbusmenuMenuitem * mi) diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am index f3556e9..f66f1f5 100644 --- a/libdbusmenu-gtk/Makefile.am +++ b/libdbusmenu-gtk/Makefile.am @@ -98,7 +98,7 @@ DbusmenuGtk$(VER)-0.4.gir: libdbusmenu-gtk$(VER).la DbusmenuGtk_0_4_gir_INCLUDES = \ GObject-2.0 \ $(GTKGIR) \ - Dbusmenu-Glib-0.4 + Dbusmenu-0.4 DbusmenuGtk_0_4_gir_CFLAGS = $(DBUSMENUGTK_CFLAGS) -I$(top_srcdir) DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) @@ -141,7 +141,7 @@ DbusmenuGtk$(VER)-0.4.vapi: DbusmenuGtk$(VER)-0.4.tmp.gir Makefile.am --pkg gdk-pixbuf-2.0 \ --pkg $(GTKVALA) \ --pkg atk \ - --pkg Dbusmenu-Glib-0.4 \ + --pkg Dbusmenu-0.4 \ --vapidir=$(top_builddir)/libdbusmenu-glib \ $< diff --git a/libdbusmenu-gtk/Makefile.in b/libdbusmenu-gtk/Makefile.in index 3700d89..8d6b23a 100644 --- a/libdbusmenu-gtk/Makefile.in +++ b/libdbusmenu-gtk/Makefile.in @@ -394,7 +394,7 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) --includedir=$(top_buildd @HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_INCLUDES = \ @HAVE_INTROSPECTION_TRUE@ GObject-2.0 \ @HAVE_INTROSPECTION_TRUE@ $(GTKGIR) \ -@HAVE_INTROSPECTION_TRUE@ Dbusmenu-Glib-0.4 +@HAVE_INTROSPECTION_TRUE@ Dbusmenu-0.4 @HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_CFLAGS = $(DBUSMENUGTK_CFLAGS) -I$(top_srcdir) @HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la @@ -990,7 +990,7 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ @HAVE_INTROSPECTION_TRUE@ --pkg gdk-pixbuf-2.0 \ @HAVE_INTROSPECTION_TRUE@ --pkg $(GTKVALA) \ @HAVE_INTROSPECTION_TRUE@ --pkg atk \ -@HAVE_INTROSPECTION_TRUE@ --pkg Dbusmenu-Glib-0.4 \ +@HAVE_INTROSPECTION_TRUE@ --pkg Dbusmenu-0.4 \ @HAVE_INTROSPECTION_TRUE@ --vapidir=$(top_builddir)/libdbusmenu-glib \ @HAVE_INTROSPECTION_TRUE@ $< diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index db1d8dd..70cde53 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -38,6 +38,7 @@ typedef struct _ParserData GtkWidget *label; GtkAction *action; GtkWidget *widget; + GtkWidget *shell; } ParserData; typedef struct _RecurseContext @@ -63,6 +64,9 @@ static void label_notify_cb (GtkWidget * widget, static void action_notify_cb (GtkAction * action, GParamSpec * pspec, gpointer data); +static void child_added_cb (GtkContainer * menu, + GtkWidget * widget, + gpointer data); static void item_activated (DbusmenuMenuitem * item, guint timestamp, gpointer user_data); @@ -109,7 +113,6 @@ dbusmenu_cache_freed (gpointer data, GObject * obj) /* If the dbusmenu item is killed we don't need to remove the weak ref as well. */ g_object_steal_data(G_OBJECT(data), CACHED_MENUITEM); - g_signal_handlers_disconnect_by_func(data, G_CALLBACK(widget_notify_cb), obj); ParserData *pdata = (ParserData *)g_object_get_data(G_OBJECT(obj), PARSER_DATA); @@ -128,6 +131,11 @@ dbusmenu_cache_freed (gpointer data, GObject * obj) g_object_remove_weak_pointer(G_OBJECT(pdata->widget), (gpointer*)&pdata->widget); } + if (pdata != NULL && pdata->shell != NULL) { + g_signal_handlers_disconnect_by_func(pdata->shell, G_CALLBACK(child_added_cb), obj); + g_object_remove_weak_pointer(G_OBJECT(pdata->shell), (gpointer*)&pdata->shell); + } + return; } @@ -143,6 +151,49 @@ object_cache_freed (gpointer data) return; } +/* Gets the positon of the child with its' parent if it has one. + Returns -1 if the position is unable to be calculated. */ +static gint +get_child_position (GtkWidget * child) +{ + GtkWidget * parent = gtk_widget_get_parent (child); + if (parent == NULL || !GTK_IS_CONTAINER (parent)) + return -1; + + GList * children = gtk_container_get_children (GTK_CONTAINER (parent)); + GList * iter; + gint position = 0; + + for (iter = children; iter != NULL; iter = iter->next) { + if (iter->data == child) + break; + ++position; + } + + g_list_free (children); + + if (iter == NULL) + return -1; + else + return position; +} + +/* Creates a new menu item that is attached to the widget and has + the data linkages hooked up. Also allocates the ParserData */ +static DbusmenuMenuitem * +new_menuitem (GtkWidget * widget) +{ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + + ParserData *pdata = g_new0 (ParserData, 1); + g_object_set_data_full(G_OBJECT(item), PARSER_DATA, pdata, g_free); + + g_object_set_data_full(G_OBJECT(widget), CACHED_MENUITEM, item, object_cache_freed); + g_object_weak_ref(G_OBJECT(item), dbusmenu_cache_freed, widget); + + return item; +} + static void parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) { @@ -161,10 +212,11 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) */ if (recurse->parent == NULL && GTK_IS_MENU_BAR(widget)) { GList *children = gtk_container_get_children (GTK_CONTAINER (widget)); + GList *iter; - for (; children != NULL; children = children->next) { + for (iter = children; iter != NULL; iter = iter->next) { gtk_menu_shell_activate_item (GTK_MENU_SHELL (widget), - children->data, + iter->data, TRUE); } @@ -172,9 +224,18 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) } if (recurse->parent == NULL) { - recurse->parent = dbusmenu_menuitem_new(); + recurse->parent = new_menuitem(widget); } + ParserData *pdata = (ParserData *)g_object_get_data(G_OBJECT(recurse->parent), PARSER_DATA); + + pdata->shell = widget; + g_signal_connect (G_OBJECT (widget), + "child-added", + G_CALLBACK (child_added_cb), + recurse->parent); + g_object_add_weak_pointer(G_OBJECT (widget), (gpointer*)&pdata->shell); + gtk_container_foreach (GTK_CONTAINER (widget), (GtkCallback)parse_menu_structure_helper, recurse); @@ -194,8 +255,6 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) /* We don't have one, so we'll need to build it */ if (thisitem == NULL) { thisitem = construct_dbusmenu_for_widget (widget); - g_object_set_data_full(G_OBJECT(widget), CACHED_MENUITEM, thisitem, object_cache_freed); - g_object_weak_ref(G_OBJECT(thisitem), dbusmenu_cache_freed, widget); if (!gtk_widget_get_visible (widget)) { g_signal_connect (G_OBJECT (widget), @@ -227,8 +286,14 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) g_object_set_data (G_OBJECT (thisitem), "dbusmenu-parent", recurse->parent); - dbusmenu_menuitem_child_append (recurse->parent, - thisitem); + gint pos = get_child_position (widget); + if (pos >= 0) + dbusmenu_menuitem_child_add_position (recurse->parent, + thisitem, + pos); + else + dbusmenu_menuitem_child_append (recurse->parent, + thisitem); } } @@ -265,10 +330,9 @@ construct_dbusmenu_for_widget (GtkWidget * widget) /* If it's a standard GTK Menu Item we need to do some of our own work */ if (GTK_IS_MENU_ITEM (widget)) { - DbusmenuMenuitem *mi = dbusmenu_menuitem_new (); + DbusmenuMenuitem *mi = new_menuitem(widget); - ParserData *pdata = g_new0 (ParserData, 1); - g_object_set_data_full (G_OBJECT (mi), PARSER_DATA, pdata, g_free); + ParserData *pdata = (ParserData *)g_object_get_data(G_OBJECT(mi), PARSER_DATA); gboolean visible = FALSE; gboolean sensitive = FALSE; @@ -414,7 +478,7 @@ construct_dbusmenu_for_widget (GtkWidget * widget) /* If it's none of those we're going to just create a generic menuitem as a place holder for it. */ - return dbusmenu_menuitem_new(); + return new_menuitem(widget); } static void @@ -720,6 +784,19 @@ widget_notify_cb (GtkWidget *widget, } } +/* A child item was added to a menu we're watching. Let's try to integrate it. */ +static void +child_added_cb (GtkContainer *menu, GtkWidget *widget, gpointer data) +{ + DbusmenuMenuitem *menuitem = (DbusmenuMenuitem *)data; + + RecurseContext recurse = {0}; + recurse.toplevel = gtk_widget_get_toplevel(GTK_WIDGET(menu)); + recurse.parent = menuitem; + + parse_menu_structure_helper(widget, &recurse); +} + static gboolean should_show_image (GtkImage *image) { |