normal: "e17_icon_fileman_"TYPE".png"; \
} \
} \
+ description { \
+ state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ color: 128 128 128 255; \
+ } \
+ } \
+ } \
+ programs { \
+ program { \
+ name: "disable"; \
+ signal: "disable"; \
+ source: ""; \
+ action: STATE_SET "disabled" 0.0; \
+ transition: LINEAR 0.1; \
+ target: "icon"; \
+ } \
+ program { \
+ name: "default"; \
+ signal: "default"; \
+ source: ""; \
+ action: STATE_SET "default" 0.0; \
+ transition: LINEAR 0.1; \
+ target: "icon"; \
} \
} \
} \
normal: "e17_icon_fileman_"TYPE"_clicked.png"; \
} \
} \
+ description { \
+ state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ color: 128 128 128 255; \
+ } \
} \
} \
programs { \
action: STATE_SET "default" 0.0; \
target: "icon"; \
} \
+ program { \
+ name: "disable"; \
+ signal: "disable"; \
+ source: ""; \
+ action: STATE_SET "disabled" 0.0; \
+ transition: LINEAR 0.1; \
+ target: "icon"; \
+ } \
+ program { \
+ name: "default"; \
+ signal: "default"; \
+ source: ""; \
+ action: STATE_SET "default" 0.0; \
+ transition: LINEAR 0.1; \
+ target: "icon"; \
+ } \
} \
} \
type: SWALLOW;
description {
state: "default" 0.0;
- }
+ }
+ }
+ part {
+ name: "background_overlay";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ description {
+ state: "selecting" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 0 0 0 128;
+ }
}
-
part {
name: "icons";
type: SWALLOW;
description {
state: "default" 0.0;
}
- }
-
+ }
part {
name: "typebuffer";
mouse_events: 0;
action: STATE_SET "default" 0.0;
transition: LINEAR 0.2;
target: "typebuffer";
- target: "text";
+ target: "text";
}
+ program {
+ name: "default";
+ signal: "default";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.1;
+ target: "background_overlay";
+ }
+ program {
+ name: "selecting";
+ signal: "selecting";
+ source: "";
+ action: STATE_SET "selecting" 0.0;
+ transition: LINEAR 0.1;
+ target: "background_overlay";
+ }
}
}
}
mouse_events: 1;
description {
state: "default" 0.0;
- visible: 0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
normal: "e17_button.png";
border: 8 8 8 8;
}
+ color: 255 255 255 0;
}
description {
state: "clicked" 0.0;
inherit: "default" 0.0;
- visible: 1;
+ color: 255 255 255 255;
}
}
part {
signal: "clicked";
source: "";
action: STATE_SET "clicked" 0.0;
+ transition: LINEAR 0.2;
target: "icon_title";
target: "icon_overlay";
}
name: "unclicked";
signal: "unclicked";
source: "";
- action: STATE_SET "default" 0.0;
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.2;
target: "icon_title";
target: "icon_overlay";
}
to: "icon_box_bg";
}
}
+ }
+ part {
+ name: "icon_overlay";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 {
+ to: "icon_box_bg";
+ }
+ rel2 {
+ to: "icon_box_bg";
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 0 0 0 128;
+ }
}
}
+ programs {
+ program {
+ name: "disable";
+ signal: "disable";
+ source: "";
+ action: STATE_SET "disabled" 0.0;
+ transition: LINEAR 0.1;
+ target: "icon_overlay";
+ }
+ program {
+ name: "default";
+ signal: "default";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.1;
+ target: "icon_overlay";
+ }
+ }
}
group {
name: "fileman/icon_list";
-// min: 12 12;
-// max: 12 12;
parts {
part {
name: "icon_swallow";
mouse_events: 0;
description {
state: "default" 0.0;
- //min: 16 16;
- //max: 16 16;
align: 1.0 1.0;
fixed: 1 1;
rel1 {
effect: SHADOW;
description {
state: "default" 0.0;
- //min: 16 16;
rel1 {
to_x: "icon_swallow";
relative: 1.0 0.0;
state: "default" 0.0;
color: 0 0 0 0;
}
- }
-/*
- part {
- name: "icon_title";
- type: TEXTBLOCK;
- effect: NONE;
- description {
- rel1 {
- relative: 0.0 1.0;
- offset: 5 -20;
- }
- rel2 {
- relative: 1.0 1.0;
- offset: -6 1000;
- }
- color: 0 0 0 255;
- //color3: 0 0 0 32;
- text {
- text: "No Title";
- style: "fileman_icon_style";
- min: 1 1;
- }
- }
}
-*/
part {
name: "icon_title_edit_swallow";
type: SWALLOW;
static void _e_fileman_scroll_child_size_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
static int _e_fileman_reconfigure_cb(void *data, int type, void *event);
-
E_Fileman *
e_fileman_new(E_Container *con)
{
+ char dir[PATH_MAX];
+
+ if (!getcwd(dir, sizeof(dir)))
+ return NULL;
+
+ return e_fileman_new_to_dir(con, dir);
+}
+
+E_Fileman *
+e_fileman_new_to_dir(E_Container *con, char *path)
+{
E_Fileman *fileman;
E_Manager *man;
char dir[PATH_MAX];
if (!con) con = e_container_number_get(man, 0);
if (!con) return NULL;
}
- if (!getcwd(dir, sizeof(dir)))
- return NULL;
+
+ snprintf(dir, PATH_MAX, "%s", path);
+
+ if(!ecore_file_is_dir(dir))
+ if (!getcwd(dir, sizeof(dir)))
+ return NULL;
fileman = E_OBJECT_ALLOC(E_Fileman, E_FILEMAN_TYPE, _e_fileman_free);
if (!fileman) return NULL;
e_win_title_set(fileman->win, dir);
evas_event_freeze(fileman->evas);
- fileman->smart = e_fm_add(fileman->evas);
+ fileman->smart = e_fm_add(fileman->evas);
e_fm_e_win_set(fileman->smart, fileman->win);
+ e_fm_dir_set(fileman->smart, dir);
fileman->main = e_scrollframe_add(fileman->evas);
e_scrollframe_custom_theme_set(fileman->main, "base/themes/fileman",
static void _e_fm_string_replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize);
+static void _e_fm_autocomplete(E_Fm_Smart_Data *sd);
static void _e_fm_icon_select_glob(E_Fm_Smart_Data *sd, char *glb);
static void _e_fm_icon_select_up(E_Fm_Smart_Data *sd);
static void _e_fm_icon_select_down(E_Fm_Smart_Data *sd);
ev = event_info;
icon = data;
- e_fm_icon_signal_emit(icon->icon_object, "hilight", "");
+ e_fm_icon_signal_emit(icon->icon_object, "mousein", "");
}
static void
ev = event_info;
icon = data;
- e_fm_icon_signal_emit(icon->icon_object, "default", "");
+ e_fm_icon_signal_emit(icon->icon_object, "mouseout", "");
}
static void
}
static void
+_e_fm_autocomplete(E_Fm_Smart_Data *sd)
+{
+ /* TODO */
+}
+
+static void
_e_fm_icon_select_glob(E_Fm_Smart_Data *sd, char *glb)
{
E_Fm_Icon *icon, *anchor;
ev = NULL;
glbpath = E_NEW(char, strlen(sd->dir) + strlen(glb) + 2);
snprintf(glbpath, strlen(sd->dir) + strlen(glb) + 2, "%s/%s", sd->dir, glb);
- if(glob(glbpath, 0, NULL, &globbuf))
- return;
_e_fm_selections_clear(sd);
+
+ edje_object_signal_emit(sd->edje_obj, "selecting", "");
+
+ if(glob(glbpath, 0, NULL, &globbuf))
+ {
+ for (l = sd->files; l; l = l->next)
+ {
+ icon = l->data;
+ e_fm_icon_signal_emit(icon->icon_object, "disable", "");
+ }
+ return;
+ }
+
for (l = sd->files; l; l = l->next)
{
icon = l->data;
if(!strcmp(icon->file->name, file))
{
_e_fm_selections_add(l->data, l);
+ e_fm_icon_signal_emit(icon->icon_object, "default", "");
if(!anchor)
{
evas_object_geometry_get(icon->icon_object, &x, &y, &w, &h);
{
Evas_Event_Key_Down *ev;
E_Fm_Smart_Data *sd;
+ Evas_List *l;
+ E_Fm_Icon *icon;
ev = event_info;
sd = data;
+ if (!strcmp(ev->keyname, "Tab"))
+ {
+ if(strcmp(edje_object_part_state_get(sd->edje_obj, "typebuffer", NULL), "shown"))
+ {
+
+ _e_fm_autocomplete(sd);
+ }
+ }
if (!strcmp(ev->keyname, "Up"))
{
if(!strcmp(edje_object_part_state_get(sd->edje_obj, "typebuffer", NULL), "shown"))
- {
+ {
edje_object_signal_emit(sd->edje_obj, "typebuf_hide", "");
- edje_object_part_text_set(sd->edje_obj, "text", "");
+ edje_object_part_text_set(sd->edje_obj, "text", "");
+ for (l = sd->files; l; l = l->next)
+ {
+ icon = l->data;
+ e_fm_icon_signal_emit(icon->icon_object, "default", "");
+ }
+ edje_object_signal_emit(sd->edje_obj, "default", "");
}
else
_e_fm_icon_select_up(sd);
if(!strcmp(edje_object_part_state_get(sd->edje_obj, "typebuffer", NULL), "shown"))
{
edje_object_signal_emit(sd->edje_obj, "typebuf_hide", "");
- edje_object_part_text_set(sd->edje_obj, "text", "");
+ edje_object_part_text_set(sd->edje_obj, "text", "");
+ for (l = sd->files; l; l = l->next)
+ {
+ icon = l->data;
+ e_fm_icon_signal_emit(icon->icon_object, "default", "");
+ }
+ edje_object_signal_emit(sd->edje_obj, "default", "");
}
else
_e_fm_icon_select_down(sd);
{
edje_object_signal_emit(sd->edje_obj, "typebuf_hide", "");
edje_object_part_text_set(sd->edje_obj, "text", "");
+ for (l = sd->files; l; l = l->next)
+ {
+ icon = l->data;
+ e_fm_icon_signal_emit(icon->icon_object, "default", "");
+ }
+ edje_object_signal_emit(sd->edje_obj, "default", "");
}
}
else if (!strcmp(ev->keyname, "Return"))
{
if(!strcmp(edje_object_part_state_get(sd->edje_obj, "typebuffer", NULL), "shown"))
{
- char *buf;
-
edje_object_signal_emit(sd->edje_obj, "typebuf_hide", "");
- buf = strdup(edje_object_part_text_get(sd->edje_obj, "text"));
edje_object_part_text_set(sd->edje_obj, "text", "");
- if(strcmp(buf, ""))
- _e_fm_icon_select_glob(sd, buf);
+ for (l = sd->files; l; l = l->next)
+ {
+ icon = l->data;
+ e_fm_icon_signal_emit(icon->icon_object, "default", "");
+ }
+ edje_object_signal_emit(sd->edje_obj, "default", "");
}
else
_e_fm_icon_run(sd);
buf = calloc(size , sizeof(char));
snprintf(buf, size, "%s", str);
edje_object_part_text_set(sd->edje_obj, "text", buf);
+ _e_fm_icon_select_glob(sd, buf);
+ E_FREE(buf);
}
}
else
buf = calloc(size, sizeof(char));
snprintf(buf, size, "%s%s", str, ev->string);
edje_object_part_text_set(sd->edje_obj, "text", buf);
+ _e_fm_icon_select_glob(sd, buf);
+ E_FREE(buf);
}
else
{
edje_object_part_text_set(sd->edje_obj, "text", ev->string);
+ _e_fm_icon_select_glob(sd, ev->string);
}
if(strcmp(edje_object_part_state_get(sd->edje_obj, "typebuffer", NULL), "shown"))