Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_apps.c e_fwin.c e_int_menus.c 


Log Message:


be more lenient on valid exe's in ibar, e apps, menus.
close fwin's if dir is deleted.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -3 -r1.231 -r1.232
--- e_apps.c    16 Oct 2006 00:03:11 -0000      1.231
+++ e_apps.c    16 Oct 2006 14:26:02 -0000      1.232
@@ -416,63 +416,63 @@
      }
 
    if ((a) && (a->path))
-      {
-         if ((!in_all) && (strncmp(a->path, _e_apps_path_all, 
strlen(_e_apps_path_all)) == 0))
-           in_all = 1;
-         if (ecore_file_is_dir(a->path))
-           {
-               if ((!a->idle_fill) && (!a->filled))
-                {
-                   snprintf(buf, sizeof(buf), "%s/.directory", path);
-                   if (ecore_file_exists(buf))
-                      e_app_fields_fill(a, buf);
-                   else
-                     {
-                        a->name = 
evas_stringshare_add(ecore_file_get_file(a->path));
-                        a->filled = 1;
-                        a->idle_fill = 1;
-                     }
-                }
-              if (!a->filled) goto error;
-              if (scan_subdirs)
-                 {
-                    if (stated)
-                       _e_app_subdir_rescan(a);
-                    else
-                       e_app_subdir_scan(a, scan_subdirs);
-                 }
-                 
-              /* Don't monitor the all directory, all changes to that must go 
through e_app. */
-               if ((!stated) && (strcmp(_e_apps_path_all, a->path) != 0))
-                 a->monitor = ecore_file_monitor_add(a->path, 
_e_app_cb_monitor, a);
-           }
-        else if (_e_app_is_eapp(a->path))
-           {
-                if ((!a->idle_fill) && (!a->filled))
-                  e_app_fields_fill(a, a->path);
-                 
-               /* no exe field.. not valid. drop it */
-//               if (!_e_app_exe_valid_get(a->exe))
-//                  goto error;
+     {
+       if ((!in_all) && (strncmp(a->path, _e_apps_path_all, 
strlen(_e_apps_path_all)) == 0))
+         in_all = 1;
+       if (ecore_file_is_dir(a->path))
+         {
+            if ((!a->idle_fill) && (!a->filled))
+              {
+                 snprintf(buf, sizeof(buf), "%s/.directory", path);
+                 if (ecore_file_exists(buf))
+                   e_app_fields_fill(a, buf);
+                 else
+                   {
+                      a->name = 
evas_stringshare_add(ecore_file_get_file(a->path));
+                      a->filled = 1;
+                      a->idle_fill = 1;
+                   }
+              }
+            if (!a->filled) goto error;
+            if (scan_subdirs)
+              {
+                 if (stated)
+                   _e_app_subdir_rescan(a);
+                 else
+                   e_app_subdir_scan(a, scan_subdirs);
+              }
+            
+            /* Don't monitor the all directory, all changes to that must go 
through e_app. */
+            if ((!stated) && (strcmp(_e_apps_path_all, a->path) != 0))
+              a->monitor = ecore_file_monitor_add(a->path, _e_app_cb_monitor, 
a);
+         }
+       else if (_e_app_is_eapp(a->path))
+         {
+            if ((!a->idle_fill) && (!a->filled))
+              e_app_fields_fill(a, a->path);
+            
+            /* no exe field.. not valid. drop it */
+            //           if (!_e_app_exe_valid_get(a->exe))
+            //              goto error;
          }
        else
          goto error;
-
+       
         if (virtual_app)
          {
             a2 = E_OBJECT_ALLOC(E_App, E_APP_TYPE, _e_app_free);
             if (a2)
               {
                  if (_e_app_copy(a2, a))
-                    a->references = evas_list_append(a->references, a2);
+                   a->references = evas_list_append(a->references, a2);
                  else
                    {
                       e_object_del(E_OBJECT(a2));
                       goto error;
                    }
-               }
-             else
-                goto error;
+              }
+            else
+              goto error;
          }
        /* Timestamp the cache, and no need to stat the file twice if the cache 
was stale. */
        if ((stated) || (stat(a->path, &st) >= 0))
@@ -480,7 +480,7 @@
             a->mtime = st.st_mtime;
             stated = 1;
          }
-
+       
        if (new_app)
          {
             _e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, 
a->path, a);
@@ -492,13 +492,13 @@
                }
          }
        else if ((_e_apps_all) && (_e_apps_all->subapps) && (in_all))
-           _e_apps_all->subapps = evas_list_remove(_e_apps_all->subapps, a);
+         _e_apps_all->subapps = evas_list_remove(_e_apps_all->subapps, a);
         if ((_e_apps_all) && (a != _e_apps_all) && (in_all))
-            _e_apps_all->subapps = evas_list_prepend(_e_apps_all->subapps, a);
-
+         _e_apps_all->subapps = evas_list_prepend(_e_apps_all->subapps, a);
+       
         if (virtual_app)
-           a = a2;
-
+         a = a2;
+       
      }
    else
      goto error;
@@ -2502,6 +2502,7 @@
                  e_app_fields_fill(a, path);
                  if (a->filled)
                    {
+/* allow invalid apps
                       if (!_e_app_exe_valid_get(a->exe))
                         {
                            a->deleted = 1;
@@ -2517,6 +2518,7 @@
                            _e_app_subdir_rescan(app);
                         }
                       else
+ */
                         {
                            _e_app_change(a, E_APP_CHANGE);
                            for (l = a->references; l; l = l->next)
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fwin.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_fwin.c    1 Oct 2006 12:05:33 -0000       1.3
+++ e_fwin.c    16 Oct 2006 14:26:02 -0000      1.4
@@ -12,6 +12,7 @@
 static void _e_fwin_free(E_Fwin *fwin);
 static void _e_fwin_cb_delete(E_Win *win);
 static void _e_fwin_cb_resize(E_Win *win);
+static void _e_fwin_deleted(void *data, Evas_Object *obj, void *event_info);
 static void _e_fwin_changed(void *data, Evas_Object *obj, void *event_info);
 static void _e_fwin_selected(void *data, Evas_Object *obj, void *event_info);
 static void _e_fwin_menu_extend(void *data, Evas_Object *obj, E_Menu *m, 
E_Fm2_Icon_Info *info);
@@ -85,6 +86,8 @@
    e_fm2_config_set(o, &fmc);
    evas_object_smart_callback_add(o, "dir_changed",
                                  _e_fwin_changed, fwin);
+   evas_object_smart_callback_add(o, "dir_deleted",
+                                 _e_fwin_deleted, fwin);
    evas_object_smart_callback_add(o, "selected",
                                  _e_fwin_selected, fwin);
    e_fm2_path_set(o, dev, path);
@@ -159,6 +162,15 @@
    fwin = win->data;
    evas_object_resize(fwin->bg_obj, fwin->win->w, fwin->win->h);
    evas_object_resize(fwin->scrollframe_obj, fwin->win->w, fwin->win->h);
+}
+
+static void
+_e_fwin_deleted(void *data, Evas_Object *obj, void *event_info)
+{
+   E_Fwin *fwin;
+   
+   fwin = data;
+   e_object_del(E_OBJECT(fwin));
 }
 
 static void
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_menus.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -3 -r1.177 -r1.178
--- e_int_menus.c       16 Oct 2006 01:58:06 -0000      1.177
+++ e_int_menus.c       16 Oct 2006 14:26:02 -0000      1.178
@@ -496,7 +496,7 @@
          {
             a = l->data;
             
-             if (e_app_valid_exe_get(a) || (!a->exe))
+//             if (e_app_valid_exe_get(a) || (!a->exe))
               {
                  int opt = 0;
                  char label[4096];



-------------------------------------------------------------------------
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