From: Enlightenment C. <no...@cv...> - 2006-08-21 04:35:54
|
Enlightenment CVS committal Author : onefang Project : e17 Module : apps/e Dir : e17/apps/e/src/bin Modified Files: e_actions.c e_int_menus.c e_int_menus.h e_main.c Log Message: New menu structure. ~/.e/e/applications/menu/all ~/.e/e/applications/menu/favorites The first one is all the converted FDO menus, which will track changes to those menus. The second one is the original favorites menu, which the user can edit to their hearts content. WARNING - will break your Favorite menus, coz it has moved. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_actions.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -3 -r1.78 -r1.79 --- e_actions.c 20 Aug 2006 04:48:27 -0000 1.78 +++ e_actions.c 21 Aug 2006 04:35:52 -0000 1.79 @@ -1113,6 +1113,7 @@ { if (!strcmp(name, "main")) return e_int_menus_main_new(); else if (!strcmp(name, "favorites")) return e_int_menus_favorite_apps_new(); + else if (!strcmp(name, "all")) return e_int_menus_all_apps_new(); else if (!strcmp(name, "clients")) return e_int_menus_clients_new(); return NULL; } @@ -1738,6 +1739,8 @@ e_register_action_predef_name(_("Menu"), _("Show Main Menu"), "menu_show", "main", EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 0); e_register_action_predef_name(_("Menu"), _("Show Favorites Menu"), "menu_show", "favorites", + EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 0); + e_register_action_predef_name(_("Menu"), _("Show All Applications Menu"), "menu_show", "all", EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 0); e_register_action_predef_name(_("Menu"), _("Show Clients Menu"), "menu_show", "clients", EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 0); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_int_menus.c,v retrieving revision 1.148 retrieving revision 1.149 diff -u -3 -r1.148 -r1.149 --- e_int_menus.c 16 Aug 2006 09:37:14 -0000 1.148 +++ e_int_menus.c 21 Aug 2006 04:35:52 -0000 1.149 @@ -9,6 +9,7 @@ { E_Menu *menu; E_Menu *apps; + E_Menu *all_apps; E_Menu *desktops; E_Menu *clients; // E_Menu *gadgets; @@ -77,6 +78,13 @@ e_menu_item_label_set(mi, _("Favorite Applications")); e_util_menu_item_edje_icon_set(mi, "enlightenment/favorites"); e_menu_item_submenu_set(mi, subm); + + subm = e_int_menus_all_apps_new(); + dat->all_apps = subm; + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, _("All Applications")); + e_util_menu_item_edje_icon_set(mi, "enlightenment/all_applications"); + e_menu_item_submenu_set(mi, subm); mi = e_menu_item_new(m); e_menu_item_label_set(mi, _("Run Command")); @@ -186,7 +194,25 @@ homedir = e_user_homedir_get(); if (homedir) { - snprintf(buf, sizeof(buf), "%s/.e/e/applications/favorite", homedir); + snprintf(buf, sizeof(buf), "%s/.e/e/applications/menu/favorite", homedir); + m = e_int_menus_apps_new(buf); + free(homedir); + return m; + } + return NULL; +} + +EAPI E_Menu * +e_int_menus_all_apps_new(void) +{ + E_Menu *m; + char buf[4096]; + char *homedir; + + homedir = e_user_homedir_get(); + if (homedir) + { + snprintf(buf, sizeof(buf), "%s/.e/e/applications/menu/all", homedir); m = e_int_menus_apps_new(buf); free(homedir); return m; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_int_menus.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- e_int_menus.h 2 Mar 2006 12:03:48 -0000 1.15 +++ e_int_menus.h 21 Aug 2006 04:35:52 -0000 1.16 @@ -22,6 +22,7 @@ EAPI E_Menu *e_int_menus_clients_new(void); EAPI E_Menu *e_int_menus_apps_new(const char *dir); EAPI E_Menu *e_int_menus_favorite_apps_new(void); +EAPI E_Menu *e_int_menus_all_apps_new(void); EAPI E_Menu *e_int_menus_config_new(void); EAPI E_Menu *e_int_menus_gadgets_new(void); EAPI E_Menu *e_int_menus_themes_new(void); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_main.c,v retrieving revision 1.177 retrieving revision 1.178 diff -u -3 -r1.177 -r1.178 --- e_main.c 20 Aug 2006 08:22:19 -0000 1.177 +++ e_main.c 21 Aug 2006 04:35:52 -0000 1.178 @@ -834,7 +834,8 @@ "%s/.e/e/backgrounds", "%s/.e/e/applications", "%s/.e/e/applications/all", - "%s/.e/e/applications/favorite", + "%s/.e/e/applications/menu/favorite", + "%s/.e/e/applications/menu/all", "%s/.e/e/applications/bar", "%s/.e/e/applications/bar/default", "%s/.e/e/applications/startup", |