forked from enlightenment/enlightenment
parent
b525c5defa
commit
ac2fca776a
|
@ -33412,8 +33412,8 @@ collections {
|
|||
normal: "base_bg.png";
|
||||
border: 2 2 2 2;
|
||||
}
|
||||
fill.smooth: 0;
|
||||
color: 205 205 205 255;
|
||||
fill.smooth: 1;
|
||||
color: 245 245 245 255;
|
||||
}
|
||||
}
|
||||
part {
|
||||
|
@ -34333,12 +34333,12 @@ collections {
|
|||
normal: "everything_item_bg.png";
|
||||
border: 5 5 5 5;
|
||||
}
|
||||
color: 255 255 255 32;
|
||||
color: 255 255 255 16;
|
||||
}
|
||||
description {
|
||||
state: "selected" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 128;
|
||||
color: 255 255 255 108;
|
||||
}
|
||||
}
|
||||
part {
|
||||
|
@ -34557,7 +34557,7 @@ collections {
|
|||
source: "e";
|
||||
action: STATE_SET "selected" 0.0;
|
||||
target: "bg";
|
||||
transition: ACCELERATE 0.05;
|
||||
transition: ACCELERATE 0.15;
|
||||
/* target: "clip"; */
|
||||
}
|
||||
program {
|
||||
|
@ -34565,7 +34565,7 @@ collections {
|
|||
signal: "e,state,unselected";
|
||||
source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
/* transition: LINEAR 0.1; */
|
||||
transition: LINEAR 0.2;
|
||||
target: "bg";
|
||||
/* target: "clip"; */
|
||||
}
|
||||
|
@ -34944,6 +34944,36 @@ collections {
|
|||
}
|
||||
}
|
||||
|
||||
group {
|
||||
name: "e/modules/everything/textblock";
|
||||
styles {
|
||||
style {
|
||||
name: "everything_textblock_style";
|
||||
base: "font=Sans font_size=11 align=left color=#000";
|
||||
tag: "hilight" "+ font=Sans:style=Bold color=#0c0c0c";
|
||||
tag: "b" "+ font=Sans:style=Bold";
|
||||
tag: "br" "\n";
|
||||
tag: "/title" "- \n \n";
|
||||
}
|
||||
}
|
||||
parts {
|
||||
part {
|
||||
name: "e.textblock.text";
|
||||
type: TEXTBLOCK;
|
||||
mouse_events: 0;
|
||||
scale: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1.offset: 4 4;
|
||||
rel2.offset: -5 -5;
|
||||
text {
|
||||
style: "everything_textblock_style";
|
||||
min: 1 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/*** MOD: CONF_COLORS ***/
|
||||
|
|
|
@ -344,6 +344,8 @@ struct _Config
|
|||
Eina_List *views;
|
||||
|
||||
int min_w, min_h;
|
||||
|
||||
unsigned char first_run;
|
||||
};
|
||||
|
||||
struct _Plugin_Config
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
/* #undef DBG
|
||||
* #define DBG(...) ERR(__VA_ARGS__) */
|
||||
|
||||
#define CONFIG_VERSION 9
|
||||
#define CONFIG_VERSION 10
|
||||
|
||||
/* actual module specifics */
|
||||
static void _e_mod_action_cb(E_Object *obj, const char *params);
|
||||
|
@ -214,6 +214,7 @@ _config_init()
|
|||
E_CONFIG_LIST(D, T, conf_actions, plugin_conf_edd);
|
||||
E_CONFIG_LIST(D, T, conf_objects, plugin_conf_edd);
|
||||
E_CONFIG_LIST(D, T, conf_views, plugin_conf_edd);
|
||||
E_CONFIG_VAL(D, T, first_run, UCHAR);
|
||||
#undef T
|
||||
#undef D
|
||||
evry_conf = e_config_domain_load("module.everything", conf_edd);
|
||||
|
@ -226,10 +227,16 @@ _config_init()
|
|||
|
||||
if (evry_conf && evry_conf->version == 8)
|
||||
{
|
||||
evry_conf->width = 460;
|
||||
evry_conf->width = 445;
|
||||
evry_conf->height = 310;
|
||||
evry_conf->rel_y = 0.25;
|
||||
evry_conf->scroll_animate = 1;
|
||||
evry_conf->version = 9;
|
||||
}
|
||||
|
||||
if (evry_conf && evry_conf->version == 9)
|
||||
{
|
||||
evry_conf->first_run = EINA_TRUE;
|
||||
evry_conf->version = CONFIG_VERSION;
|
||||
}
|
||||
|
||||
|
@ -245,7 +252,7 @@ _config_init()
|
|||
evry_conf->version = CONFIG_VERSION;
|
||||
evry_conf->rel_x = 0.5;
|
||||
evry_conf->rel_y = 0.25;
|
||||
evry_conf->width = 460;
|
||||
evry_conf->width = 445;
|
||||
evry_conf->height = 310;
|
||||
evry_conf->scroll_animate = 1;
|
||||
evry_conf->scroll_speed = 10.0;
|
||||
|
@ -258,6 +265,7 @@ _config_init()
|
|||
evry_conf->view_zoom = 0;
|
||||
evry_conf->cycle_mode = 0;
|
||||
evry_conf->history_sort_mode = 0;
|
||||
evry_conf->first_run = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -143,10 +143,18 @@ _cb_show_timer(void *data)
|
|||
Evry_View *view =evry_conf->views->data;
|
||||
Evry_State *s = selector->state;
|
||||
|
||||
if (evry_conf->first_run)
|
||||
{
|
||||
_evry_view_toggle(s, "?");
|
||||
evry_conf->first_run = EINA_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
s->view = view->create(view, s, list->o_main);
|
||||
|
||||
_evry_view_show(s->view);
|
||||
}
|
||||
}
|
||||
else return 0;
|
||||
|
||||
_evry_list_win_show();
|
||||
|
@ -1520,16 +1528,11 @@ _evry_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
if (len < (INPUTLEN - strlen(ev->compose)))
|
||||
{
|
||||
strcat(s->input, ev->compose);
|
||||
/* if ((len == 0) && isspace(s->input[0]))
|
||||
* _evry_show_triggers(); */
|
||||
if ((len == 1) &&
|
||||
(isspace(s->input[0])) &&
|
||||
(_evry_view_toggle(s, s->input + 1)))
|
||||
{
|
||||
/* space at the beginning is trigger */
|
||||
_evry_update(selector, 0);
|
||||
}
|
||||
else if (isspace(*ev->compose))
|
||||
|
||||
if (len == 0 && (_evry_view_toggle(s, s->input)))
|
||||
goto end;
|
||||
|
||||
if (isspace(*ev->compose))
|
||||
{
|
||||
/* do not update matches on space */
|
||||
_evry_update(selector, 0);
|
||||
|
@ -1797,6 +1800,7 @@ _evry_view_toggle(Evry_State *s, const char *trigger)
|
|||
{
|
||||
Evry_View *view, *v = NULL;
|
||||
Eina_List *l, *ll;
|
||||
Eina_Bool triggered = FALSE;
|
||||
|
||||
if (trigger)
|
||||
{
|
||||
|
@ -1804,9 +1808,12 @@ _evry_view_toggle(Evry_State *s, const char *trigger)
|
|||
{
|
||||
if (view->trigger && !strncmp(trigger, view->trigger, 1) &&
|
||||
(v = view->create(view, s, list->o_main)))
|
||||
{
|
||||
triggered = EINA_TRUE;
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->view)
|
||||
|
@ -1855,7 +1862,7 @@ _evry_view_toggle(Evry_State *s, const char *trigger)
|
|||
_evry_view_show(s->view);
|
||||
view->update(s->view, 0);
|
||||
|
||||
return 1;
|
||||
return triggered;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -62,19 +62,23 @@ _view_create(Evry_View *v, const Evry_State *s, const Evas_Object *swallow)
|
|||
int mw, mh;
|
||||
|
||||
char *text =
|
||||
_("<title><b>Welcome!</b></title>"
|
||||
"Ok, here comes the explanation of <hilight>everything</hilight>...<br>"
|
||||
_(" Ok, here comes the explanation of <hilight>everything</hilight>...<br>"
|
||||
" Just type a few letters of the thing you are looking for. <br>"
|
||||
" Use cursor <hilight><up/down></hilight> to choose from the list of things.<br>"
|
||||
" Press <hilight><tab></hilight> to select"
|
||||
" an action, then press <hilight><return></hilight>.<br>"
|
||||
/* "You might want to know <br>some mo keybinding to ease your experience though.<br>" */
|
||||
"<hilight><space><?></hilight> show this page<br>"
|
||||
"<hilight><ctrl+letter></hilight> jump to plugin beginning with 'letter'<br>"
|
||||
"<hilight><ctrl+left/right></hilight>"
|
||||
"cycle through plugins<br>"
|
||||
"<hilight><ctrl+1></hilight> "
|
||||
"choose a different view (e.g. for images)<br>");
|
||||
" <hilight><?></hilight> show this page<br>"
|
||||
" <hilight><return></hilight> run action<br>"
|
||||
" <hilight><ctrl+return></hilight> run action and continue<br>"
|
||||
" <hilight><tab></hilight> toggle between selectors<br>"
|
||||
" <hilight><ctrl+tab></hilight> complete input (depends on plugin)<br>"
|
||||
" <hilight><ctrl+'x'></hilight> jump to plugin beginning with 'x'<br>"
|
||||
" <hilight><ctrl+left/right></hilight> cycle through plugins<br>"
|
||||
" <hilight><ctrl+1></hilight> toggle view modes (exit this page ;)<br>"
|
||||
" <hilight><ctrl+2></hilight> toggle list view modes<br>"
|
||||
" <hilight><ctrl+3></hilight> toggle thumb view modes"
|
||||
);
|
||||
|
||||
if (v->active) return v;
|
||||
|
||||
|
@ -85,7 +89,7 @@ _view_create(Evry_View *v, const Evry_State *s, const Evas_Object *swallow)
|
|||
e_box_freeze(v->o_list);
|
||||
o = edje_object_add(evas_object_evas_get(swallow));
|
||||
e_theme_edje_object_set(o, "base/theme/widgets",
|
||||
"e/widgets/textblock");
|
||||
"e/modules/everything/textblock");
|
||||
|
||||
edje_object_part_text_set(o, "e.textblock.text", text);
|
||||
e_box_pack_start(v->o_list, o);
|
||||
|
|
Loading…
Reference in New Issue