Reenable places menu integration, for people that dont use efm. With his new configuration value

SVN revision: 40930
This commit is contained in:
Davide Andreoli 2009-06-07 00:42:11 +00:00
parent c707e022c4
commit 3e31defdbe
3 changed files with 33 additions and 21 deletions

View File

@ -9,6 +9,7 @@ struct _E_Config_Dialog_Data
char *fm;
int fm_chk;
Evas_Object *entry;
int show_menu;
int show_home;
int show_desk;
int show_trash;
@ -79,6 +80,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->auto_mount = places_conf->auto_mount;
cfdata->auto_open = places_conf->auto_open;
cfdata->show_menu = places_conf->show_menu;
cfdata->show_home = places_conf->show_home;
cfdata->show_desk = places_conf->show_desk;
cfdata->show_trash = places_conf->show_trash;
@ -116,6 +118,10 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
of = e_widget_framelist_add(evas, D_("General"), 0);
e_widget_framelist_content_align_set(of, 0.0, 0.0);
ow = e_widget_check_add(evas, D_("Show in main main"),
&(cfdata->show_menu));
e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, D_("Mount volumes on insert"),
&(cfdata->auto_mount));
e_widget_framelist_object_append(of, ow);
@ -137,28 +143,28 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_widget_list_object_append(o, of, 1, 1, 0.5);
//Display frame
//~ of = e_widget_framelist_add(evas, D_("Show"), 0);
//~ e_widget_framelist_content_align_set(of, 0.0, 0.0);
of = e_widget_framelist_add(evas, D_("Show in menu"), 0);
e_widget_framelist_content_align_set(of, 0.0, 0.0);
//~ ow = e_widget_check_add(evas, D_("Home"), &(cfdata->show_home));
//~ e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, D_("Home"), &(cfdata->show_home));
e_widget_framelist_object_append(of, ow);
//~ ow = e_widget_check_add(evas, D_("Desktop"), &(cfdata->show_desk));
//~ e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, D_("Desktop"), &(cfdata->show_desk));
e_widget_framelist_object_append(of, ow);
//~ ow = e_widget_check_add(evas, D_("Trash"), &(cfdata->show_trash));
//~ e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, D_("Trash"), &(cfdata->show_trash));
e_widget_framelist_object_append(of, ow);
//~ ow = e_widget_check_add(evas, D_("Filesystem"), &(cfdata->show_root));
//~ e_widget_framelist_object_append(of, ow);
//~ ow = e_widget_check_add(evas, D_("Temp"), &(cfdata->show_temp));
//~ e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, D_("Filesystem"), &(cfdata->show_root));
e_widget_framelist_object_append(of, ow);
//~ ow = e_widget_check_add(evas, D_("Favorites"), &(cfdata->show_bookm));
//~ e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, D_("Temp"), &(cfdata->show_temp));
e_widget_framelist_object_append(of, ow);
//~ e_widget_list_object_append(o, of, 1, 1, 0.5);
ow = e_widget_check_add(evas, D_("Favorites"), &(cfdata->show_bookm));
e_widget_framelist_object_append(of, ow);
e_widget_list_object_append(o, of, 1, 1, 0.5);
return o;
}
@ -166,6 +172,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
static int
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
places_conf->show_menu = cfdata->show_menu;
places_conf->auto_mount = cfdata->auto_mount;
places_conf->auto_open = cfdata->auto_open;
places_conf->show_home = cfdata->show_home;

View File

@ -96,6 +96,7 @@ e_modapi_init(E_Module *m)
E_CONFIG_VAL(D, T, auto_mount, UCHAR);
E_CONFIG_VAL(D, T, auto_open, UCHAR);
E_CONFIG_LIST(D, T, conf_items, conf_item_edd);
E_CONFIG_VAL(D, T, show_menu, UCHAR);
E_CONFIG_VAL(D, T, show_home, UCHAR);
E_CONFIG_VAL(D, T, show_desk, UCHAR);
E_CONFIG_VAL(D, T, show_trash, UCHAR);
@ -151,11 +152,14 @@ e_modapi_init(E_Module *m)
places_conf->module = m;
e_gadcon_provider_register(&_gc_class);
places_init();
//~ E_Int_Menu_Augmentation *maug;
//~ maug = e_int_menus_menu_augmentation_add("main/1",
//~ places_augmentation,
//~ NULL, NULL, NULL);
if (places_conf->show_menu)
{
E_Int_Menu_Augmentation *maug;
maug = e_int_menus_menu_augmentation_add("main/1",
places_augmentation,
NULL, NULL, NULL);
}
return m;
}

View File

@ -40,6 +40,7 @@ struct _Config
const char *fm;
unsigned char auto_mount;
unsigned char auto_open;
unsigned char show_menu;
unsigned char show_home;
unsigned char show_desk;