forked from enlightenment/enlightenment
Fix some formatting.
Add config option to show/hide toolbar. Disable toolbar use with #if 0 for now...not stable enough. SVN revision: 32527
This commit is contained in:
parent
5907077bf6
commit
a1629df8a2
|
@ -104,6 +104,7 @@ static void _e_fwin_zone_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj,
|
||||||
static int _e_fwin_zone_move_resize(void *data, int type, void *event);
|
static int _e_fwin_zone_move_resize(void *data, int type, void *event);
|
||||||
static void _e_fwin_config_set(E_Fwin *fwin);
|
static void _e_fwin_config_set(E_Fwin *fwin);
|
||||||
static void _e_fwin_window_title_set(E_Fwin *fwin);
|
static void _e_fwin_window_title_set(E_Fwin *fwin);
|
||||||
|
static void _e_fwin_toolbar_resize(E_Fwin *fwin);
|
||||||
|
|
||||||
/* local subsystem globals */
|
/* local subsystem globals */
|
||||||
static Evas_List *fwins = NULL;
|
static Evas_List *fwins = NULL;
|
||||||
|
@ -374,8 +375,14 @@ _e_fwin_new(E_Container *con, const char *dev, const char *path)
|
||||||
evas_object_move(o, 0, 0);
|
evas_object_move(o, 0, 0);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
fwin->tbar = e_toolbar_new(e_win_evas_get(fwin->win), "toolbar");
|
#if 0
|
||||||
e_toolbar_show(fwin->tbar);
|
if (fileman_config->view.show_toolbar)
|
||||||
|
{
|
||||||
|
fwin->tbar = e_toolbar_new(e_win_evas_get(fwin->win), "toolbar",
|
||||||
|
fwin->win, fwin->fm_obj);
|
||||||
|
e_toolbar_show(fwin->tbar);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
o = edje_object_add(e_win_evas_get(fwin->win));
|
o = edje_object_add(e_win_evas_get(fwin->win));
|
||||||
edje_object_part_swallow(fwin->bg_obj, "e.swallow.bg", o);
|
edje_object_part_swallow(fwin->bg_obj, "e.swallow.bg", o);
|
||||||
|
@ -462,7 +469,7 @@ static void
|
||||||
_e_fwin_cb_resize(E_Win *win)
|
_e_fwin_cb_resize(E_Win *win)
|
||||||
{
|
{
|
||||||
E_Fwin *fwin;
|
E_Fwin *fwin;
|
||||||
|
|
||||||
if (!win) return; //safety
|
if (!win) return; //safety
|
||||||
fwin = win->data;
|
fwin = win->data;
|
||||||
if (fwin->bg_obj)
|
if (fwin->bg_obj)
|
||||||
|
@ -474,10 +481,10 @@ _e_fwin_cb_resize(E_Win *win)
|
||||||
}
|
}
|
||||||
if (fwin->win)
|
if (fwin->win)
|
||||||
{
|
{
|
||||||
e_toolbar_move_resize(fwin->tbar, 0, 0, fwin->win->w, fwin->tbar->h);
|
if (fwin->tbar)
|
||||||
evas_object_move(fwin->scrollframe_obj, 0, fwin->tbar->h);
|
_e_fwin_toolbar_resize(fwin);
|
||||||
evas_object_resize(fwin->scrollframe_obj, fwin->win->w,
|
else
|
||||||
(fwin->win->h - fwin->tbar->h));
|
evas_object_resize(fwin->scrollframe_obj, fwin->win->w, fwin->win->h);
|
||||||
}
|
}
|
||||||
else if (fwin->zone)
|
else if (fwin->zone)
|
||||||
evas_object_resize(fwin->scrollframe_obj, fwin->zone->w, fwin->zone->h);
|
evas_object_resize(fwin->scrollframe_obj, fwin->zone->w, fwin->zone->h);
|
||||||
|
@ -1580,3 +1587,40 @@ _e_fwin_window_title_set(E_Fwin *fwin)
|
||||||
e_win_title_set(fwin->win, buf);
|
e_win_title_set(fwin->win, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_fwin_toolbar_resize(E_Fwin *fwin)
|
||||||
|
{
|
||||||
|
int x, y, w, h;
|
||||||
|
|
||||||
|
e_toolbar_position_calc(fwin->tbar);
|
||||||
|
w = fwin->win->w;
|
||||||
|
h = fwin->win->h;
|
||||||
|
switch (fwin->tbar->gadcon->orient)
|
||||||
|
{
|
||||||
|
case E_GADCON_ORIENT_TOP:
|
||||||
|
x = 0;
|
||||||
|
y = fwin->tbar->h;
|
||||||
|
h = (h - fwin->tbar->h);
|
||||||
|
break;
|
||||||
|
case E_GADCON_ORIENT_BOTTOM:
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
h = (h - fwin->tbar->h);
|
||||||
|
break;
|
||||||
|
case E_GADCON_ORIENT_LEFT:
|
||||||
|
x = (fwin->tbar->x + fwin->tbar->w);
|
||||||
|
y = 0;
|
||||||
|
w = (w - fwin->tbar->w);
|
||||||
|
break;
|
||||||
|
case E_GADCON_ORIENT_RIGHT:
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
w = (fwin->win->w - fwin->tbar->w);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
evas_object_move(fwin->scrollframe_obj, x, y);
|
||||||
|
evas_object_resize(fwin->scrollframe_obj, w, h);
|
||||||
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ struct _E_Config_Dialog_Data
|
||||||
int fit_custom_pos;
|
int fit_custom_pos;
|
||||||
int show_full_path;
|
int show_full_path;
|
||||||
int show_desktop_icons;
|
int show_desktop_icons;
|
||||||
|
int show_toolbar;
|
||||||
} view;
|
} view;
|
||||||
/* display of icons */
|
/* display of icons */
|
||||||
struct
|
struct
|
||||||
|
@ -24,15 +25,7 @@ struct _E_Config_Dialog_Data
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
} icon;
|
} icon, list, fixed;
|
||||||
struct
|
|
||||||
{
|
|
||||||
int w, h;
|
|
||||||
} list;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
int w, h;
|
|
||||||
} fixed;
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int show;
|
int show;
|
||||||
|
@ -112,6 +105,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->view.single_click = fileman_config->view.single_click;
|
cfdata->view.single_click = fileman_config->view.single_click;
|
||||||
cfdata->view.show_full_path = fileman_config->view.show_full_path;
|
cfdata->view.show_full_path = fileman_config->view.show_full_path;
|
||||||
cfdata->view.show_desktop_icons = fileman_config->view.show_desktop_icons;
|
cfdata->view.show_desktop_icons = fileman_config->view.show_desktop_icons;
|
||||||
|
cfdata->view.show_toolbar = fileman_config->view.show_toolbar;
|
||||||
cfdata->icon.icon.w = fileman_config->icon.icon.w;
|
cfdata->icon.icon.w = fileman_config->icon.icon.w;
|
||||||
cfdata->icon.icon.h = fileman_config->icon.icon.h;
|
cfdata->icon.icon.h = fileman_config->icon.icon.h;
|
||||||
cfdata->icon.extension.show = fileman_config->icon.extension.show;
|
cfdata->icon.extension.show = fileman_config->icon.extension.show;
|
||||||
|
@ -133,6 +127,7 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
fileman_config->view.single_click = cfdata->view.single_click;
|
fileman_config->view.single_click = cfdata->view.single_click;
|
||||||
fileman_config->view.show_full_path = cfdata->view.show_full_path;
|
fileman_config->view.show_full_path = cfdata->view.show_full_path;
|
||||||
fileman_config->view.show_desktop_icons = cfdata->view.show_desktop_icons;
|
fileman_config->view.show_desktop_icons = cfdata->view.show_desktop_icons;
|
||||||
|
fileman_config->view.show_toolbar = cfdata->view.show_toolbar;
|
||||||
fileman_config->icon.extension.show = cfdata->icon.extension.show;
|
fileman_config->icon.extension.show = cfdata->icon.extension.show;
|
||||||
|
|
||||||
/* Make these two equal so that icons are proportioned correctly */
|
/* Make these two equal so that icons are proportioned correctly */
|
||||||
|
@ -199,6 +194,9 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
ob = e_widget_check_add(evas, _("Show Desktop Icons"),
|
ob = e_widget_check_add(evas, _("Show Desktop Icons"),
|
||||||
&(cfdata->view.show_desktop_icons));
|
&(cfdata->view.show_desktop_icons));
|
||||||
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
||||||
|
ob = e_widget_check_add(evas, _("Show Toolbar"),
|
||||||
|
&(cfdata->view.show_toolbar));
|
||||||
|
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,6 @@ e_modapi_init(E_Module *m)
|
||||||
(zone->container->num + zone->num));
|
(zone->container->num + zone->num));
|
||||||
e_fwin_zone_new(zone, "desktop", buf);
|
e_fwin_zone_new(zone, "desktop", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,6 +223,7 @@ _e_mod_fileman_config_load(void)
|
||||||
E_CONFIG_VAL(D, T, view.fit_custom_pos, UCHAR);
|
E_CONFIG_VAL(D, T, view.fit_custom_pos, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, view.show_full_path, UCHAR);
|
E_CONFIG_VAL(D, T, view.show_full_path, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, view.show_desktop_icons, UCHAR);
|
E_CONFIG_VAL(D, T, view.show_desktop_icons, UCHAR);
|
||||||
|
E_CONFIG_VAL(D, T, view.show_toolbar, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, icon.icon.w, INT);
|
E_CONFIG_VAL(D, T, icon.icon.w, INT);
|
||||||
E_CONFIG_VAL(D, T, icon.icon.h, INT);
|
E_CONFIG_VAL(D, T, icon.icon.h, INT);
|
||||||
E_CONFIG_VAL(D, T, icon.list.w, INT);
|
E_CONFIG_VAL(D, T, icon.list.w, INT);
|
||||||
|
@ -298,7 +298,11 @@ _e_mod_fileman_config_load(void)
|
||||||
fileman_config->selection.single = 0;
|
fileman_config->selection.single = 0;
|
||||||
fileman_config->selection.windows_modifiers = 0;
|
fileman_config->selection.windows_modifiers = 0;
|
||||||
IFMODCFGEND;
|
IFMODCFGEND;
|
||||||
|
|
||||||
|
IFMODCFG(0x0101);
|
||||||
|
fileman_config->view.show_toolbar = 0;
|
||||||
|
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 */
|
||||||
|
|
|
@ -7,7 +7,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 0x0100
|
#define MOD_CONFIG_FILE_GENERATION 0x0101
|
||||||
#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;
|
||||||
|
@ -34,6 +34,7 @@ struct _Config
|
||||||
unsigned char fit_custom_pos;
|
unsigned char fit_custom_pos;
|
||||||
unsigned char show_full_path;
|
unsigned char show_full_path;
|
||||||
unsigned char show_desktop_icons;
|
unsigned char show_desktop_icons;
|
||||||
|
unsigned char show_toolbar;
|
||||||
} view;
|
} view;
|
||||||
/* display of icons */
|
/* display of icons */
|
||||||
struct {
|
struct {
|
||||||
|
|
Loading…
Reference in New Issue