diff options
author | Ted Gould <ted@gould.cx> | 2010-07-08 10:20:16 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-07-08 10:20:16 -0500 |
commit | 0828cb88a4db832ddfcf0350305bebf116c1a240 (patch) | |
tree | 7ccf22d87004a15db6adb2415f8eb339782c375a /libdbusmenu-gtk | |
parent | a79f1b295ca5a6a0f20cc899db9043a46aff22e9 (diff) | |
parent | 2e974ea0fa59265a0ec4cce29cbb62519ce872cb (diff) | |
download | libdbusmenu-0828cb88a4db832ddfcf0350305bebf116c1a240.tar.gz libdbusmenu-0828cb88a4db832ddfcf0350305bebf116c1a240.tar.bz2 libdbusmenu-0828cb88a4db832ddfcf0350305bebf116c1a240.zip |
Import upstream version 0.3.5
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 2 | ||||
-rw-r--r-- | libdbusmenu-gtk/menuitem.c | 7 |
2 files changed, 6 insertions, 3 deletions
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. */ |