From 864cd6288c13bcbd387872de0ceea6bb8679efdf Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 2 May 2013 13:57:54 -0700 Subject: in dispose(), call gtk_widget_remove_accelerator(), to balance out the earlier calls to gtk_widget_add_accelerator() --- libdbusmenu-gtk/client.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 8e84e3d..6ccb81d 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -130,16 +130,32 @@ dbusmenu_gtkclient_init (DbusmenuGtkClient *self) return; } +static void +clear_shortcut_foreach (DbusmenuMenuitem *mi, gpointer gclient) +{ + guint key = 0; + GtkMenuItem * gmi; + GdkModifierType mod = 0; + DbusmenuGtkClient * client = DBUSMENU_GTKCLIENT (gclient); + + gmi = dbusmenu_gtkclient_menuitem_get (client, mi); + dbusmenu_gtkclient_menuitem_get (client, mi); + dbusmenu_menuitem_property_get_shortcut (mi, &key, &mod); + if (key) + gtk_widget_remove_accelerator (GTK_WIDGET (gmi), client->priv->agroup, key, mod); +} + /* Just calling the super class. Future use. */ static void dbusmenu_gtkclient_dispose (GObject *object) { - DbusmenuGtkClientPrivate * priv = DBUSMENU_GTKCLIENT_GET_PRIVATE(object); + DbusmenuMenuitem * root; + DbusmenuGtkClientPrivate * priv = DBUSMENU_GTKCLIENT(object)->priv; - if (priv->agroup != NULL) { - g_object_unref(priv->agroup); - priv->agroup = NULL; - } + if ((root = dbusmenu_client_get_root (DBUSMENU_CLIENT(object)))) + dbusmenu_menuitem_foreach (root, clear_shortcut_foreach, object); + g_message ("hello world 6"); + g_clear_object (&priv->agroup); if (priv->old_themedirs) { remove_theme_dirs(gtk_icon_theme_get_default(), priv->old_themedirs); @@ -161,7 +177,6 @@ dbusmenu_gtkclient_dispose (GObject *object) static void dbusmenu_gtkclient_finalize (GObject *object) { - G_OBJECT_CLASS (dbusmenu_gtkclient_parent_class)->finalize (object); return; } @@ -361,8 +376,6 @@ do_swap_agroup (DbusmenuMenuitem * mi, gpointer userdata) { static void swap_agroup (DbusmenuMenuitem *mi, gpointer userdata) { do_swap_agroup (mi, userdata); - - return; /* See what I did here, Ted? :) */ } /* Refresh the shortcut for an entry */ -- cgit v1.2.3 From df6b46e2012729e91888dbe4e1677f559bf1a31a Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 15 May 2013 07:44:38 -0400 Subject: Remove stray debug g_message() --- libdbusmenu-gtk/client.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 6ccb81d..d345313 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -154,7 +154,6 @@ dbusmenu_gtkclient_dispose (GObject *object) if ((root = dbusmenu_client_get_root (DBUSMENU_CLIENT(object)))) dbusmenu_menuitem_foreach (root, clear_shortcut_foreach, object); - g_message ("hello world 6"); g_clear_object (&priv->agroup); if (priv->old_themedirs) { -- cgit v1.2.3 From 11862e7d3f9e7b8c0d9897aba1d402306212d3a0 Mon Sep 17 00:00:00 2001 From: Automatic PS uploader Date: Wed, 15 May 2013 12:44:56 +0000 Subject: Releasing 12.10.3daily13.05.15-0ubuntu1, based on r443 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 265144f..4dda35b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +libdbusmenu (12.10.3daily13.05.15-0ubuntu1) saucy; urgency=low + + [ Charles Kerr ] + * In gtkclient's destructor, balance client's earlier + gtk_widget_add_accelerator() calls with + gtk_widget_remove_accelerator() calls. (LP: #1173262) + + [ Mathieu Trudel-Lapierre ] + * Remove stray g_message(). + + [ Ubuntu daily release ] + * Automatic snapshot from revision 443 + + -- Ubuntu daily release Wed, 15 May 2013 12:44:56 +0000 + libdbusmenu (12.10.3daily13.02.01-0ubuntu1) raring; urgency=low [ Mathieu Trudel-Lapierre ] -- cgit v1.2.3 From ec9f767eac6b83d1dbf7200cddc1dbe81a9d11d7 Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Fri, 17 May 2013 22:30:19 +0100 Subject: Set the max ID of menuitems to G_MAXINT rather than 30000, as internally, the server side happily creates ID's greater than this which then wraparound on the client side. We keep the minimum unchanged at -1, as some consumers addume that < 0 is an error (rather than -1). To make this a bit less fragile, handle rollover on the server side from G_MAXINT to 1, rather than having a signed integer overflow which will just break things a bit later on --- libdbusmenu-glib/menuitem.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index cd9f978..536fd6d 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -270,7 +270,7 @@ dbusmenu_menuitem_class_init (DbusmenuMenuitemClass *klass) g_object_class_install_property (object_class, PROP_ID, g_param_spec_int(PROP_ID_S, "ID for the menu item", "This is a unique indentifier for the menu item.", - -1, 30000, -1, + -1, G_MAXINT, -1, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /* Check transfer functions for GValue */ @@ -391,7 +391,8 @@ set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec) case PROP_ID: priv->id = g_value_get_int(value); if (priv->id > menuitem_next_id) { - menuitem_next_id = priv->id + 1; + menuitem_next_id = (priv->id + 1) % G_MAXINT; + if (menuitem_next_id == 0) menuitem_next_id++; } break; default: @@ -411,6 +412,8 @@ get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec) case PROP_ID: if (priv->id == -1) { priv->id = menuitem_next_id++; + menuitem_next_id &= G_MAXINT; + if (menuitem_next_id == 0) menuitem_next_id++; } if (dbusmenu_menuitem_get_root(DBUSMENU_MENUITEM(obj))) { g_value_set_int(value, 0); -- cgit v1.2.3 From 09ce53603cda79824123867e8ea11af94be81eec Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Tue, 28 May 2013 15:46:09 +0100 Subject: Update for review comments --- libdbusmenu-glib/menuitem.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 536fd6d..0b85193 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -391,8 +391,11 @@ set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec) case PROP_ID: priv->id = g_value_get_int(value); if (priv->id > menuitem_next_id) { - menuitem_next_id = (priv->id + 1) % G_MAXINT; - if (menuitem_next_id == 0) menuitem_next_id++; + if (priv->id == G_MAXINT) { + menuitem_next_id = 1; + } else { + menuitem_next_id = priv->id + 1; + } } break; default: @@ -411,9 +414,12 @@ get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec) switch (id) { case PROP_ID: if (priv->id == -1) { - priv->id = menuitem_next_id++; - menuitem_next_id &= G_MAXINT; - if (menuitem_next_id == 0) menuitem_next_id++; + priv->id = menuitem_next_id; + if (menuitem_next_id == G_MAXINT) { + menuitem_next_id = 1; + } else { + menuitem_next_id += 1; + } } if (dbusmenu_menuitem_get_root(DBUSMENU_MENUITEM(obj))) { g_value_set_int(value, 0); -- cgit v1.2.3 From 3a2379a02cab94a8b1fa3b6aa756a93aa06524d4 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 4 Jun 2013 16:09:24 -0400 Subject: Move gtkdoc-check tests into tests/ --- docs/libdbusmenu-glib/reference/Makefile.am | 3 --- docs/libdbusmenu-gtk/reference/Makefile.am | 3 --- tests/Makefile.am | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/libdbusmenu-glib/reference/Makefile.am b/docs/libdbusmenu-glib/reference/Makefile.am index 6c9e6eb..bdc0b22 100644 --- a/docs/libdbusmenu-glib/reference/Makefile.am +++ b/docs/libdbusmenu-glib/reference/Makefile.am @@ -89,11 +89,8 @@ EXTRA_DIST += version.xml.in # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt #DISTCLEANFILES += -# Comment this out if you want 'make check' to test you doc status -# and run some sanity checks if ENABLE_GTK_DOC TESTS_ENVIRONMENT = cd $(srcdir) && \ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) -TESTS = $(GTKDOC_CHECK) endif diff --git a/docs/libdbusmenu-gtk/reference/Makefile.am b/docs/libdbusmenu-gtk/reference/Makefile.am index 9c94bd1..7902a09 100644 --- a/docs/libdbusmenu-gtk/reference/Makefile.am +++ b/docs/libdbusmenu-gtk/reference/Makefile.am @@ -89,12 +89,9 @@ EXTRA_DIST += version.xml.in # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt #DISTCLEANFILES += -# Comment this out if you want 'make check' to test you doc status -# and run some sanity checks if ENABLE_GTK_DOC TESTS_ENVIRONMENT = cd $(srcdir) && \ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) -TESTS = $(GTKDOC_CHECK) endif diff --git a/tests/Makefile.am b/tests/Makefile.am index 0cd68d0..69b9f26 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -35,6 +35,12 @@ TESTS += \ # test-gtk-submenu endif +if ENABLE_GTK_DOC +TESTS += \ + test_libdbusmenu_glib_gtkdoc \ + test_libdbusmenu_gtk_gtkdoc +endif + # The Python test only work on the system copy of # dbusmenu, so while they can be usefule they're not # good tests of what you're currently building. Handy @@ -710,6 +716,18 @@ test-mago: test-gtk-label-client test-gtk-label-server $(srcdir)/dbusmenu-gtk/ma # Other ######################### +test_libdbusmenu_glib_gtkdoc: + @echo "#!/bin/bash" > $@ + @echo cd $(abs_top_builddir)/docs/libdbusmenu-glib/reference >> $@ + @echo gtester --verbose -k $(GTKDOC_CHECK) >> $@ + @chmod +x $@ + +test_libdbusmenu_gtk_gtkdoc: + @echo "#!/bin/bash" > $@ + @echo cd $(abs_top_builddir)/docs/libdbusmenu-gtk/reference >> $@ + @echo gtester --verbose -k $(GTKDOC_CHECK) >> $@ + @chmod +x $@ + examplesdir = $(docdir)/examples/ examples_DATA = \ -- cgit v1.2.3 From 3fb26d72a84c783b5b141744b40d60394a69d042 Mon Sep 17 00:00:00 2001 From: Automatic PS uploader Date: Fri, 7 Jun 2013 02:03:02 +0000 Subject: Releasing 12.10.3daily13.06.07-0ubuntu1, based on r446 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4dda35b..85d1cbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +libdbusmenu (12.10.3daily13.06.07-0ubuntu1) saucy; urgency=low + + [ Mathieu Trudel-Lapierre ] + * Fix gtkdoc-check tests, and move them to tests subdirectory. + + [ Chris Coulson ] + * Fix the long-standing "nm-applet stops working after a few days / + hours" issue; properly handle "unique" IDs for indicator menuitems. + (LP: #1011073) + + [ Ubuntu daily release ] + * Automatic snapshot from revision 446 + + -- Ubuntu daily release Fri, 07 Jun 2013 02:02:59 +0000 + libdbusmenu (12.10.3daily13.05.15-0ubuntu1) saucy; urgency=low [ Charles Kerr ] -- cgit v1.2.3 From 22dac42b70121c7eff4aa3dcdee1289dab2da9e5 Mon Sep 17 00:00:00 2001 From: Jeremy Bicha Date: Fri, 7 Jun 2013 08:02:28 -0400 Subject: Have -dev packages depend on their corresponding gir- packages --- debian/control | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 7735456..cc7be0c 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,6 @@ Build-Depends: debhelper (>= 9), libatk1.0-dev, libjson-glib-dev (>= 0.13.4), gobject-introspection, - gir1.2-gtk-2.0, libgirepository1.0-dev (>= 0.9.3), libx11-dev (>= 1.3), valac-0.16, @@ -53,6 +52,7 @@ Section: libdevel Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, + gir1.2-dbusmenu-glib-0.4 (= ${binary:Version}), libdbusmenu-glib4 (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76), libgtk2.0-dev (>= 2.12.0), @@ -83,6 +83,7 @@ Section: libdevel Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, + gir1.2-dbusmenu-gtk-0.4 (= ${binary:Version}), libdbusmenu-gtk4 (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76), libgtk2.0-dev (>= 2.12.0), @@ -112,7 +113,7 @@ Description: tools useful during development with libdbusmenu applications with libdbusmenu. Package: gir1.2-dbusmenu-glib-0.4 -Section: libs +Section: introspection Architecture: any Depends: ${misc:Depends}, libdbusmenu-glib4 (= ${binary:Version}), @@ -126,7 +127,7 @@ Description: typelib file for libdbusmenu-glib4 generate dynamic bindings for libdbusmenu-glib4. Package: gir1.2-dbusmenu-gtk-0.4 -Section: libs +Section: introspection Architecture: any Depends: ${misc:Depends}, libdbusmenu-gtk4 (= ${binary:Version}), @@ -213,6 +214,7 @@ Section: libdevel Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, + gir1.2-dbusmenu-gtk3-0.4 (= ${binary:Version}), libdbusmenu-gtk3-4 (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76), libgtk-3-dev (>= 2.91.4-0ubuntu1), @@ -226,7 +228,7 @@ Description: library for passing menus over DBus - GTK+ version developement fil This package contains files that are needed to build GTK+ applications. Package: gir1.2-dbusmenu-gtk3-0.4 -Section: libs +Section: introspection Architecture: any Depends: ${misc:Depends}, libdbusmenu-gtk3-4 (= ${binary:Version}), -- cgit v1.2.3