aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-03 14:01:01 -0600
committerTed Gould <ted@gould.cx>2011-02-03 14:01:01 -0600
commit61839709d922db8d78b316be40827bab25c86002 (patch)
treef65346e8a2cc7a80688ec5553495d57f06f9cadc
parent6c339510a684ba9a8f01fc57188bb4953be0e30b (diff)
parentffeede1b23ea70ef789217ef24c3d3182bf27350 (diff)
downloadlibdbusmenu-61839709d922db8d78b316be40827bab25c86002.tar.gz
libdbusmenu-61839709d922db8d78b316be40827bab25c86002.tar.bz2
libdbusmenu-61839709d922db8d78b316be40827bab25c86002.zip
Import upstream version 0.3.96
-rw-r--r--ChangeLog16
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac6
-rw-r--r--docs/libdbusmenu-glib/reference/html/ch01.html2
-rw-r--r--docs/libdbusmenu-glib/reference/version.xml2
-rw-r--r--docs/libdbusmenu-gtk/reference/html/ch01.html2
-rw-r--r--docs/libdbusmenu-gtk/reference/version.xml2
-rw-r--r--libdbusmenu-gtk/parser.c42
8 files changed, 74 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index ddd8828..ed82801 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
# Generated by Makefile. Do not edit.
+2011-02-03 Ted Gould <ted@gould.cx>
+
+ 0.3.96
+
+2011-02-03 Ted Gould <ted@gould.cx>
+
+ Ensure that we remove signals from the objects we put them on.
+
+2011-02-03 Michael Terry <mike@mterry.name>
+
+ keep track of objects that we set notifies for
+
+2011-02-02 Michael Terry <mike@mterry.name>
+
+ disconnect signals when done with menuitem
+
2011-01-31 Ted Gould <ted@gould.cx>
0.3.95
diff --git a/configure b/configure
index d904fd0..0b87918 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.95.
+# Generated by GNU Autoconf 2.67 for libdbusmenu 0.3.96.
#
# 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.95'
-PACKAGE_STRING='libdbusmenu 0.3.95'
+PACKAGE_VERSION='0.3.96'
+PACKAGE_STRING='libdbusmenu 0.3.96'
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.95 to adapt to many kinds of systems.
+\`configure' configures libdbusmenu 0.3.96 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.95:";;
+ short | recursive ) echo "Configuration of libdbusmenu 0.3.96:";;
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.95
+libdbusmenu configure 0.3.96
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.95, which was
+It was created by libdbusmenu $as_me 0.3.96, 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.95
+ VERSION=0.3.96
# Some tools Automake needs.
@@ -13280,7 +13280,7 @@ fi
###########################
LIBDBUSMENU_CURRENT=3
-LIBDBUSMENU_REVISION=3
+LIBDBUSMENU_REVISION=4
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.95, which was
+This file was extended by libdbusmenu $as_me 0.3.96, 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.95
+libdbusmenu config.status 0.3.96
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index b479fce..381df76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(libdbusmenu, 0.3.95, ted@canonical.com)
+AC_INIT(libdbusmenu, 0.3.96, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009,2010 Canonical])
AC_PREREQ(2.62)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libdbusmenu, 0.3.95, [-Wno-portability])
+AM_INIT_AUTOMAKE(libdbusmenu, 0.3.96, [-Wno-portability])
AM_MAINTAINER_MODE
@@ -136,7 +136,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc])
###########################
LIBDBUSMENU_CURRENT=3
-LIBDBUSMENU_REVISION=3
+LIBDBUSMENU_REVISION=4
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 a4b5dde..bdf1fbc 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="id553671"></a>API</h2></div></div></div>
+<a name="id450827"></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/version.xml b/docs/libdbusmenu-glib/reference/version.xml
index 14756e4..06cee8f 100644
--- a/docs/libdbusmenu-glib/reference/version.xml
+++ b/docs/libdbusmenu-glib/reference/version.xml
@@ -1 +1 @@
-0.3.95
+0.3.96
diff --git a/docs/libdbusmenu-gtk/reference/html/ch01.html b/docs/libdbusmenu-gtk/reference/html/ch01.html
index 5838b8f..8720685 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="id525169"></a>API</h2></div></div></div>
+<a name="id338562"></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"></span>
diff --git a/docs/libdbusmenu-gtk/reference/version.xml b/docs/libdbusmenu-gtk/reference/version.xml
index 14756e4..06cee8f 100644
--- a/docs/libdbusmenu-gtk/reference/version.xml
+++ b/docs/libdbusmenu-gtk/reference/version.xml
@@ -1 +1 @@
-0.3.95
+0.3.96
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c
index 7e5e7e1..db1d8dd 100644
--- a/libdbusmenu-gtk/parser.c
+++ b/libdbusmenu-gtk/parser.c
@@ -31,6 +31,14 @@ License version 3 and version 2.1 along with this program. If not, see
#include "serializablemenuitem.h"
#define CACHED_MENUITEM "dbusmenu-gtk-parser-cached-item"
+#define PARSER_DATA "dbusmenu-gtk-parser-data"
+
+typedef struct _ParserData
+{
+ GtkWidget *label;
+ GtkAction *action;
+ GtkWidget *widget;
+} ParserData;
typedef struct _RecurseContext
{
@@ -102,6 +110,24 @@ dbusmenu_cache_freed (gpointer data, GObject * obj)
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);
+
+ if (pdata != NULL && pdata->label != NULL) {
+ g_signal_handlers_disconnect_by_func(pdata->label, G_CALLBACK(label_notify_cb), obj);
+ g_object_remove_weak_pointer(G_OBJECT(pdata->label), (gpointer*)&pdata->label);
+ }
+
+ if (pdata != NULL && pdata->action != NULL) {
+ g_signal_handlers_disconnect_by_func(pdata->action, G_CALLBACK(action_notify_cb), obj);
+ g_object_remove_weak_pointer(G_OBJECT(pdata->action), (gpointer*)&pdata->action);
+ }
+
+ if (pdata != NULL && pdata->widget != NULL) {
+ g_signal_handlers_disconnect_by_func(pdata->widget, G_CALLBACK(widget_notify_cb), obj);
+ g_object_remove_weak_pointer(G_OBJECT(pdata->widget), (gpointer*)&pdata->widget);
+ }
+
return;
}
@@ -110,8 +136,10 @@ dbusmenu_cache_freed (gpointer data, GObject * obj)
static void
object_cache_freed (gpointer data)
{
- if (!G_IS_OBJECT(data)) return;
- g_object_weak_unref(G_OBJECT(data), dbusmenu_cache_freed, data);
+ // TODO: make this have access to both data and obj so we can call these
+ //if (!G_IS_OBJECT(obj)) return;
+ //g_object_weak_unref(G_OBJECT(obj), dbusmenu_cache_freed, data);
+ //dbusmenu_cache_freed(data, obj);
return;
}
@@ -239,6 +267,9 @@ construct_dbusmenu_for_widget (GtkWidget * widget)
{
DbusmenuMenuitem *mi = dbusmenu_menuitem_new ();
+ ParserData *pdata = g_new0 (ParserData, 1);
+ g_object_set_data_full (G_OBJECT (mi), PARSER_DATA, pdata, g_free);
+
gboolean visible = FALSE;
gboolean sensitive = FALSE;
if (GTK_IS_SEPARATOR_MENU_ITEM (widget))
@@ -313,10 +344,12 @@ construct_dbusmenu_for_widget (GtkWidget * widget)
{
// Sometimes, an app will directly find and modify the label
// (like empathy), so watch the label especially for that.
+ pdata->label = label;
g_signal_connect (G_OBJECT (label),
"notify",
G_CALLBACK (label_notify_cb),
mi);
+ g_object_add_weak_pointer(G_OBJECT (label), (gpointer*)&pdata->label);
}
if (GTK_IS_ACTIVATABLE (widget))
@@ -332,10 +365,12 @@ construct_dbusmenu_for_widget (GtkWidget * widget)
visible = gtk_action_is_visible (action);
sensitive = gtk_action_is_sensitive (action);
+ pdata->action = action;
g_signal_connect_object (action, "notify",
G_CALLBACK (action_notify_cb),
mi,
G_CONNECT_AFTER);
+ g_object_add_weak_pointer(G_OBJECT (action), (gpointer*)&pdata->action);
}
}
}
@@ -367,10 +402,13 @@ construct_dbusmenu_for_widget (GtkWidget * widget)
DBUSMENU_MENUITEM_PROP_ENABLED,
sensitive);
+ pdata->widget = widget;
g_signal_connect (widget,
"notify",
G_CALLBACK (widget_notify_cb),
mi);
+ g_object_add_weak_pointer(G_OBJECT (widget), (gpointer*)&pdata->widget);
+
return mi;
}