Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : apps/entice

Dir     : e17/apps/entice/src/bin


Modified Files:
        entice.c entice.h main.c 


Log Message:
allow for loading of directories again.


===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- entice.c    22 Jan 2004 19:39:13 -0000      1.32
+++ entice.c    26 Jan 2004 04:10:23 -0000      1.33
@@ -122,6 +122,7 @@
       e_container_spacing_set(e->container, 4);
       e_container_move_button_set(e->container, 2);
       e_container_layout_plugin_set(e->container, "entice");
+      evas_object_color_set(e->container, 255, 255, 255, 255);
 
       if (edje_object_part_exists(e->edje, "EnticeThumbnailArea"))
       {
@@ -398,7 +399,7 @@
    struct dirent *dent = NULL;
    char buf[PATH_MAX], *file = NULL;
 
-   if (entice && entice->ee && data)
+   if (data)
    {
       file = (char *) data;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- entice.h    22 Jan 2004 19:39:13 -0000      1.14
+++ entice.h    26 Jan 2004 04:10:23 -0000      1.15
@@ -42,6 +42,7 @@
 int entice_file_del_from_fs(const char *file);
 int entice_current_image_set(const char *file);
 void entice_file_add_job_cb(void *data, int add_type);
+void entice_file_add_dir_job_cb(void *data);
 
 void entice_thumbs_scroll_next_start(void);
 void entice_thumbs_scroll_prev_start(void);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/main.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- main.c      22 Jan 2004 19:39:13 -0000      1.19
+++ main.c      26 Jan 2004 04:10:23 -0000      1.20
@@ -11,6 +11,9 @@
 #include <Ecore_Ipc.h>
 #include <Ecore_Job.h>
 #include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include "entice.h"
 #include "ipc.h"
 #include "prefs.h"
@@ -130,6 +133,7 @@
    pid_t pid;
    int fd[2];
    char line[PATH_MAX];
+   struct stat status;
 
    if (pipe(fd) < 0)
       exit(1);
@@ -154,7 +158,19 @@
             for (i = 1; i < argc; i++)
             {
                snprintf(line, PATH_MAX, "%s", argv[i]);
-               entice_file_add_job_cb(line, IPC_FILE_APPEND);
+               if (!stat(line, &status))
+               {
+                  if (S_ISDIR(status.st_mode))
+                  {
+                     fprintf(stderr, "Adding Dir %s\n", line);
+                     entice_file_add_dir_job_cb(line);
+                  }
+                  else
+                  {
+                     fprintf(stderr, "Adding File %s\n", line);
+                     entice_file_add_job_cb(line, IPC_FILE_APPEND);
+                  }
+               }
             }
             break;
          }




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to