Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_fm.c e_fwin.c e_zone.c 


Log Message:


nuke leaks, valgrind complaints, etc.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -3 -r1.97 -r1.98
--- e_fm.c      24 Oct 2006 11:23:02 -0000      1.97
+++ e_fm.c      29 Oct 2006 09:31:12 -0000      1.98
@@ -2078,7 +2078,10 @@
             /* FIXME: Use a real icon size. */
             v = (char *)ecore_desktop_icon_find(desktop->icon, NULL, 
e_config->icon_theme);
             if (v)
-              ic->info.icon = evas_stringshare_add(v);
+              {
+                 ic->info.icon = evas_stringshare_add(v);
+                 free(v);
+              }
          }
        
        if (desktop->type)
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fwin.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- e_fwin.c    29 Oct 2006 09:04:26 -0000      1.16
+++ e_fwin.c    29 Oct 2006 09:31:12 -0000      1.17
@@ -371,7 +371,6 @@
        getcwd(pcwd, sizeof(pcwd));
        chdir(e_fm2_real_path_get(fad->fwin->fm_obj));
 
-       e_exehist_add(buf, cmd);
        selected = e_fm2_selected_list_get(fad->fwin->fm_obj);
        if (selected)
          {
@@ -536,6 +535,25 @@
 {
    /* FIXME: execute file ici with either a temrinal, the shell, or directly
     * or open the .desktop and exec it */
+   switch (ext)
+     {
+      case E_FWIN_EXEC_NONE:
+       break;
+      case E_FWIN_EXEC_DIRECT:
+       e_zone_exec(fwin->win->border->zone, ici->file);
+       e_exehist_add("fwin", ici->file);
+       break;
+      case E_FWIN_EXEC_SH:
+       break;
+      case E_FWIN_EXEC_TERMINAL_DIRECT:
+       break;
+      case E_FWIN_EXEC_TERMINAL_SH:
+       break;
+      case E_FWIN_EXEC_DESKTOP:
+       break;
+      default:
+       break;
+     }
 }
 
 static void
@@ -551,7 +569,7 @@
    E_Fwin_Apps_Dialog *fad;
    E_Fm2_Config fmc;
    E_Fm2_Icon_Info *ici;
-   char buf[4096];
+   char buf[4096], *f;
    int need_dia = 0;
    Evas_Hash *mimes = NULL;
    Evas_List *mlist = NULL;
@@ -600,14 +618,21 @@
                  if (ici->link)
                    {
                       if (!S_ISDIR(ici->statinfo.st_mode))
-                        mimes = evas_hash_direct_add(mimes, 
e_fm_mime_filename_get(ici->link), (void *)1);
+                        {
+                           f = e_fm_mime_filename_get(ici->link);
+                           mimes = evas_hash_del(mimes, f, (void *)1);
+                           mimes = evas_hash_direct_add(mimes, f, (void *)1);
+                        }
                    }
                  else
                    {
                       snprintf(buf, sizeof(buf), "%s/%s",
                                e_fm2_real_path_get(fwin->fm_obj), ici->file);
                       if (!S_ISDIR(ici->statinfo.st_mode))
-                        mimes = evas_hash_direct_add(mimes, ici->mime, (void 
*)1);
+                        {
+                           mimes = evas_hash_del(mimes, ici->mime, (void *)1);
+                           mimes = evas_hash_direct_add(mimes, ici->mime, 
(void *)1);
+                        }
                    }
               }
          }
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- e_zone.c    30 Sep 2006 10:16:23 -0000      1.103
+++ e_zone.c    29 Oct 2006 09:31:12 -0000      1.104
@@ -647,18 +647,21 @@
    a = e_app_exe_find(exe);
    if (!a) 
      {
-       a = E_NEW(E_App, 1);
-       a->name = strdup (exe);
-       a->exe = strdup (exe);
+//     a = E_NEW(E_App, 1);
+//     a->name = strdup(exe);
+//     a->exe = strdup(exe);
      }
 
-   inst = E_NEW(E_App_Instance, 1);
-   if (!inst) return 0;
+   if (a)
+     {
+       inst = E_NEW(E_App_Instance, 1);
+       if (!inst) return 0;
+     }
 
    ex = ecore_exe_pipe_run(exe, ECORE_EXE_PIPE_AUTO | ECORE_EXE_PIPE_READ | 
ECORE_EXE_PIPE_ERROR | ECORE_EXE_PIPE_READ_LINE_BUFFERED | 
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED, inst);
    if (!ex)
      {
-       free(inst);
+       if (inst) free(inst);
        ret = 0;
      }
    /* reset env vars */
@@ -671,12 +674,19 @@
    /* 20 lines at start and end, 20x100 limit on bytes at each end. */
    ecore_exe_auto_limits_set(ex, 2000, 2000, 20, 20);
    ecore_exe_tag_set(ex, "E/app");
-   inst->app = a;
-   inst->exe = ex;
-   inst->launch_id = startup_id;
-   inst->launch_time = ecore_time_get();
-   a->instances = evas_list_append(a->instances, inst);
-   if (a->startup_notify) a->starting = 1;
+   if (a)
+     {
+       inst->app = a;
+       inst->exe = ex;
+       inst->launch_id = startup_id;
+       inst->launch_time = ecore_time_get();
+       a->instances = evas_list_append(a->instances, inst);
+       if (a->startup_notify) a->starting = 1;
+     }
+   else
+     {
+       ecore_exe_free(ex);
+     }
    return ret;
 }
 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to