aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-18 12:26:59 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-18 12:26:59 -0500
commit6c4e291f69fca1b30b08658fea9b7dd85d3a67ee (patch)
tree540714a9a579a01a7bcb5b6bf7be046d1bc3ef60
parent9b75358ca14e1ad8a41c364195df748a1a1bbf5d (diff)
parentddbe5f1a0c8f487c1a633834b8f5df418162af92 (diff)
downloadlibdbusmenu-6c4e291f69fca1b30b08658fea9b7dd85d3a67ee.tar.gz
libdbusmenu-6c4e291f69fca1b30b08658fea9b7dd85d3a67ee.tar.bz2
libdbusmenu-6c4e291f69fca1b30b08658fea9b7dd85d3a67ee.zip
sync with trunk
-rw-r--r--debian/changelog30
-rw-r--r--debian/control10
-rw-r--r--docs/libdbusmenu-glib/reference/Makefile.am3
-rw-r--r--docs/libdbusmenu-gtk/reference/Makefile.am3
-rw-r--r--libdbusmenu-glib/menuitem.c15
-rw-r--r--libdbusmenu-gtk/client.c28
-rw-r--r--tests/Makefile.am18
7 files changed, 86 insertions, 21 deletions
diff --git a/debian/changelog b/debian/changelog
index 265144f..85d1cbf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,33 @@
+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 <ps-jenkins@lists.canonical.com> Fri, 07 Jun 2013 02:02:59 +0000
+
+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 <ps-jenkins@lists.canonical.com> Wed, 15 May 2013 12:44:56 +0000
+
libdbusmenu (12.10.3daily13.02.01-0ubuntu1) raring; urgency=low
[ Mathieu Trudel-Lapierre ]
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}),
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/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c
index cd9f978..0b85193 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,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;
+ if (priv->id == G_MAXINT) {
+ menuitem_next_id = 1;
+ } else {
+ menuitem_next_id = priv->id + 1;
+ }
}
break;
default:
@@ -410,7 +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++;
+ 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);
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 8e84e3d..d345313 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -130,16 +130,31 @@ 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_clear_object (&priv->agroup);
if (priv->old_themedirs) {
remove_theme_dirs(gtk_icon_theme_get_default(), priv->old_themedirs);
@@ -161,7 +176,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 +375,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 */
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 356d803..b136935 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,6 +36,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
@@ -731,6 +737,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 = \