Commits

Ivan Vučica committed 31ed2fb Draft

Menu items cannot be 'standalone' directly on the root. This is what broke mini-dbusmenu.

  • Participants
  • Parent commits 17f63f2

Comments (0)

Files changed (1)

File mini-dbusmenu.c

 
 	
 	// Fill the menu with some items
+	DbusmenuMenuitem * base_root = dbusmenu_menuitem_new();
 	DbusmenuMenuitem * root = dbusmenu_menuitem_new();
+	dbusmenu_menuitem_property_set(root, DBUSMENU_MENUITEM_PROP_LABEL, ("The Menu"));
+	dbusmenu_menuitem_child_append(base_root, root);
+
+
 
 	DbusmenuMenuitem * mi = dbusmenu_menuitem_new();
 	dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, ("Compose New Message, NOW"));
 //	g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(command_item_activate), EVO_CONTACTS_CMD);
 	dbusmenu_menuitem_child_append(root, mi);
 
-	dbusmenu_server_set_root(menu_server, root);
+	dbusmenu_server_set_root(menu_server, base_root);
 #if INDICATE
 	indicate_server_set_menu(server, menu_server);
 #endif