From: Enlightenment S. <no-...@en...> - 2009-08-16 00:42:32
|
Log: 'everything' module: cleanups Author: jeffdameth Date: 2009-08-15 17:13:56 -0700 (Sat, 15 Aug 2009) New Revision: 41796 Modified: trunk/e/src/modules/everything/evry.c trunk/e/src/modules/everything/evry_plug_apps.c trunk/e/src/modules/everything/evry_plug_calc.c trunk/e/src/modules/everything/evry_plug_clipboard.c trunk/e/src/modules/everything/evry_plug_config.c trunk/e/src/modules/everything/evry_plug_tracker.c Modified: trunk/e/src/modules/everything/evry.c =================================================================== --- trunk/e/src/modules/everything/evry.c 2009-08-15 23:53:23 UTC (rev 41795) +++ trunk/e/src/modules/everything/evry.c 2009-08-16 00:13:56 UTC (rev 41796) @@ -153,7 +153,6 @@ 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 @@ { if (isspace(*m) && !isspace(*(m+1))) { - word_min[words] = MAX_FUZZ; - words++; + word_min[words++] = MAX_FUZZ; } } @@ -541,6 +539,7 @@ /* first offset of match in word */ if (!first) { + offset *= 10; last = offset; first = 1; } @@ -808,7 +807,6 @@ static void _evry_selector_free(Evry_Selector *sel) { - Evry_State *s; Evry_Plugin *p; if (sel->o_icon) @@ -838,7 +836,6 @@ { if (selector) { - Evry_State *s = selector->state; Evry_Plugin *p; Eina_List *l; @@ -1360,7 +1357,6 @@ 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_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 @@ 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 @@ 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 @@ 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 @@ 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; Modified: trunk/e/src/modules/everything/evry_plug_apps.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_apps.c 2009-08-15 23:53:23 UTC (rev 41795) +++ trunk/e/src/modules/everything/evry_plug_apps.c 2009-08-16 00:13:56 UTC (rev 41796) @@ -28,7 +28,6 @@ if (it) { - Eina_List *l; Efreet_Desktop *desktop; if (!it->uri) return 0; @@ -182,7 +181,7 @@ { Efreet_Desktop *desktop; Eina_List *l; - int m1, m2, min; + int m1, m2; EINA_LIST_FOREACH(apps, l, desktop) { @@ -319,7 +318,7 @@ { 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 @@ { E_Zone *zone; Evry_App *app = NULL; - Efreet_Desktop *desktop = NULL; Eina_List *files = NULL; char *exe = NULL; @@ -499,6 +497,8 @@ Inst *inst = p->private; if (inst->candidate) return _app_action(it, inst->candidate); + + return 0; } static int Modified: trunk/e/src/modules/everything/evry_plug_calc.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_calc.c 2009-08-15 23:53:23 UTC (rev 41795) +++ trunk/e/src/modules/everything/evry_plug_calc.c 2009-08-16 00:13:56 UTC (rev 41796) @@ -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 @@ _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 @@ static void _shutdown(void) { - Evry_Item *it; char *result; EINA_LIST_FREE(history, result) Modified: trunk/e/src/modules/everything/evry_plug_clipboard.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_clipboard.c 2009-08-15 23:53:23 UTC (rev 41795) +++ trunk/e/src/modules/everything/evry_plug_clipboard.c 2009-08-16 00:13:56 UTC (rev 41796) @@ -9,6 +9,8 @@ { 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 Modified: trunk/e/src/modules/everything/evry_plug_config.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_config.c 2009-08-15 23:53:23 UTC (rev 41795) +++ trunk/e/src/modules/everything/evry_plug_config.c 2009-08-16 00:13:56 UTC (rev 41796) @@ -57,9 +57,9 @@ { 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); } } Modified: trunk/e/src/modules/everything/evry_plug_tracker.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_tracker.c 2009-08-15 23:53:23 UTC (rev 41795) +++ trunk/e/src/modules/everything/evry_plug_tracker.c 2009-08-16 00:13:56 UTC (rev 41796) @@ -29,7 +29,6 @@ if (!strcmp(it->plugin->type_out, "APPLICATION")) { - Efreet_Desktop *desktop; Eina_List *l; const char *mime; Evry_App *app = it->data[0]; |