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. SVN revision: 24979
This commit is contained in:
parent
0aba7f40ae
commit
4bf92f25f8
|
@ -1113,6 +1113,7 @@ _e_actions_menu_find(const char *name)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -1739,6 +1740,8 @@ e_actions_init(void)
|
|||
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);
|
||||
e_register_action_predef_name(_("Menu"), _("Show Menu..."), "menu_show", "clients",
|
||||
|
|
|
@ -9,6 +9,7 @@ struct _Main_Data
|
|||
{
|
||||
E_Menu *menu;
|
||||
E_Menu *apps;
|
||||
E_Menu *all_apps;
|
||||
E_Menu *desktops;
|
||||
E_Menu *clients;
|
||||
// E_Menu *gadgets;
|
||||
|
@ -78,6 +79,13 @@ e_int_menus_main_new(void)
|
|||
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"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/run");
|
||||
|
@ -186,7 +194,25 @@ e_int_menus_favorite_apps_new(void)
|
|||
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;
|
||||
|
|
|
@ -22,6 +22,7 @@ EAPI E_Menu *e_int_menus_desktops_new(void);
|
|||
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);
|
||||
|
|
|
@ -834,7 +834,8 @@ _e_main_dirs_init(void)
|
|||
"%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",
|
||||
|
|
Loading…
Reference in New Issue