Added an option, by request, to disable display of Favorites or Applications
on the main menu. SVN revision: 29971
This commit is contained in:
parent
4a415aa5f7
commit
c19205a09a
|
@ -553,6 +553,9 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, desk_auto_switch, INT);
|
||||
|
||||
E_CONFIG_VAL(D, T, thumb_nice, INT);
|
||||
|
||||
E_CONFIG_VAL(D, T, menu_favorites_show, INT);
|
||||
E_CONFIG_VAL(D, T, menu_apps_show, INT);
|
||||
|
||||
e_config = e_config_domain_load("e", _e_config_edd);
|
||||
if (e_config)
|
||||
|
@ -1391,6 +1394,11 @@ e_config_init(void)
|
|||
IFCFG(0x0117);
|
||||
e_config->cnfmdlg_disabled = 0;
|
||||
IFCFGEND;
|
||||
|
||||
IFCFG(0x0118);
|
||||
e_config->menu_favorites_show = 1;
|
||||
e_config->menu_apps_show = 1;
|
||||
IFCFGEND;
|
||||
|
||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||
|
||||
|
@ -1519,6 +1527,9 @@ e_config_init(void)
|
|||
E_CONFIG_LIMIT(e_config->mouse_accel_denominator, 1, 10);
|
||||
E_CONFIG_LIMIT(e_config->mouse_accel_threshold, 1, 10);
|
||||
|
||||
E_CONFIG_LIMIT(e_config->menu_favorites_show, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->menu_apps_show, 0, 1);
|
||||
|
||||
/* FIXME: disabled auto apply because it causes problems */
|
||||
e_config->cfgdlg_auto_apply = 0;
|
||||
/* FIXME: desklock personalized password id disabled for security reasons */
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
|
|||
/* increment this whenever a new set of config values are added but the users
|
||||
* config doesn't need to be wiped - simply new values need to be put in
|
||||
*/
|
||||
#define E_CONFIG_FILE_GENERATION 0x0117
|
||||
#define E_CONFIG_FILE_GENERATION 0x0118
|
||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||
|
||||
#define E_EVAS_ENGINE_DEFAULT 0
|
||||
|
@ -203,6 +203,8 @@ struct _E_Config
|
|||
int menu_eap_name_show; // GUI
|
||||
int menu_eap_generic_show; // GUI
|
||||
int menu_eap_comment_show; // GUI
|
||||
int menu_favorites_show; // GUI
|
||||
int menu_apps_show; // GUI
|
||||
int fullscreen_policy; // GUI
|
||||
int exebuf_max_exe_list; // GUI
|
||||
int exebuf_max_eap_list; // GUI
|
||||
|
|
|
@ -9,6 +9,9 @@ static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E
|
|||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int menu_favorites_show;
|
||||
int menu_apps_show;
|
||||
|
||||
int menu_eap_name_show;
|
||||
int menu_eap_generic_show;
|
||||
int menu_eap_comment_show;
|
||||
|
@ -47,6 +50,8 @@ e_int_config_menus(E_Container *con)
|
|||
static void
|
||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
cfdata->menu_favorites_show = e_config->menu_favorites_show;
|
||||
cfdata->menu_apps_show = e_config->menu_apps_show;
|
||||
cfdata->menu_eap_name_show = e_config->menu_eap_name_show;
|
||||
cfdata->menu_eap_generic_show = e_config->menu_eap_generic_show;
|
||||
cfdata->menu_eap_comment_show = e_config->menu_eap_comment_show;
|
||||
|
@ -76,6 +81,8 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
static int
|
||||
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
e_config->menu_favorites_show = cfdata->menu_favorites_show;
|
||||
e_config->menu_apps_show = cfdata->menu_apps_show;
|
||||
e_config->menu_eap_name_show = cfdata->menu_eap_name_show;
|
||||
e_config->menu_eap_generic_show = cfdata->menu_eap_generic_show;
|
||||
e_config->menu_eap_comment_show = cfdata->menu_eap_comment_show;
|
||||
|
@ -89,6 +96,13 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
Evas_Object *o, *of, *ob;
|
||||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
of = e_widget_framelist_add(evas, _("Main Menu Settings"), 0);
|
||||
ob = e_widget_check_add(evas, _("Show Favorites In Main Menu"), &(cfdata->menu_favorites_show));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Show Applications In Main Menu"), &(cfdata->menu_apps_show));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Menu Settings"), 0);
|
||||
ob = e_widget_check_add(evas, _("Show Name In Menu"), &(cfdata->menu_eap_name_show));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
@ -103,6 +117,8 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
static int
|
||||
_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
e_config->menu_favorites_show = cfdata->menu_favorites_show;
|
||||
e_config->menu_apps_show = cfdata->menu_apps_show;
|
||||
e_config->menu_eap_name_show = cfdata->menu_eap_name_show;
|
||||
e_config->menu_eap_generic_show = cfdata->menu_eap_generic_show;
|
||||
e_config->menu_eap_comment_show = cfdata->menu_eap_comment_show;
|
||||
|
@ -130,6 +146,13 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
|||
Evas_Object *o, *of, *ob;
|
||||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
of = e_widget_framelist_add(evas, _("Main Menu Settings"), 0);
|
||||
ob = e_widget_check_add(evas, _("Show Favorites In Main Menu"), &(cfdata->menu_favorites_show));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Show Applications In Main Menu"), &(cfdata->menu_apps_show));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Menu Settings"), 0);
|
||||
ob = e_widget_check_add(evas, _("Show Name In Menu"), &(cfdata->menu_eap_name_show));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
|
|
@ -94,24 +94,29 @@ e_int_menus_main_new(void)
|
|||
|
||||
e_menu_category_set(m, "main");
|
||||
|
||||
subm = e_int_menus_favorite_apps_new();
|
||||
if (subm)
|
||||
if (e_config->menu_favorites_show)
|
||||
{
|
||||
dat->apps = subm;
|
||||
subm = e_int_menus_favorite_apps_new();
|
||||
if (subm)
|
||||
{
|
||||
dat->apps = subm;
|
||||
mi = e_menu_item_new(m);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
if (e_config->menu_apps_show)
|
||||
{
|
||||
subm = e_int_menus_all_apps_new();
|
||||
dat->all_apps = subm;
|
||||
mi = e_menu_item_new(m);
|
||||
|
||||
e_menu_item_label_set(mi, _("Favorite Applications"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/favorites");
|
||||
e_menu_item_label_set(mi, _("Applications"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/applications");
|
||||
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, _("Applications"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/applications");
|
||||
e_menu_item_submenu_set(mi, subm);
|
||||
|
||||
|
||||
#ifdef ENABLE_FILES
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Files"));
|
||||
|
@ -380,7 +385,7 @@ _e_int_menus_main_del_hook(void *obj)
|
|||
if (dat)
|
||||
{
|
||||
if (dat->apps) e_object_del(E_OBJECT(dat->apps));
|
||||
e_object_del(E_OBJECT(dat->all_apps));
|
||||
if (dat->all_apps) e_object_del(E_OBJECT(dat->all_apps));
|
||||
e_object_del(E_OBJECT(dat->desktops));
|
||||
e_object_del(E_OBJECT(dat->clients));
|
||||
e_object_del(E_OBJECT(dat->config));
|
||||
|
|
Loading…
Reference in New Issue