forked from enlightenment/enlightenment
parent
05fd34c8bd
commit
ea8f90ed0e
|
@ -5,42 +5,41 @@ typedef struct _Instance Instance;
|
||||||
|
|
||||||
struct _Instance
|
struct _Instance
|
||||||
{
|
{
|
||||||
E_Gadcon_Client *gcc;
|
E_Gadcon_Client *gcc;
|
||||||
|
|
||||||
E_Toolbar *tbar;
|
E_Toolbar *tbar;
|
||||||
|
|
||||||
Evas_Object *o_base, *o_box, *o_fm, *o_scroll;
|
Evas_Object *o_base, *o_box, *o_fm, *o_scroll;
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
Eina_List *l_buttons;
|
Eina_List *l_buttons;
|
||||||
Eina_List *history, *current;
|
Eina_List *history, *current;
|
||||||
int ignore_dir;
|
int ignore_dir;
|
||||||
|
|
||||||
const char *theme;
|
const char *theme;
|
||||||
|
|
||||||
Ecore_Idle_Enterer *idler;
|
Ecore_Idle_Enterer *idler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* local function protos */
|
/* local function protos */
|
||||||
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
||||||
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
||||||
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
||||||
static const char *_gc_label(const E_Gadcon_Client_Class *client_class);
|
static const char *_gc_label(const E_Gadcon_Client_Class *client_class);
|
||||||
static Evas_Object *_gc_icon(const E_Gadcon_Client_Class *client_class, Evas *evas);
|
static Evas_Object *_gc_icon(const E_Gadcon_Client_Class *client_class, Evas *evas);
|
||||||
static const char *_gc_id_new(const E_Gadcon_Client_Class *client_class);
|
static const char *_gc_id_new(const E_Gadcon_Client_Class *client_class);
|
||||||
static void _cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
static void _cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||||
static void _cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
static void _cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||||
static void _cb_back_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _cb_back_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
static void _cb_forward_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _cb_forward_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
static void _cb_up_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _cb_up_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
static void _cb_refresh_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _cb_refresh_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
static void _cb_favorites_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _cb_favorites_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
static void _cb_changed(void *data, Evas_Object *obj, void *event_info);
|
static void _cb_changed(void *data, Evas_Object *obj, void *event_info);
|
||||||
static void _cb_dir_changed(void *data, Evas_Object *obj, void *event_info);
|
static void _cb_dir_changed(void *data, Evas_Object *obj, void *event_info);
|
||||||
static void _cb_button_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _cb_button_click(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
static void _cb_scroll_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
|
static void _cb_scroll_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
|
||||||
static void _box_button_append(Instance *inst, const char *label, void (*func)(void *data, Evas_Object *obj, const char *emission, const char *source));
|
static void _box_button_append(Instance *inst, const char *label, void (*func)(void *data, Evas_Object *obj, const char *emission, const char *source));
|
||||||
|
|
||||||
static Eina_List *instances = NULL;
|
static Eina_List *instances = NULL;
|
||||||
static const char *_nav_mod_dir = NULL;
|
static const char *_nav_mod_dir = NULL;
|
||||||
|
@ -49,10 +48,10 @@ static const char *_nav_mod_dir = NULL;
|
||||||
static const E_Gadcon_Client_Class _gc_class =
|
static const E_Gadcon_Client_Class _gc_class =
|
||||||
{
|
{
|
||||||
GADCON_CLIENT_CLASS_VERSION, "efm_navigation",
|
GADCON_CLIENT_CLASS_VERSION, "efm_navigation",
|
||||||
{
|
{
|
||||||
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
|
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
|
||||||
e_gadcon_site_is_efm_toolbar
|
e_gadcon_site_is_efm_toolbar
|
||||||
}, E_GADCON_CLIENT_STYLE_PLAIN
|
}, E_GADCON_CLIENT_STYLE_PLAIN
|
||||||
};
|
};
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
|
@ -71,7 +70,8 @@ e_fwin_nav_shutdown(void)
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _cb_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
static void
|
||||||
|
_cb_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Instance *inst;
|
Instance *inst;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
@ -123,28 +123,28 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
||||||
|
|
||||||
inst->o_base = edje_object_add(gc->evas);
|
inst->o_base = edje_object_add(gc->evas);
|
||||||
e_theme_edje_object_set(inst->o_base, "base/theme/modules/efm_navigation",
|
e_theme_edje_object_set(inst->o_base, "base/theme/modules/efm_navigation",
|
||||||
"modules/efm_navigation/main");
|
"modules/efm_navigation/main");
|
||||||
|
|
||||||
edje_object_signal_callback_add(inst->o_base, "e,action,back,click", "",
|
edje_object_signal_callback_add(inst->o_base, "e,action,back,click", "",
|
||||||
_cb_back_click, inst);
|
_cb_back_click, inst);
|
||||||
edje_object_signal_callback_add(inst->o_base, "e,action,forward,click", "",
|
edje_object_signal_callback_add(inst->o_base, "e,action,forward,click", "",
|
||||||
_cb_forward_click, inst);
|
_cb_forward_click, inst);
|
||||||
edje_object_signal_callback_add(inst->o_base, "e,action,up,click", "",
|
edje_object_signal_callback_add(inst->o_base, "e,action,up,click", "",
|
||||||
_cb_up_click, inst);
|
_cb_up_click, inst);
|
||||||
edje_object_signal_callback_add(inst->o_base, "e,action,refresh,click", "",
|
edje_object_signal_callback_add(inst->o_base, "e,action,refresh,click", "",
|
||||||
_cb_refresh_click, inst);
|
_cb_refresh_click, inst);
|
||||||
edje_object_signal_callback_add(inst->o_base, "e,action,favorites,click", "",
|
edje_object_signal_callback_add(inst->o_base, "e,action,favorites,click", "",
|
||||||
_cb_favorites_click, inst);
|
_cb_favorites_click, inst);
|
||||||
evas_object_show(inst->o_base);
|
evas_object_show(inst->o_base);
|
||||||
|
|
||||||
inst->o_scroll = e_scrollframe_add(gc->evas);
|
inst->o_scroll = e_scrollframe_add(gc->evas);
|
||||||
e_scrollframe_custom_theme_set(inst->o_scroll,
|
e_scrollframe_custom_theme_set(inst->o_scroll,
|
||||||
"base/theme/modules/efm_navigation",
|
"base/theme/modules/efm_navigation",
|
||||||
"modules/efm_navigation/pathbar_scrollframe");
|
"modules/efm_navigation/pathbar_scrollframe");
|
||||||
|
|
||||||
e_scrollframe_single_dir_set(inst->o_scroll, 1);
|
e_scrollframe_single_dir_set(inst->o_scroll, 1);
|
||||||
e_scrollframe_policy_set(inst->o_scroll, E_SCROLLFRAME_POLICY_AUTO,
|
e_scrollframe_policy_set(inst->o_scroll, E_SCROLLFRAME_POLICY_AUTO,
|
||||||
E_SCROLLFRAME_POLICY_OFF);
|
E_SCROLLFRAME_POLICY_OFF);
|
||||||
e_scrollframe_thumbscroll_force(inst->o_scroll, 1);
|
e_scrollframe_thumbscroll_force(inst->o_scroll, 1);
|
||||||
evas_object_show(inst->o_scroll);
|
evas_object_show(inst->o_scroll);
|
||||||
|
|
||||||
|
@ -155,8 +155,8 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
||||||
evas_object_show(inst->o_box);
|
evas_object_show(inst->o_box);
|
||||||
|
|
||||||
evas_object_event_callback_add(inst->o_scroll, EVAS_CALLBACK_RESIZE,
|
evas_object_event_callback_add(inst->o_scroll, EVAS_CALLBACK_RESIZE,
|
||||||
_cb_scroll_resize, inst);
|
_cb_scroll_resize, inst);
|
||||||
|
|
||||||
edje_object_part_swallow(inst->o_base, "e.swallow.pathbar", inst->o_scroll);
|
edje_object_part_swallow(inst->o_base, "e.swallow.pathbar", inst->o_scroll);
|
||||||
|
|
||||||
inst->gcc = e_gadcon_client_new(gc, name, id, style, inst->o_base);
|
inst->gcc = e_gadcon_client_new(gc, name, id, style, inst->o_base);
|
||||||
|
@ -164,23 +164,23 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
||||||
|
|
||||||
/* add the hooks to get signals from efm */
|
/* add the hooks to get signals from efm */
|
||||||
evas_object_event_callback_add(inst->o_fm, EVAS_CALLBACK_KEY_DOWN,
|
evas_object_event_callback_add(inst->o_fm, EVAS_CALLBACK_KEY_DOWN,
|
||||||
_cb_key_down, inst);
|
_cb_key_down, inst);
|
||||||
evas_object_smart_callback_add(inst->o_fm, "changed",
|
evas_object_smart_callback_add(inst->o_fm, "changed",
|
||||||
_cb_changed, inst);
|
_cb_changed, inst);
|
||||||
evas_object_smart_callback_add(inst->o_fm, "dir_changed",
|
evas_object_smart_callback_add(inst->o_fm, "dir_changed",
|
||||||
_cb_dir_changed, inst);
|
_cb_dir_changed, inst);
|
||||||
|
|
||||||
evas_object_event_callback_add(inst->o_base,
|
evas_object_event_callback_add(inst->o_base,
|
||||||
EVAS_CALLBACK_MOUSE_DOWN,
|
EVAS_CALLBACK_MOUSE_DOWN,
|
||||||
_cb_mouse_down, inst);
|
_cb_mouse_down, inst);
|
||||||
if (!inst->gcc->resizable)
|
if (!inst->gcc->resizable)
|
||||||
{
|
{
|
||||||
evas_object_geometry_get(inst->gcc->gadcon->o_container, 0, 0, &w, &h);
|
evas_object_geometry_get(inst->gcc->gadcon->o_container, 0, 0, &w, &h);
|
||||||
e_gadcon_client_min_size_set(inst->gcc, w, h);
|
e_gadcon_client_min_size_set(inst->gcc, w, h);
|
||||||
e_gadcon_client_aspect_set(inst->gcc, w, h);
|
e_gadcon_client_aspect_set(inst->gcc, w, h);
|
||||||
evas_object_event_callback_add(inst->gcc->gadcon->o_container,
|
evas_object_event_callback_add(inst->gcc->gadcon->o_container,
|
||||||
EVAS_CALLBACK_RESIZE,
|
EVAS_CALLBACK_RESIZE,
|
||||||
_cb_resize, inst);
|
_cb_resize, inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
edje_object_signal_emit(inst->o_base, "e,state,back,disabled", "e");
|
edje_object_signal_emit(inst->o_base, "e,state,back,disabled", "e");
|
||||||
|
@ -206,8 +206,8 @@ _gc_shutdown(E_Gadcon_Client *gcc)
|
||||||
instances = eina_list_remove(instances, inst);
|
instances = eina_list_remove(instances, inst);
|
||||||
|
|
||||||
evas_object_event_callback_del_full(inst->o_fm,
|
evas_object_event_callback_del_full(inst->o_fm,
|
||||||
EVAS_CALLBACK_KEY_DOWN,
|
EVAS_CALLBACK_KEY_DOWN,
|
||||||
_cb_key_down, inst);
|
_cb_key_down, inst);
|
||||||
|
|
||||||
evas_object_smart_callback_del(inst->o_fm, "changed", _cb_changed);
|
evas_object_smart_callback_del(inst->o_fm, "changed", _cb_changed);
|
||||||
evas_object_smart_callback_del(inst->o_fm, "dir_changed", _cb_dir_changed);
|
evas_object_smart_callback_del(inst->o_fm, "dir_changed", _cb_dir_changed);
|
||||||
|
@ -217,8 +217,8 @@ _gc_shutdown(E_Gadcon_Client *gcc)
|
||||||
|
|
||||||
if (gcc->gadcon->o_container)
|
if (gcc->gadcon->o_container)
|
||||||
evas_object_event_callback_del_full(gcc->gadcon->o_container,
|
evas_object_event_callback_del_full(gcc->gadcon->o_container,
|
||||||
EVAS_CALLBACK_RESIZE,
|
EVAS_CALLBACK_RESIZE,
|
||||||
_cb_resize, inst);
|
_cb_resize, inst);
|
||||||
|
|
||||||
EINA_LIST_FREE(inst->l_buttons, btn)
|
EINA_LIST_FREE(inst->l_buttons, btn)
|
||||||
{
|
{
|
||||||
|
@ -245,14 +245,16 @@ _gc_orient(E_Gadcon_Client *gcc __UNUSED__, E_Gadcon_Orient orient)
|
||||||
{
|
{
|
||||||
case E_GADCON_ORIENT_TOP:
|
case E_GADCON_ORIENT_TOP:
|
||||||
case E_GADCON_ORIENT_BOTTOM:
|
case E_GADCON_ORIENT_BOTTOM:
|
||||||
/* e_gadcon_client_aspect_set(gcc, 16 * 4, 16); */
|
/* e_gadcon_client_aspect_set(gcc, 16 * 4, 16); */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_LEFT:
|
case E_GADCON_ORIENT_LEFT:
|
||||||
case E_GADCON_ORIENT_RIGHT:
|
case E_GADCON_ORIENT_RIGHT:
|
||||||
/* e_gadcon_client_aspect_set(gcc, 16, 16 * 4); */
|
/* e_gadcon_client_aspect_set(gcc, 16, 16 * 4); */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* e_gadcon_client_min_size_set(gcc, 16, 16); */
|
/* e_gadcon_client_min_size_set(gcc, 16, 16); */
|
||||||
}
|
}
|
||||||
|
@ -275,7 +277,7 @@ _gc_id_new(const E_Gadcon_Client_Class *client_class __UNUSED__)
|
||||||
static char buf[PATH_MAX];
|
static char buf[PATH_MAX];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s.%d", _gc_class.name,
|
snprintf(buf, sizeof(buf), "%s.%d", _gc_class.name,
|
||||||
(eina_list_count(instances) + 1));
|
(eina_list_count(instances) + 1));
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +324,7 @@ _cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
|
||||||
m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
|
m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
|
||||||
ecore_x_pointer_xy_get(zone->container->win, &x, &y);
|
ecore_x_pointer_xy_get(zone->container->win, &x, &y);
|
||||||
e_menu_activate_mouse(m, zone, x, y, 1, 1,
|
e_menu_activate_mouse(m, zone, x, y, 1, 1,
|
||||||
E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
|
E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -431,7 +433,7 @@ _cb_scroll_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
|
||||||
{
|
{
|
||||||
Instance *inst = data;
|
Instance *inst = data;
|
||||||
Evas_Coord mw = 0, mh = 0;
|
Evas_Coord mw = 0, mh = 0;
|
||||||
|
|
||||||
evas_object_geometry_get(inst->o_box, NULL, NULL, &mw, NULL);
|
evas_object_geometry_get(inst->o_box, NULL, NULL, &mw, NULL);
|
||||||
evas_object_geometry_get(inst->o_scroll, NULL, NULL, NULL, &mh);
|
evas_object_geometry_get(inst->o_scroll, NULL, NULL, NULL, &mh);
|
||||||
evas_object_resize(inst->o_box, mw, mh);
|
evas_object_resize(inst->o_box, mw, mh);
|
||||||
|
@ -449,7 +451,7 @@ _box_button_append(Instance *inst, const char *label, void (*func)(void *data, E
|
||||||
o = edje_object_add(evas_object_evas_get(inst->o_box));
|
o = edje_object_add(evas_object_evas_get(inst->o_box));
|
||||||
|
|
||||||
e_theme_edje_object_set(o, "base/theme/modules/efm_navigation",
|
e_theme_edje_object_set(o, "base/theme/modules/efm_navigation",
|
||||||
"modules/efm_navigation/pathbar_button");
|
"modules/efm_navigation/pathbar_button");
|
||||||
|
|
||||||
edje_object_signal_callback_add(o, "e,action,click", "", func, inst);
|
edje_object_signal_callback_add(o, "e,action,click", "", func, inst);
|
||||||
edje_object_part_text_set(o, "e.text.label", label);
|
edje_object_part_text_set(o, "e.text.label", label);
|
||||||
|
@ -481,56 +483,56 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
||||||
/* update pathbar */
|
/* update pathbar */
|
||||||
if (!inst->l_buttons)
|
if (!inst->l_buttons)
|
||||||
_box_button_append(inst, "/", _cb_button_click);
|
_box_button_append(inst, "/", _cb_button_click);
|
||||||
|
|
||||||
sel = inst->l_buttons;
|
sel = inst->l_buttons;
|
||||||
l = eina_list_next(sel);
|
l = eina_list_next(sel);
|
||||||
p = path = ecore_file_realpath(real_path);
|
p = path = ecore_file_realpath(real_path);
|
||||||
|
|
||||||
while (p)
|
while (p)
|
||||||
{
|
{
|
||||||
dir = strsep(&p, "/");
|
dir = strsep(&p, "/");
|
||||||
|
|
||||||
if (!(*dir)) continue;
|
if (!(*dir)) continue;
|
||||||
|
|
||||||
if (l && (btn = eina_list_data_get(l)))
|
if (l && (btn = eina_list_data_get(l)))
|
||||||
{
|
{
|
||||||
if (strcmp(dir, edje_object_part_text_get(btn, "e.text.label")))
|
if (strcmp(dir, edje_object_part_text_get(btn, "e.text.label")))
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
e_box_unpack(btn);
|
e_box_unpack(btn);
|
||||||
evas_object_del(btn);
|
evas_object_del(btn);
|
||||||
ll = l;
|
ll = l;
|
||||||
l = eina_list_next(l);
|
l = eina_list_next(l);
|
||||||
btn = eina_list_data_get(l);
|
btn = eina_list_data_get(l);
|
||||||
|
|
||||||
inst->l_buttons =
|
inst->l_buttons =
|
||||||
eina_list_remove_list(inst->l_buttons, ll);
|
eina_list_remove_list(inst->l_buttons, ll);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!p) sel = l;
|
if (!p) sel = l;
|
||||||
l = eina_list_next(l);
|
l = eina_list_next(l);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_box_button_append(inst, dir, _cb_button_click);
|
_box_button_append(inst, dir, _cb_button_click);
|
||||||
if (!p) sel = eina_list_last(inst->l_buttons);
|
if (!p) sel = eina_list_last(inst->l_buttons);
|
||||||
changed = 1;
|
changed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(path);
|
free(path);
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
evas_object_geometry_get(inst->o_box, NULL, NULL, &mw, NULL);
|
evas_object_geometry_get(inst->o_box, NULL, NULL, &mw, NULL);
|
||||||
edje_object_size_min_calc(e_scrollframe_edje_object_get(inst->o_scroll), &sw, NULL);
|
edje_object_size_min_calc(e_scrollframe_edje_object_get(inst->o_scroll), &sw, NULL);
|
||||||
|
|
||||||
evas_object_size_hint_max_set(inst->o_scroll, mw + sw, 32);
|
evas_object_size_hint_max_set(inst->o_scroll, mw + sw, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(inst->l_buttons, l, btn)
|
EINA_LIST_FOREACH(inst->l_buttons, l, btn)
|
||||||
|
@ -546,40 +548,40 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
||||||
btn = eina_list_data_get(sel);
|
btn = eina_list_data_get(sel);
|
||||||
evas_object_geometry_get(btn, &x, &y, &w, &h);
|
evas_object_geometry_get(btn, &x, &y, &w, &h);
|
||||||
|
|
||||||
/* show buttons around selected */
|
/* show buttons around selected */
|
||||||
if (sel->next)
|
if (sel->next)
|
||||||
{
|
{
|
||||||
btn = eina_list_data_get(sel->next);
|
btn = eina_list_data_get(sel->next);
|
||||||
evas_object_geometry_get(btn, NULL, NULL, &ww, NULL);
|
evas_object_geometry_get(btn, NULL, NULL, &ww, NULL);
|
||||||
w += ww;
|
w += ww;
|
||||||
}
|
}
|
||||||
if (sel->prev)
|
if (sel->prev)
|
||||||
{
|
{
|
||||||
btn = eina_list_data_get(sel->prev);
|
btn = eina_list_data_get(sel->prev);
|
||||||
evas_object_geometry_get(btn, NULL, NULL, &ww, NULL);
|
evas_object_geometry_get(btn, NULL, NULL, &ww, NULL);
|
||||||
x -= ww;
|
x -= ww;
|
||||||
w += ww;
|
w += ww;
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_object_geometry_get(inst->o_box, &xx, &yy, NULL, NULL);
|
evas_object_geometry_get(inst->o_box, &xx, &yy, NULL, NULL);
|
||||||
e_scrollframe_child_region_show(inst->o_scroll, x - xx, y - yy, w, h);
|
e_scrollframe_child_region_show(inst->o_scroll, x - xx, y - yy, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update history */
|
/* update history */
|
||||||
if ((!inst->ignore_dir) && (eina_list_data_get(inst->current) != real_path))
|
if ((!inst->ignore_dir) && (eina_list_data_get(inst->current) != real_path))
|
||||||
{
|
{
|
||||||
if (inst->current)
|
if (inst->current)
|
||||||
{
|
{
|
||||||
while (inst->history != inst->current)
|
while (inst->history != inst->current)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(eina_list_data_get(inst->history));
|
eina_stringshare_del(eina_list_data_get(inst->history));
|
||||||
inst->history =
|
inst->history =
|
||||||
eina_list_remove_list(inst->history, inst->history);
|
eina_list_remove_list(inst->history, inst->history);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inst->history =
|
inst->history =
|
||||||
eina_list_prepend(inst->history, eina_stringshare_ref(real_path));
|
eina_list_prepend(inst->history, eina_stringshare_ref(real_path));
|
||||||
inst->current = inst->history;
|
inst->current = inst->history;
|
||||||
}
|
}
|
||||||
inst->ignore_dir = 0;
|
inst->ignore_dir = 0;
|
||||||
|
|
||||||
|
@ -598,3 +600,4 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
||||||
else
|
else
|
||||||
edje_object_signal_emit(inst->o_base, "e,state,forward,enabled", "e");
|
edje_object_signal_emit(inst->o_base, "e,state,forward,enabled", "e");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue