aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac6
-rw-r--r--docs/libdbusmenu-glib/reference/version.xml2
-rw-r--r--docs/libdbusmenu-gtk/reference/version.xml2
-rw-r--r--libdbusmenu-glib/client.c7
-rw-r--r--libdbusmenu-glib/server.c15
-rw-r--r--libdbusmenu-gtk/client.c2
-rw-r--r--libdbusmenu-gtk/menuitem.c7
8 files changed, 40 insertions, 23 deletions
diff --git a/configure b/configure
index 92521bf..daea5a7 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.65 for libdbusmenu 0.3.4.
+# Generated by GNU Autoconf 2.65 for libdbusmenu 0.3.5.
#
# 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.4'
-PACKAGE_STRING='libdbusmenu 0.3.4'
+PACKAGE_VERSION='0.3.5'
+PACKAGE_STRING='libdbusmenu 0.3.5'
PACKAGE_BUGREPORT='ted@canonical.com'
PACKAGE_URL=''
@@ -1524,7 +1524,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.4 to adapt to many kinds of systems.
+\`configure' configures libdbusmenu 0.3.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1594,7 +1594,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libdbusmenu 0.3.4:";;
+ short | recursive ) echo "Configuration of libdbusmenu 0.3.5:";;
esac
cat <<\_ACEOF
@@ -1724,7 +1724,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libdbusmenu configure 0.3.4
+libdbusmenu configure 0.3.5
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2097,7 +2097,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.4, which was
+It was created by libdbusmenu $as_me 0.3.5, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2911,7 +2911,7 @@ fi
# Define the identity of the package.
PACKAGE=libdbusmenu
- VERSION=0.3.4
+ VERSION=0.3.5
# Some tools Automake needs.
@@ -12937,7 +12937,7 @@ fi
###########################
LIBDBUSMENU_CURRENT=1
-LIBDBUSMENU_REVISION=9
+LIBDBUSMENU_REVISION=10
LIBDBUSMENU_AGE=0
@@ -14250,7 +14250,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.4, which was
+This file was extended by libdbusmenu $as_me 0.3.5, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14316,7 +14316,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.4
+libdbusmenu config.status 0.3.5
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index bd7fff8..7ec994b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(libdbusmenu, 0.3.4, ted@canonical.com)
+AC_INIT(libdbusmenu, 0.3.5, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009,2010 Canonical])
AC_PREREQ(2.62)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libdbusmenu, 0.3.4, [-Wno-portability])
+AM_INIT_AUTOMAKE(libdbusmenu, 0.3.5, [-Wno-portability])
AM_MAINTAINER_MODE
@@ -87,7 +87,7 @@ AC_PATH_PROG([VALA_API_GEN], [vapigen])
###########################
LIBDBUSMENU_CURRENT=1
-LIBDBUSMENU_REVISION=9
+LIBDBUSMENU_REVISION=10
LIBDBUSMENU_AGE=0
AC_SUBST(LIBDBUSMENU_CURRENT)
diff --git a/docs/libdbusmenu-glib/reference/version.xml b/docs/libdbusmenu-glib/reference/version.xml
index 42045ac..c2c0004 100644
--- a/docs/libdbusmenu-glib/reference/version.xml
+++ b/docs/libdbusmenu-glib/reference/version.xml
@@ -1 +1 @@
-0.3.4
+0.3.5
diff --git a/docs/libdbusmenu-gtk/reference/version.xml b/docs/libdbusmenu-gtk/reference/version.xml
index 42045ac..c2c0004 100644
--- a/docs/libdbusmenu-gtk/reference/version.xml
+++ b/docs/libdbusmenu-gtk/reference/version.xml
@@ -1 +1 @@
-0.3.4
+0.3.5
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index fa233a4..871170a 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -561,6 +561,9 @@ build_proxies (DbusmenuClient * client)
static gint
parse_node_get_id (xmlNodePtr node)
{
+ if (node == NULL) {
+ return -1;
+ }
if (node->type != XML_ELEMENT_NODE) {
return -1;
}
@@ -886,6 +889,10 @@ parse_layout (DbusmenuClient * client, const gchar * layout)
xmlNodePtr root = xmlDocGetRootElement(xmldoc);
+ if (root == NULL) {
+ g_warning("Unable to get root node of menu XML");
+ }
+
DbusmenuMenuitem * oldroot = priv->root;
priv->root = parse_layout_xml(client, root, priv->root, NULL, priv->menuproxy);
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 0da66cc..13c2843 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -225,15 +225,22 @@ static void
set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec)
{
DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(obj);
+ GError * error = NULL;
switch (id) {
case PROP_DBUS_OBJECT:
g_return_if_fail(priv->dbusobject == NULL);
priv->dbusobject = g_value_dup_string(value);
- DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
- dbus_g_connection_register_g_object(connection,
- priv->dbusobject,
- obj);
+ DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+
+ if (connection == NULL || error != NULL) {
+ g_warning("Unable to get session bus: %s", error == NULL ? "No message" : error->message);
+ if (error != NULL) { g_error_free(error); }
+ } else {
+ dbus_g_connection_register_g_object(connection,
+ priv->dbusobject,
+ obj);
+ }
break;
case PROP_ROOT_NODE:
if (priv->root != NULL) {
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index a46aef3..b406697 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -148,7 +148,9 @@ do_swap_agroup (DbusmenuMenuitem * mi, gpointer userdata) {
return FALSE;
}
+ #ifdef MASSIVEDEBUGGING
g_debug("Setting shortcut on '%s': %d %X", dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL), key, modifiers);
+ #endif
GtkMenuItem * gmi = dbusmenu_gtkclient_menuitem_get(data->client, mi);
if (gmi == NULL) {
diff --git a/libdbusmenu-gtk/menuitem.c b/libdbusmenu-gtk/menuitem.c
index 9924546..5846aa7 100644
--- a/libdbusmenu-gtk/menuitem.c
+++ b/libdbusmenu-gtk/menuitem.c
@@ -264,9 +264,10 @@ dbusmenu_menuitem_property_set_shortcut_menuitem (DbusmenuMenuitem * menuitem, c
GtkAccelGroup * group = gtk_accel_group_from_accel_closure(closure);
- /* Seriously, if this returns NULL something is seriously
- wrong in GTK. */
- g_return_val_if_fail(group != NULL, FALSE);
+ /* Apparently this is more common than I thought. */
+ if (group == NULL) {
+ return FALSE;
+ }
GtkAccelKey * key = gtk_accel_group_find(group, find_closure, closure);
/* Again, not much we can do except complain loudly. */