'everything'

- open with..: find also text/plain apps for text/* files
- stricter matching of history items. no more 'Open Terminal' everywhere
- defer popup creation


SVN revision: 47865
This commit is contained in:
Hannes Janetzek 2010-04-09 04:14:09 +00:00
parent 358dbeb100
commit 04ded7c5db
3 changed files with 37 additions and 17 deletions

View File

@ -310,6 +310,17 @@ _config_free(void)
/* action callback */
static int
_e_mod_run_defer_cb(void *data)
{
E_Zone *zone;
zone = data;
if (zone) evry_show(zone, NULL);
return 0;
}
static void
_e_mod_action_cb(E_Object *obj, const char *params)
{
@ -331,22 +342,13 @@ _e_mod_action_cb(E_Object *obj, const char *params)
if (!zone) return;
if (params && params[0])
evry_show(zone, params);
else
evry_show(zone, NULL);
ecore_idle_enterer_add(_e_mod_run_defer_cb, zone);
}
/* menu item callback(s) */
static int
_e_mod_run_defer_cb(void *data)
{
E_Zone *zone;
zone = data;
if (zone) evry_show(zone, NULL);
return 0;
}
static void
_e_mod_run_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
{

View File

@ -245,7 +245,7 @@ evry_history_add(Eina_Hash *hist, Evry_State *s, const char *ctxt)
hi->count += (hi->transient ? 2:1);
if (ctxt && !hi->context)
hi->context = eina_stringshare_ref(ctxt);
if (s->input)
{
if (hi->input)
@ -272,6 +272,9 @@ evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input, c
{
if (hi->plugin != it->plugin->name)
continue;
if (ctxt != hi->context)
continue;
if (evry_conf->history_sort_mode == 0)
{
@ -291,11 +294,10 @@ evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input, c
it->usage += hi->usage * hi->count;
}
}
if (hi->context && ctxt)
{
if (hi->context == ctxt)
it->usage += hi->usage * hi->count * 2;
}
if (ctxt && hi->context &&
(hi->context == ctxt))
it->usage += hi->usage * hi->count * 10;
}
else if (evry_conf->history_sort_mode == 1)
{

View File

@ -78,6 +78,22 @@ _begin_open_with(Evry_Plugin *plugin, const Evry_Item *item)
p->candidate = item;
p->apps_mime = efreet_util_desktop_mime_list(mime);
if (strcmp(mime, "text/plain") &&
!strncmp(mime, "text/", 5))
{
Eina_List *tmp;
tmp = efreet_util_desktop_mime_list("text/plain");
EINA_LIST_FREE(tmp, desktop)
{
if (!eina_list_data_find_list(p->apps_mime, desktop))
p->apps_mime = eina_list_append(p->apps_mime, desktop);
else
efreet_desktop_free(desktop);
}
}
desktop = e_exehist_mime_desktop_get(mime);
if (desktop)
p->apps_mime = eina_list_prepend(p->apps_mime, desktop);