forked from enlightenment/enlightenment
'everything'
- fix plugin order config - actually save app config - scroll tabs, and turn off the 'blinking' on input SVN revision: 48070
This commit is contained in:
parent
cbdd5ca614
commit
233d282c92
|
@ -33790,14 +33790,14 @@ collections {
|
|||
signal: "e,signal,update";
|
||||
source: "e";
|
||||
action: STATE_SET "faded" 0.0;
|
||||
transition: SINUSOIDAL 0.35;
|
||||
/* transition: SINUSOIDAL 0.5; */
|
||||
target: "bar_clip";
|
||||
after: "update_list2";
|
||||
}
|
||||
program {
|
||||
name: "update_list2";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: SINUSOIDAL 0.15;
|
||||
/* transition: SINUSOIDAL 0.15; */
|
||||
target: "bar_clip";
|
||||
}
|
||||
program {
|
||||
|
@ -33815,14 +33815,23 @@ collections {
|
|||
images {
|
||||
image: "toolbar_sel.png" COMP;
|
||||
}
|
||||
min: 70 10;
|
||||
max: 100 10;
|
||||
min: 50 10;
|
||||
parts {
|
||||
part {
|
||||
name: "clip";
|
||||
mouse_events: 0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1.relative: 0.05 0.0;
|
||||
rel2.relative: 0.95 1.0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "label2";
|
||||
type: TEXT;
|
||||
scale: 1;
|
||||
description {
|
||||
clip_to: "clip";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
align: 0.5 0.5;
|
||||
fixed: 0 1;
|
||||
|
@ -33833,7 +33842,7 @@ collections {
|
|||
font: "Sans:style";
|
||||
text_source: "e.text.label";
|
||||
size: 11;
|
||||
min: 1 1;
|
||||
min: 0 1;
|
||||
align: 0.5 0.5;
|
||||
}
|
||||
}
|
||||
|
@ -33866,11 +33875,14 @@ collections {
|
|||
name: "e.text.label";
|
||||
type: TEXT;
|
||||
mouse_events: 0;
|
||||
clip_to: "clip";
|
||||
scale: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
align: 0.5 0.5;
|
||||
fixed: 0 1;
|
||||
rel1.to: "clip";
|
||||
rel2.to: "clip";
|
||||
rel1.offset: 5 3;
|
||||
rel2.offset: -6 -1;
|
||||
visible: 0;
|
||||
|
@ -33878,7 +33890,7 @@ collections {
|
|||
text {
|
||||
font: "Sans:style=Bold";
|
||||
size: 10;
|
||||
min: 1 1;
|
||||
min: 0 1;
|
||||
align: 0.5 0.5;
|
||||
}
|
||||
}
|
||||
|
@ -33898,7 +33910,7 @@ collections {
|
|||
target: "bg";
|
||||
target: "e.text.label";
|
||||
target: "label2";
|
||||
transition: LINEAR 0.3;
|
||||
transition: LINEAR 0.1;
|
||||
}
|
||||
program {
|
||||
name: "go_passive";
|
||||
|
@ -33912,166 +33924,6 @@ collections {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/*** EVERYTHING PREVIEW ***/
|
||||
|
||||
group {
|
||||
name: "e/modules/everything/preview";
|
||||
parts {
|
||||
part {
|
||||
name: "bg";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 64 64 63 255;
|
||||
rel1 {
|
||||
offset: -4 -4;
|
||||
}
|
||||
rel2 {
|
||||
offset: 4 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "frame";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
align: 0 0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 -4;
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "e.swallow.icon1";
|
||||
type: SWALLOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
to: "frame";
|
||||
offset: 2 2;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.3333 1.0;
|
||||
to: "frame";
|
||||
offset: -3 -3;
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "right" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.3333 0.0;
|
||||
rel2.relative: 0.6666 1.0;
|
||||
}
|
||||
description {
|
||||
state: "left" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 0.0 1.0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "e.swallow.icon2";
|
||||
type: SWALLOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.3333 0.0;
|
||||
to: "frame";
|
||||
offset: 2 2;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.6666 1.0;
|
||||
to: "frame";
|
||||
offset: -3 -3;
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "left" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.00 0.0;
|
||||
rel2.relative: 0.3333 1.0;
|
||||
}
|
||||
description {
|
||||
state: "right" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.6666 0.0;
|
||||
rel2.relative: 0.9999 1.0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "e.swallow.icon3";
|
||||
type: SWALLOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.6666 0.0;
|
||||
to: "frame";
|
||||
offset: 2 2;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.9999 1.0;
|
||||
to: "frame";
|
||||
offset: -3 -3;
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "left" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.3333 0.0;
|
||||
rel2.relative: 0.6666 1.0;
|
||||
}
|
||||
description {
|
||||
state: "right" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 1.0 0.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
programs {
|
||||
program {
|
||||
name: "slide_left";
|
||||
signal: "e,signal,slide_left";
|
||||
source: "e";
|
||||
action: STATE_SET "right" 0.0;
|
||||
target: "e.swallow.icon1";
|
||||
target: "e.swallow.icon2";
|
||||
target: "e.swallow.icon3";
|
||||
after: "slide_middle";
|
||||
}
|
||||
program {
|
||||
name: "slide_right";
|
||||
signal: "e,signal,slide_right";
|
||||
source: "e";
|
||||
action: STATE_SET "left" 0.0;
|
||||
target: "e.swallow.icon1";
|
||||
target: "e.swallow.icon2";
|
||||
target: "e.swallow.icon3";
|
||||
after: "slide_middle";
|
||||
}
|
||||
program {
|
||||
name: "slide_middle";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "e.swallow.icon1";
|
||||
target: "e.swallow.icon2";
|
||||
target: "e.swallow.icon3";
|
||||
transition: LINEAR 0.25;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/*** EVERYTHING THUMB VIEW ***/
|
||||
|
||||
|
|
|
@ -435,6 +435,10 @@ _hist_items_add_cb(const Eina_Hash *hash, const void *key, void *data, void *fda
|
|||
if (hi->plugin != p->base.name)
|
||||
continue;
|
||||
app = NULL;
|
||||
|
||||
/* ignore executables for parameter */
|
||||
if (!strncmp(key, "_", 1))
|
||||
continue;
|
||||
|
||||
if ((d = efreet_util_desktop_exec_find(key)))
|
||||
{
|
||||
|
@ -608,14 +612,18 @@ static int
|
|||
_fetch(Evry_Plugin *plugin, const char *input)
|
||||
{
|
||||
PLUGIN(p, plugin);
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll, *previous;
|
||||
Efreet_Desktop *desktop;
|
||||
Evry_Item *it;
|
||||
char *file;
|
||||
int prio = 0;
|
||||
int len = input ? strlen(input) : 0;
|
||||
|
||||
EVRY_PLUGIN_ITEMS_CLEAR(p);
|
||||
plugin->changed = 0;
|
||||
|
||||
previous = plugin->items;
|
||||
plugin->items = NULL;
|
||||
|
||||
/* EVRY_PLUGIN_ITEMS_CLEAR(p); */
|
||||
|
||||
/* add apps for a given mimetype */
|
||||
if (plugin->type == type_action)
|
||||
|
@ -661,8 +669,13 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
/* add executables */
|
||||
_add_executables(p, input);
|
||||
|
||||
if (!plugin->items) return 0;
|
||||
|
||||
if (!plugin->items)
|
||||
{
|
||||
plugin->items = previous;
|
||||
EVRY_PLUGIN_ITEMS_CLEAR(p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (plugin->type == type_action)
|
||||
{
|
||||
EINA_LIST_FOREACH(plugin->items, l, it)
|
||||
|
@ -677,6 +690,18 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
if (plugin->type != type_action || input)
|
||||
EVRY_PLUGIN_ITEMS_SORT(plugin, _cb_sort);
|
||||
|
||||
for (l = previous, ll = plugin->items; l && ll; l = l->next, ll = ll->next)
|
||||
{
|
||||
if (l->data != ll->data)
|
||||
{
|
||||
plugin->changed = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (l || ll) plugin->changed = 1;
|
||||
|
||||
if (previous) eina_list_free(previous);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -964,58 +989,6 @@ module_init(void)
|
|||
evry_action_register(act4, 4);
|
||||
evry_action_register(act5, 5);
|
||||
|
||||
/*
|
||||
Eina_List *l, *ll;
|
||||
const char *file, *name;
|
||||
History_Entry *he;
|
||||
History_Item *hi;
|
||||
name = EVRY_PLUGIN(p1)->name;
|
||||
double t;
|
||||
int found = 0;
|
||||
|
||||
evry_history_load();
|
||||
|
||||
EINA_LIST_FOREACH(e_exehist_list_get(), l, file)
|
||||
{
|
||||
t = e_exehist_newest_run_get(file);
|
||||
he = eina_hash_find(evry_hist->subjects, file);
|
||||
|
||||
if (!he)
|
||||
{
|
||||
he = E_NEW(History_Entry, 1);
|
||||
eina_hash_add(evry_hist->subjects, file, he);
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_LIST_FOREACH(he->items, ll, hi)
|
||||
{
|
||||
if (hi->plugin != name) continue;
|
||||
|
||||
if (t > hi->last_used - 1.0)
|
||||
{
|
||||
hi->last_used = t;
|
||||
hi->usage += TIME_FACTOR(hi->last_used);
|
||||
hi->count = e_exehist_popularity_get(file);
|
||||
}
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
hi = E_NEW(History_Item, 1);
|
||||
hi->plugin = eina_stringshare_ref(name);
|
||||
hi->last_used = t;
|
||||
hi->count = e_exehist_popularity_get(file);
|
||||
hi->usage += TIME_FACTOR(hi->last_used);
|
||||
he->items = eina_list_append(he->items, hi);
|
||||
}
|
||||
found = 0;
|
||||
}
|
||||
evry_history_unload();
|
||||
*/
|
||||
/* taken from e_exebuf.c */
|
||||
exelist_exe_edd = E_CONFIG_DD_NEW("E_Exe", E_Exe);
|
||||
#undef T
|
||||
|
@ -1165,11 +1138,8 @@ _scan_idler(void *data)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
|
||||
static E_Config_DD *conf_edd = NULL;
|
||||
|
||||
static Eina_Bool active = EINA_FALSE;
|
||||
|
@ -1263,6 +1233,8 @@ static int
|
|||
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
_conf->list_executables = cfdata->list_executables;
|
||||
e_config_domain_save("module.everything-apps", conf_edd, _conf);
|
||||
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
}
|
||||
|
@ -1270,7 +1242,7 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
/***************************************************************************/
|
||||
|
||||
static void
|
||||
_conf_new(void)
|
||||
_conf_new(void)
|
||||
{
|
||||
_conf = E_NEW(Module_Config, 1);
|
||||
_conf->version = (MOD_CONFIG_FILE_EPOCH << 16);
|
||||
|
|
|
@ -359,9 +359,10 @@ _hist_items_add_cb(const Eina_Hash *hash, const void *key, void *data, void *fda
|
|||
EINA_LIST_FOREACH(p->files, ll, file)
|
||||
if (!strcmp(file->path, key))
|
||||
return EINA_TRUE;
|
||||
|
||||
if (!ecore_file_exists(key))
|
||||
continue;
|
||||
|
||||
/* XXX this blocks ui when drive is sleeping */
|
||||
/* if (!ecore_file_exists(key))
|
||||
* continue; */
|
||||
|
||||
label = ecore_file_file_get(key);
|
||||
if (!label)
|
||||
|
|
|
@ -100,6 +100,8 @@ struct _Plugin_Config
|
|||
int priority;
|
||||
|
||||
const char *trigger;
|
||||
|
||||
Evry_Plugin *plugin;
|
||||
};
|
||||
|
||||
|
||||
|
@ -233,6 +235,8 @@ struct _Evry_Plugin
|
|||
|
||||
/* not to be set by plugin! */
|
||||
Plugin_Config *config;
|
||||
|
||||
Eina_Bool changed;
|
||||
};
|
||||
|
||||
|
||||
|
@ -257,6 +261,8 @@ struct _Evry_State
|
|||
Eina_Bool item_auto_selected;
|
||||
|
||||
Evry_View *view;
|
||||
|
||||
Eina_Bool changed;
|
||||
};
|
||||
|
||||
struct _Evry_View
|
||||
|
|
|
@ -256,6 +256,14 @@ _config_init()
|
|||
evry_conf->cycle_mode = 0;
|
||||
evry_conf->history_sort_mode = 0;
|
||||
}
|
||||
|
||||
|
||||
/* if (evry_conf->conf_subjects) eina_list_free(evry_conf->conf_subjects);
|
||||
* if (evry_conf->conf_actions) eina_list_free(evry_conf->conf_actions);
|
||||
* if (evry_conf->conf_objects) eina_list_free(evry_conf->conf_objects);
|
||||
* evry_conf->conf_subjects = NULL;
|
||||
* evry_conf->conf_actions = NULL;
|
||||
* evry_conf->conf_objects = NULL; */
|
||||
}
|
||||
|
||||
|
||||
|
@ -499,7 +507,7 @@ evry_plugin_register(Evry_Plugin *p, int priority)
|
|||
pc->name = eina_stringshare_add(p->name);
|
||||
pc->enabled = 1;
|
||||
pc->priority = priority ? priority : 100;;
|
||||
|
||||
pc->plugin = p;
|
||||
confs = eina_list_append(confs, pc);
|
||||
/* return NULL */
|
||||
}
|
||||
|
|
|
@ -52,6 +52,9 @@ struct _Tab_View
|
|||
void (*clear) (Tab_View *tv);
|
||||
int (*key_down) (Tab_View *tv, const Ecore_Event_Key *ev);
|
||||
|
||||
double align;
|
||||
double align_to;
|
||||
Ecore_Animator *animator;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1001,7 +1001,8 @@ _evry_list_win_update(Evry_State *s)
|
|||
if (s != selector->state) return;
|
||||
if (!list->visible) return;
|
||||
|
||||
_evry_view_update(s, s->plugin);
|
||||
if (s->changed)
|
||||
_evry_view_update(s, s->plugin);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1854,6 +1855,7 @@ _evry_matches_update(Evry_Selector *sel, int async)
|
|||
Evry_Plugin *p;
|
||||
Eina_List *l;
|
||||
const char *input;
|
||||
s->changed = 1;
|
||||
|
||||
EINA_LIST_FREE(s->cur_plugins, p);
|
||||
|
||||
|
@ -1873,6 +1875,7 @@ _evry_matches_update(Evry_Selector *sel, int async)
|
|||
(!strncmp(s->input, p->trigger, strlen(p->trigger))))
|
||||
{
|
||||
s->cur_plugins = eina_list_append(s->cur_plugins, p);
|
||||
|
||||
p->fetch(p, s->input + strlen(p->trigger));
|
||||
break;
|
||||
}
|
||||
|
@ -1883,16 +1886,25 @@ _evry_matches_update(Evry_Selector *sel, int async)
|
|||
{
|
||||
EINA_LIST_FOREACH(s->plugins, l, p)
|
||||
{
|
||||
if (!win->plugin_dedicated && p->trigger) continue;
|
||||
if (p == sel->aggregator) continue;
|
||||
if (!win->plugin_dedicated && p->trigger)
|
||||
continue;
|
||||
if (p == sel->aggregator)
|
||||
continue;
|
||||
/* dont wait for async plugin. use their current items */
|
||||
if (!async && p->async_fetch && p->items)
|
||||
{
|
||||
s->cur_plugins = eina_list_append(s->cur_plugins, p);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p->fetch(p, input) || (sel->states->next) || (win->plugin_dedicated))
|
||||
s->cur_plugins = eina_list_append(s->cur_plugins, p);
|
||||
p->changed = EINA_TRUE;
|
||||
|
||||
if ((p->fetch(p, input)) ||
|
||||
(sel->states->next) ||
|
||||
(win->plugin_dedicated))
|
||||
{
|
||||
s->cur_plugins = eina_list_append(s->cur_plugins, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1904,8 +1916,6 @@ _evry_matches_update(Evry_Selector *sel, int async)
|
|||
{
|
||||
s->cur_plugins = eina_list_prepend(s->cur_plugins, sel->aggregator);
|
||||
sel->aggregator->fetch(sel->aggregator, input);
|
||||
/* if (s->plugin_auto_selected)
|
||||
* _evry_plugin_select(s, NULL); */
|
||||
}
|
||||
else
|
||||
sel->aggregator->cleanup(sel->aggregator);
|
||||
|
|
|
@ -80,15 +80,11 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
C(scroll_animate);
|
||||
C(scroll_speed);
|
||||
#undef C
|
||||
|
||||
EINA_LIST_FOREACH(evry_conf->plugins, l, p)
|
||||
if (p->type == type_subject)
|
||||
cfdata->p_subject = eina_list_append(cfdata->p_subject, p);
|
||||
else if (p->type == type_action)
|
||||
cfdata->p_action = eina_list_append(cfdata->p_action, p);
|
||||
else if (p->type == type_object)
|
||||
cfdata->p_object = eina_list_append(cfdata->p_object, p);
|
||||
|
||||
cfdata->p_subject = eina_list_clone(evry_conf->conf_subjects);
|
||||
cfdata->p_action = eina_list_clone(evry_conf->conf_actions);
|
||||
cfdata->p_object = eina_list_clone(evry_conf->conf_objects);
|
||||
|
||||
if (evry_conf->cmd_terminal)
|
||||
cfdata->cmd_terminal = strdup(evry_conf->cmd_terminal);
|
||||
|
||||
|
@ -112,6 +108,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
if (cfdata->p_subject) eina_list_free(cfdata->p_subject);
|
||||
if (cfdata->p_action) eina_list_free(cfdata->p_action);
|
||||
if (cfdata->p_object) eina_list_free(cfdata->p_object);
|
||||
|
||||
E_FREE(cfdata->cmd_terminal);
|
||||
E_FREE(cfdata->cmd_sudo);
|
||||
E_FREE(cfdata);
|
||||
|
@ -130,24 +127,36 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
{
|
||||
|
||||
#define C(_name) evry_conf->_name = cfdata->_name
|
||||
C(height);
|
||||
C(width);
|
||||
C(hide_list);
|
||||
C(hide_input);
|
||||
C(quick_nav);
|
||||
C(rel_x);
|
||||
C(rel_y);
|
||||
C(view_mode);
|
||||
C(view_zoom);
|
||||
C(cycle_mode);
|
||||
C(history_sort_mode);
|
||||
C(scroll_animate);
|
||||
C(scroll_speed);
|
||||
C(height);
|
||||
C(width);
|
||||
C(hide_list);
|
||||
C(hide_input);
|
||||
C(quick_nav);
|
||||
C(rel_x);
|
||||
C(rel_y);
|
||||
C(view_mode);
|
||||
C(view_zoom);
|
||||
C(cycle_mode);
|
||||
C(history_sort_mode);
|
||||
C(scroll_animate);
|
||||
C(scroll_speed);
|
||||
#undef C
|
||||
|
||||
evry_conf->plugins = eina_list_sort(evry_conf->plugins, -1,
|
||||
_evry_cb_plugin_sort);
|
||||
/* evry_conf->plugins = eina_list_sort(evry_conf->plugins, -1,
|
||||
* _evry_cb_plugin_sort); */
|
||||
|
||||
if (evry_conf->conf_subjects) eina_list_free(evry_conf->conf_subjects);
|
||||
if (evry_conf->conf_actions) eina_list_free(evry_conf->conf_actions);
|
||||
if (evry_conf->conf_objects) eina_list_free(evry_conf->conf_objects);
|
||||
|
||||
evry_conf->conf_subjects = cfdata->p_subject;
|
||||
evry_conf->conf_actions = cfdata->p_action;
|
||||
evry_conf->conf_objects = cfdata->p_object;
|
||||
|
||||
cfdata->p_subject = NULL;
|
||||
cfdata->p_action = NULL;
|
||||
cfdata->p_object = NULL;
|
||||
|
||||
if (evry_conf->cmd_terminal)
|
||||
eina_stringshare_del(evry_conf->cmd_terminal);
|
||||
evry_conf->cmd_terminal = eina_stringshare_add(cfdata->cmd_terminal);
|
||||
|
@ -165,7 +174,7 @@ _fill_list(Eina_List *plugins, Evas_Object *obj, int enabled __UNUSED__)
|
|||
Evas *evas;
|
||||
Evas_Coord w;
|
||||
Eina_List *l;
|
||||
Evry_Plugin *p;
|
||||
Plugin_Config *pc;
|
||||
|
||||
/* freeze evas, edje, and list widget */
|
||||
evas = evas_object_evas_get(obj);
|
||||
|
@ -173,10 +182,10 @@ _fill_list(Eina_List *plugins, Evas_Object *obj, int enabled __UNUSED__)
|
|||
edje_freeze();
|
||||
e_widget_ilist_freeze(obj);
|
||||
e_widget_ilist_clear(obj);
|
||||
|
||||
EINA_LIST_FOREACH(plugins, l, p)
|
||||
e_widget_ilist_append(obj, NULL, p->name, NULL, p, NULL);
|
||||
|
||||
|
||||
EINA_LIST_FOREACH(plugins, l, pc)
|
||||
e_widget_ilist_append(obj, NULL, pc->name, NULL, pc, NULL);
|
||||
|
||||
e_widget_ilist_go(obj);
|
||||
e_widget_size_min_get(obj, &w, NULL);
|
||||
e_widget_size_min_set(obj, w > 180 ? w : 180, 200);
|
||||
|
@ -195,22 +204,22 @@ _plugin_move(Eina_List *plugins, Evas_Object *list, int dir)
|
|||
|
||||
if (sel >= 0)
|
||||
{
|
||||
Evry_Plugin *p;
|
||||
Plugin_Config *pc;
|
||||
int prio = 0;
|
||||
|
||||
l1 = eina_list_nth_list(plugins, sel);
|
||||
l2 = eina_list_nth_list(plugins, sel + dir);
|
||||
|
||||
if (!l1 || !l2) return;
|
||||
p = l1->data;
|
||||
pc = l1->data;
|
||||
l1->data = l2->data;
|
||||
l2->data = p;
|
||||
l2->data = pc;
|
||||
|
||||
_fill_list(plugins, list, 0);
|
||||
e_widget_ilist_selected_set(list, sel + dir);
|
||||
|
||||
EINA_LIST_FOREACH(plugins, l1, p)
|
||||
p->config->priority = prio++;
|
||||
EINA_LIST_FOREACH(plugins, l1, pc)
|
||||
pc->priority = prio++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,7 +245,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("General Settings"), 0);
|
||||
of = e_widget_framelist_add(evas, _("General"), 0);
|
||||
|
||||
ob = e_widget_check_add(evas, _("Hide input when inactive"),
|
||||
&(cfdata->hide_input));
|
||||
|
@ -270,9 +279,9 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
ob = e_widget_check_add(evas, _("Animate scrolling"),
|
||||
&(cfdata->scroll_animate));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"),
|
||||
5, 20, 0.1, 0, &(cfdata->scroll_speed), NULL, 10);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
/* ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"),
|
||||
* 5, 20, 0.1, 0, &(cfdata->scroll_speed), NULL, 10);
|
||||
* e_widget_framelist_object_append(of, ob); */
|
||||
|
||||
ob = e_widget_check_add(evas, _("Up/Down select next item in icon view"),
|
||||
&(cfdata->cycle_mode));
|
||||
|
@ -347,7 +356,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
* e_widget_framelist_object_append(of, ob);
|
||||
* e_widget_list_object_append(o, of, 1, 1, 0.5); */
|
||||
|
||||
e_widget_toolbook_page_append(otb, NULL, _("Position / Size"),
|
||||
e_widget_toolbook_page_append(otb, NULL, _("Geometry"),
|
||||
o, 1, 0, 1, 0, 0.5, 0.0);
|
||||
|
||||
ob = e_widget_list_add(evas, 1, 1);
|
||||
|
|
|
@ -128,13 +128,32 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
Eina_List *items = NULL;
|
||||
const char *context = NULL;
|
||||
|
||||
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||
|
||||
s = p->selector->state;
|
||||
plugin->changed = 1;
|
||||
|
||||
s = p->selector->state;
|
||||
|
||||
if (!s || !s->cur_plugins || !s->cur_plugins->next)
|
||||
return 0;
|
||||
|
||||
/* first is aggregator itself */
|
||||
lp = s->cur_plugins->next;
|
||||
|
||||
/* EINA_LIST_FOREACH(lp, l, pp)
|
||||
* {
|
||||
* if (pp->changed)
|
||||
* {
|
||||
* plugin->changed = 1;
|
||||
* break;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* if (!plugin->changed)
|
||||
* return 1; */
|
||||
/* printf("aggreator changed\n"); */
|
||||
|
||||
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||
|
||||
/* get current 'context' ... */
|
||||
for (i = 1; i < 3; i++)
|
||||
{
|
||||
Evry_Item *item;
|
||||
|
@ -145,9 +164,6 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
}
|
||||
}
|
||||
|
||||
/* first is aggregator itself */
|
||||
lp = s->cur_plugins->next;
|
||||
|
||||
if (input)
|
||||
{
|
||||
EINA_LIST_FOREACH(lp, l, pp)
|
||||
|
|
|
@ -615,7 +615,7 @@ _animator(void *data)
|
|||
{
|
||||
Smart_Data *sd = evas_object_smart_data_get(data);
|
||||
double da;
|
||||
double spd = 25.0 / e_config->framerate;
|
||||
double spd = (25.0 / (double)e_config->framerate) / (double) (1 + sd->view->zoom);
|
||||
int wait = 0;
|
||||
|
||||
if (sd->sel_pos != sd->sel_pos_to)
|
||||
|
|
|
@ -11,7 +11,35 @@ struct _Tab
|
|||
int cw, mw;
|
||||
};
|
||||
|
||||
static int
|
||||
_animator(void *data)
|
||||
{
|
||||
Tab_View *v = data;
|
||||
|
||||
double da;
|
||||
double spd = (25.0 / (double)e_config->framerate);
|
||||
int wait = 0;
|
||||
|
||||
if (v->align != v->align_to)
|
||||
{
|
||||
v->align = (v->align * (1.0 - spd)) + (v->align_to * spd);
|
||||
|
||||
da = v->align - v->align_to;
|
||||
if (da < 0.0) da = -da;
|
||||
if (da < 0.02)
|
||||
v->align = v->align_to;
|
||||
else
|
||||
wait++;
|
||||
|
||||
e_box_align_set(v->o_tabs, 1.0 - v->align, 0.5);
|
||||
}
|
||||
|
||||
if (wait) return 1;
|
||||
|
||||
v->animator = NULL;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_tab_scroll_to(Tab_View *v, Evry_Plugin *p)
|
||||
|
@ -28,25 +56,25 @@ _tab_scroll_to(Tab_View *v, Evry_Plugin *p)
|
|||
|
||||
e_box_size_min_get(v->o_tabs, &mw, NULL);
|
||||
evas_object_geometry_get(v->o_tabs, NULL, NULL, &w, NULL);
|
||||
|
||||
if (mw <= w + 5)
|
||||
|
||||
if (mw < w)
|
||||
{
|
||||
e_box_align_set(v->o_tabs, 0.0, 0.5);
|
||||
return;
|
||||
e_box_align_set(v->o_tabs, 0.0, 0.5);
|
||||
return;
|
||||
}
|
||||
|
||||
if (n > 1)
|
||||
{
|
||||
align = (double)i / (double)(n - 1);
|
||||
/* if (evry_conf->scroll_animate)
|
||||
* {
|
||||
* if (!scroll_timer)
|
||||
* scroll_timer = ecore_timer_add(0.01, _evry_list_scroll_timer, NULL);
|
||||
* if (!scroll_animator)
|
||||
* scroll_animator = ecore_animator_add(_evry_list_animator, NULL);
|
||||
* }
|
||||
* else */
|
||||
e_box_align_set(v->o_tabs, 1.0 - align, 0.5);
|
||||
if (evry_conf->scroll_animate)
|
||||
{
|
||||
v->align_to = align;
|
||||
|
||||
if (!v->animator)
|
||||
v->animator = ecore_animator_add(_animator, v);
|
||||
}
|
||||
else
|
||||
e_box_align_set(v->o_tabs, 1.0 - align, 0.5);
|
||||
}
|
||||
else
|
||||
e_box_align_set(v->o_tabs, 0.0, 0.5);
|
||||
|
@ -63,8 +91,9 @@ _tabs_update(Tab_View *v)
|
|||
Evas_Coord w;
|
||||
Evas_Object *o;
|
||||
|
||||
evas_object_geometry_get(v->o_tabs, NULL, NULL, &w, NULL);
|
||||
|
||||
/* evas_object_geometry_get(v->o_tabs, NULL, NULL, &w, NULL); */
|
||||
w = evry_conf->width - 22;
|
||||
|
||||
/* remove tabs for not active plugins */
|
||||
e_box_freeze(v->o_tabs);
|
||||
|
||||
|
@ -106,25 +135,26 @@ _tabs_update(Tab_View *v)
|
|||
|
||||
if (eina_list_count(s->cur_plugins) == 2)
|
||||
e_box_pack_options_set(o, 1, 1, 0, 0, 0.0, 0.5,
|
||||
140, 10, 140, 9999);
|
||||
w/4, 10, w/3, 9999);
|
||||
else
|
||||
e_box_pack_options_set(o, 1, 1, 1, 0, 0.0, 0.5,
|
||||
(tab->mw < tab->cw ? tab->cw : tab->mw), 10,
|
||||
(w ? w/3 : 140), 9999);
|
||||
e_box_pack_options_set(o, 1, 1, 0, 0, 0.0, 0.5,
|
||||
w/4, 10,
|
||||
w/3, 9999);
|
||||
if (s->plugin == p)
|
||||
edje_object_signal_emit(o, "e,state,selected", "e");
|
||||
else
|
||||
edje_object_signal_emit(o, "e,state,unselected", "e");
|
||||
}
|
||||
|
||||
e_box_thaw(v->o_tabs);
|
||||
|
||||
if (eina_list_count(s->cur_plugins) == 2)
|
||||
{
|
||||
e_box_align_set(v->o_tabs, 0.0, 0.5);
|
||||
v->align = 0;
|
||||
e_box_align_set(v->o_tabs, 0.0, 0.5);
|
||||
}
|
||||
else if (s->plugin)
|
||||
_tab_scroll_to(v, s->plugin);
|
||||
|
||||
e_box_thaw(v->o_tabs);
|
||||
}
|
||||
|
||||
|
||||
|
@ -315,5 +345,8 @@ evry_tab_view_free(Tab_View *v)
|
|||
|
||||
evas_object_del(v->o_tabs);
|
||||
|
||||
if (v->animator)
|
||||
ecore_animator_del(v->animator);
|
||||
|
||||
E_FREE(v);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue