'everything' first start help page

SVN revision: 48170
This commit is contained in:
Hannes Janetzek 2010-04-20 18:49:42 +00:00
parent b525c5defa
commit ac2fca776a
5 changed files with 91 additions and 40 deletions

View File

@ -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 ***/

View File

@ -344,6 +344,8 @@ struct _Config
Eina_List *views;
int min_w, min_h;
unsigned char first_run;
};
struct _Plugin_Config

View File

@ -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,13 +227,19 @@ _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 = CONFIG_VERSION;
evry_conf->version = 9;
}
if (evry_conf && evry_conf->version == 9)
{
evry_conf->first_run = EINA_TRUE;
evry_conf->version = CONFIG_VERSION;
}
if (evry_conf && evry_conf->version != CONFIG_VERSION)
{
_config_free();
@ -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;
}
}

View File

@ -143,9 +143,17 @@ _cb_show_timer(void *data)
Evry_View *view =evry_conf->views->data;
Evry_State *s = selector->state;
s->view = view->create(view, s, list->o_main);
_evry_view_show(s->view);
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;
@ -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,14 +1800,18 @@ _evry_view_toggle(Evry_State *s, const char *trigger)
{
Evry_View *view, *v = NULL;
Eina_List *l, *ll;
Eina_Bool triggered = FALSE;
if (trigger)
{
EINA_LIST_FOREACH(evry_conf->views, ll, view)
{
if (view->trigger && !strncmp(trigger, view->trigger, 1) &&
(v = view->create(view, s, list->o_main)))
goto found;
{
triggered = EINA_TRUE;
goto found;
}
}
}
else
@ -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

View File

@ -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>"
"Just type a few letters of the thing you are looking for. <br>"
"Use cursor <hilight>&lt;up/down&gt;</hilight> to choose from the list of things.<br>"
"Press <hilight>&lt;tab&gt;</hilight> to select "
"an action, then press <hilight>&lt;return&gt;</hilight>.<br>"
/* "You might want to know <br>some mo keybinding to ease your experience though.<br>" */
"<hilight>&lt;space&gt;&lt;?&gt;</hilight> show this page<br>"
"<hilight>&lt;ctrl+letter&gt;</hilight> jump to plugin beginning with 'letter'<br>"
"<hilight>&lt;ctrl+left/right&gt;</hilight>"
"cycle through plugins<br>"
"<hilight>&lt;ctrl+1&gt;</hilight> "
"choose a different view (e.g. for images)<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>&lt;up/down&gt;</hilight> to choose from the list of things.<br>"
" Press <hilight>&lt;tab&gt;</hilight> to select"
" an action, then press <hilight>&lt;return&gt;</hilight>.<br>"
/* "You might want to know <br>some mo keybinding to ease your experience though.<br>" */
" <hilight>&lt;?&gt;</hilight> show this page<br>"
" <hilight>&lt;return&gt;</hilight> run action<br>"
" <hilight>&lt;ctrl+return&gt;</hilight> run action and continue<br>"
" <hilight>&lt;tab&gt;</hilight> toggle between selectors<br>"
" <hilight>&lt;ctrl+tab&gt;</hilight> complete input (depends on plugin)<br>"
" <hilight>&lt;ctrl+'x'&gt;</hilight> jump to plugin beginning with 'x'<br>"
" <hilight>&lt;ctrl+left/right&gt;</hilight> cycle through plugins<br>"
" <hilight>&lt;ctrl+1&gt;</hilight> toggle view modes (exit this page ;)<br>"
" <hilight>&lt;ctrl+2&gt;</hilight> toggle list view modes<br>"
" <hilight>&lt;ctrl+3&gt;</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);