forked from enlightenment/enlightenment
e17/evry: fix apps icon, started moving evry config dialog to 'launcher' section
SVN revision: 58499
This commit is contained in:
parent
1311c0f8a5
commit
568780ca18
|
@ -58,7 +58,7 @@ static Evry_Module *evry_module = NULL;
|
|||
static Eina_List *handlers = NULL;
|
||||
|
||||
static Module_Config *_conf;
|
||||
|
||||
static char _module_icon[] = "system-run";
|
||||
static Eina_List *_plugins = NULL;
|
||||
static Eina_List *_actions = NULL;
|
||||
static Evry_Item *_act_open_with = NULL;
|
||||
|
@ -1029,7 +1029,7 @@ _plugins_init(const Evry_API *api)
|
|||
return EINA_FALSE;
|
||||
|
||||
p = EVRY_PLUGIN_NEW(Plugin, N_("Applications"),
|
||||
"system-run", EVRY_TYPE_APP,
|
||||
_module_icon, EVRY_TYPE_APP,
|
||||
_begin, _finish, _fetch, NULL);
|
||||
p->complete = &_complete;
|
||||
p->config_path = "extensions/everything-apps";
|
||||
|
@ -1038,7 +1038,7 @@ _plugins_init(const Evry_API *api)
|
|||
|
||||
|
||||
p = EVRY_PLUGIN_NEW(Plugin, N_("Exebuf"),
|
||||
"system-run", EVRY_TYPE_APP,
|
||||
_module_icon, EVRY_TYPE_APP,
|
||||
_begin_exe, _finish_exe, _fetch_exe, NULL);
|
||||
p->complete = &_complete;
|
||||
p->config_path = "extensions/everything-apps";
|
||||
|
@ -1047,7 +1047,7 @@ _plugins_init(const Evry_API *api)
|
|||
p->config->min_query = 5;
|
||||
|
||||
p = EVRY_PLUGIN_NEW(Plugin, N_("Applications"),
|
||||
"system-run", EVRY_TYPE_APP,
|
||||
_module_icon, EVRY_TYPE_APP,
|
||||
_begin_mime, _finish, _fetch, NULL);
|
||||
p->complete = &_complete;
|
||||
p->config_path = "extensions/everything-apps";
|
||||
|
@ -1055,7 +1055,7 @@ _plugins_init(const Evry_API *api)
|
|||
_plugins = eina_list_append(_plugins, p);
|
||||
|
||||
p = EVRY_PLUGIN_NEW(Plugin, N_("Open With..."),
|
||||
"system-run", EVRY_TYPE_APP,
|
||||
_module_icon, EVRY_TYPE_APP,
|
||||
_begin_mime, _finish_mime, _fetch_mime, NULL);
|
||||
p->config_path = "extensions/everything-apps";
|
||||
evry->plugin_register(p, EVRY_PLUGIN_ACTION, 1);
|
||||
|
@ -1179,9 +1179,8 @@ _conf_dialog(E_Container *con, const char *params __UNUSED__)
|
|||
{
|
||||
E_Config_Dialog *cfd = NULL;
|
||||
E_Config_Dialog_View *v = NULL;
|
||||
char buf[4096];
|
||||
|
||||
if (e_config_dialog_find("everything-apps", "extensions/everything-apps")) return NULL;
|
||||
if (e_config_dialog_find("everything-apps", "launcher/everything-apps")) return NULL;
|
||||
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
if (!v) return NULL;
|
||||
|
@ -1191,10 +1190,8 @@ _conf_dialog(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.create_widgets = _basic_create;
|
||||
v->basic.apply_cfdata = _basic_apply;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/e-module.edj", _conf->module->dir);
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Everything Applications"), "everything-apps",
|
||||
"extensions/everything-apps", buf, 0, v, NULL);
|
||||
"launcher/everything-apps", _module_icon, 0, v, NULL);
|
||||
|
||||
/* e_dialog_resizable_set(cfd->dia, 1); */
|
||||
_conf->cfd = cfd;
|
||||
|
@ -1309,19 +1306,12 @@ _conf_free(void)
|
|||
static void
|
||||
_conf_init(E_Module *m)
|
||||
{
|
||||
char buf[4096];
|
||||
char title[4096];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/e-module.edj", m->dir);
|
||||
|
||||
e_configure_registry_category_add
|
||||
("extensions", 80, _("Extensions"), NULL,
|
||||
"preferences-extensions");
|
||||
|
||||
snprintf(title, sizeof(title), "%s: %s", _("Everything Plugin"), _("Applications"));
|
||||
|
||||
e_configure_registry_item_add("extensions/everything-apps", 110, title,
|
||||
NULL, buf, _conf_dialog);
|
||||
e_configure_registry_item_add("launcher/everything-apps", 110, title,
|
||||
NULL, _module_icon, _conf_dialog);
|
||||
|
||||
conf_edd = E_CONFIG_DD_NEW("Module_Config", Module_Config);
|
||||
|
||||
|
@ -1350,6 +1340,8 @@ _conf_init(E_Module *m)
|
|||
static void
|
||||
_conf_shutdown(void)
|
||||
{
|
||||
e_configure_registry_item_del("launcher/everything-apps");
|
||||
|
||||
_conf_free();
|
||||
|
||||
E_CONFIG_DD_FREE(conf_edd);
|
||||
|
|
|
@ -1599,13 +1599,10 @@ static void
|
|||
_conf_init(E_Module *m)
|
||||
{
|
||||
char title[4096];
|
||||
|
||||
e_configure_registry_category_add("extensions", 80, _("Extensions"),
|
||||
NULL, "preferences-extensions");
|
||||
|
||||
snprintf(title, sizeof(title), "%s: %s", _("Everything Plugin"), _("Files"));
|
||||
|
||||
e_configure_registry_item_add("extensions/everything-files", 110, title,
|
||||
e_configure_registry_item_add("launcher/everything-files", 110, title,
|
||||
NULL, _module_icon, _conf_dialog);
|
||||
|
||||
conf_edd = E_CONFIG_DD_NEW("Module_Config", Module_Config);
|
||||
|
@ -1638,6 +1635,8 @@ _conf_init(E_Module *m)
|
|||
static void
|
||||
_conf_shutdown(void)
|
||||
{
|
||||
e_configure_registry_item_del("launcher/everything-files");
|
||||
|
||||
E_FREE(_conf);
|
||||
E_CONFIG_DD_FREE(conf_edd);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ static Eina_List *_evry_types = NULL;
|
|||
static E_Int_Menu_Augmentation *maug = NULL;
|
||||
static E_Action *act = NULL;
|
||||
static Ecore_Timer *cleanup_timer;
|
||||
|
||||
static const char *module_icon = NULL;
|
||||
static E_Config_DD *conf_edd = NULL;
|
||||
static E_Config_DD *plugin_conf_edd = NULL;
|
||||
|
||||
|
@ -39,6 +39,7 @@ e_modapi_init(E_Module *m)
|
|||
{
|
||||
Eina_List *l;
|
||||
Evry_Module *em;
|
||||
char buf[4096];
|
||||
|
||||
_e_module_evry_log_dom = eina_log_domain_register
|
||||
("e_module_everything", EINA_LOG_DEFAULT_COLOR);
|
||||
|
@ -66,11 +67,14 @@ e_modapi_init(E_Module *m)
|
|||
("main/1", _e_mod_menu_add, NULL, NULL, NULL);
|
||||
|
||||
e_configure_registry_category_add
|
||||
("extensions", 80, _("Extensions"), NULL, "preferences-extensions");
|
||||
("launcher", 80, _("Launcher"), NULL, "modules-launcher");
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/e-module-everything.edj", e_module_dir_get(m));
|
||||
module_icon = eina_stringshare_add(buf);
|
||||
|
||||
e_configure_registry_item_add
|
||||
("extensions/run_everything", 40, _("Everything Configuration"),
|
||||
NULL, "system-run", evry_config_dialog);
|
||||
("launcher/run_everything", 40, _("Everything Configuration"),
|
||||
NULL, module_icon, evry_config_dialog);
|
||||
evry_init();
|
||||
|
||||
_evry_type_init("NONE");
|
||||
|
@ -196,8 +200,8 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
EINA_LIST_FREE(_evry_types, t)
|
||||
eina_stringshare_del(t);
|
||||
|
||||
e_configure_registry_item_del("extensions/run_everything");
|
||||
e_configure_registry_category_del("extensions");
|
||||
e_configure_registry_item_del("launcher/run_everything");
|
||||
e_configure_registry_category_del("launcher");
|
||||
|
||||
while ((cfd = e_config_dialog_get("E", "_config_everything_dialog")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
|
@ -215,6 +219,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
maug = NULL;
|
||||
}
|
||||
|
||||
if (module_icon)
|
||||
eina_stringshare_del(module_icon);
|
||||
|
||||
/* Clean EET */
|
||||
E_CONFIG_DD_FREE(conf_edd);
|
||||
E_CONFIG_DD_FREE(plugin_conf_edd);
|
||||
|
|
|
@ -381,6 +381,13 @@ extern int _evry_events[NUM_EVRY_EVENTS];
|
|||
#define EVRY_PLUGIN_ITEMS_ADD(_plugin, _items, _input, _match_detail, _set_usage) \
|
||||
evry_util_plugin_items_add(EVRY_PLUGIN(_plugin), _items, _input, _match_detail, _set_usage)
|
||||
|
||||
/*** E Module ***/
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI E_Config_Dialog *evry_config_dialog(E_Container *con, const char *params);
|
||||
EAPI E_Config_Dialog *evry_collection_conf_dialog(E_Container *con, const char *params);
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
/*** Common Logging ***/
|
||||
extern int _e_module_evry_log_dom;
|
||||
|
@ -399,17 +406,10 @@ extern int _e_module_evry_log_dom;
|
|||
#define WRN(...) EINA_LOG_DOM_WARN(_e_module_evry_log_dom, __VA_ARGS__)
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_e_module_evry_log_dom, __VA_ARGS__)
|
||||
|
||||
/*** E Module ***/
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI E_Config_Dialog *evry_config_dialog(E_Container *con, const char *params);
|
||||
EAPI E_Config_Dialog *evry_collection_conf_dialog(E_Container *con, const char *params);
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
//#define CHECK_REFS 1
|
||||
//#define CHECK_TIME 1
|
||||
//#undef DBG
|
||||
//#define DBG(...) ERR(__VA_ARGS__)
|
||||
|
||||
#ifdef CHECK_REFS
|
||||
extern Eina_List *_refd;
|
||||
|
|
|
@ -144,7 +144,7 @@ _add_plugin(const char *name)
|
|||
_begin, _finish, _fetch, NULL);
|
||||
p->browse = &_browse;
|
||||
|
||||
snprintf(path, sizeof(path), "extensions/everything-%s", p->name);
|
||||
snprintf(path, sizeof(path), "launcher/everything-%s", p->name);
|
||||
|
||||
snprintf(title, sizeof(title), "%s: %s", _("Everything Plugin"), p->base.label);
|
||||
|
||||
|
@ -172,9 +172,6 @@ evry_plug_collection_init(void)
|
|||
|
||||
COLLECTION_PLUGIN = evry_type_register("COLLECTION_PLUGIN");
|
||||
|
||||
e_configure_registry_category_add
|
||||
("extensions", 80, _("Extensions"), NULL, "preferences-extensions");
|
||||
|
||||
p = _add_plugin("Plugins");
|
||||
p->begin = &_begin_all;
|
||||
if (evry_plugin_register(p, EVRY_PLUGIN_SUBJECT, 100))
|
||||
|
|
Loading…
Reference in New Issue