forked from enlightenment/enlightenment
hacky implementation of toolbar orientation saving
ticket #2030 SVN revision: 81259
This commit is contained in:
parent
484daacd13
commit
b18e9acc91
|
@ -549,12 +549,14 @@ e_fwin_reload_all(void)
|
||||||
fwin->cur_page->tbar = e_toolbar_new
|
fwin->cur_page->tbar = e_toolbar_new
|
||||||
(e_win_evas_get(fwin->win), "toolbar",
|
(e_win_evas_get(fwin->win), "toolbar",
|
||||||
fwin->win, fwin->cur_page->fm_obj);
|
fwin->win, fwin->cur_page->fm_obj);
|
||||||
|
e_toolbar_orient(fwin->cur_page->tbar, fileman_config->view.toolbar_orient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fwin->cur_page->tbar)
|
if (fwin->cur_page->tbar)
|
||||||
{
|
{
|
||||||
|
fileman_config->view.toolbar_orient = fwin->cur_page->tbar->gadcon->orient;
|
||||||
e_object_del(E_OBJECT(fwin->cur_page->tbar));
|
e_object_del(E_OBJECT(fwin->cur_page->tbar));
|
||||||
fwin->cur_page->tbar = NULL;
|
fwin->cur_page->tbar = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1019,8 +1021,11 @@ _e_fwin_page_create(E_Fwin *fwin)
|
||||||
e_widget_scrollframe_focus_object_set(o, page->fm_obj);
|
e_widget_scrollframe_focus_object_set(o, page->fm_obj);
|
||||||
|
|
||||||
if (fileman_config->view.show_toolbar)
|
if (fileman_config->view.show_toolbar)
|
||||||
page->tbar = e_toolbar_new(evas, "toolbar",
|
{
|
||||||
fwin->win, page->fm_obj);
|
page->tbar = e_toolbar_new(evas, "toolbar",
|
||||||
|
fwin->win, page->fm_obj);
|
||||||
|
e_toolbar_orient(page->tbar, fileman_config->view.toolbar_orient);
|
||||||
|
}
|
||||||
|
|
||||||
page->fm_op_entry_add_handler =
|
page->fm_op_entry_add_handler =
|
||||||
ecore_event_handler_add(E_EVENT_FM_OP_REGISTRY_ADD,
|
ecore_event_handler_add(E_EVENT_FM_OP_REGISTRY_ADD,
|
||||||
|
@ -1034,7 +1039,11 @@ static void
|
||||||
_e_fwin_page_free(E_Fwin_Page *page)
|
_e_fwin_page_free(E_Fwin_Page *page)
|
||||||
{
|
{
|
||||||
if (page->fm_obj) evas_object_del(page->fm_obj);
|
if (page->fm_obj) evas_object_del(page->fm_obj);
|
||||||
if (page->tbar) e_object_del(E_OBJECT(page->tbar));
|
if (page->tbar)
|
||||||
|
{
|
||||||
|
fileman_config->view.toolbar_orient = page->tbar->gadcon->orient;
|
||||||
|
e_object_del(E_OBJECT(page->tbar));
|
||||||
|
}
|
||||||
else evas_object_del(page->scrollframe_obj);
|
else evas_object_del(page->scrollframe_obj);
|
||||||
|
|
||||||
if (page->fm_op_entry_add_handler)
|
if (page->fm_op_entry_add_handler)
|
||||||
|
|
|
@ -266,6 +266,7 @@ _e_mod_fileman_config_load(void)
|
||||||
E_CONFIG_VAL(D, T, tooltip.size, DOUBLE);
|
E_CONFIG_VAL(D, T, tooltip.size, DOUBLE);
|
||||||
E_CONFIG_VAL(D, T, tooltip.enable, UCHAR);
|
E_CONFIG_VAL(D, T, tooltip.enable, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, view.spring_delay, INT);
|
E_CONFIG_VAL(D, T, view.spring_delay, INT);
|
||||||
|
E_CONFIG_VAL(D, T, view.toolbar_orient, UINT);
|
||||||
E_CONFIG_LIST(D, T, paths, paths_edd);
|
E_CONFIG_LIST(D, T, paths, paths_edd);
|
||||||
|
|
||||||
fileman_config = e_config_domain_load("module.fileman", conf_edd);
|
fileman_config = e_config_domain_load("module.fileman", conf_edd);
|
||||||
|
@ -346,6 +347,10 @@ _e_mod_fileman_config_load(void)
|
||||||
fileman_config->icon.max_thumb_size = 0;
|
fileman_config->icon.max_thumb_size = 0;
|
||||||
IFMODCFGEND;
|
IFMODCFGEND;
|
||||||
|
|
||||||
|
IFMODCFG(0x0118);
|
||||||
|
fileman_config->view.toolbar_orient = E_GADCON_ORIENT_TOP;
|
||||||
|
IFMODCFGEND;
|
||||||
|
|
||||||
fileman_config->config_version = MOD_CONFIG_FILE_VERSION;
|
fileman_config->config_version = MOD_CONFIG_FILE_VERSION;
|
||||||
|
|
||||||
/* UCHAR's give nasty compile warnings about comparisons so not gonna limit those */
|
/* UCHAR's give nasty compile warnings about comparisons so not gonna limit those */
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* Increment for Major Changes */
|
/* Increment for Major Changes */
|
||||||
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
||||||
/* Increment for Minor Changes (ie: user doesn't need a new config) */
|
/* Increment for Minor Changes (ie: user doesn't need a new config) */
|
||||||
#define MOD_CONFIG_FILE_GENERATION 0x0117
|
#define MOD_CONFIG_FILE_GENERATION 0x0118
|
||||||
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
||||||
|
|
||||||
typedef struct _Config Config;
|
typedef struct _Config Config;
|
||||||
|
@ -40,6 +40,7 @@ struct _Config
|
||||||
unsigned char desktop_navigation;
|
unsigned char desktop_navigation;
|
||||||
unsigned char menu_shows_files;
|
unsigned char menu_shows_files;
|
||||||
int spring_delay;
|
int spring_delay;
|
||||||
|
E_Gadcon_Orient toolbar_orient;
|
||||||
} view;
|
} view;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue