diff options
-rw-r--r-- | libdbusmenu-gtk/client.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 497808b..6ec435c 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -551,6 +551,25 @@ process_toggle_state (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * varia return; } +/* Submenu processing */ +static void +process_submenu (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant) +{ + const gchar * submenu = g_variant_get_string(variant, NULL); + + if (g_strcmp0(submenu, DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU) != 0) { + /* This is the only case we're really supporting right now, + so if it's not this, we want to clean up. */ + + } else { + /* We need to build a menu for these guys to live in. */ + + + } + + return; +} + /* Whenever we have a property change on a DbusmenuMenuitem we need to be responsive to that. */ static void @@ -566,6 +585,8 @@ menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, Gt process_toggle_type(mi, gmi, variant); } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE)) { process_toggle_state(mi, gmi, variant); + } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY)) { + process_submenu(mi, gmi, variant); } return; @@ -720,6 +741,7 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * process_sensitive(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_ENABLED)); process_toggle_type(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE)); process_toggle_state(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE)); + process_submenu(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY)); refresh_shortcut(client, item); /* Oh, we're a child, let's deal with that */ |