From: Enlightenment S. <no-...@en...> - 2010-04-25 12:01:27
|
Log: 'everything' keep right input position on backspace - set context for calc items (usually one one wants to copy its text items instead of googling it) Author: jeffdameth Date: 2010-04-25 05:01:20 -0700 (Sun, 25 Apr 2010) New Revision: 48302 Modified: trunk/e/src/modules/everything-calc/e_mod_main.c trunk/e/src/modules/everything/evry.c Modified: trunk/e/src/modules/everything/evry.c =================================================================== --- trunk/e/src/modules/everything/evry.c 2010-04-25 11:35:41 UTC (rev 48301) +++ trunk/e/src/modules/everything/evry.c 2010-04-25 12:01:20 UTC (rev 48302) @@ -1586,7 +1586,11 @@ val = *(s->inp + pos); s->inp[pos] = 0; - s->input = s->inp; + + if (s->trigger_active && s->inp[0] != 0) + s->input = s->inp + 1; + else + s->input = s->inp; if ((pos == 0) || !isspace(val)) _evry_update(sel, 1); Modified: trunk/e/src/modules/everything-calc/e_mod_main.c =================================================================== --- trunk/e/src/modules/everything-calc/e_mod_main.c 2010-04-25 11:35:41 UTC (rev 48301) +++ trunk/e/src/modules/everything-calc/e_mod_main.c 2010-04-25 12:01:20 UTC (rev 48302) @@ -31,12 +31,14 @@ EINA_LIST_FREE(history, result) { it = evry_item_new(NULL, p, result, NULL); + it->context = eina_stringshare_ref(p->name); p->items = eina_list_prepend(p->items, it); eina_stringshare_del(result); } } it = evry_item_new(NULL, p, "0", NULL); + it->context = eina_stringshare_ref(p->name); p->items = eina_list_prepend(p->items, it); return p; @@ -127,6 +129,7 @@ it_old->selected = EINA_FALSE; it2 = evry_item_new(NULL, p, it_old->label, NULL); + it2->context = eina_stringshare_ref(p->name); p->items = eina_list_prepend(p->items, it2); evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD); |