Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_apps.c e_eap_editor.c 


Log Message:
*Saving E_Apps forces new ones into ~/.e/e/applications/all, and adds
them to the _e_apps_all list directly.

* No monitoring of ~/.e/e/applications/all, it should all be taken care
of internally.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -3 -r1.185 -r1.186
--- e_apps.c    15 Sep 2006 21:46:25 -0000      1.185
+++ e_apps.c    16 Sep 2006 12:09:29 -0000      1.186
@@ -192,6 +192,7 @@
      }
 }
 
+/* FIXME: Not actualy used anywhere, should we nuke it or should we use it 
everywhere that an E_App is allocated? */
 EAPI E_App *
 e_app_raw_new(void)
 {
@@ -248,7 +249,9 @@
                    a->name = 
evas_stringshare_add(ecore_file_get_file(a->path));
                  if (scan_subdirs) e_app_subdir_scan(a, scan_subdirs);
                  
-                 a->monitor = ecore_file_monitor_add(a->path, 
_e_app_cb_monitor, a);
+                 /* Don't monitor the all directory, all changes to that must 
go through e_app. */
+                  if (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(path))
               {
@@ -1312,6 +1315,7 @@
 {
    char buf[PATH_MAX];
    const char *lang, *ext = NULL;
+   int new_eap = 0;
 
    /* Check if it's a new one that has not been saved yet. */
    if (a->path)
@@ -1321,6 +1325,19 @@
          snprintf(buf, sizeof(buf), "%s/%s.desktop", _e_apps_all->path, 
a->name);
         a->path = evas_stringshare_add(buf);
       }
+   if (!a->path)  return;
+   /* This still lets old ones that are not in all to be saved, but new ones 
are forced to be in all. */
+   if (!ecore_file_exists(a->path))
+      {
+         /* Force it to be in all. */
+         snprintf(buf, sizeof(buf), "%s/%s", _e_apps_all->path, 
ecore_file_get_file(a->path));
+        a->path = evas_stringshare_add(buf);
+      }
+   if (!a->path)  return;
+   if (!ecore_file_exists(a->path))
+      {
+         new_eap = 1;
+      }
 
    ext = strrchr(a->path, '.');
    if ((ext) && (strcmp(ext, ".desktop") == 0))
@@ -1485,6 +1502,14 @@
          }
        _e_app_subdir_rescan(a->parent);
      }
+   if (new_eap)
+      {
+         /* Careful, if this is being created from the border icon, this E_App 
is already part of the border. */
+         a->parent = _e_apps_all;
+         _e_apps_all->subapps = evas_list_append(_e_apps_all->subapps, a);
+        /* FIXME: Don't know if we need to copy and reference this since it is 
in the repository. */
+        _e_app_change(a, E_APP_ADD);
+      }
 }
 
 EAPI void
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_eap_editor.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- e_eap_editor.c      15 Sep 2006 22:42:04 -0000      1.54
+++ e_eap_editor.c      16 Sep 2006 12:09:29 -0000      1.55
@@ -141,7 +141,6 @@
    cfdata->width = cfdata->editor->eap->width;
    if (cfdata->image)  cfdata->editor->img_set = 1;
 
-   IFADD(cfdata->editor->eap->path, cfdata->eap.path);
    IFADD(cfdata->editor->eap->icon_class, cfdata->eap.icon_class);
 
    IFDEL(cfdata->eap.icon_path);
@@ -176,7 +175,6 @@
    IFFREE(data->ipath);
    IFFREE(data->image);
 
-   IFDEL(data->eap.path);
    IFDEL(data->eap.icon_class);
    IFDEL(data->eap.icon_path);
    
@@ -522,12 +520,10 @@
        cfdata->editor->img_set = 1;
        if (cfdata->editor->img) evas_object_del(cfdata->editor->img);
 
-//        IFDEL(cfdata->eap.path);
         IFDEL(cfdata->eap.icon_class);
         IFDEL(cfdata->eap.icon_path);
 
        cfdata->eap.icon_path = evas_stringshare_add(cfdata->image);
-//     cfdata->eap.path = evas_stringshare_add("");
        cfdata->eap.icon_class = NULL;
         cfdata->editor->img = e_app_icon_add(cfdata->editor->evas, 
&(cfdata->eap));
 #if 0



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