e_modapi_shutdown(E_Module *m __UNUSED__)
{
E_Config_Dialog *cfd;
- Evry_Action *a;
+ printf("________________________________________________\n");
evry_shutdown();
- /* remove module-supplied menu additions */
- if (maug)
- {
- e_int_menus_menu_augmentation_del("main/1", maug);
- maug = NULL;
- }
- /* remove module-supplied action */
- if (act)
- {
- e_action_predef_name_del(_("Everything Launcher"), _("Show Everything Dialog"));
- e_action_del("everything");
- }
-
view_thumb_shutdown();
view_help_shutdown();
evry_plug_clipboard_shutdown();
evry_plug_text_shutdown();
evry_plug_actions_shutdown();
- /* EINA_LIST_FREE(evry_conf->plugins, p)
- * evry_plugin_free(p, 1); */
- EINA_LIST_FREE(evry_conf->actions, a)
- evry_action_free(a);
+ _config_free();
+ evry_history_free();
+
+ e_configure_registry_item_del("extensions/run_everything");
+ e_configure_registry_category_del("extensions");
while ((cfd = e_config_dialog_get("E", "_config_everything_dialog")))
e_object_del(E_OBJECT(cfd));
- e_configure_registry_item_del("extensions/run_everything");
- e_configure_registry_category_del("extensions");
+ if (act)
+ {
+ e_action_predef_name_del(_("Everything Launcher"), _("Show Everything Dialog"));
+ e_action_del("everything");
+ }
- _config_free();
- evry_history_free();
+ if (maug)
+ {
+ e_int_menus_menu_augmentation_del("main/1", maug);
+ maug = NULL;
+ }
/* Clean EET */
E_CONFIG_DD_FREE(conf_edd);
E_CONFIG_DD_FREE(plugin_conf_edd);
E_CONFIG_DD_FREE(plugin_setting_edd);
e_datastore_del("everything_loaded");
-
+ printf("________________________________________________\n");
return 1;
}
_config_free(void)
{
Plugin_Config *pc;
- int i;
- Eina_List *conf[3];
-
- conf[0] = evry_conf->conf_subjects;
- conf[1] = evry_conf->conf_actions;
- conf[2] = evry_conf->conf_objects;
- for (i = 0; i < 3; i++)
+ EINA_LIST_FREE(evry_conf->conf_subjects, pc)
{
- EINA_LIST_FREE(conf[i], pc)
- {
- if (pc->name) eina_stringshare_del(pc->name);
- if (pc->trigger) eina_stringshare_del(pc->trigger);
- if (pc->plugin) evry_plugin_free(pc->plugin);
- E_FREE(pc);
- }
+ if (pc->name) eina_stringshare_del(pc->name);
+ if (pc->trigger) eina_stringshare_del(pc->trigger);
+ if (pc->plugin) evry_plugin_free(pc->plugin);
+ E_FREE(pc);
+ }
+ EINA_LIST_FREE(evry_conf->conf_actions, pc)
+ {
+ if (pc->name) eina_stringshare_del(pc->name);
+ if (pc->trigger) eina_stringshare_del(pc->trigger);
+ if (pc->plugin) evry_plugin_free(pc->plugin);
+ E_FREE(pc);
+ }
+ EINA_LIST_FREE(evry_conf->conf_objects, pc)
+ {
+ if (pc->name) eina_stringshare_del(pc->name);
+ if (pc->trigger) eina_stringshare_del(pc->trigger);
+ if (pc->plugin) evry_plugin_free(pc->plugin);
+ E_FREE(pc);
}
if (evry_conf->cmd_terminal)
eina_stringshare_del(evry_conf->cmd_terminal);
if (evry_conf->cmd_sudo)
eina_stringshare_del(evry_conf->cmd_sudo);
-
+
E_FREE(evry_conf);
}
void
evry_plugin_free(Evry_Plugin *p)
{
- evry_plugin_unregister(p);
-
evry_item_free(EVRY_ITEM(p));
}
evry_plugin_unregister(Evry_Plugin *p)
{
DBG("%s", p->name);
+ Eina_List *l = evry_conf->conf_subjects;
- if (eina_list_data_find_list(evry_conf->conf_subjects, p->config))
+ if (l && eina_list_data_find_list(l, p->config))
{
- char buf[256];
- snprintf(buf, sizeof(buf), _("Show %s Plugin"), p->name);
-
- e_action_predef_name_del(_("Everything"), buf);
+ /* char buf[256];
+ * snprintf(buf, sizeof(buf), _("Show %s Plugin"), p->name);
+ *
+ * e_action_predef_name_del(_("Everything"), buf); */
}
}
EAPI int evry_browse_back(Evry_Selector *sel);
extern Evry_Selector **selectors;
-extern const char *action_selector;
#endif
static const char *thumb_types = NULL;
Evry_Selector **selectors = NULL;
-const char *action_selector;
/* externally accessible functions */
int
evry_init(void)
{
- action_selector = eina_stringshare_add(_("Select Action"));
thumb_types = eina_stringshare_add("FILE");
return 1;
}
evry_hide();
eina_stringshare_del(thumb_types);
- eina_stringshare_del(action_selector);
return 1;
}
if (sel->update_timer)
ecore_timer_del(sel->update_timer);
- _evry_timer_cb_actions_get(it);
- /* sel->update_timer = ecore_timer_add(0.1, _evry_timer_cb_actions_get, it); */
+ /* _evry_timer_cb_actions_get(it); */
+ sel->update_timer = ecore_timer_add(0.1, _evry_timer_cb_actions_get, it);
}
EAPI void
Evry_Plugin *p, *pp;
Evry_Selector *sel = selectors[2];
Evry_Item *it;
- /* required type */
- /* const char *type_in = act->type_in2; */
while (sel->state)
_evry_state_pop(sel);
EINA_LIST_FOREACH(sel->plugins, l, p)
{
- printf("check %s %s\n", EVRY_ITEM(p)->subtype, act->type_in2);
-
if (!evry_item_type_check(EVRY_ITEM(p), NULL, act->type_in2))
continue;
Eina_List *actions;
Eina_Bool parent;
Evry_Action *action;
-
};
static Evry_Plugin *_base_plug = NULL;
void evry_plug_actions_shutdown()
{
+ Evry_Action *a;
+
evry_plugin_free(_base_plug);
+
+ EINA_LIST_FREE(evry_conf->actions, a)
+ evry_action_free(a);
}
act->base.icon = icon;
act->base.type = eina_stringshare_add("ACTION");
- printf("icon %s\n", act->base.icon);
-
act->name = eina_stringshare_add(name);
act->type_in1 = (type_in1 ? eina_stringshare_add(type_in1) : NULL);
Evry_Selector *selector;
};
-inline static int
-_is_action(const Evry_Item *it)
-{
- return (it->plugin->name == action_selector);
-}
+/* inline static int
+ * _is_action(const Evry_Item *it)
+ * {
+ * return (it->plugin->name == action_selector);
+ * } */
static int
_cb_sort_recent(const void *data1, const void *data2)
if (it2->usage && !it1->usage)
return 1;
- if (_is_action(it1) || _is_action(it2))
- {
- if (_is_action(it1) && _is_action(it2))
- return (it1->priority - it2->priority);
- else if (_is_action(it1))
- return ((it1->plugin->config->priority + it1->priority) -
- (it2->plugin->config->priority));
- else
- return ((it1->plugin->config->priority) -
- (it2->plugin->config->priority + it2->priority));
- }
+ /* if (_is_action(it1) || _is_action(it2))
+ * {
+ * if (_is_action(it1) && _is_action(it2))
+ * return (it1->priority - it2->priority);
+ * else if (_is_action(it1))
+ * return ((it1->plugin->config->priority + it1->priority) -
+ * (it2->plugin->config->priority));
+ * else
+ * return ((it1->plugin->config->priority) -
+ * (it2->plugin->config->priority + it2->priority));
+ * } */
if (it1->plugin == it2->plugin)
return (it1->priority - it2->priority);
if (it2->usage && !it1->usage)
return 1;
- if (_is_action(it1) || _is_action(it2))
- {
- if (_is_action(it1) && _is_action(it2))
- return (it1->priority - it2->priority);
- else if (_is_action(it1))
- return ((it1->plugin->config->priority + it1->priority)
- - it2->plugin->config->priority);
- else
- return (it1->plugin->config->priority -
- (it1->plugin->config->priority + it2->priority));
- }
+ /* if (_is_action(it1) || _is_action(it2))
+ * {
+ * if (_is_action(it1) && _is_action(it2))
+ * return (it1->priority - it2->priority);
+ * else if (_is_action(it1))
+ * return ((it1->plugin->config->priority + it1->priority)
+ * - it2->plugin->config->priority);
+ * else
+ * return (it1->plugin->config->priority -
+ * (it1->plugin->config->priority + it2->priority));
+ * } */
if ((it1->plugin == it2->plugin) &&
(it1->priority - it2->priority))
evry_item_free(it->item);
free(it);
}
+ evas_object_del(sd->selector);
+
free(sd);
evas_object_smart_data_set(obj, NULL);
-
- evas_object_del(sd->selector);
}
static void