forked from enlightenment/enlightenment
'everything' module:
- core: cleanup async_update function - tracker: cleanups SVN revision: 41715
This commit is contained in:
parent
435f9b1272
commit
9f2d45a90e
|
@ -599,20 +599,21 @@ _evry_selector_free(Evry_Selector *sel)
|
||||||
static void
|
static void
|
||||||
_evry_selector_activate(Evry_Selector *sel)
|
_evry_selector_activate(Evry_Selector *sel)
|
||||||
{
|
{
|
||||||
if (selector)
|
if (selector && selector->state)
|
||||||
{
|
{
|
||||||
edje_object_signal_emit(selector->o_main, "e,state,unselected", "e");
|
Evry_State *s = selector->state;
|
||||||
|
Evry_Plugin *p;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
_evry_list_clear_list(s);
|
||||||
|
|
||||||
|
edje_object_signal_emit(selector->o_main, "e,state,unselected", "e");
|
||||||
edje_object_part_text_set(selector->o_main, "e.text.plugin", "");
|
edje_object_part_text_set(selector->o_main, "e.text.plugin", "");
|
||||||
|
|
||||||
if (update_timer)
|
if (update_timer)
|
||||||
{
|
{
|
||||||
Evry_State *s = selector->state;
|
if (s->plugin && !s->plugin->async_query)
|
||||||
|
|
||||||
/* XXX what if an async plugin is selected */
|
|
||||||
if (s && s->plugin && !s->plugin->async_query)
|
|
||||||
{
|
{
|
||||||
_evry_list_clear_list(s);
|
|
||||||
_evry_matches_update(selector);
|
_evry_matches_update(selector);
|
||||||
_evry_selector_update(selector);
|
_evry_selector_update(selector);
|
||||||
}
|
}
|
||||||
|
@ -620,6 +621,13 @@ _evry_selector_activate(Evry_Selector *sel)
|
||||||
update_timer = NULL;
|
update_timer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(selector->plugins, l, p)
|
||||||
|
{
|
||||||
|
e_box_unpack(p->tab);
|
||||||
|
evas_object_del(p->tab);
|
||||||
|
p->tab = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
_evry_list_win_hide();
|
_evry_list_win_hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -704,7 +712,7 @@ _evry_selector_update(Evry_Selector *sel)
|
||||||
|
|
||||||
it = s->sel_item;
|
it = s->sel_item;
|
||||||
|
|
||||||
if (!it && s->plugin)
|
if (s->plugin && (!it || s->item_auto_selected))
|
||||||
{
|
{
|
||||||
/* get first item */
|
/* get first item */
|
||||||
if (s->plugin->items)
|
if (s->plugin->items)
|
||||||
|
@ -943,6 +951,7 @@ _evry_browse_back(Evry_Selector *sel)
|
||||||
_evry_list_clear_list(s);
|
_evry_list_clear_list(s);
|
||||||
_evry_state_pop(sel);
|
_evry_state_pop(sel);
|
||||||
_evry_selector_update(sel);
|
_evry_selector_update(sel);
|
||||||
|
sel->aggregator->fetch(sel->aggregator, NULL);
|
||||||
_evry_list_update(sel->state);
|
_evry_list_update(sel->state);
|
||||||
_evry_update_text_label(sel->state);
|
_evry_update_text_label(sel->state);
|
||||||
}
|
}
|
||||||
|
@ -969,7 +978,7 @@ _evry_selectors_switch(void)
|
||||||
|
|
||||||
if (update_timer)
|
if (update_timer)
|
||||||
{
|
{
|
||||||
/* XXX redundant > selector_activate,
|
/* duplicate code: selector_activate,
|
||||||
plugin_action, update_timer !!! */
|
plugin_action, update_timer !!! */
|
||||||
if (!s->plugin->async_query)
|
if (!s->plugin->async_query)
|
||||||
{
|
{
|
||||||
|
@ -1003,8 +1012,6 @@ _evry_selectors_switch(void)
|
||||||
edje_object_signal_emit(win->o_main,
|
edje_object_signal_emit(win->o_main,
|
||||||
"e,state,object_selector_hide", "e");
|
"e,state,object_selector_hide", "e");
|
||||||
|
|
||||||
_evry_list_clear_list(s);
|
|
||||||
|
|
||||||
while (selector->states)
|
while (selector->states)
|
||||||
_evry_state_pop(selector);
|
_evry_state_pop(selector);
|
||||||
|
|
||||||
|
@ -1510,6 +1517,8 @@ _evry_list_item_desel(Evry_State *s, Evry_Item *it)
|
||||||
static void
|
static void
|
||||||
_evry_list_item_sel(Evry_State *s, Evry_Item *it)
|
_evry_list_item_sel(Evry_State *s, Evry_Item *it)
|
||||||
{
|
{
|
||||||
|
if (s->sel_item == it) return;
|
||||||
|
|
||||||
if (list->visible && selector->state == s)
|
if (list->visible && selector->state == s)
|
||||||
{
|
{
|
||||||
if (s->sel_item)
|
if (s->sel_item)
|
||||||
|
@ -1754,6 +1763,7 @@ _evry_list_animator(void *data __UNUSED__)
|
||||||
static void
|
static void
|
||||||
_evry_list_tabs_update(Evry_State *s)
|
_evry_list_tabs_update(Evry_State *s)
|
||||||
{
|
{
|
||||||
|
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evry_Plugin *p;
|
Evry_Plugin *p;
|
||||||
|
|
||||||
|
@ -1844,7 +1854,7 @@ _evry_plug_actions_init(void)
|
||||||
pc = E_NEW(Plugin_Config, 1);
|
pc = E_NEW(Plugin_Config, 1);
|
||||||
pc->name = eina_stringshare_add(p->name);
|
pc->name = eina_stringshare_add(p->name);
|
||||||
pc->enabled = 1;
|
pc->enabled = 1;
|
||||||
pc->priority = 100;
|
pc->priority = 1;
|
||||||
p->config = pc;
|
p->config = pc;
|
||||||
|
|
||||||
action_selector = p;
|
action_selector = p;
|
||||||
|
@ -1921,7 +1931,6 @@ _evry_plug_actions_fetch(Evry_Plugin *p, const char *input)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (input) TODO sort */
|
|
||||||
if (p->items) return 1;
|
if (p->items) return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1976,7 +1985,7 @@ _evry_plug_aggregator_new(void)
|
||||||
pc = E_NEW(Plugin_Config, 1);
|
pc = E_NEW(Plugin_Config, 1);
|
||||||
pc->name = eina_stringshare_add(p->name);
|
pc->name = eina_stringshare_add(p->name);
|
||||||
pc->enabled = 1;
|
pc->enabled = 1;
|
||||||
pc->priority = 100;
|
pc->priority = -1;
|
||||||
p->config = pc;
|
p->config = pc;
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
|
@ -2004,7 +2013,6 @@ _evry_plug_aggregator_fetch(Evry_Plugin *p, const char *input __UNUSED__)
|
||||||
eina_list_free(p->items);
|
eina_list_free(p->items);
|
||||||
p->items = NULL;
|
p->items = NULL;
|
||||||
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(s->cur_plugins, l, plugin)
|
EINA_LIST_FOREACH(s->cur_plugins, l, plugin)
|
||||||
{
|
{
|
||||||
for (cnt = 0, ll = plugin->items; ll && cnt < 15; ll = ll->next, cnt++)
|
for (cnt = 0, ll = plugin->items; ll && cnt < 15; ll = ll->next, cnt++)
|
||||||
|
@ -2042,19 +2050,44 @@ _evry_plug_aggregator_item_icon_get(Evry_Plugin *p, const Evry_Item *it, Evas *e
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_evry_plugin_list_insert(Evry_State *s, Evry_Plugin *p)
|
||||||
|
{
|
||||||
|
Eina_List *l;
|
||||||
|
Evry_Plugin *plugin;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(s->cur_plugins, l, plugin)
|
||||||
|
if (p == plugin)
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
if (p->config->priority < plugin->config->priority)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (l)
|
||||||
|
s->cur_plugins = eina_list_prepend_relative_list(s->cur_plugins, p, l);
|
||||||
|
else
|
||||||
|
s->cur_plugins = eina_list_append(s->cur_plugins, p);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evry_plugin_async_update(Evry_Plugin *p, int action)
|
evry_plugin_async_update(Evry_Plugin *p, int action)
|
||||||
{
|
{
|
||||||
Evry_State *s;
|
Evry_State *s;
|
||||||
|
Evry_Plugin *agg;
|
||||||
|
|
||||||
if (!win) return;
|
if (!win) return;
|
||||||
|
|
||||||
s = selector->state;
|
s = selector->state;
|
||||||
|
|
||||||
|
/* received data from a plugin of the current selector ? */
|
||||||
if (!s || !eina_list_data_find(s->plugins, p)) return;
|
if (!s || !eina_list_data_find(s->plugins, p)) return;
|
||||||
|
|
||||||
|
agg = selector->aggregator;
|
||||||
|
|
||||||
if (action == EVRY_ASYNC_UPDATE_ADD)
|
if (action == EVRY_ASYNC_UPDATE_ADD)
|
||||||
{
|
{
|
||||||
|
/* remove plugin and update selector. */
|
||||||
if (!p->items)
|
if (!p->items)
|
||||||
{
|
{
|
||||||
if (!eina_list_data_find(s->cur_plugins, p)) return;
|
if (!eina_list_data_find(s->cur_plugins, p)) return;
|
||||||
|
@ -2064,82 +2097,71 @@ evry_plugin_async_update(Evry_Plugin *p, int action)
|
||||||
if (p == s->plugin)
|
if (p == s->plugin)
|
||||||
{
|
{
|
||||||
s->plugin = NULL;
|
s->plugin = NULL;
|
||||||
/* _evry_list_clear_list(s); */
|
|
||||||
_evry_selector_update(selector);
|
_evry_selector_update(selector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* add plugin to current plugins*/
|
||||||
|
_evry_plugin_list_insert(s, p);
|
||||||
|
|
||||||
|
/* update aggregator */
|
||||||
|
if (eina_list_count(s->cur_plugins) > 1)
|
||||||
|
{
|
||||||
|
if (s->plugin == agg)
|
||||||
|
_evry_list_clear_list(s);
|
||||||
|
|
||||||
|
agg->fetch(agg, NULL);
|
||||||
|
|
||||||
|
/* add aggregator */
|
||||||
|
if (!(s->cur_plugins->data == agg))
|
||||||
|
{
|
||||||
|
s->cur_plugins = eina_list_prepend(s->cur_plugins, agg);
|
||||||
|
_evry_list_clear_list(s);
|
||||||
|
s->plugin = agg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* plugin is active */
|
||||||
|
if ((s->plugin == p) || (s->plugin == agg))
|
||||||
|
{
|
||||||
|
p = s->plugin;
|
||||||
|
_evry_selector_update(selector);
|
||||||
|
|
||||||
if (list->visible)
|
if (list->visible)
|
||||||
_evry_list_tabs_update(s);
|
{
|
||||||
}
|
Eina_List *l;
|
||||||
return;
|
Evry_Item *it;
|
||||||
}
|
evas_event_freeze(list->popup->evas);
|
||||||
|
e_box_freeze(list->o_list);
|
||||||
|
EINA_LIST_FOREACH(p->items, l, it)
|
||||||
|
if (it->o_bg) e_box_unpack(it->o_bg);
|
||||||
|
e_box_thaw(list->o_list);
|
||||||
|
evas_event_thaw(list->popup->evas);
|
||||||
|
|
||||||
if (!eina_list_data_find(s->cur_plugins, p))
|
_evry_list_show_items(s, p);
|
||||||
{
|
_evry_list_scroll_to(s, s->sel_item);
|
||||||
s->cur_plugins = eina_list_append(s->cur_plugins, p);
|
}
|
||||||
if (!s->plugin) _evry_select_plugin(s, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (eina_list_count(s->cur_plugins) > 1)
|
|
||||||
{
|
|
||||||
if (s->plugin == selector->aggregator)
|
|
||||||
_evry_list_clear_list(s);
|
|
||||||
|
|
||||||
selector->aggregator->fetch(selector->aggregator, NULL);
|
|
||||||
|
|
||||||
if (!eina_list_data_find(s->cur_plugins, selector->aggregator))
|
|
||||||
{
|
|
||||||
s->cur_plugins = eina_list_prepend(s->cur_plugins,
|
|
||||||
selector->aggregator);
|
|
||||||
_evry_list_clear_list(s);
|
|
||||||
|
|
||||||
s->plugin = selector->aggregator;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->visible)
|
/* plugin box was updated: realign */
|
||||||
_evry_list_tabs_update(s);
|
if (s->plugin)
|
||||||
|
|
||||||
if ((s->plugin == p) || (s->plugin == selector->aggregator))
|
|
||||||
{
|
|
||||||
p = s->plugin;
|
|
||||||
|
|
||||||
if ((s->item_auto_selected) && (s->plugin->items->data != s->sel_item))
|
|
||||||
{
|
|
||||||
s->sel_item = NULL;
|
|
||||||
_evry_selector_update(selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (list->visible)
|
|
||||||
{
|
|
||||||
Eina_List *l;
|
|
||||||
Evry_Item *it;
|
|
||||||
evas_event_freeze(list->popup->evas);
|
|
||||||
e_box_freeze(list->o_list);
|
|
||||||
EINA_LIST_FOREACH(p->items, l, it)
|
|
||||||
if (it->o_bg) e_box_unpack(it->o_bg);
|
|
||||||
|
|
||||||
e_box_thaw(list->o_list);
|
|
||||||
evas_event_thaw(list->popup->evas);
|
|
||||||
}
|
|
||||||
|
|
||||||
_evry_list_show_items(s, p);
|
|
||||||
|
|
||||||
if (list->visible && s->sel_item)
|
|
||||||
{
|
|
||||||
/* TODO check this again!*/
|
|
||||||
_evry_list_item_sel(s, s->sel_item);
|
|
||||||
_evry_list_scroll_to(s, s->sel_item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (s->plugin)
|
|
||||||
{
|
{
|
||||||
|
_evry_list_tabs_update(s);
|
||||||
_evry_list_tab_scroll_to(s, s->plugin);
|
_evry_list_tab_scroll_to(s, s->plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
_evry_selector_update(selector);
|
|
||||||
}
|
}
|
||||||
else if ((action == EVRY_ASYNC_UPDATE_CLEAR) && (s->plugin == p))
|
else if (action == EVRY_ASYNC_UPDATE_CLEAR)
|
||||||
{
|
{
|
||||||
|
Evry_Plugin *tmp = s->plugin;
|
||||||
|
|
||||||
|
s->plugin = p;
|
||||||
_evry_list_clear_list(s);
|
_evry_list_clear_list(s);
|
||||||
|
s->plugin = tmp;
|
||||||
|
|
||||||
|
s->cur_plugins = eina_list_remove(s->cur_plugins, p);
|
||||||
|
agg->fetch(agg, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,12 +85,8 @@ _fetch(Evry_Plugin *p, const char *input)
|
||||||
{
|
{
|
||||||
if (e_util_glob_case_match(bd->desktop->exec, match1))
|
if (e_util_glob_case_match(bd->desktop->exec, match1))
|
||||||
_item_add(p, bd, 1);
|
_item_add(p, bd, 1);
|
||||||
else if (e_util_glob_case_match(bd->desktop->exec, match2))
|
|
||||||
_item_add(p, bd, 2);
|
|
||||||
else if (e_util_glob_case_match(bd->desktop->name, match1))
|
else if (e_util_glob_case_match(bd->desktop->name, match1))
|
||||||
_item_add(p, bd, 1);
|
_item_add(p, bd, 1);
|
||||||
else if (e_util_glob_case_match(bd->desktop->name, match2))
|
|
||||||
_item_add(p, bd, 2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,16 +10,10 @@ struct _Inst
|
||||||
int active;
|
int active;
|
||||||
char *condition;
|
char *condition;
|
||||||
char *service;
|
char *service;
|
||||||
/* Eina_List *items; */
|
|
||||||
int max_hits;
|
int max_hits;
|
||||||
};
|
};
|
||||||
|
|
||||||
static E_DBus_Connection *conn = NULL;
|
static E_DBus_Connection *conn = NULL;
|
||||||
|
|
||||||
/* static Evry_Plugin *p1 = NULL;
|
|
||||||
* static Evry_Plugin *p2 = NULL;
|
|
||||||
* static Evry_Plugin *p3 = NULL;
|
|
||||||
* static Evry_Plugin *p4 = NULL; */
|
|
||||||
static Eina_List *plugins = NULL;
|
static Eina_List *plugins = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,10 +130,6 @@ _dbus_cb_reply(void *data, DBusMessage *msg, DBusError *error)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_CLEAR);
|
|
||||||
* _cleanup(p);
|
|
||||||
* */
|
|
||||||
|
|
||||||
dbus_message_iter_init(msg, &array);
|
dbus_message_iter_init(msg, &array);
|
||||||
if(dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_ARRAY)
|
if(dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_ARRAY)
|
||||||
{
|
{
|
||||||
|
@ -155,9 +145,10 @@ _dbus_cb_reply(void *data, DBusMessage *msg, DBusError *error)
|
||||||
/* dbus_message_iter_get_basic(&iter, &service); */
|
/* dbus_message_iter_get_basic(&iter, &service); */
|
||||||
dbus_message_iter_next(&iter);
|
dbus_message_iter_next(&iter);
|
||||||
dbus_message_iter_get_basic(&iter, &mime);
|
dbus_message_iter_get_basic(&iter, &mime);
|
||||||
|
|
||||||
/* dbus_message_iter_next(&iter);
|
/* dbus_message_iter_next(&iter);
|
||||||
* dbus_message_iter_get_basic(&iter, &date); */
|
* dbus_message_iter_get_basic(&iter, &date);
|
||||||
/* printf("date: %s\n",date); */
|
* printf("%s : %s\n", date, uri); */
|
||||||
|
|
||||||
if (uri && mime) _item_add(p, uri, mime, 1);
|
if (uri && mime) _item_add(p, uri, mime, 1);
|
||||||
}
|
}
|
||||||
|
@ -173,20 +164,22 @@ _fetch(Evry_Plugin *p, const char *input)
|
||||||
{
|
{
|
||||||
Inst *inst = p->private;
|
Inst *inst = p->private;
|
||||||
DBusMessage *msg;
|
DBusMessage *msg;
|
||||||
DBusMessageIter iter;
|
|
||||||
int live_query_id = 0;
|
int live_query_id = 0;
|
||||||
|
int max_hits = inst->max_hits;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
int sort_descending = 1;
|
int sort_descending = 1;
|
||||||
int sort_by_service = 0;
|
int sort_by_service = 0;
|
||||||
|
int sort_by_access = 0;
|
||||||
char *search_text;
|
char *search_text;
|
||||||
char *fields[2];
|
char *fields[2];
|
||||||
char *keywords[1];
|
char *keywords[1];
|
||||||
char *sort_fields[1];
|
char *sort_fields[1];
|
||||||
fields[0] = "File:Mime";
|
fields[0] = "File:Mime";
|
||||||
|
/* fields[1] = "File:Modified"; */
|
||||||
fields[1] = "File:Accessed";
|
fields[1] = "File:Accessed";
|
||||||
keywords[0] = "";
|
keywords[0] = "";
|
||||||
sort_fields[0] = "";
|
/* sort_fields[0] = "File:Modified"; */
|
||||||
|
sort_fields[0] = "File:Accessed";
|
||||||
char **_fields = fields;
|
char **_fields = fields;
|
||||||
char **_keywords = keywords;
|
char **_keywords = keywords;
|
||||||
char **_sort_fields = sort_fields;
|
char **_sort_fields = sort_fields;
|
||||||
|
@ -194,15 +187,17 @@ _fetch(Evry_Plugin *p, const char *input)
|
||||||
_cleanup(p);
|
_cleanup(p);
|
||||||
|
|
||||||
if (!conn) return 0;
|
if (!conn) return 0;
|
||||||
/* if (!input || (strlen(input) < 3)) return 0; */
|
|
||||||
|
|
||||||
if (input && (strlen(input) > 2))
|
if (input && (strlen(input) > 2))
|
||||||
{
|
{
|
||||||
search_text = malloc(sizeof(char) * strlen(input) + 3);
|
search_text = malloc(sizeof(char) * strlen(input) + 3);
|
||||||
sprintf(search_text, "*%s*", input);
|
sprintf(search_text, "*%s*", input);
|
||||||
|
max_hits = 50;
|
||||||
}
|
}
|
||||||
else if (!p->begin)
|
else if (!p->begin && p->type == type_object)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
sort_by_access = 1;
|
||||||
search_text = "";
|
search_text = "";
|
||||||
}
|
}
|
||||||
else return 0;
|
else return 0;
|
||||||
|
@ -216,15 +211,15 @@ _fetch(Evry_Plugin *p, const char *input)
|
||||||
dbus_message_append_args(msg,
|
dbus_message_append_args(msg,
|
||||||
DBUS_TYPE_INT32, &live_query_id,
|
DBUS_TYPE_INT32, &live_query_id,
|
||||||
DBUS_TYPE_STRING, &inst->service,
|
DBUS_TYPE_STRING, &inst->service,
|
||||||
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &_fields, 1,
|
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &_fields, 1 + sort_by_access,
|
||||||
DBUS_TYPE_STRING, &search_text,
|
DBUS_TYPE_STRING, &search_text,
|
||||||
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &_keywords, 0,
|
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &_keywords, 0,
|
||||||
DBUS_TYPE_STRING, &inst->condition,
|
DBUS_TYPE_STRING, &inst->condition,
|
||||||
DBUS_TYPE_BOOLEAN, &sort_by_service,
|
DBUS_TYPE_BOOLEAN, &sort_by_service,
|
||||||
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &_sort_fields, 0,
|
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &_sort_fields, sort_by_access,
|
||||||
DBUS_TYPE_BOOLEAN, &sort_descending,
|
DBUS_TYPE_BOOLEAN, &sort_descending,
|
||||||
DBUS_TYPE_INT32, &offset,
|
DBUS_TYPE_INT32, &offset,
|
||||||
DBUS_TYPE_INT32, &inst->max_hits,
|
DBUS_TYPE_INT32, &max_hits,
|
||||||
DBUS_TYPE_INVALID);
|
DBUS_TYPE_INVALID);
|
||||||
|
|
||||||
e_dbus_message_send(conn, msg, _dbus_cb_reply, -1, p);
|
e_dbus_message_send(conn, msg, _dbus_cb_reply, -1, p);
|
||||||
|
@ -304,61 +299,11 @@ _init(void)
|
||||||
_plugin_new("Music", type_subject, "Music", 20, 0);
|
_plugin_new("Music", type_subject, "Music", 20, 0);
|
||||||
_plugin_new("Videos", type_subject, "Videos", 20, 0);
|
_plugin_new("Videos", type_subject, "Videos", 20, 0);
|
||||||
_plugin_new("Documents", type_subject, "Documents", 20, 0);
|
_plugin_new("Documents", type_subject, "Documents", 20, 0);
|
||||||
_plugin_new("Text", type_subject, "Text Files", 20, 0);
|
_plugin_new("Text", type_subject, "TextFiles", 20, 0);
|
||||||
|
|
||||||
_plugin_new("Find Files", type_object, "Files", 20, 1);
|
_plugin_new("Find Files", type_object, "Files", 20, 1);
|
||||||
_plugin_new("Folders", type_object, "Folders", 20, 0);
|
_plugin_new("Folders", type_object, "Folders", 20, 0);
|
||||||
|
|
||||||
|
|
||||||
/* p = E_NEW(Evry_Plugin, 1);
|
|
||||||
* p->name = "Images";
|
|
||||||
* p->type = type_subject;
|
|
||||||
* p->type_in = "NONE";
|
|
||||||
* p->type_out = "FILE";
|
|
||||||
* p->async_query = 1;
|
|
||||||
* p->fetch = &_fetch;
|
|
||||||
* p->cleanup = &_cleanup;
|
|
||||||
* p->icon_get = &_item_icon_get;
|
|
||||||
* inst = E_NEW(Inst, 1);
|
|
||||||
* inst->condition = "";
|
|
||||||
* inst->service = "Images";
|
|
||||||
* inst->results = 10;
|
|
||||||
* p->private = inst;
|
|
||||||
* evry_plugin_register(p);
|
|
||||||
* plugins = eina_list_append(plugins, p);
|
|
||||||
*
|
|
||||||
* p = E_NEW(Evry_Plugin, 1);
|
|
||||||
* p->name = "Find Files";
|
|
||||||
* p->type = type_object;
|
|
||||||
* p->type_in = "NONE";
|
|
||||||
* p->type_out = "FILE";
|
|
||||||
* p->async_query = 1;
|
|
||||||
* p->begin = &_begin;
|
|
||||||
* p->fetch = &_fetch;
|
|
||||||
* p->cleanup = &_cleanup;
|
|
||||||
* p->icon_get = &_item_icon_get;
|
|
||||||
* inst = E_NEW(Inst, 1);
|
|
||||||
* inst->condition = "";
|
|
||||||
* inst->service = "Files";
|
|
||||||
* p->private = inst;
|
|
||||||
* evry_plugin_register(p);
|
|
||||||
* plugins = eina_list_append(plugins, p);
|
|
||||||
*
|
|
||||||
* p4 = E_NEW(Evry_Plugin, 1);
|
|
||||||
* p4->name = "Folders";
|
|
||||||
* p4->type = type_object;
|
|
||||||
* p4->type_in = "NONE";
|
|
||||||
* p4->type_out = "FILE";
|
|
||||||
* p4->async_query = 1;
|
|
||||||
* p4->fetch = &_fetch;
|
|
||||||
* p4->cleanup = &_cleanup;
|
|
||||||
* p4->icon_get = &_item_icon_get;
|
|
||||||
* inst = E_NEW(Inst, 1);
|
|
||||||
* inst->condition = "";
|
|
||||||
* inst->service = "Folders";
|
|
||||||
* p4->private = inst;
|
|
||||||
* evry_plugin_register(p4); */
|
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue