aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbusmenu-gtk/client.c12
-rw-r--r--libdbusmenu-gtk/menu.c1
2 files changed, 3 insertions, 10 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index f715e35..a236123 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -154,16 +154,10 @@ new_menuitem (DbusmenuClient * client, DbusmenuMenuitem * mi, gpointer userdata)
return;
}
-static gboolean
-is_root (DbusmenuGtkClient * gtkclient, DbusmenuMenuitem * mi)
-{
- return mi == dbusmenu_client_get_root(DBUSMENU_CLIENT(gtkclient));
-}
-
static void
new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, DbusmenuGtkClient * gtkclient)
{
- if (is_root(gtkclient, mi)) { return; }
+ if (dbusmenu_menuitem_get_root(mi)) { return; }
gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);
GtkMenu * menu = GTK_MENU(ann_menu);
@@ -186,7 +180,7 @@ new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, Dbus
static void
delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient * gtkclient)
{
- if (is_root(gtkclient, mi)) { return; }
+ if (dbusmenu_menuitem_get_root(mi)) { return; }
if (g_list_length(dbusmenu_menuitem_get_children(mi)) == 0) {
gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);
@@ -204,7 +198,7 @@ delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient
static void
move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint old, DbusmenuGtkClient * gtkclient)
{
- if (is_root(gtkclient, mi)) { return; }
+ if (dbusmenu_menuitem_get_root(mi)) { return; }
gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);
if (ann_menu == NULL) {
diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c
index a59421a..b54df7b 100644
--- a/libdbusmenu-gtk/menu.c
+++ b/libdbusmenu-gtk/menu.c
@@ -215,7 +215,6 @@ root_child_delete (DbusmenuMenuitem * root, DbusmenuMenuitem * child, DbusmenuGt
static void
root_changed (DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, DbusmenuGtkMenu * menu) {
- g_debug("Root changed");
if (newroot == NULL) {
gtk_widget_hide(GTK_WIDGET(menu));
return;