Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e_utils

Dir     : e17/apps/e_utils/src/bin/e17genmenu


Modified Files:
        icons.c parse.c 


Log Message:
Another crack at overwrite.  Overwrite the .order files regardless,
since we are not touching the users menus, just creating our own.

Fix the icon finding bug that was causing some items to not have eaps
created.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/icons.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- icons.c     7 Mar 2006 21:58:24 -0000       1.1
+++ icons.c     21 Mar 2006 03:50:43 -0000      1.2
@@ -142,7 +142,7 @@
    double begin;
 
    begin = ecore_time_get();
-   if (icon == NULL)
+   if ((icon == NULL) || (icon[0] == '\0'))
      {
         icon_time += ecore_time_get() - begin;
         return DEFAULTICON;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/parse.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- parse.c     21 Mar 2006 02:27:29 -0000      1.2
+++ parse.c     21 Mar 2006 03:50:43 -0000      1.3
@@ -229,47 +229,52 @@
    snprintf(path, sizeof(path), "%s" EAPPDIR "/%s", home, eap->eap_name);
    window_class = get_window_class(path);
 
-   if ((ecore_file_exists(path)) && (!overwrite))
-     {
-        not_over_count++;
-        return;
-     }
-
    if (eap->icon != NULL)
       icon = find_icon(strdup(eap->icon));
    if (eap->icon == NULL)
       icon = strdup(DEFAULTICON);
 
-   /* Start Making The Eap */
-   write_icon(path, icon);
-
-   /* Set Eap Values. Trap For Name Not Being Set */
-   if (eap->name != NULL)
-      write_eap(path, "app/info/name", eap->name);
-   else if (eap->eap_name != NULL)
-      write_eap(path, "app/info/name", eap->eap_name);
-
-   if (eap->generic != NULL)
-      write_eap(path, "app/info/generic", eap->generic);
-   if (eap->comment != NULL)
-      write_eap(path, "app/info/comments", eap->comment);
-
-   /* Parse Exec string for %'s that messup eap write */
-   exec = NULL;
-   if (eap->exec != NULL)
+   if ((ecore_file_exists(path)) && (!overwrite))
+     {
+        not_over_count++;
+     }
+   else
      {
-        exec = parse_exec(eap->exec);
-        if (exec != NULL)
+        /* FIXME: This is probably why creating eaps takes so long.  
+        * We should just create it right in the first place, rather 
+        * than creating a basic one, then rewriting it several times
+        * each time we find a new little bit of info.
+        */
+        /* Start Making The Eap */
+        write_icon(path, icon);
+        /* Set Eap Values. Trap For Name Not Being Set */
+        if (eap->name != NULL)
+           write_eap(path, "app/info/name", eap->name);
+        else if (eap->eap_name != NULL)
+           write_eap(path, "app/info/name", eap->eap_name);
+
+        if (eap->generic != NULL)
+           write_eap(path, "app/info/generic", eap->generic);
+        if (eap->comment != NULL)
+           write_eap(path, "app/info/comments", eap->comment);
+
+        /* Parse Exec string for %'s that messup eap write */
+        exec = NULL;
+        if (eap->exec != NULL)
           {
-             write_eap(path, "app/info/exe", exec);
-             write_eap(path, "app/icon/class", exec);
+             exec = parse_exec(eap->exec);
+             if (exec != NULL)
+               {
+                  write_eap(path, "app/info/exe", exec);
+                  write_eap(path, "app/icon/class", exec);
+               }
           }
-     }
 
-   if (eap->startup != NULL)
-      write_eap(path, "app/info/startup_notify", eap->startup);
-   if (window_class != NULL)
-      write_eap(path, "app/window/class", window_class);
+        if (eap->startup != NULL)
+           write_eap(path, "app/info/startup_notify", eap->startup);
+        if (window_class != NULL)
+           write_eap(path, "app/window/class", window_class);
+     }     
 
    category = NULL;
    if (menu_path != NULL)




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to