aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-03-23 16:34:24 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-03-23 16:34:24 -0400
commitfcb2bd4e6936d7f7e40537f19e7dc13eb9d50ec2 (patch)
treed387895da5b6205efb28f6806b251a2bd053a1a3
parentacb6127f75c35a8e2b205f902cd3616b4ad42110 (diff)
parentfe1b40cc146c28681b6473ab28198def62c5a38d (diff)
downloadlibdbusmenu-fcb2bd4e6936d7f7e40537f19e7dc13eb9d50ec2.tar.gz
libdbusmenu-fcb2bd4e6936d7f7e40537f19e7dc13eb9d50ec2.tar.bz2
libdbusmenu-fcb2bd4e6936d7f7e40537f19e7dc13eb9d50ec2.zip
releasing version 0.4.0-0ubuntu1
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog52
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac6
-rw-r--r--debian/changelog11
-rw-r--r--docs/libdbusmenu-glib/reference/html/api-index-full.html12
-rw-r--r--docs/libdbusmenu-glib/reference/html/ch01.html2
-rw-r--r--docs/libdbusmenu-glib/reference/html/index.sgml3
-rw-r--r--docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html35
-rw-r--r--docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp3
-rw-r--r--docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp23
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/client.sgml2
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml2
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml23
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/server.sgml2
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/types.sgml2
-rw-r--r--docs/libdbusmenu-glib/reference/version.xml2
-rw-r--r--docs/libdbusmenu-glib/reference/xml/api-index-full.xml3
-rw-r--r--docs/libdbusmenu-glib/reference/xml/menuitem.xml32
-rw-r--r--docs/libdbusmenu-gtk/reference/html/ch01.html2
-rw-r--r--docs/libdbusmenu-gtk/reference/version.xml2
-rw-r--r--libdbusmenu-glib/client.c65
-rw-r--r--libdbusmenu-gtk/menuitem.c11
-rw-r--r--libdbusmenu-gtk/parser.c2
24 files changed, 245 insertions, 55 deletions
diff --git a/AUTHORS b/AUTHORS
index 79ab996..33caf1e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,6 +12,7 @@
Martin Pitt
Mathieu Trudel-Lapierre
Michael Terry
+ Oleg Shparber
Robert Collins
seb128
Sebastien Bacher
diff --git a/ChangeLog b/ChangeLog
index 4626e49..defc97e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,57 @@
# Generated by Makefile. Do not edit.
+2011-03-23 Ted Gould <ted@gould.cx>
+
+ 0.4.0
+
+2011-03-23 Ted Gould <ted@gould.cx>
+
+ Ensure that we don't remove properties that are getting their values updated
+
+2011-03-22 Ted Gould <ted@gould.cx>
+
+ Protect against NULL properties
+
+2011-03-22 Ted Gould <ted@gould.cx>
+
+ Remove the link instead of the data
+
+2011-03-22 Ted Gould <ted@gould.cx>
+
+ Protect the entries that are about to be updated from being removed
+
+2011-03-23 Ted Gould <ted@gould.cx>
+
+ Switch to using iter_loop to protect from NULL variants
+
+2011-03-21 Ted Gould <ted@gould.cx>
+
+ A couple more intr_loops with a small memory leak fix
+
+2011-03-21 Ted Gould <ted@gould.cx>
+
+ Moving from iter_next to iter_loop on a couple more iterators
+
+2011-03-21 Ted Gould <ted@gould.cx>
+
+ Removing an unneeded iner_new
+
+2011-03-21 Ted Gould <ted@gould.cx>
+
+ Use iter_loop to handle unref'ing the variants cleanly.
+
+2011-03-22 Ted Gould <ted@gould.cx>
+
+ Look everywhere for accel closures
+
+2011-03-21 Michael Terry <mike@mterry.name>
+
+ check menu items for accelerators directly if accel label doesn't have one
+
+2011-03-21 Oleg Shparber <oleg.shparber@wisetroll.com>
+
+ Entering and exiting the GDK threads when calling up to GTK
+
2011-03-16 Ted Gould <ted@gould.cx>
0.3.102
diff --git a/configure b/configure
index 5baf0d2..b35e8ab 100755
--- a/configure
+++ b/configure
@@ -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.102.
+# Generated by GNU Autoconf 2.67 for libdbusmenu 0.4.0.
#
# 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.102'
-PACKAGE_STRING='libdbusmenu 0.3.102'
+PACKAGE_VERSION='0.4.0'
+PACKAGE_STRING='libdbusmenu 0.4.0'
PACKAGE_BUGREPORT='ted@canonical.com'
PACKAGE_URL=''
@@ -1541,7 +1541,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.102 to adapt to many kinds of systems.
+\`configure' configures libdbusmenu 0.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1611,7 +1611,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libdbusmenu 0.3.102:";;
+ short | recursive ) echo "Configuration of libdbusmenu 0.4.0:";;
esac
cat <<\_ACEOF
@@ -1751,7 +1751,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libdbusmenu configure 0.3.102
+libdbusmenu configure 0.4.0
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2122,7 +2122,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.102, which was
+It was created by libdbusmenu $as_me 0.4.0, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2943,7 +2943,7 @@ fi
# Define the identity of the package.
PACKAGE=libdbusmenu
- VERSION=0.3.102
+ VERSION=0.4.0
# Some tools Automake needs.
@@ -13294,7 +13294,7 @@ fi
###########################
LIBDBUSMENU_CURRENT=3
-LIBDBUSMENU_REVISION=10
+LIBDBUSMENU_REVISION=11
LIBDBUSMENU_AGE=0
@@ -14616,7 +14616,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.102, which was
+This file was extended by libdbusmenu $as_me 0.4.0, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14682,7 +14682,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.102
+libdbusmenu config.status 0.4.0
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 84e0bec..a400680 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(libdbusmenu, 0.3.102, ted@canonical.com)
+AC_INIT(libdbusmenu, 0.4.0, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009,2010 Canonical])
AC_PREREQ(2.62)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libdbusmenu, 0.3.102, [-Wno-portability])
+AM_INIT_AUTOMAKE(libdbusmenu, 0.4.0, [-Wno-portability])
AM_MAINTAINER_MODE
@@ -134,7 +134,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc])
###########################
LIBDBUSMENU_CURRENT=3
-LIBDBUSMENU_REVISION=10
+LIBDBUSMENU_REVISION=11
LIBDBUSMENU_AGE=0
AC_SUBST(LIBDBUSMENU_CURRENT)
diff --git a/debian/changelog b/debian/changelog
index e153912..47e23ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+libdbusmenu (0.4.0-0ubuntu1) natty; urgency=low
+
+ * New upstream release.
+ * Protect from NULL variants by using iter_loop (LP: #737844)
+ * Look for accellerators inside the labels as well
+ * Protecting properties that are getting updated from an
+ extra remove signal. (LP: #730925)
+ * Enter and exit the GDK threads before calling GTK (LP: #717162)
+
+ -- Ted Gould <ted@ubuntu.com> Wed, 23 Mar 2011 14:56:24 -0500
+
libdbusmenu (0.3.102-0ubuntu1) natty; urgency=low
* New upstream release.
diff --git a/docs/libdbusmenu-glib/reference/html/api-index-full.html b/docs/libdbusmenu-glib/reference/html/api-index-full.html
index 00c4939..b8691d6 100644
--- a/docs/libdbusmenu-glib/reference/html/api-index-full.html
+++ b/docs/libdbusmenu-glib/reference/html/api-index-full.html
@@ -180,6 +180,18 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" title="DBUSMENU_MENUITEM_EVENT_ACTIVATED">DBUSMENU_MENUITEM_EVENT_ACTIVATED</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS" title="DBUSMENU_MENUITEM_EVENT_CLOSED">DBUSMENU_MENUITEM_EVENT_CLOSED</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS" title="DBUSMENU_MENUITEM_EVENT_OPENED">DBUSMENU_MENUITEM_EVENT_OPENED</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-find-id" title="dbusmenu_menuitem_find_id ()">dbusmenu_menuitem_find_id</a>, function in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a>
</dt>
<dd></dd>
diff --git a/docs/libdbusmenu-glib/reference/html/ch01.html b/docs/libdbusmenu-glib/reference/html/ch01.html
index 5c2cc1d..d054c64 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="id325831"></a>API</h2></div></div></div>
+<a name="id440860"></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"> — The server signals changed and
diff --git a/docs/libdbusmenu-glib/reference/html/index.sgml b/docs/libdbusmenu-glib/reference/html/index.sgml
index 8b4ca32..5446760 100644
--- a/docs/libdbusmenu-glib/reference/html/index.sgml
+++ b/docs/libdbusmenu-glib/reference/html/index.sgml
@@ -66,6 +66,9 @@
<ANCHOR id="DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS">
<ANCHOR id="DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS">
<ANCHOR id="DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS">
+<ANCHOR id="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS">
+<ANCHOR id="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS">
+<ANCHOR id="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS">
<ANCHOR id="DbusmenuMenuitem" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem">
<ANCHOR id="dbusmenu-menuitem-about-to-show-cb" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-about-to-show-cb">
<ANCHOR id="dbusmenu-menuitem-buildvariant-slot-t" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-buildvariant-slot-t">
diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html
index 9621955..9a787b2 100644
--- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html
+++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html
@@ -75,6 +75,9 @@ Unstable, unless otherwise indicated
#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS" title="DBUSMENU_MENUITEM_SHORTCUT_CONTROL">DBUSMENU_MENUITEM_SHORTCUT_CONTROL</a>
#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS" title="DBUSMENU_MENUITEM_SHORTCUT_SHIFT">DBUSMENU_MENUITEM_SHORTCUT_SHIFT</a>
#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS" title="DBUSMENU_MENUITEM_SHORTCUT_SUPER">DBUSMENU_MENUITEM_SHORTCUT_SUPER</a>
+#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" title="DBUSMENU_MENUITEM_EVENT_ACTIVATED">DBUSMENU_MENUITEM_EVENT_ACTIVATED</a>
+#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS" title="DBUSMENU_MENUITEM_EVENT_CLOSED">DBUSMENU_MENUITEM_EVENT_CLOSED</a>
+#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS" title="DBUSMENU_MENUITEM_EVENT_OPENED">DBUSMENU_MENUITEM_EVENT_OPENED</a>
struct <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="struct DbusmenuMenuitem">DbusmenuMenuitem</a>;
<span class="returnvalue">void</span> (<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-about-to-show-cb" title="dbusmenu_menuitem_about_to_show_cb ()">*dbusmenu_menuitem_about_to_show_cb</a>)
(<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="struct DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *mi</code></em>,
@@ -493,6 +496,38 @@ super key.
</div>
<hr>
<div class="refsect2">
+<a name="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"></a><h3>DBUSMENU_MENUITEM_EVENT_ACTIVATED</h3>
+<pre class="programlisting">#define DBUSMENU_MENUITEM_EVENT_ACTIVATED "clicked"
+</pre>
+<p>
+String for the event identifier when a menu item is clicked
+on by the user.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"></a><h3>DBUSMENU_MENUITEM_EVENT_CLOSED</h3>
+<pre class="programlisting">#define DBUSMENU_MENUITEM_EVENT_CLOSED "closed"
+</pre>
+<p>
+String for the event identifier when a menu is closed and
+displayed to the user. Only valid for items that contain
+submenus.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"></a><h3>DBUSMENU_MENUITEM_EVENT_OPENED</h3>
+<pre class="programlisting">#define DBUSMENU_MENUITEM_EVENT_OPENED "opened"
+</pre>
+<p>
+String for the event identifier when a menu is opened and
+displayed to the user. Only valid for items that contain
+submenus.
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="DbusmenuMenuitem"></a><h3>struct DbusmenuMenuitem</h3>
<pre class="programlisting">struct DbusmenuMenuitem {
GObject parent;
diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp
index 7495bc7..7abce72 100644
--- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp
+++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp
@@ -68,6 +68,9 @@
<function name="DBUSMENU_MENUITEM_SHORTCUT_CONTROL" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS"/>
<function name="DBUSMENU_MENUITEM_SHORTCUT_SHIFT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS"/>
<function name="DBUSMENU_MENUITEM_SHORTCUT_SUPER" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS"/>
+ <function name="DBUSMENU_MENUITEM_EVENT_ACTIVATED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"/>
+ <function name="DBUSMENU_MENUITEM_EVENT_CLOSED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"/>
+ <function name="DBUSMENU_MENUITEM_EVENT_OPENED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"/>
<function name="struct DbusmenuMenuitem" link="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"/>
<function name="dbusmenu_menuitem_about_to_show_cb ()" link="libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-about-to-show-cb"/>
<function name="dbusmenu_menuitem_buildvariant_slot_t ()" link="libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-buildvariant-slot-t"/>
diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2 b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2
index 06d5db8..cb644ad 100644
--- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2
+++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2
@@ -68,6 +68,9 @@
<keyword type="macro" name="DBUSMENU_MENUITEM_SHORTCUT_CONTROL" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS"/>
<keyword type="macro" name="DBUSMENU_MENUITEM_SHORTCUT_SHIFT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS"/>
<keyword type="macro" name="DBUSMENU_MENUITEM_SHORTCUT_SUPER" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS"/>
+ <keyword type="macro" name="DBUSMENU_MENUITEM_EVENT_ACTIVATED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"/>
+ <keyword type="macro" name="DBUSMENU_MENUITEM_EVENT_CLOSED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"/>
+ <keyword type="macro" name="DBUSMENU_MENUITEM_EVENT_OPENED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"/>
<keyword type="struct" name="struct DbusmenuMenuitem" link="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"/>
<keyword type="function" name="dbusmenu_menuitem_about_to_show_cb ()" link="libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-about-to-show-cb"/>
<keyword type="function" name="dbusmenu_menuitem_buildvariant_slot_t ()" link="libdbusmenu-glib-DbusmenuMenuitem.html#dbusmenu-menuitem-buildvariant-slot-t"/>
diff --git a/docs/libdbusmenu-glib/reference/tmpl/client.sgml b/docs/libdbusmenu-glib/reference/tmpl/client.sgml
index 76c0d19..d685c48 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/client.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/client.sgml
@@ -9,13 +9,11 @@ DbusmenuClient
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml
index 503c293..cbea574 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml
@@ -9,13 +9,11 @@ DbusmenuMenuitemProxy
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml
index c45f2c9..d012503 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml
@@ -9,13 +9,11 @@ DbusmenuMenuitem
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -239,6 +237,27 @@ DbusmenuMenuitem
+<!-- ##### MACRO DBUSMENU_MENUITEM_EVENT_ACTIVATED ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO DBUSMENU_MENUITEM_EVENT_CLOSED ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO DBUSMENU_MENUITEM_EVENT_OPENED ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### STRUCT DbusmenuMenuitem ##### -->
<para>
diff --git a/docs/libdbusmenu-glib/reference/tmpl/server.sgml b/docs/libdbusmenu-glib/reference/tmpl/server.sgml
index ca9c51e..f9134af 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/server.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/server.sgml
@@ -9,13 +9,11 @@ DbusmenuServer
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-glib/reference/tmpl/types.sgml b/docs/libdbusmenu-glib/reference/tmpl/types.sgml
index 8a5e419..0089955 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/types.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/types.sgml
@@ -9,13 +9,11 @@ Types
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-glib/reference/version.xml b/docs/libdbusmenu-glib/reference/version.xml
index 27d5f4a..1d0ba9e 100644
--- a/docs/libdbusmenu-glib/reference/version.xml
+++ b/docs/libdbusmenu-glib/reference/version.xml
@@ -1 +1 @@
-0.3.102
+0.4.0
diff --git a/docs/libdbusmenu-glib/reference/xml/api-index-full.xml b/docs/libdbusmenu-glib/reference/xml/api-index-full.xml
index 08fd7fa..23e8734 100644
--- a/docs/libdbusmenu-glib/reference/xml/api-index-full.xml
+++ b/docs/libdbusmenu-glib/reference/xml/api-index-full.xml
@@ -44,6 +44,9 @@
<indexentry><primaryie linkends="dbusmenu-menuitem-child-find"><link linkend="dbusmenu-menuitem-child-find">dbusmenu_menuitem_child_find</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
<indexentry><primaryie linkends="dbusmenu-menuitem-child-prepend"><link linkend="dbusmenu-menuitem-child-prepend">dbusmenu_menuitem_child_prepend</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
<indexentry><primaryie linkends="dbusmenu-menuitem-child-reorder"><link linkend="dbusmenu-menuitem-child-reorder">dbusmenu_menuitem_child_reorder</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
+<indexentry><primaryie linkends="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"><link linkend="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS">DBUSMENU_MENUITEM_EVENT_ACTIVATED</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
+<indexentry><primaryie linkends="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"><link linkend="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS">DBUSMENU_MENUITEM_EVENT_CLOSED</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
+<indexentry><primaryie linkends="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"><link linkend="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS">DBUSMENU_MENUITEM_EVENT_OPENED</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
<indexentry><primaryie linkends="dbusmenu-menuitem-find-id"><link linkend="dbusmenu-menuitem-find-id">dbusmenu_menuitem_find_id</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
<indexentry><primaryie linkends="dbusmenu-menuitem-foreach"><link linkend="dbusmenu-menuitem-foreach">dbusmenu_menuitem_foreach</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
<indexentry><primaryie linkends="dbusmenu-menuitem-get-children"><link linkend="dbusmenu-menuitem-get-children">dbusmenu_menuitem_get_children</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry>
diff --git a/docs/libdbusmenu-glib/reference/xml/menuitem.xml b/docs/libdbusmenu-glib/reference/xml/menuitem.xml
index d4f3504..d9a4881 100644
--- a/docs/libdbusmenu-glib/reference/xml/menuitem.xml
+++ b/docs/libdbusmenu-glib/reference/xml/menuitem.xml
@@ -58,6 +58,9 @@ Unstable, unless otherwise indicated
#define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS">DBUSMENU_MENUITEM_SHORTCUT_CONTROL</link>
#define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS">DBUSMENU_MENUITEM_SHORTCUT_SHIFT</link>
#define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS">DBUSMENU_MENUITEM_SHORTCUT_SUPER</link>
+#define <link linkend="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS">DBUSMENU_MENUITEM_EVENT_ACTIVATED</link>
+#define <link linkend="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS">DBUSMENU_MENUITEM_EVENT_CLOSED</link>
+#define <link linkend="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS">DBUSMENU_MENUITEM_EVENT_OPENED</link>
struct <link linkend="DbusmenuMenuitem">DbusmenuMenuitem</link>;
<link linkend="void"><returnvalue>void</returnvalue></link> (<link linkend="dbusmenu-menuitem-about-to-show-cb">*dbusmenu_menuitem_about_to_show_cb</link>)
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
@@ -445,6 +448,35 @@ shift key.
Used in <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"><type>DBUSMENU_MENUITEM_PROP_SHORTCUT</type></link> to represent the
super key.
</para></refsect2>
+<refsect2 id="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" role="macro">
+<title>DBUSMENU_MENUITEM_EVENT_ACTIVATED</title>
+<indexterm zone="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"><primary>DBUSMENU_MENUITEM_EVENT_ACTIVATED</primary></indexterm>
+<programlisting>#define DBUSMENU_MENUITEM_EVENT_ACTIVATED "clicked"
+</programlisting>
+<para>
+String for the event identifier when a menu item is clicked
+on by the user.
+</para></refsect2>
+<refsect2 id="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS" role="macro">
+<title>DBUSMENU_MENUITEM_EVENT_CLOSED</title>
+<indexterm zone="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"><primary>DBUSMENU_MENUITEM_EVENT_CLOSED</primary></indexterm>
+<programlisting>#define DBUSMENU_MENUITEM_EVENT_CLOSED "closed"
+</programlisting>
+<para>
+String for the event identifier when a menu is closed and
+displayed to the user. Only valid for items that contain
+submenus.
+</para></refsect2>
+<refsect2 id="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS" role="macro">
+<title>DBUSMENU_MENUITEM_EVENT_OPENED</title>
+<indexterm zone="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"><primary>DBUSMENU_MENUITEM_EVENT_OPENED</primary></indexterm>
+<programlisting>#define DBUSMENU_MENUITEM_EVENT_OPENED "opened"
+</programlisting>
+<para>
+String for the event identifier when a menu is opened and
+displayed to the user. Only valid for items that contain
+submenus.
+</para></refsect2>
<refsect2 id="DbusmenuMenuitem" role="struct">
<title>struct DbusmenuMenuitem</title>
<indexterm zone="DbusmenuMenuitem"><primary>DbusmenuMenuitem</primary></indexterm>
diff --git a/docs/libdbusmenu-gtk/reference/html/ch01.html b/docs/libdbusmenu-gtk/reference/html/ch01.html
index 61a4f74..f8af1ad 100644
--- a/docs/libdbusmenu-gtk/reference/html/ch01.html
+++ b/docs/libdbusmenu-gtk/reference/html/ch01.html
@@ -21,7 +21,7 @@
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
-<a name="id581523"></a>API</h2></div></div></div>
+<a name="id331770"></a>API</h2></div></div></div>
<div class="toc"><dl>
<dt>
<span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"> — A GTK Menu Object that syncronizes over DBus</span>
diff --git a/docs/libdbusmenu-gtk/reference/version.xml b/docs/libdbusmenu-gtk/reference/version.xml
index 27d5f4a..1d0ba9e 100644
--- a/docs/libdbusmenu-gtk/reference/version.xml
+++ b/docs/libdbusmenu-gtk/reference/version.xml
@@ -1 +1 @@
-0.3.102
+0.4.0
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 2976436..24d5c5d 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -599,9 +599,10 @@ get_properties_callback (GObject *obj, GAsyncResult * res, gpointer user_data)
/* Callback all the folks we can find */
GVariant * child = g_variant_get_child_value(params, 0);
- GVariantIter * iter = g_variant_iter_new(child);
+ GVariantIter iter;
+ g_variant_iter_init(&iter, child);
g_variant_unref(child);
- while ((child = g_variant_iter_next_value(iter)) != NULL) {
+ while ((child = g_variant_iter_next_value(&iter)) != NULL) {
if (g_strcmp0(g_variant_get_type_string(child), "(ia{sv})") != 0) {
g_warning("Properties return signature is not '(ia{sv})' it is '%s'", g_variant_get_type_string(child));
g_variant_unref(child);
@@ -631,7 +632,6 @@ get_properties_callback (GObject *obj, GAsyncResult * res, gpointer user_data)
g_variant_unref(properties);
g_variant_unref(child);
}
- g_variant_iter_free(iter);
g_variant_unref(params);
/* Provide errors for those who we can't */
@@ -1153,7 +1153,7 @@ menuproxy_prop_changed_cb (GDBusProxy * proxy, GVariant * properties, GStrv inva
GVariantIter iters;
gchar * key; GVariant * value;
g_variant_iter_init(&iters, properties);
- while (g_variant_iter_next(&iters, "{sv}", &key, &value)) {
+ while (g_variant_iter_loop(&iters, "{sv}", &key, &value)) {
if (g_strcmp0(key, "TextDirection") == 0) {
if (g_variant_is_of_type(value, G_VARIANT_TYPE_VARIANT)) {
GVariant * tmp = g_variant_get_variant(value);
@@ -1181,9 +1181,6 @@ menuproxy_prop_changed_cb (GDBusProxy * proxy, GVariant * properties, GStrv inva
priv->icon_dirs = g_variant_dup_strv(value, NULL);
dirs_changed = TRUE;
}
-
- g_variant_unref(value);
- g_free(key);
}
if (olddir != priv->text_direction) {
@@ -1258,10 +1255,9 @@ menuproxy_signal_cb (GDBusProxy * proxy, gchar * sender, gchar * signal, GVarian
g_variant_iter_init(&properties, propv);
gchar * property;
- while (g_variant_iter_next(&properties, "s", &property)) {
+ while (g_variant_iter_loop(&properties, "s", &property)) {
/* g_debug("Removing property '%s' on %d", property, id); */
dbusmenu_menuitem_property_remove(menuitem, property);
- g_free(property);
}
g_variant_unref(ritem);
g_variant_unref(propv);
@@ -1284,15 +1280,20 @@ menuproxy_signal_cb (GDBusProxy * proxy, gchar * sender, gchar * signal, GVarian
gchar * property;
GVariant * value;
- while (g_variant_iter_next(&properties, "{sv}", &property, &value)) {
+ while (g_variant_iter_loop(&properties, "{sv}", &property, &value)) {
GVariant * internalvalue = value;
if (G_LIKELY(g_variant_is_of_type(value, G_VARIANT_TYPE_VARIANT))) {
/* Unboxing if needed */
internalvalue = g_variant_get_variant(value);
- g_variant_unref(value);
}
+
id_prop_update(proxy, id, property, internalvalue, client);
- g_variant_unref(internalvalue);
+
+ if (internalvalue != value) {
+ /* If we unboxed, we need to drop it, otherwise the
+ iter_loop function will unref for us */
+ g_variant_unref(internalvalue);
+ }
}
g_variant_unref(propv);
g_variant_unref(item);
@@ -1336,19 +1337,16 @@ menuitem_get_properties_cb (GVariant * properties, GError * error, gpointer data
return;
}
- GVariantIter * iter = g_variant_iter_new(properties);
+ GVariantIter iter;
gchar * key;
GVariant * value;
- while (g_variant_iter_next(iter, "{sv}", &key, &value)) {
- dbusmenu_menuitem_property_set_variant(item, key, value);
+ g_variant_iter_init(&iter, properties);
- g_variant_unref(value);
- g_free(key);
+ while (g_variant_iter_loop(&iter, "{sv}", &key, &value)) {
+ dbusmenu_menuitem_property_set_variant(item, key, value);
}
- g_variant_iter_free(iter);
-
g_object_unref(data);
return;
@@ -1368,9 +1366,30 @@ menuitem_get_properties_replace_cb (GVariant * properties, GError * error, gpoin
have_error = TRUE;
}
+ /* Get the list of the current properties */
GList * current_props = dbusmenu_menuitem_properties_list(DBUSMENU_MENUITEM(data));
GList * tmp = NULL;
+ if (properties != NULL) {
+ GVariantIter iter;
+ g_variant_iter_init(&iter, properties);
+ gchar * name; GVariant * value;
+
+ /* Remove the entries from the current list that we have new
+ values for. This way we don't create signals of them being
+ removed with the duplication of the value being changed. */
+ while (g_variant_iter_loop(&iter, "{sv}", &name, &value) && have_error == FALSE) {
+ for (tmp = current_props; tmp != NULL; tmp = g_list_next(tmp)) {
+ if (g_strcmp0((gchar *)tmp->data, name) == 0) {
+ current_props = g_list_delete_link(current_props, tmp);
+ break;
+ }
+ }
+ }
+ }
+
+ /* Remove all entries that we're not getting values for, we can
+ assume that they no longer exist */
for (tmp = current_props; tmp != NULL && have_error == FALSE; tmp = g_list_next(tmp)) {
dbusmenu_menuitem_property_remove(DBUSMENU_MENUITEM(data), (const gchar *)tmp->data);
}
@@ -1714,20 +1733,16 @@ parse_layout_xml(DbusmenuClient * client, GVariant * layout, DbusmenuMenuitem *
all other properties. */
child_props = g_variant_get_child_value(child, 1);
g_variant_iter_init(&iter, child_props);
- while (g_variant_iter_next(&iter, "{sv}", &prop, &value)) {
+ while (g_variant_iter_loop(&iter, "{sv}", &prop, &value)) {
if (g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_TYPE) == 0) {
dbusmenu_menuitem_property_set_variant(childmi, prop, value);
}
- g_free(prop);
- g_variant_unref(value);
}
/* Now go through and do all the properties. */
g_variant_iter_init(&iter, child_props);
- while (g_variant_iter_next(&iter, "{sv}", &prop, &value)) {
+ while (g_variant_iter_loop(&iter, "{sv}", &prop, &value)) {
dbusmenu_menuitem_property_set_variant(childmi, prop, value);
- g_free(prop);
- g_variant_unref(value);
}
g_variant_unref(child_props);
}
diff --git a/libdbusmenu-gtk/menuitem.c b/libdbusmenu-gtk/menuitem.c
index b3358fe..ca2bc3e 100644
--- a/libdbusmenu-gtk/menuitem.c
+++ b/libdbusmenu-gtk/menuitem.c
@@ -236,8 +236,15 @@ dbusmenu_menuitem_property_set_shortcut_menuitem (DbusmenuMenuitem * menuitem, c
NULL);
}
- if (closure == NULL)
- return FALSE;
+ if (closure == NULL) {
+ /* As a fallback, check for a closure in the related menu item. This
+ actually happens with SWT menu items. */
+ GList * closures = gtk_widget_list_accel_closures (GTK_WIDGET (gmi));
+ if (closures == NULL)
+ return FALSE;
+ closure = closures->data;
+ g_list_free (closures);
+ }
GtkAccelGroup * group = gtk_accel_group_from_accel_closure(closure);
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c
index 9d93a1e..a7f90a2 100644
--- a/libdbusmenu-gtk/parser.c
+++ b/libdbusmenu-gtk/parser.c
@@ -845,7 +845,9 @@ item_activated (DbusmenuMenuitem *item, guint timestamp, gpointer user_data)
if (GTK_IS_MENU_ITEM (child))
{
+ gdk_threads_enter ();
gtk_menu_item_activate (GTK_MENU_ITEM (child));
+ gdk_threads_leave ();
}
}
}