'everything' module:
authorHannes Janetzek <hannes.janetzek@gmail.com>
Tue, 18 Aug 2009 19:10:13 +0000 (19:10 +0000)
committerHannes Janetzek <hannes.janetzek@gmail.com>
Tue, 18 Aug 2009 19:10:13 +0000 (19:10 +0000)
valgrinding and cleanups

SVN revision: 41861

src/modules/everything/e_mod_main.c
src/modules/everything/evry.c
src/modules/everything/evry_plug_apps.c
src/modules/everything/evry_plug_aspell.c
src/modules/everything/evry_plug_border.c
src/modules/everything/evry_plug_border_act.c
src/modules/everything/evry_plug_calc.c
src/modules/everything/evry_plug_preview.c
src/modules/everything/evry_plug_tracker.c

index 4ba6bd4562dffd06888085e5d1386fb09c114a36..2f3966439d239debdcd27ed4f3a8e4087d30b223 100644 (file)
@@ -176,6 +176,10 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
    e_configure_registry_item_del("extensions/run_everything");
    e_configure_registry_category_del("extensions");
 
+   if (evry_conf->plugins_conf) eina_list_free(evry_conf->plugins_conf);
+   
+   E_FREE(evry_conf);
+   
    /* Clean EET */
    E_CONFIG_DD_FREE(conf_item_edd);
    E_CONFIG_DD_FREE(conf_edd);
@@ -294,6 +298,16 @@ evry_plugin_free(Evry_Plugin *p)
    if (p->trigger)  eina_stringshare_del(p->trigger);
    if (p->icon)     eina_stringshare_del(p->icon);
 
+   if (p->config)
+     {
+       if (p->config->name)
+         eina_stringshare_del(p->config->name);
+       if (p->config->trigger)
+         eina_stringshare_del(p->config->trigger);
+
+       E_FREE(p->config);
+     }
+   
    E_FREE(p);
 }
 
index 4969be887ea12d915076113d43b2b6b43521b263..708f7ff80f0da30b0ab9f0e2252e005b2a0deb96 100644 (file)
@@ -294,7 +294,8 @@ evry_item_new(Evry_Plugin *p, const char *label, void (*cb_free) (Evry_Item *ite
 
    it->plugin = p;
    if (label) it->label = eina_stringshare_add(label);
-
+   if (cb_free) it->cb_free = cb_free;
+   
    it->ref = 1;
 
    /* item_cnt++; */
@@ -1949,7 +1950,7 @@ _evry_plug_actions_free(void)
    evry_plugin_unregister(p);
    eina_stringshare_del(p->config->name);
    E_FREE(p->config);
-   E_FREE(p);
+   evry_plugin_free(p); 
 }
 
 static int
@@ -2073,7 +2074,7 @@ _evry_plug_aggregator_free(Evry_Plugin *p)
 {
    if (p->config->name) eina_stringshare_del(p->config->name);
    E_FREE(p->config);
-   E_FREE(p);
+   evry_plugin_free(p); 
 }
 
 
@@ -2104,7 +2105,7 @@ _evry_plug_aggregator_fetch(Evry_Plugin *p, const char *input)
                  if (!it->fuzzy_match)
                    it->fuzzy_match = evry_fuzzy_match(it->label, input);
 
-                 if (it->fuzzy_match)
+                 if (it->fuzzy_match || selector == selectors[2])
                    {
                       evry_item_ref(it);
                       items = eina_list_append(items, it);
index 3b617658e284b3b5eb2b6c9402e0e6685c7036aa..e995d69bf24a3ae2b3e76e634bc4869f7626e137 100644 (file)
@@ -161,9 +161,9 @@ _item_add(Evry_Plugin *p, Efreet_Desktop *desktop, char *file, int match)
      }
 
    if (desktop)
-     it = evry_item_new(p, desktop->name, &_item_free);
+     it = evry_item_new(p, desktop->name, _item_free);
    else
-     it = evry_item_new(p, file, &_item_free);
+     it = evry_item_new(p, file, _item_free);
 
    app = E_NEW(Evry_App, 1);
    app->desktop = desktop;
@@ -341,7 +341,7 @@ _fetch(Evry_Plugin *p, const char *input)
 
        if (found || p == p2)
          {
-            it = evry_item_new(p, _("Run Command"), &_item_free);
+            it = evry_item_new(p, _("Run Command"), _item_free);
             app = E_NEW(Evry_App, 1);
             if (input)
               app->file = eina_stringshare_add(input);
@@ -352,7 +352,7 @@ _fetch(Evry_Plugin *p, const char *input)
             p->items = eina_list_append(p->items, it);
 
             snprintf(cmd, sizeof(cmd), "xterm -hold -e %s", input);
-            it = evry_item_new(p, _("Run in Terminal"), &_item_free);
+            it = evry_item_new(p, _("Run in Terminal"), _item_free);
             app = E_NEW(Evry_App, 1);
             if (input)
               app->file = eina_stringshare_add(cmd);
@@ -652,7 +652,7 @@ _init(void)
    p1 = evry_plugin_new("Applications", type_subject, "", "APPLICATION", 0, NULL, NULL,
                        _begin, _cleanup, _fetch, NULL, NULL,
                        _icon_get, NULL, NULL);
-   
+
    p2 = evry_plugin_new("Open With...", type_action, "FILE", "", 0, NULL, NULL,
                        _begin, _cleanup, _fetch, _open_with_action, NULL,
                        _icon_get, NULL, NULL);
@@ -662,10 +662,10 @@ _init(void)
 
    act = evry_action_new("Launch", "APPLICATION", NULL, "everything-launch",
                         _exec_app_action, _exec_app_check_item, NULL);
-   
+
    act1 = evry_action_new("Open File...", "APPLICATION", "FILE", "document-open",
                          _exec_app_action, _exec_app_check_item, NULL);
-   
+
    act2 = evry_action_new("Edit Application Entry", "APPLICATION", NULL, "everything-launch",
                          _edit_app_action, _edit_app_check_item, NULL);
 
index 396904277ce6d6a075f5cf3c95ca64a77f8ac18b..3ea758defbcf30e3f1c5f2f8f638effd70608a35 100644 (file)
@@ -308,6 +308,7 @@ _cleanup(Evry_Plugin *plugin)
    if (p->exe)
      {
        ecore_exe_quit(p->exe);
+       ecore_exe_free(p->exe);
        p->exe = NULL;
      }
    if (p->lang)
index 8487a92d5fedc8bf897871df7cddc5ca5349f460..2baffbf396ed0839b7b1e5c27ff343eb8ed6b218 100644 (file)
@@ -17,7 +17,7 @@ _cleanup(Evry_Plugin *p)
 static void
 _item_free(Evry_Item *it)
 {
-   /* if (it->data[0]) e_object_unref(E_OBJECT(it->data[0])); */
+   if (it->data[0]) e_object_unref(E_OBJECT(it->data[0]));
 }
 
 static void
@@ -25,9 +25,9 @@ _item_add(Evry_Plugin *p, E_Border *bd, int match, int *prio)
 {
    Evry_Item *it;
 
-   it = evry_item_new(p, e_border_name_get(bd), &_item_free);
+   it = evry_item_new(p, e_border_name_get(bd), _item_free);
 
-   /* e_object_ref(E_OBJECT(bd)); */
+   e_object_ref(E_OBJECT(bd));
    it->data[0] = bd;
    it->fuzzy_match = match;
    it->priority = *prio;
index 00d234176088dc724a6375cc832827cbdfbc573b..1820114bc21ea80a30999573968c494badde0f44 100644 (file)
@@ -121,7 +121,7 @@ _item_add(Evry_Plugin *p, const char *label, void (*action_cb) (E_Border *bd), c
 
    if (!match) return;
 
-   it = evry_item_new(p, label, &_item_free);
+   it = evry_item_new(p, label, _item_free);
    it->data[0] = action_cb;
    it->data[1] = (void *) eina_stringshare_add(icon);
    it->fuzzy_match = match;
index 91f5fa949b6d001e6066cd0f4c7cc7f6eafe878a..30f2ce455dcb1e0737ce021b858a921b5b53ff6c 100644 (file)
@@ -73,8 +73,11 @@ _cleanup(Evry_Plugin *p)
    ecore_event_handler_del(error_handler);
    ecore_event_handler_del(del_handler);
    data_handler = NULL;
+   error_handler = NULL;
+   del_handler = NULL;
 
    ecore_exe_quit(exe);
+   ecore_exe_free(exe);
    exe = NULL;
 }
 
index c48a1119265a21f8e41a2f168c3e3cb993639b81..6b37898f717901b6aaa0acd1566504b626c003e0 100644 (file)
@@ -2,7 +2,7 @@
 
 
 static Evry_View *view = NULL;
-static Evas_Object *o_thumb[5];
+static Evas_Object *o_thumb[4];
 static Evas_Object *o_main = NULL;
 static Eina_List *items = NULL;
 static const char *view_types;
index 2d61900ec79df4eef1e7803492790a9cc112b547..6eec7d8f12dede30835e5d6b170d13cf5ad77db7 100644 (file)
@@ -277,7 +277,7 @@ _fetch(Evry_Plugin *p, const char *input)
        inst->input = eina_stringshare_add(input);
        search_text = malloc(sizeof(char) * strlen(input) + 1);
        sprintf(search_text, "%s", input);
-       max_hits = 50;
+       max_hits = 100;
      }
    else if (!input && !p->begin && p->type == type_object)
      {