- ObMenu *t;
- /* create a Send To Workspace ObMenu */
- send_to_menu = menu_new_full(NULL, "send-to-workspace",
- NULL, NULL, client_send_to_update,
- NULL, NULL, NULL,
- NULL);
-
- layer_menu = menu_new(NULL, "layer", NULL);
- menu_add_entry(layer_menu, menu_entry_new("Top Layer",
- action_from_string("sendtotoplayer")));
- menu_add_entry(layer_menu, menu_entry_new("Normal Layer",
- action_from_string("sendtonormallayer")));
- menu_add_entry(layer_menu, menu_entry_new("Bottom Layer",
- action_from_string("sendtobottomlayer")));
-
- t = (ObMenu *)plugin_create("client_menu");
+ GSList *acts;
+
+ menu_new(LAYER_MENU_NAME, _("Layer"), NULL);
+ menu_set_update_func(LAYER_MENU_NAME, layer_update);
+
+ acts = g_slist_prepend(NULL, action_from_string("SendToTopLayer"));
+ menu_add_normal(LAYER_MENU_NAME, LAYER_TOP, _("Always on top"), acts);
+
+ acts = g_slist_prepend(NULL, action_from_string("SendToNormalLayer"));
+ menu_add_normal(LAYER_MENU_NAME, LAYER_NORMAL, _("Normal"), acts);
+
+ 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);