From 48e56c778776722788b6a61ce6b935343e8be523 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 30 Nov 2011 04:54:52 +0000 Subject: [PATCH] fix garbage value config_path variables and use correct config registry strings SPANK SPANK SPANK! SVN revision: 65706 --- src/modules/everything/evry_plug_apps.c | 12 ++++++++---- src/modules/everything/evry_plug_files.c | 11 +++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/modules/everything/evry_plug_apps.c b/src/modules/everything/evry_plug_apps.c index 6230712fa..5f7f59cea 100644 --- a/src/modules/everything/evry_plug_apps.c +++ b/src/modules/everything/evry_plug_apps.c @@ -1072,24 +1072,27 @@ _plugins_init(const Evry_API *api) int prio = 0; Eina_List *l; Evry_Action *act; + const char *config_path; evry = api; if (!evry->api_version_check(EVRY_API_VERSION)) return EINA_FALSE; + config_path = eina_stringshare_add("launcher/everything-apps"); + p = EVRY_PLUGIN_BASE("Applications", _module_icon, EVRY_TYPE_APP, _begin, _finish, _fetch); p->complete = &_complete; p->browse = &_browse; - p->config_path = "extensions/everything-apps"; + p->config_path = eina_stringshare_ref(config_path); evry->plugin_register(p, EVRY_PLUGIN_SUBJECT, 1); _plugins = eina_list_append(_plugins, p); p = EVRY_PLUGIN_BASE("Exebuf", _module_icon, EVRY_TYPE_APP, _begin_exe, _finish_exe, _fetch_exe); p->complete = &_complete; - p->config_path = "extensions/everything-apps"; + p->config_path = eina_stringshare_ref(config_path); _plugins = eina_list_append(_plugins, p); if (evry->plugin_register(p, EVRY_PLUGIN_SUBJECT, 3)) p->config->min_query = 3; @@ -1097,13 +1100,13 @@ _plugins_init(const Evry_API *api) p = EVRY_PLUGIN_BASE("Applications", _module_icon, EVRY_TYPE_APP, _begin_mime, _finish, _fetch); p->complete = &_complete; - p->config_path = "extensions/everything-apps"; + p->config_path = eina_stringshare_ref(config_path); evry->plugin_register(p, EVRY_PLUGIN_OBJECT, 1); _plugins = eina_list_append(_plugins, p); p = EVRY_PLUGIN_BASE("Open With...", _module_icon, EVRY_TYPE_APP, _begin_mime, _finish_mime, _fetch_mime); - p->config_path = "extensions/everything-apps"; + p->config_path = eina_stringshare_ref(config_path); evry->plugin_register(p, EVRY_PLUGIN_ACTION, 1); _plugins = eina_list_append(_plugins, p); @@ -1175,6 +1178,7 @@ _plugins_init(const Evry_API *api) (handlers, ecore_event_handler_add (EFREET_EVENT_DESKTOP_CACHE_UPDATE, _desktop_cache_update, NULL)); + eina_stringshare_del(config_path); return EINA_TRUE; } diff --git a/src/modules/everything/evry_plug_files.c b/src/modules/everything/evry_plug_files.c index f87753478..c0b5971ff 100644 --- a/src/modules/everything/evry_plug_files.c +++ b/src/modules/everything/evry_plug_files.c @@ -1296,12 +1296,14 @@ _plugins_init(const Evry_API *api) Evry_Action *act, *act_sort_date, *act_sort_name; Evry_Plugin *p; int prio = 0; + const char *config_path; evry = api; if (!evry->api_version_check(EVRY_API_VERSION)) return EINA_FALSE; + config_path = eina_stringshare_add("launcher/everything-files"); _mime_dir = eina_stringshare_add("inode/directory"); _mime_mount = eina_stringshare_add("inode/mountpoint"); _mime_unknown = eina_stringshare_add("unknown"); @@ -1346,7 +1348,7 @@ _plugins_init(const Evry_API *api) p->input_type = EVRY_TYPE_FILE; p->cb_key_down = &_cb_key_down; p->browse = &_browse; - p->config_path = "extensions/everything-files"; + p->config_path = eina_stringshare_ref(config_path); p->actions = eina_list_append(p->actions, act_sort_date); p->actions = eina_list_append(p->actions, act_sort_name); _plugins = eina_list_append(_plugins, p); @@ -1358,7 +1360,7 @@ _plugins_init(const Evry_API *api) _begin, _finish, _fetch); p->cb_key_down = &_cb_key_down; p->browse = &_browse; - p->config_path = "extensions/everything-files"; + p->config_path = eina_stringshare_ref(config_path); p->actions = eina_list_append(p->actions, act_sort_date); p->actions = eina_list_append(p->actions, act_sort_name); _plugins = eina_list_append(_plugins, p); @@ -1370,7 +1372,7 @@ _plugins_init(const Evry_API *api) p = EVRY_PLUGIN_BASE("Recent Files", _module_icon, EVRY_TYPE_FILE, _recentf_begin, _finish, _recentf_fetch); p->browse = &_recentf_browse; - p->config_path = "extensions/everything-files"; + p->config_path = eina_stringshare_ref(config_path); if (evry->plugin_register(p, EVRY_PLUGIN_SUBJECT, 3)) { @@ -1382,7 +1384,7 @@ _plugins_init(const Evry_API *api) p = EVRY_PLUGIN_BASE("Recent Files", _module_icon, EVRY_TYPE_FILE, _recentf_begin, _finish, _recentf_fetch); p->browse = &_recentf_browse; - p->config_path = "extensions/everything-files"; + p->config_path = eina_stringshare_ref(config_path); if (evry->plugin_register(p, EVRY_PLUGIN_OBJECT, 3)) { @@ -1390,6 +1392,7 @@ _plugins_init(const Evry_API *api) p->config->min_query = 3; } _plugins = eina_list_append(_plugins, p); + eina_stringshare_del(config_path); return EINA_TRUE; }