forked from enlightenment/enlightenment
- do slide animation in theme
- cleanups SVN revision: 49186
This commit is contained in:
parent
fb5409a64a
commit
32e239300b
|
@ -32783,9 +32783,9 @@ collections {
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/*** MOD: EVERYTHING ***/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
group {
|
||||
name: "e/modules/everything/main";
|
||||
name: "e/modules/everything/list";
|
||||
images {
|
||||
image: "base_bg.png" COMP;
|
||||
image: "inset_sunk.png" COMP;
|
||||
|
@ -32800,32 +32800,14 @@ collections {
|
|||
data.item: "shaped" "1";
|
||||
data.item: "shadow_offset" "50";
|
||||
parts {
|
||||
/*************** list ***************/
|
||||
part {
|
||||
name: "list_win";
|
||||
type: RECT;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
min: 300 155;
|
||||
rel1 {
|
||||
to_y: "frame";
|
||||
offset: 10 -3;
|
||||
relative: 0.0 1.0;
|
||||
}
|
||||
rel2 {
|
||||
offset: -11 -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "list_frame";
|
||||
type: RECT;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
rel1.to: "list_win";
|
||||
rel2.to: "list_win";
|
||||
/* rel1.to: "list_win";
|
||||
* rel2.to: "list_win"; */
|
||||
}
|
||||
description {
|
||||
state: "composite" 0.0;
|
||||
|
@ -32855,7 +32837,7 @@ collections {
|
|||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
rel1.to: "list_win";
|
||||
/* rel1.to: "list_win"; */
|
||||
rel1.offset: 0 -50;
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
|
@ -32886,7 +32868,6 @@ collections {
|
|||
to_y: "input_base";
|
||||
}
|
||||
rel2 {
|
||||
/* to: "list_frame"; */
|
||||
to_x: "list_frame";
|
||||
to_y: "input_base";
|
||||
}
|
||||
|
@ -32906,13 +32887,13 @@ collections {
|
|||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
to_y: "list_win";
|
||||
/* to_y: "list_win"; */
|
||||
to_x: "base";
|
||||
}
|
||||
|
||||
rel2 {
|
||||
relative: 1.0 0.0;
|
||||
to_y: "list_win";
|
||||
/* to_y: "list_win"; */
|
||||
to_x: "base";
|
||||
offset: -1 1;
|
||||
}
|
||||
|
@ -33203,9 +33184,45 @@ collections {
|
|||
}
|
||||
}
|
||||
description {
|
||||
state: "visible" 0.0;
|
||||
state: "default" 1.0;
|
||||
inherit: "default" 0.0;
|
||||
min: 32 150;
|
||||
rel1 {
|
||||
relative: -1.0 0.0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.0 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "e.swallow.list2";
|
||||
type: SWALLOW;
|
||||
clip_to: "list_clip";
|
||||
mouse_events: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 32 170;
|
||||
fixed: 1 1;
|
||||
rel1 {
|
||||
relative: 1.0 0.0;
|
||||
offset: 0 3;
|
||||
to: "list_clip";
|
||||
}
|
||||
rel2 {
|
||||
relative: 2.0 1.0;
|
||||
offset: -1 -1;
|
||||
to: "list_clip";
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "default" 1.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
|
@ -33231,6 +33248,29 @@ collections {
|
|||
color: 200 200 200 255;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "list_over2";
|
||||
clip_to: "base";
|
||||
mouse_events: 0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
offset: -1 -1;
|
||||
to: "list_bg";
|
||||
}
|
||||
rel2 {
|
||||
offset: -1 -1;
|
||||
to: "list_bg";
|
||||
}
|
||||
image {
|
||||
normal: "inset_sunk.png";
|
||||
border: 7 7 7 7;
|
||||
middle: 0;
|
||||
}
|
||||
fill.smooth : 0;
|
||||
color: 200 200 200 255;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "box";
|
||||
mouse_events: 0;
|
||||
|
@ -33252,6 +33292,156 @@ collections {
|
|||
color: 255 255 255 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
programs {
|
||||
program {
|
||||
name: "composite_mode";
|
||||
signal: "e,state,composited";
|
||||
source: "e";
|
||||
action: STATE_SET "composite" 0.0;
|
||||
target: "list_frame";
|
||||
target: "list_shadow";
|
||||
}
|
||||
program {
|
||||
name: "show_list";
|
||||
signal: "e,state,list_show";
|
||||
source: "e";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
transition: DECELERATE 0.1;
|
||||
target: "base";
|
||||
target: "shadow_clip";
|
||||
}
|
||||
program {
|
||||
name: "hide_list";
|
||||
signal: "e,state,list_hide";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: ACCELERATE 0.08;
|
||||
target: "base";
|
||||
target: "shadow_clip";
|
||||
}
|
||||
program {
|
||||
name: "show_entry";
|
||||
signal: "e,state,entry_show";
|
||||
source: "e";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
transition: SINUSOIDAL 0.08;
|
||||
target: "input_over1";
|
||||
target: "input_over2";
|
||||
target: "input_base";
|
||||
}
|
||||
program {
|
||||
name: "hide_entry";
|
||||
signal: "e,state,entry_hide";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: SINUSOIDAL 0.08;
|
||||
target: "input_over1";
|
||||
target: "input_over2";
|
||||
target: "input_base";
|
||||
}
|
||||
program {
|
||||
name: "update_list";
|
||||
signal: "e,signal,update";
|
||||
source: "e";
|
||||
action: STATE_SET "faded" 0.0;
|
||||
/* transition: SINUSOIDAL 0.5; */
|
||||
target: "bar_clip";
|
||||
after: "update_list2";
|
||||
}
|
||||
program {
|
||||
name: "update_list2";
|
||||
action: STATE_SET "default" 0.0;
|
||||
/* transition: SINUSOIDAL 0.15; */
|
||||
target: "bar_clip";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "slide_left";
|
||||
signal: "e,action,slide,left";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "e.swallow.list";
|
||||
target: "e.swallow.list2";
|
||||
after: "slide_left2";
|
||||
}
|
||||
program {
|
||||
name: "slide_left2";
|
||||
action: STATE_SET "default" 1.0;
|
||||
transition: ACCELERATE 0.15;
|
||||
target: "e.swallow.list";
|
||||
target: "e.swallow.list2";
|
||||
after: "left_end";
|
||||
}
|
||||
program { name: "left_end";
|
||||
action: SIGNAL_EMIT "e,action,slide,left,finished" "";
|
||||
}
|
||||
program {
|
||||
name: "slide_right";
|
||||
signal: "e,action,slide,right";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 1.0;
|
||||
target: "e.swallow.list";
|
||||
target: "e.swallow.list2";
|
||||
after: "slide_right2";
|
||||
}
|
||||
program {
|
||||
name: "slide_right2";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: ACCELERATE 0.15;
|
||||
target: "e.swallow.list";
|
||||
target: "e.swallow.list2";
|
||||
after: "right_end";
|
||||
}
|
||||
program { name: "right_end";
|
||||
action: SIGNAL_EMIT "e,action,slide,right,finished" "";
|
||||
}
|
||||
program {
|
||||
name: "slide_default";
|
||||
signal: "e,action,slide,default";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "e.swallow.list";
|
||||
target: "e.swallow.list2";
|
||||
}
|
||||
}
|
||||
}
|
||||
group {
|
||||
name: "e/modules/everything/main";
|
||||
images {
|
||||
image: "base_bg.png" COMP;
|
||||
image: "inset_sunk.png" COMP;
|
||||
image: "menu_sel_bg.png" COMP;
|
||||
image: "menu_sel_fg.png" COMP;
|
||||
image: "everything_drop.png" COMP;
|
||||
image: "everything_bar.png" COMP;
|
||||
image: "everything_box.png" COMP;
|
||||
image: "vgrad_dark.png" COMP;
|
||||
|
||||
}
|
||||
data.item: "shaped" "1";
|
||||
data.item: "shadow_offset" "50";
|
||||
parts {
|
||||
|
||||
part {
|
||||
name: "list";
|
||||
source: "e/modules/everything/list";
|
||||
type: GROUP;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 1;
|
||||
min: 300 155;
|
||||
rel1 {
|
||||
to_y: "frame";
|
||||
offset: 10 -3;
|
||||
relative: 0.0 1.0;
|
||||
}
|
||||
rel2 {
|
||||
offset: -11 -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************** top ***************/
|
||||
part {
|
||||
name: "win";
|
||||
|
@ -33514,63 +33704,6 @@ collections {
|
|||
target: "win";
|
||||
target: "frame";
|
||||
target: "shadow";
|
||||
target: "list_frame";
|
||||
target: "list_shadow";
|
||||
}
|
||||
program {
|
||||
name: "show_list";
|
||||
signal: "e,state,list_show";
|
||||
source: "e";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
transition: ACCELERATE 0.05;
|
||||
target: "base";
|
||||
target: "shadow_clip";
|
||||
}
|
||||
program {
|
||||
name: "hide_list";
|
||||
signal: "e,state,list_hide";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: ACCELERATE 0.08;
|
||||
target: "base";
|
||||
target: "shadow_clip";
|
||||
}
|
||||
program {
|
||||
name: "show_entry";
|
||||
signal: "e,state,entry_show";
|
||||
source: "e";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
transition: SINUSOIDAL 0.03;
|
||||
target: "input_over1";
|
||||
target: "input_over2";
|
||||
target: "input_base";
|
||||
target: "e.swallow.list";
|
||||
}
|
||||
program {
|
||||
name: "hide_entry";
|
||||
signal: "e,state,entry_hide";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: SINUSOIDAL 0.08;
|
||||
target: "input_over1";
|
||||
target: "input_over2";
|
||||
target: "input_base";
|
||||
target: "e.swallow.list";
|
||||
}
|
||||
program {
|
||||
name: "update_list";
|
||||
signal: "e,signal,update";
|
||||
source: "e";
|
||||
action: STATE_SET "faded" 0.0;
|
||||
/* transition: SINUSOIDAL 0.5; */
|
||||
target: "bar_clip";
|
||||
after: "update_list2";
|
||||
}
|
||||
program {
|
||||
name: "update_list2";
|
||||
action: STATE_SET "default" 0.0;
|
||||
/* transition: SINUSOIDAL 0.15; */
|
||||
target: "bar_clip";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34641,7 +34774,7 @@ collections {
|
|||
signal: "e,state,detail,show";
|
||||
source: "e";
|
||||
action: STATE_SET "detail" 0.0;
|
||||
transition: ACCELERATE 0.06;
|
||||
transition: ACCELERATE 0.08;
|
||||
target: "e.text.label";
|
||||
target: "e.text.detail";
|
||||
}
|
||||
|
|
|
@ -37,10 +37,15 @@ struct _Evry_Window
|
|||
|
||||
int mouse_out;
|
||||
int mouse_button;
|
||||
|
||||
Evry_View *view_clearing;
|
||||
Evry_View *view_freeing;
|
||||
};
|
||||
|
||||
struct _Evry_Selector
|
||||
{
|
||||
Evry_Window *win;
|
||||
|
||||
/* current state */
|
||||
Evry_State *state;
|
||||
|
||||
|
@ -112,8 +117,10 @@ struct _Evry_View
|
|||
Evry_View *(*create) (Evry_View *view, const Evry_State *s, const Evas_Object *swallow);
|
||||
void (*destroy) (Evry_View *view);
|
||||
int (*cb_key_down) (Evry_View *view, const Ecore_Event_Key *ev);
|
||||
int (*update) (Evry_View *view, int slide);
|
||||
void (*clear) (Evry_View *view, int slide);
|
||||
int (*update) (Evry_View *view);
|
||||
void (*clear) (Evry_View *view);
|
||||
|
||||
Ecore_Timer *clear_timer;
|
||||
|
||||
int priority;
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@ static int _evry_clear(Evry_Selector *sel);
|
|||
static int _evry_cb_update_timer(void *data);
|
||||
|
||||
static Evry_State *_evry_state_new(Evry_Selector *sel, Eina_List *plugins);
|
||||
static void _evry_state_pop(Evry_Selector *sel);
|
||||
static void _evry_state_pop(Evry_Selector *sel, int immediate);
|
||||
|
||||
static Evry_Selector *_evry_selector_new(Evry_Window *win, int type);
|
||||
static void _evry_selector_free(Evry_Selector *sel);
|
||||
|
@ -49,7 +49,7 @@ static void _evry_list_win_clear(int hide);
|
|||
static void _evry_view_clear(Evry_State *s);
|
||||
static void _evry_view_update(Evry_State *s, Evry_Plugin *plugin);
|
||||
static int _evry_view_key_press(Evry_State *s, Ecore_Event_Key *ev);
|
||||
static void _evry_view_show(Evry_View *v);
|
||||
static void _evry_view_show(Evry_View *v, int slide);
|
||||
static void _evry_view_hide(Evry_View *v, int slide);
|
||||
|
||||
static void _evry_item_desel(Evry_State *s, Evry_Item *it);
|
||||
|
@ -148,7 +148,7 @@ _cb_show_timer(void *data)
|
|||
else
|
||||
{
|
||||
s->view = view->create(view, s, win->o_main);
|
||||
_evry_view_show(s->view);
|
||||
_evry_view_show(s->view, 0);
|
||||
}
|
||||
|
||||
_evry_list_win_show();
|
||||
|
@ -266,7 +266,7 @@ evry_show(E_Zone *zone, const char *params)
|
|||
_evry_selector_activate(SUBJ_SEL);
|
||||
|
||||
if (!evry_conf->hide_input)
|
||||
edje_object_signal_emit(win->o_main, "e,state,entry_show", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,entry_show", "e");
|
||||
|
||||
if (!evry_conf->hide_list)
|
||||
win->show_timer = ecore_timer_add(0.01, _cb_show_timer, win);
|
||||
|
@ -305,7 +305,7 @@ evry_hide(int clear)
|
|||
while ((CUR_SEL)->states->next)
|
||||
{
|
||||
slide = 1;
|
||||
_evry_state_pop(CUR_SEL);
|
||||
_evry_state_pop(CUR_SEL, 1);
|
||||
}
|
||||
|
||||
sel = CUR_SEL;
|
||||
|
@ -317,8 +317,8 @@ evry_hide(int clear)
|
|||
_evry_aggregator_fetch(sel, s->input);
|
||||
_evry_selector_update(sel);
|
||||
_evry_update_text_label(s);
|
||||
_evry_view_show(s->view);
|
||||
s->view->update(s->view, slide);
|
||||
_evry_view_show(s->view, slide);
|
||||
s->view->update(s->view);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ _evry_timer_cb_actions_get(void *data)
|
|||
{
|
||||
s = sel->state;
|
||||
if (s->view)
|
||||
s->view->update(s->view, 0);
|
||||
s->view->update(s->view);
|
||||
else
|
||||
_evry_view_update(s, NULL);
|
||||
}
|
||||
|
@ -689,8 +689,8 @@ _evry_list_win_show(void)
|
|||
win->visible = EINA_TRUE;
|
||||
_evry_list_win_update((CUR_SEL)->state);
|
||||
|
||||
edje_object_signal_emit(win->o_main, "e,state,list_show", "e");
|
||||
edje_object_signal_emit(win->o_main, "e,state,entry_show", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,list_show", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,entry_show", "e");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -706,10 +706,10 @@ _evry_list_win_clear(int hide)
|
|||
if (hide)
|
||||
{
|
||||
win->visible = EINA_FALSE;
|
||||
edje_object_signal_emit(win->o_main, "e,state,list_hide", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,list_hide", "e");
|
||||
|
||||
if (evry_conf->hide_input && (!(sel->state) || (sel->state->input[0])))
|
||||
edje_object_signal_emit(win->o_main, "e,state,entry_hide", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,entry_hide", "e");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -743,6 +743,7 @@ _evry_window_new(E_Zone *zone)
|
|||
if (e_config->use_composite)
|
||||
{
|
||||
edje_object_signal_emit(o, "e,state,composited", "e");
|
||||
edje_object_signal_emit(o, "list:e,state,composited", "e");
|
||||
edje_object_message_signal_process(o);
|
||||
edje_object_calc_force(o);
|
||||
|
||||
|
@ -1018,6 +1019,7 @@ _evry_selector_new(Evry_Window *win, int type)
|
|||
}
|
||||
|
||||
win->selectors[type] = sel;
|
||||
sel->win = win;
|
||||
|
||||
return sel;
|
||||
}
|
||||
|
@ -1031,7 +1033,7 @@ _evry_selector_free(Evry_Selector *sel)
|
|||
_evry_view_clear(sel->state);
|
||||
|
||||
while (sel->states)
|
||||
_evry_state_pop(sel);
|
||||
_evry_state_pop(sel, 1);
|
||||
|
||||
EVRY_PLUGIN_FREE(sel->aggregator);
|
||||
EVRY_PLUGIN_FREE(sel->actions);
|
||||
|
@ -1105,7 +1107,7 @@ _evry_selector_activate(Evry_Selector *sel)
|
|||
if (s->cur_item)
|
||||
_evry_selector_label_set(sel, "e.text.plugin",
|
||||
EVRY_ITEM(s->cur_item->plugin)->label);
|
||||
_evry_view_show(s->view);
|
||||
_evry_view_show(s->view, 0);
|
||||
_evry_list_win_update(s);
|
||||
}
|
||||
}
|
||||
|
@ -1368,7 +1370,7 @@ _evry_selector_actions_get(Evry_Item *it)
|
|||
Evry_Selector *sel = ACTN_SEL;
|
||||
|
||||
while (sel->state)
|
||||
_evry_state_pop(sel);
|
||||
_evry_state_pop(sel, 1);
|
||||
|
||||
if (!it) return 0;
|
||||
|
||||
|
@ -1403,7 +1405,7 @@ _evry_selector_objects_get(Evry_Action *act)
|
|||
Evry_Item *it;
|
||||
|
||||
while (sel->state)
|
||||
_evry_state_pop(sel);
|
||||
_evry_state_pop(sel, 1);
|
||||
|
||||
it = (ACTN_SEL)->state->cur_item;
|
||||
|
||||
|
@ -1452,7 +1454,7 @@ _evry_state_new(Evry_Selector *sel, Eina_List *plugins)
|
|||
}
|
||||
|
||||
static void
|
||||
_evry_state_pop(Evry_Selector *sel)
|
||||
_evry_state_pop(Evry_Selector *sel, int immediate)
|
||||
{
|
||||
Evry_Plugin *p;
|
||||
Evry_State *s;
|
||||
|
@ -1465,7 +1467,12 @@ _evry_state_pop(Evry_Selector *sel)
|
|||
free(s->inp);
|
||||
|
||||
if (s->view)
|
||||
{
|
||||
if (immediate)
|
||||
s->view->destroy(s->view);
|
||||
else
|
||||
_evry_view_hide(s->view, -1);
|
||||
}
|
||||
|
||||
if (s->sel_items)
|
||||
eina_list_free(s->sel_items);
|
||||
|
@ -1529,8 +1536,8 @@ evry_state_push(Evry_Selector *sel, Eina_List *plugins)
|
|||
s->view = view->create(view, s, win->o_main);
|
||||
if (s->view)
|
||||
{
|
||||
_evry_view_show(s->view);
|
||||
s->view->update(s->view, -1);
|
||||
_evry_view_show(s->view, -1);
|
||||
s->view->update(s->view);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1633,8 +1640,8 @@ evry_browse_item(Evry_Item *it)
|
|||
s->view = view->create(view, s, win->o_main);
|
||||
if (s->view)
|
||||
{
|
||||
_evry_view_show(s->view);
|
||||
s->view->update(s->view, -1);
|
||||
_evry_view_show(s->view, -1);
|
||||
s->view->update(s->view);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1654,7 +1661,7 @@ evry_browse_back(Evry_Selector *sel)
|
|||
if (!s || !sel->states->next)
|
||||
return 0;
|
||||
|
||||
_evry_state_pop(sel);
|
||||
_evry_state_pop(sel, 0);
|
||||
|
||||
s = sel->state;
|
||||
_evry_aggregator_fetch(sel, s->input);
|
||||
|
@ -1662,8 +1669,8 @@ evry_browse_back(Evry_Selector *sel)
|
|||
if (sel == SUBJ_SEL)
|
||||
_evry_selector_update_actions(sel);
|
||||
_evry_update_text_label(s);
|
||||
_evry_view_show(s->view);
|
||||
s->view->update(s->view, 1);
|
||||
_evry_view_show(s->view, 1);
|
||||
s->view->update(s->view);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -1718,7 +1725,7 @@ evry_selectors_switch(int dir)
|
|||
else if (CUR_SEL == OBJ_SEL && dir > 0)
|
||||
{
|
||||
while ((CUR_SEL)->states)
|
||||
_evry_state_pop(CUR_SEL);
|
||||
_evry_state_pop(CUR_SEL, 1);
|
||||
|
||||
edje_object_signal_emit(win->o_main, "e,state,object_selector_hide", "e");
|
||||
_evry_selector_activate(SUBJ_SEL);
|
||||
|
@ -1809,7 +1816,7 @@ _evry_cheat_history(Evry_State *s, int promote, int delete)
|
|||
if (s->plugin == s->selector->aggregator)
|
||||
_evry_aggregator_fetch(s->selector, s->input);
|
||||
if (s->view)
|
||||
s->view->update(s->view, 0);
|
||||
s->view->update(s->view);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -1870,7 +1877,17 @@ _evry_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
old = ev->key;
|
||||
win->request_selection = EINA_FALSE;
|
||||
|
||||
if (!strcmp(ev->key, "KP_Enter"))
|
||||
if (!strcmp(ev->key, "F1"))
|
||||
{
|
||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,left", "e");
|
||||
goto end;
|
||||
}
|
||||
else if (!strcmp(ev->key, "F2"))
|
||||
{
|
||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,right", "e");
|
||||
goto end;
|
||||
}
|
||||
else if (!strcmp(ev->key, "KP_Enter"))
|
||||
{
|
||||
ev->key = "Return";
|
||||
}
|
||||
|
@ -2082,12 +2099,12 @@ _evry_update_text_label(Evry_State *s)
|
|||
if (!win->visible && evry_conf->hide_input)
|
||||
{
|
||||
if (strlen(s->inp) > 0)
|
||||
edje_object_signal_emit(win->o_main, "e,state,entry_show", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,entry_show", "e");
|
||||
else
|
||||
edje_object_signal_emit(win->o_main, "e,state,entry_hide", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,entry_hide", "e");
|
||||
}
|
||||
|
||||
edje_object_part_text_set(win->o_main, "e.text.label", s->inp);
|
||||
edje_object_part_text_set(win->o_main, "list:e.text.label", s->inp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2105,7 +2122,7 @@ _evry_update(Evry_Selector *sel, int fetch)
|
|||
sel->update_timer =
|
||||
ecore_timer_add(MATCH_LAG, _evry_cb_update_timer, sel);
|
||||
|
||||
edje_object_signal_emit(win->o_main, "e,signal,update", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,signal,update", "e");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2144,7 +2161,7 @@ _evry_clear(Evry_Selector *sel)
|
|||
_evry_update(sel, 1);
|
||||
|
||||
if (!win->visible && evry_conf->hide_input)
|
||||
edje_object_signal_emit(win->o_main, "e,state,entry_hide", "e");
|
||||
edje_object_signal_emit(win->o_main, "list:e,state,entry_hide", "e");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -2313,29 +2330,137 @@ _evry_plugin_action(Evry_Selector *sel, int finished)
|
|||
}
|
||||
|
||||
static void
|
||||
_evry_view_show(Evry_View *v)
|
||||
_evry_view_show(Evry_View *v, int slide)
|
||||
{
|
||||
if (!v) return;
|
||||
|
||||
if (v->o_list)
|
||||
{
|
||||
edje_object_part_swallow(win->o_main, "e.swallow.list", v->o_list);
|
||||
evas_object_show(v->o_list);
|
||||
}
|
||||
|
||||
if (v->o_bar)
|
||||
{
|
||||
edje_object_part_swallow(win->o_main, "e.swallow.bar", v->o_bar);
|
||||
edje_object_part_swallow(win->o_main, "list:e.swallow.bar", v->o_bar);
|
||||
evas_object_show(v->o_bar);
|
||||
}
|
||||
|
||||
if (!v->o_list)
|
||||
return;
|
||||
|
||||
if (slide < 0)
|
||||
{
|
||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list2", v->o_list);
|
||||
evas_object_show(v->o_list);
|
||||
|
||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,left", "e");
|
||||
}
|
||||
else if (slide > 0)
|
||||
{
|
||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list", v->o_list);
|
||||
evas_object_show(v->o_list);
|
||||
|
||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,right", "e");
|
||||
}
|
||||
else
|
||||
{
|
||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list", v->o_list);
|
||||
evas_object_show(v->o_list);
|
||||
|
||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,default", "e");
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
_clear_timer(void *data)
|
||||
{
|
||||
Evry_View *v = data;
|
||||
|
||||
v->clear(v);
|
||||
|
||||
if (v->o_list)
|
||||
{
|
||||
edje_object_part_unswallow(win->o_main, v->o_list);
|
||||
evas_object_hide(v->o_list);
|
||||
}
|
||||
|
||||
v->clear_timer = NULL;
|
||||
win->view_clearing = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_free_timer(void *data)
|
||||
{
|
||||
Evry_View *v = data;
|
||||
v->destroy(v);
|
||||
win->view_freeing = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_evry_view_hide(Evry_View *v, int slide)
|
||||
{
|
||||
if (!v) return;
|
||||
if (win->view_freeing)
|
||||
{
|
||||
Evry_View *vv = win->view_freeing;
|
||||
|
||||
v->clear(v, slide);
|
||||
ecore_timer_del(vv->clear_timer);
|
||||
vv->destroy(vv);
|
||||
win->view_freeing = NULL;
|
||||
}
|
||||
|
||||
if (win->view_clearing)
|
||||
{
|
||||
Evry_View *vv = win->view_clearing;
|
||||
|
||||
ecore_timer_del(vv->clear_timer);
|
||||
vv->clear_timer = NULL;
|
||||
vv->clear(vv);
|
||||
|
||||
if (vv->o_list)
|
||||
{
|
||||
edje_object_part_unswallow(win->o_main, vv->o_list);
|
||||
evas_object_hide(vv->o_list);
|
||||
}
|
||||
|
||||
win->view_clearing = NULL;
|
||||
}
|
||||
|
||||
if (!v || v->clear_timer) return;
|
||||
|
||||
if (slide && v->o_list)
|
||||
{
|
||||
if (slide < 0)
|
||||
{
|
||||
evas_object_hide(v->o_list);
|
||||
edje_object_part_unswallow(win->o_main, v->o_list);
|
||||
|
||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list2", v->o_list);
|
||||
evas_object_show(v->o_list);
|
||||
v->clear_timer = ecore_timer_add(0.2, _free_timer, v);
|
||||
|
||||
win->view_freeing = v;
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_hide(v->o_list);
|
||||
edje_object_part_unswallow(win->o_main, v->o_list);
|
||||
|
||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list", v->o_list);
|
||||
evas_object_show(v->o_list);
|
||||
|
||||
v->clear_timer = ecore_timer_add(0.2, _clear_timer, v);
|
||||
win->view_clearing = v;
|
||||
}
|
||||
|
||||
if (v->o_bar)
|
||||
{
|
||||
edje_object_part_unswallow(win->o_main, v->o_bar);
|
||||
evas_object_hide(v->o_bar);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
v->clear(v);
|
||||
|
||||
if (v->o_list)
|
||||
{
|
||||
|
@ -2359,11 +2484,11 @@ _evry_view_update(Evry_State *s, Evry_Plugin *p)
|
|||
{
|
||||
Evry_View *view = evry_conf->views->data;
|
||||
s->view = view->create(view, s, win->o_main);
|
||||
_evry_view_show(s->view);
|
||||
_evry_view_show(s->view, 0);
|
||||
}
|
||||
|
||||
if (s->view)
|
||||
s->view->update(s->view, 0);
|
||||
s->view->update(s->view);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2371,7 +2496,7 @@ _evry_view_clear(Evry_State *s)
|
|||
{
|
||||
if (!s || !s->view) return;
|
||||
|
||||
s->view->clear(s->view, 0);
|
||||
s->view->clear(s->view);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2439,8 +2564,8 @@ evry_view_toggle(Evry_State *s, const char *trigger)
|
|||
}
|
||||
|
||||
s->view = v;
|
||||
_evry_view_show(s->view);
|
||||
view->update(s->view, 0);
|
||||
_evry_view_show(s->view, 0);
|
||||
view->update(s->view);
|
||||
|
||||
return triggered;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
{
|
||||
if (!eina_list_data_find_list(items, it))
|
||||
{
|
||||
it->usage = 0;
|
||||
it->usage = -1;
|
||||
if (it->fuzzy_match == 0)
|
||||
it->fuzzy_match = evry_fuzzy_match(it->label, input);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ static Evas_Object *o_text = NULL;
|
|||
static const Evry_State *state = NULL;
|
||||
|
||||
static void
|
||||
_view_clear(Evry_View *v, int slide)
|
||||
_view_clear(Evry_View *v)
|
||||
{
|
||||
v->active = 0;
|
||||
evas_object_del(v->o_list);
|
||||
|
@ -15,7 +15,7 @@ _view_clear(Evry_View *v, int slide)
|
|||
|
||||
|
||||
static int
|
||||
_view_update(Evry_View *v, int slide)
|
||||
_view_update(Evry_View *v)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -55,8 +55,6 @@ struct _Smart_Data
|
|||
double slide_to;
|
||||
|
||||
int sliding;
|
||||
int clearing;
|
||||
|
||||
int mouse_act;
|
||||
int mouse_x;
|
||||
int mouse_y;
|
||||
|
@ -82,11 +80,10 @@ struct _Item
|
|||
|
||||
static View *view = NULL;
|
||||
|
||||
static void _view_clear(Evry_View *view, int slide);
|
||||
static void _view_clear(Evry_View *view);
|
||||
static void _pan_item_select(Evas_Object *obj, Item *it, int scroll);
|
||||
static void _animator_del(Evas_Object *obj);
|
||||
|
||||
|
||||
static int _animator(void *data);
|
||||
|
||||
static void
|
||||
_thumb_gen(void *data, Evas_Object *obj, void *event_info)
|
||||
|
@ -94,8 +91,6 @@ _thumb_gen(void *data, Evas_Object *obj, void *event_info)
|
|||
Evas_Coord w, h;
|
||||
Item *it = data;
|
||||
Smart_Data *sd = evas_object_smart_data_get(it->obj);
|
||||
if (sd->clearing)
|
||||
return;
|
||||
|
||||
if (!it->frame) return;
|
||||
|
||||
|
@ -147,9 +142,6 @@ _thumb_idler(void *data)
|
|||
char *suffix;
|
||||
int w, h;
|
||||
|
||||
if (!sd || sd->clearing)
|
||||
return 1;
|
||||
|
||||
sd->queue = eina_list_sort(sd->queue, -1, _sort_pos_cb);
|
||||
|
||||
EINA_LIST_FOREACH_SAFE(sd->queue, l, ll, it)
|
||||
|
@ -219,7 +211,7 @@ _item_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
Evas_Event_Mouse_Down *ev = event_info;
|
||||
Item *it = data;
|
||||
Smart_Data *sd = evas_object_smart_data_get(it->obj);
|
||||
if (!sd || sd->clearing) return;
|
||||
if (!sd) return;
|
||||
|
||||
sd->mouse_act = 1;
|
||||
sd->it_down = it;
|
||||
|
@ -248,7 +240,7 @@ _item_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
Evas_Event_Mouse_Up *ev = event_info;
|
||||
Item *it = data;
|
||||
Smart_Data *sd = evas_object_smart_data_get(it->obj);
|
||||
if (!sd || sd->clearing) return;
|
||||
if (!sd) return;
|
||||
|
||||
sd->mouse_x = 0;
|
||||
sd->mouse_y = 0;
|
||||
|
@ -310,6 +302,9 @@ _item_show(View *v, Item *it, Evas_Object *list)
|
|||
|
||||
evas_object_clip_set(it->frame, evas_object_clip_get(list));
|
||||
|
||||
if (it->selected)
|
||||
edje_object_signal_emit(it->frame, "e,state,selected", "e");
|
||||
|
||||
if (it->item->marked)
|
||||
edje_object_signal_emit(it->frame, "e,state,marked", "e");
|
||||
}
|
||||
|
@ -321,10 +316,6 @@ _item_show(View *v, Item *it, Evas_Object *list)
|
|||
|
||||
evas_object_show(it->frame);
|
||||
|
||||
/* if (it->changed)
|
||||
* edje_object_signal_emit(it->frame, "e,action,thumb,show_delayed", "e");
|
||||
* else */
|
||||
|
||||
if (it->item->browseable)
|
||||
edje_object_signal_emit(it->frame, "e,state,browseable", "e");
|
||||
|
||||
|
@ -516,7 +507,7 @@ _e_smart_reconfigure_do(void *data)
|
|||
if (changed)
|
||||
evas_object_smart_callback_call(obj, "changed", NULL);
|
||||
|
||||
if (!sd->clearing && !sd->thumb_idler)
|
||||
if (!sd->thumb_idler)
|
||||
sd->thumb_idler = ecore_idle_enterer_add(_thumb_idler, sd);
|
||||
|
||||
sd->idle_enter = NULL;
|
||||
|
@ -569,6 +560,8 @@ _e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
|||
Smart_Data *sd = evas_object_smart_data_get(obj);
|
||||
sd->x = x;
|
||||
sd->y = y;
|
||||
/* printf("move %p %d %d\n", sd, x, y); */
|
||||
|
||||
_e_smart_reconfigure(obj);
|
||||
}
|
||||
|
||||
|
@ -718,11 +711,6 @@ static void
|
|||
_animator_del(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd = evas_object_smart_data_get(obj);
|
||||
if (sd->clearing)
|
||||
{
|
||||
sd->clearing = EINA_FALSE;
|
||||
_view_clear(EVRY_VIEW(sd->view), 0);
|
||||
}
|
||||
|
||||
sd->animator = NULL;
|
||||
}
|
||||
|
@ -772,30 +760,6 @@ _animator(void *data)
|
|||
0, sd->scroll_align);
|
||||
}
|
||||
|
||||
if (sd->sliding)
|
||||
{
|
||||
sd->slide = ((sd->slide * (1.0 - spd)) +
|
||||
(sd->slide_to * spd));
|
||||
|
||||
da = sd->slide - sd->slide_to;
|
||||
if (da < 0.0) da = -da;
|
||||
if (da < 0.02)
|
||||
{
|
||||
sd->slide = sd->slide_to;
|
||||
sd->sliding = 0;
|
||||
|
||||
if ((sd->view->mode == VIEW_MODE_THUMB) &&
|
||||
(sd->cur_item &&
|
||||
sd->cur_item->frame))
|
||||
edje_object_signal_emit(sd->cur_item->frame,
|
||||
"e,state,selected", "e");
|
||||
}
|
||||
else
|
||||
wait++;
|
||||
|
||||
evas_object_move(sd->view->span, sd->slide, sd->y);
|
||||
}
|
||||
|
||||
if (wait)
|
||||
return 1;
|
||||
|
||||
|
@ -982,7 +946,7 @@ _clear_items(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static void
|
||||
_view_clear(Evry_View *view, int slide)
|
||||
_view_clear(Evry_View *view)
|
||||
{
|
||||
View *v = (View*) view;
|
||||
Smart_Data *sd = evas_object_smart_data_get(v->span);
|
||||
|
@ -994,30 +958,6 @@ _view_clear(Evry_View *view, int slide)
|
|||
sd->mouse_act = 0;
|
||||
sd->it_down = NULL;
|
||||
|
||||
if (!sd->clearing && evry_conf->scroll_animate)
|
||||
{
|
||||
if (slide)
|
||||
{
|
||||
if (sd->items && !sd->animator)
|
||||
sd->animator = ecore_animator_add(_animator, v->span);
|
||||
sd->sliding = 1;
|
||||
sd->slide = sd->x;
|
||||
sd->slide_to = sd->x + sd->w * -slide;
|
||||
|
||||
sd->clearing = EINA_TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (sd->animator)
|
||||
{
|
||||
ecore_animator_del(sd->animator);
|
||||
sd->animator = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (sd->clearing)
|
||||
return;
|
||||
|
||||
_clear_items(v->span);
|
||||
|
||||
if (sd->items)
|
||||
|
@ -1072,7 +1012,7 @@ _update_frame(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static int
|
||||
_view_update(Evry_View *view, int slide)
|
||||
_view_update(Evry_View *view)
|
||||
{
|
||||
GET_VIEW(v, view);
|
||||
Smart_Data *sd = evas_object_smart_data_get(v->span);
|
||||
|
@ -1091,7 +1031,7 @@ _view_update(Evry_View *view, int slide)
|
|||
|
||||
if (!p)
|
||||
{
|
||||
_view_clear(view, 0);
|
||||
_view_clear(view);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1129,6 +1069,8 @@ _view_update(Evry_View *view, int slide)
|
|||
{
|
||||
sd->cur_item = v_it;
|
||||
v_it->selected = EINA_TRUE;
|
||||
if (v->mode == VIEW_MODE_THUMB)
|
||||
edje_object_signal_emit(v_it->frame, "e,state,selected", "e");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1201,31 +1143,6 @@ _view_update(Evry_View *view, int slide)
|
|||
|
||||
v->tabs->update(v->tabs);
|
||||
|
||||
if (evry_conf->scroll_animate)
|
||||
{
|
||||
if (slide)
|
||||
{
|
||||
if (sd->items && !sd->animator)
|
||||
sd->animator = ecore_animator_add(_animator, v->span);
|
||||
|
||||
sd->clearing = EINA_FALSE;
|
||||
|
||||
if (!sd->sliding)
|
||||
sd->slide_to = sd->x;
|
||||
else
|
||||
sd->slide_to += sd->w;
|
||||
|
||||
sd->slide = sd->x + sd->w * -slide;
|
||||
|
||||
sd->sliding = 1;
|
||||
}
|
||||
else if (sd->sliding)
|
||||
{
|
||||
if (!sd->animator)
|
||||
sd->animator = ecore_animator_add(_animator, v->span);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1384,7 +1301,7 @@ _cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
|
|||
if ((slide = v->tabs->key_down(v->tabs, ev)))
|
||||
{
|
||||
/* _view_update(view, -slide); */
|
||||
_view_update(view, 0);
|
||||
_view_update(view);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1545,7 +1462,7 @@ _view_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
{
|
||||
Evas_Event_Mouse_Wheel *ev = event_info;
|
||||
Smart_Data *sd = evas_object_smart_data_get(obj);
|
||||
if (sd->clearing) return;
|
||||
|
||||
if (ev->z)
|
||||
{
|
||||
evas_object_hide(sd->selector);
|
||||
|
@ -1563,9 +1480,6 @@ _view_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
int diff_y, diff_x;
|
||||
if (!sd) return;
|
||||
|
||||
if (sd->clearing)
|
||||
goto end;
|
||||
|
||||
if (!sd->mouse_x)
|
||||
goto end;
|
||||
|
||||
|
@ -1635,6 +1549,7 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
|
|||
|
||||
v = E_NEW(View, 1);
|
||||
v->view = *view;
|
||||
v->view.clear_timer = NULL;
|
||||
v->state = s;
|
||||
v->evas = evas_object_evas_get(swallow);
|
||||
|
||||
|
@ -1696,7 +1611,7 @@ _view_destroy(Evry_View *view)
|
|||
|
||||
GET_VIEW(v, view);
|
||||
|
||||
_view_clear(view, 0);
|
||||
_view_clear(view);
|
||||
|
||||
evas_object_del(v->span);
|
||||
evas_object_del(v->bg);
|
||||
|
|
|
@ -119,7 +119,7 @@ _tab_cb_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
if (ev->button == 1)
|
||||
{
|
||||
_plugin_select(v, tab->plugin);
|
||||
v->view->update(v->view, 0);
|
||||
v->view->update(v->view);
|
||||
}
|
||||
}
|
||||
static void
|
||||
|
@ -131,12 +131,12 @@ _tabs_cb_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
if (ev->z > 0)
|
||||
{
|
||||
_plugin_next(v);
|
||||
v->view->update(v->view, 0);
|
||||
v->view->update(v->view);
|
||||
}
|
||||
else if (ev->z < 0)
|
||||
{
|
||||
_plugin_prev(v);
|
||||
v->view->update(v->view, 0);
|
||||
v->view->update(v->view);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue