'everything' module: cleanups

SVN revision: 41796
This commit is contained in:
Hannes Janetzek 2009-08-16 00:13:56 +00:00
parent 0b27802f2f
commit 398e020750
6 changed files with 13 additions and 25 deletions

View File

@ -153,7 +153,6 @@ static Evas_Object *_evry_plug_actions_item_icon_get(Evry_Plugin *p, const Evry_
static Evry_Plugin *_evry_plug_aggregator_new(void);
static void _evry_plug_aggregator_free(Evry_Plugin *p);
static int _evry_plug_aggregator_begin(Evry_Plugin *p, const Evry_Item *it);
static int _evry_plug_aggregator_fetch(Evry_Plugin *p, const char *input);
static int _evry_plug_aggregator_action(Evry_Plugin *p, const Evry_Item *item, const char *input);
static void _evry_plug_aggregator_cleanup(Evry_Plugin *p);
@ -483,8 +482,7 @@ evry_fuzzy_match(const char *str, const char *match)
{
if (isspace(*m) && !isspace(*(m+1)))
{
word_min[words] = MAX_FUZZ;
words++;
word_min[words++] = MAX_FUZZ;
}
}
@ -541,6 +539,7 @@ evry_fuzzy_match(const char *str, const char *match)
/* first offset of match in word */
if (!first)
{
offset *= 10;
last = offset;
first = 1;
}
@ -808,7 +807,6 @@ _evry_selector_new(int type)
static void
_evry_selector_free(Evry_Selector *sel)
{
Evry_State *s;
Evry_Plugin *p;
if (sel->o_icon)
@ -838,7 +836,6 @@ _evry_selector_activate(Evry_Selector *sel)
{
if (selector)
{
Evry_State *s = selector->state;
Evry_Plugin *p;
Eina_List *l;
@ -1360,7 +1357,6 @@ _evry_update(Evry_State *s, int fetch)
static int
_evry_update_timer(void *data)
{
Evry_State *s = data;
/* XXX pass selector as data? */
_evry_matches_update(selector);
_evry_selector_update(selector);
@ -1611,7 +1607,7 @@ _evry_matches_update(Evry_Selector *sel)
Evry_State *s = sel->state;
Evry_Plugin *p;
Eina_List *l;
Eina_Bool has_items;
Eina_Bool has_items = EINA_FALSE;
EINA_LIST_FREE(s->cur_plugins, p);
@ -1672,7 +1668,7 @@ _evry_matches_update(Evry_Selector *sel)
static void
_evry_list_scroll_to(Evry_State *s, Evry_Item *it)
{
int n, h, mh, i = 0, max_w, max_h;
int n, h, mh, i = 0;
Eina_List *l;
if (!it) return;
@ -1870,9 +1866,6 @@ _evry_list_item_prev(Evry_State *s)
static void
_evry_list_item_first(Evry_State *s)
{
Eina_List *l;
Evry_Item *it;
if (!s->plugin || !s->plugin->items) return;
s->plugin_auto_selected = EINA_FALSE;
@ -1885,9 +1878,6 @@ _evry_list_item_first(Evry_State *s)
static void
_evry_list_item_last(Evry_State *s)
{
Eina_List *l;
Evry_Item *it;
if (!s->plugin || !s->plugin->items) return;
s->plugin_auto_selected = EINA_FALSE;
@ -2266,7 +2256,7 @@ _evry_plug_actions_cleanup(Evry_Plugin *p)
static Evas_Object *
_evry_plug_actions_item_icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e)
{
Evas_Object *o;
Evas_Object *o = NULL;
Evry_Action *act = it->data[0];
if (!act) return NULL;

View File

@ -28,7 +28,6 @@ _begin(Evry_Plugin *p, const Evry_Item *it)
if (it)
{
Eina_List *l;
Efreet_Desktop *desktop;
if (!it->uri) return 0;
@ -182,7 +181,7 @@ _add_desktop_list(Evry_Plugin *p, Eina_List *apps, const char *input)
{
Efreet_Desktop *desktop;
Eina_List *l;
int m1, m2, min;
int m1, m2;
EINA_LIST_FOREACH(apps, l, desktop)
{
@ -319,7 +318,7 @@ _fetch(Evry_Plugin *p, const char *input)
{
snprintf(cmd, sizeof(cmd), "%s", input);
if (end = strchr(input, ' '))
if ((end = strchr(input, ' ')))
{
int len = (end - input) + 1;
if (len >= 0)
@ -430,7 +429,6 @@ _app_action(const Evry_Item *it_app, const Evry_Item *it_file)
{
E_Zone *zone;
Evry_App *app = NULL;
Efreet_Desktop *desktop = NULL;
Eina_List *files = NULL;
char *exe = NULL;
@ -499,6 +497,8 @@ _open_with_action(Evry_Plugin *p, const Evry_Item *it, const char *input __UNUSE
Inst *inst = p->private;
if (inst->candidate)
return _app_action(it, inst->candidate);
return 0;
}
static int

View File

@ -1,7 +1,6 @@
#include "Evry.h"
static void _item_add(Evry_Plugin *p, char *output, int prio);
static int _cb_data(void *data, int type, void *event);
static int _cb_error(void *data, int type, void *event);
static int _cb_del(void *data, int type, void *event);
@ -141,7 +140,6 @@ static int
_cb_data(void *data, int type __UNUSED__, void *event)
{
Ecore_Exe_Event_Data *ev = event;
Ecore_Exe_Event_Data_Line *l;
Evry_Plugin *p = data;
Evry_Item *it;
@ -211,7 +209,6 @@ _init(void)
static void
_shutdown(void)
{
Evry_Item *it;
char *result;
EINA_LIST_FREE(history, result)

View File

@ -9,6 +9,8 @@ _action(Evry_Action *act __UNUSED__, const Evry_Item *it, const Evry_Item *it2 _
{
ecore_x_selection_primary_set(clipboard_win, it->label, strlen(it->label));
ecore_x_selection_clipboard_set(clipboard_win, it->label, strlen(it->label));
return 1;
}
static int

View File

@ -57,9 +57,9 @@ _fetch(Evry_Plugin *p, const char *input)
{
if (eci->pri >= 0)
{
if (match = evry_fuzzy_match(eci->label, input))
if ((match = evry_fuzzy_match(eci->label, input)))
_item_add(p, eci, match, 0);
else if (match = evry_fuzzy_match(ecat->label, input))
else if ((match = evry_fuzzy_match(ecat->label, input)))
_item_add(p, eci, match, 1);
}
}

View File

@ -29,7 +29,6 @@ _begin(Evry_Plugin *p, const Evry_Item *it)
if (!strcmp(it->plugin->type_out, "APPLICATION"))
{
Efreet_Desktop *desktop;
Eina_List *l;
const char *mime;
Evry_App *app = it->data[0];