Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_fileman_file.c e_fileman_smart.c 


Log Message:
- add ability to delete files / directories


===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_fileman_file.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- e_fileman_file.c    23 Oct 2005 15:18:47 -0000      1.4
+++ e_fileman_file.c    23 Oct 2005 23:21:47 -0000      1.5
@@ -129,7 +129,7 @@
 int
 e_fm_file_delete(E_Fm_File *file)
 {
-   if (ecore_file_unlink(file->path))
+   if (ecore_file_recursive_rm(file->path))
      {
        free(file->path);
        file->path = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_fileman_smart.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- e_fileman_smart.c   23 Oct 2005 20:45:34 -0000      1.55
+++ e_fileman_smart.c   23 Oct 2005 23:21:47 -0000      1.56
@@ -730,29 +730,27 @@
 static void
 _e_fm_file_delete(E_Fm_Icon *icon)
 {
-   /* TODO */
-#if 0
    if (!e_fm_file_delete(icon->file))
     {
        E_Dialog *dia;
-       E_Fm *fileman;
        char *text;
 
-       fileman = icon->sd->fileman;
-       dia = e_dialog_new(fileman->con);
+       dia = e_dialog_new(icon->sd->win->container);
        e_dialog_button_add(dia, "Ok", NULL, NULL, NULL);
        e_dialog_button_focus_num(dia, 1);
        e_dialog_title_set(dia, "Error");
        text = E_NEW(char, PATH_MAX + 256);
        snprintf(text, PATH_MAX + 256, "Could not delete  <br><b>%s</b> ?", 
icon->file->path);
        e_dialog_text_set(dia, text);
-
-               e_dialog_show(dia);
+       e_dialog_show(dia);
     }
-
+   
    icon->sd->files = evas_list_remove(icon->sd->files, icon);
-   _e_fm_file_free(icon);
-#endif
+   e_icon_layout_freeze(icon->sd->layout);
+   e_icon_layout_unpack(icon);
+   e_icon_layout_thaw(icon->sd->layout);   
+   _e_fm_redraw(icon->sd);
+   _e_fm_file_free(icon);   
 }
 
 static void
@@ -839,7 +837,7 @@
    e_dialog_button_focus_num(dia, 1);
    e_dialog_title_set(dia, "Confirm");
    text = E_NEW(char, PATH_MAX + 256);
-      snprintf(text, PATH_MAX + 256, " Are you sure you want to delete 
<br><b>%s</b> ?", icon->file->name);
+   snprintf(text, PATH_MAX + 256, " Are you sure you want to delete 
<br><b>%s</b> ?", icon->file->name);
    e_dialog_text_set(dia, text);
    free(text);
    e_dialog_show(dia);
@@ -849,16 +847,11 @@
 _e_fm_file_delete_yes_cb(void *data, E_Dialog *dia)
 {
    E_Fm_Icon *icon;
-   E_Fm_Smart_Data *sd;
 
    icon = data;
-   sd = icon->sd;
-   /*
-    * TODO
-    _e_fm_file_delete(file);
-    e_object_del(E_OBJECT(dia));
-    _e_fm_redraw(sd); // no_new
-    */
+   
+   _e_fm_file_delete(icon);
+   e_object_del(E_OBJECT(dia));  
 }
 
 static void




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to