Enlightenment CVS committal
Author : devilhorns
Project : e17
Module : apps/e
Dir : e17/apps/e/src/modules/fileman
Modified Files:
e_fwin.c e_mod_config.c e_mod_main.c e_mod_main.h
Log Message:
Fix some formatting.
Add config option to show/hide toolbar.
Disable toolbar use with #if 0 for now...not stable enough.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/fileman/e_fwin.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- e_fwin.c 2 Nov 2007 06:22:24 -0000 1.15
+++ e_fwin.c 9 Nov 2007 23:33:23 -0000 1.16
@@ -104,6 +104,7 @@
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_window_title_set(E_Fwin *fwin);
+static void _e_fwin_toolbar_resize(E_Fwin *fwin);
/* local subsystem globals */
static Evas_List *fwins = NULL;
@@ -374,8 +375,14 @@
evas_object_move(o, 0, 0);
evas_object_show(o);
- fwin->tbar = e_toolbar_new(e_win_evas_get(fwin->win), "toolbar");
- e_toolbar_show(fwin->tbar);
+#if 0
+ 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));
edje_object_part_swallow(fwin->bg_obj, "e.swallow.bg", o);
@@ -462,7 +469,7 @@
_e_fwin_cb_resize(E_Win *win)
{
E_Fwin *fwin;
-
+
if (!win) return; //safety
fwin = win->data;
if (fwin->bg_obj)
@@ -474,10 +481,10 @@
}
if (fwin->win)
{
- e_toolbar_move_resize(fwin->tbar, 0, 0, fwin->win->w, fwin->tbar->h);
- evas_object_move(fwin->scrollframe_obj, 0, fwin->tbar->h);
- evas_object_resize(fwin->scrollframe_obj, fwin->win->w,
- (fwin->win->h - fwin->tbar->h));
+ if (fwin->tbar)
+ _e_fwin_toolbar_resize(fwin);
+ else
+ evas_object_resize(fwin->scrollframe_obj, fwin->win->w, fwin->win->h);
}
else if (fwin->zone)
evas_object_resize(fwin->scrollframe_obj, fwin->zone->w, fwin->zone->h);
@@ -1579,4 +1586,41 @@
snprintf(buf, sizeof(buf), "%s", file);
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);
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/fileman/e_mod_config.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- e_mod_config.c 14 Sep 2007 17:43:36 -0000 1.6
+++ e_mod_config.c 9 Nov 2007 23:33:23 -0000 1.7
@@ -17,6 +17,7 @@
int fit_custom_pos;
int show_full_path;
int show_desktop_icons;
+ int show_toolbar;
} view;
/* display of icons */
struct
@@ -24,15 +25,7 @@
struct
{
int w, h;
- } icon;
- struct
- {
- int w, h;
- } list;
- struct
- {
- int w, h;
- } fixed;
+ } icon, list, fixed;
struct
{
int show;
@@ -112,6 +105,7 @@
cfdata->view.single_click = fileman_config->view.single_click;
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_toolbar = fileman_config->view.show_toolbar;
cfdata->icon.icon.w = fileman_config->icon.icon.w;
cfdata->icon.icon.h = fileman_config->icon.icon.h;
cfdata->icon.extension.show = fileman_config->icon.extension.show;
@@ -133,6 +127,7 @@
fileman_config->view.single_click = cfdata->view.single_click;
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_toolbar = cfdata->view.show_toolbar;
fileman_config->icon.extension.show = cfdata->icon.extension.show;
/* Make these two equal so that icons are proportioned correctly */
@@ -198,6 +193,9 @@
e_widget_list_object_append(o, ob, 1, 1, 0.5);
ob = e_widget_check_add(evas, _("Show Desktop Icons"),
&(cfdata->view.show_desktop_icons));
+ 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;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/fileman/e_mod_main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_mod_main.c 31 Oct 2007 12:23:14 -0000 1.10
+++ e_mod_main.c 9 Nov 2007 23:33:23 -0000 1.11
@@ -82,7 +82,6 @@
(zone->container->num + zone->num));
e_fwin_zone_new(zone, "desktop", buf);
}
-
}
}
}
@@ -224,6 +223,7 @@
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_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.h, INT);
E_CONFIG_VAL(D, T, icon.list.w, INT);
@@ -298,7 +298,11 @@
fileman_config->selection.single = 0;
fileman_config->selection.windows_modifiers = 0;
IFMODCFGEND;
-
+
+ IFMODCFG(0x0101);
+ fileman_config->view.show_toolbar = 0;
+ IFMODCFGEND;
+
fileman_config->config_version = MOD_CONFIG_FILE_VERSION;
/* UCHAR's give nasty compile warnings about comparisons so not gonna limit
those */
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/fileman/e_mod_main.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_mod_main.h 31 Oct 2007 12:23:14 -0000 1.5
+++ e_mod_main.h 9 Nov 2007 23:33:23 -0000 1.6
@@ -7,7 +7,7 @@
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 0x0001
/* 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)
typedef struct _Config Config;
@@ -34,6 +34,7 @@
unsigned char fit_custom_pos;
unsigned char show_full_path;
unsigned char show_desktop_icons;
+ unsigned char show_toolbar;
} view;
/* display of icons */
struct {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs