struct _Plugin
{
Evry_Plugin base;
+
+ Eina_List *plugins;
};
static Eina_List *plugins = NULL;
-static const char _module_icon[] = "start";
+static const char _module_icon[] = "application-other";
static Evry_Type COLLECTION_PLUGIN;
-
+static Plugin_Config plugin_config;
static Evry_Plugin *
_browse(Evry_Plugin *plugin, const Evry_Item *item)
if (!CHECK_TYPE(item, COLLECTION_PLUGIN))
return NULL;
+ if (item->plugin != plugin)
+ return NULL;
+
pc = item->data;
pp = pc->plugin;
if (pp->begin && (inst = pp->begin(pp, NULL)))
{
- inst->config = pc;
+ if (!strcmp(plugin->name, "Plugins"))
+ inst->config = &plugin_config;
+ else
+ inst->config = pc;
+
return inst;
}
it->icon_get = itp->icon_get;
it->data = pc;
it->browseable = EINA_TRUE;
- p->base.items = eina_list_append(p->base.items, it);
+ p->plugins = eina_list_append(p->plugins, it);
}
return it;
}
EINA_LIST_FOREACH(plugin->config->plugins, l, pc)
_add_item(p, pc);
-
+
return EVRY_PLUGIN(p);
}
{
if (!strcmp(pc->name, "All") ||
!strcmp(pc->name, "Actions") ||
+ !strcmp(pc->name, "Text") ||
+ !strcmp(pc->name, "Calculator") ||
+ !strcmp(pc->name, "Spell Checker") ||
!strcmp(pc->name, "Plugins"))
continue;
-
+
_add_item(p, pc);
}
-
+
return EVRY_PLUGIN(p);
}
static void
_finish(Evry_Plugin *plugin)
{
- Evry_Plugin *inst;
+ Evry_Item *it;
GET_PLUGIN(p, plugin);
- EVRY_PLUGIN_ITEMS_FREE(p);
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+
+ EINA_LIST_FREE(p->plugins, it)
+ EVRY_ITEM_FREE(it);
E_FREE(p);
}
{
GET_PLUGIN(p, plugin);
- return !!(p->base.items);
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+
+ EVRY_PLUGIN_ITEMS_ADD(p, p->plugins, input, 1, 0);
+
+ return !!(plugin->items);
}
Eina_Bool
char path[4096];
char title[4096];
+ plugin_config.min_query = 0;
+ plugin_config.top_level = EINA_TRUE;
+ plugin_config.aggregate = EINA_FALSE;
+ plugin_config.view_mode = VIEW_MODE_NONE;
+
COLLECTION_PLUGIN = evry_type_register("COLLECTION_PLUGIN");
e_configure_registry_category_add
("extensions", 80, _("Extensions"), NULL, "preferences-extensions");
-
+
p = EVRY_PLUGIN_NEW(Evry_Plugin, N_("Plugins"),
_module_icon, COLLECTION_PLUGIN,
_begin_all, _finish, _fetch, NULL);
p->browse = &_browse;
- if (evry_plugin_register(p, EVRY_PLUGIN_SUBJECT, 1))
+ if (evry_plugin_register(p, EVRY_PLUGIN_SUBJECT, 100))
{
- p->config->enabled = EINA_FALSE;
- p->config->aggregate = EINA_FALSE;
+ p->config->aggregate = EINA_TRUE;
+ p->config->top_level = EINA_TRUE;
+ p->config->view_mode = VIEW_MODE_THUMB;
}
- plugins = eina_list_append(plugins, p);
+ plugins = eina_list_append(plugins, p);
+
-
EINA_LIST_FOREACH(evry_conf->collections, l, pc)
{
p = EVRY_PLUGIN_NEW(Evry_Plugin, N_(pc->name),
snprintf(path, sizeof(path), "extensions/everything-%s", p->name);
snprintf(title, sizeof(title), "Everything %s", p->name);
-
+
e_configure_registry_item_add
(path, 110, title, NULL, NULL/*icon*/, evry_collection_conf_dialog);
p->config_path = eina_stringshare_add(path);
-
+
plugins = eina_list_append(plugins, p);
}
-
+
return EINA_TRUE;
}
evry_plug_collection_shutdown(void)
{
Evry_Plugin *p;
-
+
EINA_LIST_FREE(plugins, p)
{
if (p->config_path)
e_configure_registry_item_del(p->config_path);
eina_stringshare_del(p->config_path);
}
-
+
EVRY_PLUGIN_FREE(p);
}
}