-void *plugin_create() /* TODO: need config */
-{
- ObMenu *m = menu_new_full(NULL, "client-menu", NULL,
- client_menu_show, NULL, NULL, NULL, NULL, NULL);
- m->plugin = PLUGIN_NAME;
- menu_add_entry(m, menu_entry_new_submenu("Send To Workspace",
- send_to_menu));
- send_to_menu->parent = m;
-
- menu_add_entry(m, menu_entry_new("Iconify",
- action_from_string("iconify")));
- menu_add_entry(m, menu_entry_new("Raise",
- action_from_string("raise")));
- menu_add_entry(m, menu_entry_new("Lower",
- action_from_string("lower")));
- menu_add_entry(m, menu_entry_new("Close",
- action_from_string("close")));
- menu_add_entry(m, menu_entry_new("Shade",
- action_from_string("toggleshade")));
- menu_add_entry(m, menu_entry_new("Omnipresent",
- action_from_string("toggleomnipresent")));
- menu_add_entry(m, menu_entry_new("Decorations",
- action_from_string("toggledecorations")));
- menu_add_entry(m, menu_entry_new_submenu("Layers",
- layer_menu));
- layer_menu->parent = m;
-
- /* send to desktop
- iconify
- raise
- lower
- close
- kill
- shade
- omnipresent
- decorations
- */
- return (void *)m;
+ acts = g_slist_prepend(NULL, action_from_string("SendToBottomLayer"));
+ menu_add_normal(LAYER_MENU_NAME, LAYER_BOTTOM, _("Always on bottom"),acts);
+
+
+ menu_new(SEND_TO_MENU_NAME, _("Send to desktop"), NULL);
+ menu_set_update_func(SEND_TO_MENU_NAME, send_to_update);
+
+ menu_new(CLIENT_MENU_NAME, _("Client menu"), NULL);
+ menu_set_update_func(CLIENT_MENU_NAME, client_update);
+
+ menu_add_submenu(CLIENT_MENU_NAME, CLIENT_SEND_TO, SEND_TO_MENU_NAME);
+
+ menu_add_submenu(CLIENT_MENU_NAME, CLIENT_LAYER, LAYER_MENU_NAME);
+
+ acts = g_slist_prepend(NULL, action_from_string("Iconify"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_ICONIFY, _("Iconify"), acts);
+
+ acts = g_slist_prepend(NULL, action_from_string("Maximize"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_MAXIMIZE, _("Maximize"), acts);
+
+ acts = g_slist_prepend(NULL, action_from_string("Raise"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_RAISE, _("Raise to top"), acts);
+
+ acts = g_slist_prepend(NULL, action_from_string("Lower"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_LOWER, _("Lower to bottom"),acts);
+
+ acts = g_slist_prepend(NULL, action_from_string("ToggleShade"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_SHADE, _("(Un)Shade"), acts);
+
+ acts = g_slist_prepend(NULL, action_from_string("ToggleDecorations"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_DECORATE, _("Decorate"), acts);
+
+ menu_add_separator(CLIENT_MENU_NAME, -1);
+
+ acts = g_slist_prepend(NULL, action_from_string("KeyboardMove"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_MOVE, _("Move"), acts);
+
+ acts = g_slist_prepend(NULL, action_from_string("KeyboardResize"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_RESIZE, _("Resize"), acts);
+
+ menu_add_separator(CLIENT_MENU_NAME, -1);
+
+ acts = g_slist_prepend(NULL, action_from_string("Close"));
+ menu_add_normal(CLIENT_MENU_NAME, CLIENT_CLOSE, _("Close"), acts);