aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-05 09:42:53 -0500
committerTed Gould <ted@gould.cx>2011-04-05 09:42:53 -0500
commit7afd944c1186a7ca15360a5a668047988d451a6f (patch)
tree48da2c444efa0170b7b5838f2a441475a88de9b0 /libdbusmenu-gtk
parentf90465d8892aff9002874ae40656b3c67a2542af (diff)
downloadlibdbusmenu-7afd944c1186a7ca15360a5a668047988d451a6f.tar.gz
libdbusmenu-7afd944c1186a7ca15360a5a668047988d451a6f.tar.bz2
libdbusmenu-7afd944c1186a7ca15360a5a668047988d451a6f.zip
Setting up the shell to handle the children display prop
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/client.c22
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 */