Enlightenment CVS committal

Author  : stffrdhrn
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_fileman_smart.c e_fileman_mime.c 


Log Message:
Some fileman work:
 * Free a list which had a FIXME note, looks like no need to free data
 * Fix a bug when right clicking on directories (do a NULL check)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_fileman_smart.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -3 -r1.130 -r1.131
--- e_fileman_smart.c   14 Feb 2006 19:39:39 -0000      1.130
+++ e_fileman_smart.c   15 Feb 2006 14:18:06 -0000      1.131
@@ -2257,7 +2257,6 @@
    E_Fm_Icon *icon;
    Evas_Event_Mouse_Up *ev;
    Evas_List *l;
-   Evas_List *mimes = NULL;
 
    ev = event_info;
    icon = data;
@@ -2314,8 +2313,21 @@
        /* the xdnd_drop will handle this case */
        if(icon->sd->drag.doing)
          break;
-       /* FIXME if it isnt null free the list */
-       icon->sd->operation.files = NULL;
+
+       /* Free file list before recreating */  
+       while (icon->sd->operation.files)
+         {
+            E_Fm_File *file;
+            
+            file = icon->sd->operation.files->data;
+            icon->sd->operation.files = evas_list_remove_list(
+                       icon->sd->operation.files, icon->sd->operation.files);
+            /*
+             * FIXME: should this be freed, it looks like we just need to free 
the list here? 
+             * e_object_del(E_OBJECT(file));
+            */
+         }
+       
        /* set the operation files equal to the selected icons */
        for(l = icon->sd->selection.icons; l; l = l->next)
          {
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_fileman_mime.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_fileman_mime.c    14 Feb 2006 19:39:39 -0000      1.3
+++ e_fileman_mime.c    15 Feb 2006 14:18:06 -0000      1.4
@@ -264,9 +264,12 @@
    E_Fm_Mime_Entry *entry;
    Evas_List *l;
 
+   if (files == NULL) 
+     return NULL;
+   
    file = (E_Fm_Mime_Entry *)files->data;
    entry = file->mime;
-   for(l = files->next; l; l = l->next)
+   for (l = files->next; l; l = l->next)
      {
        E_Fm_Mime_Entry *eme;
 




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to