Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e_utils

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


Modified Files:
        eaps.c main.c parse.c 


Log Message:
Overwriting bug fixed.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/eaps.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- eaps.c      9 Mar 2006 15:00:12 -0000       1.2
+++ eaps.c      21 Mar 2006 02:27:29 -0000      1.3
@@ -3,6 +3,8 @@
 #include "icons.h"
 #include "eaps.h"
 
+#define DEBUG 1
+
 /* Create a .directory.eap for this dir */
 void
 create_dir_eap(char *path, char *cat)
@@ -125,7 +127,7 @@
    Eet_File *ef;
 
 #ifdef DEBUG
-   fprintf(stderr, "\tWriting %s:%s\n", strdup(section), strdup(value));
+   fprintf(stderr, "\tWriting %s %s:%s\n", strdup(file), strdup(section), 
strdup(value));
 #endif
 
    ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/main.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- main.c      21 Mar 2006 01:44:50 -0000      1.4
+++ main.c      21 Mar 2006 02:27:29 -0000      1.5
@@ -117,7 +117,7 @@
 }
 
 double convert_time = 0.0, icon_time = 0.0, cache_time = 0.0, generate_time = 
0.0;
-int menu_count, item_count, reject_count;
+int menu_count, item_count, reject_count, not_over_count;
 
 int
 main(int argc, char **argv)
@@ -202,8 +202,8 @@
    printf("* aware of this problem, and has a fix on his TODO list.            
           *\n");
    
printf("********************************************************************************\n");
 
-   printf("\nTotal time %3.3f seconds, finding fdo paths %3.3f, converting fdo 
menus %3.3f, converting to %d (rejected %d) eaps in %d fdo menus %3.3f, 
generating menus %3.3f, finding icons %3.3f, generating eap caches %3.3f.\n",
-       ecore_time_get() - start, paths, convert_time, item_count, 
reject_count, menu_count, gen - (icon_time + generate_time), generate_time, 
icon_time, cache_time);
+   printf("\nTotal time %3.3f seconds, finding fdo paths %3.3f, converting fdo 
menus %3.3f, converting to %d (rejected %d) eaps in %d fdo menus %3.3f, 
generating menus %3.3f, finding icons %3.3f, not overwritten %d, generating eap 
caches %3.3f.\n",
+       ecore_time_get() - start, paths, convert_time, item_count, 
reject_count, menu_count, gen - (icon_time + generate_time), generate_time, 
icon_time, not_over_count, cache_time);
 
 #if 0
    /* This is just a test of parsing speed for the old weather data's huge xml 
file.  It passed the parse test.  B-) */
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/parse.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- parse.c     7 Mar 2006 21:58:24 -0000       1.1
+++ parse.c     21 Mar 2006 02:27:29 -0000      1.2
@@ -6,7 +6,7 @@
 #include "order.h"
 #include "parse.h"
 
-extern int reject_count;
+extern int reject_count, not_over_count;
 
 static void _parse_desktop_del(Desktop * desktop);
 
@@ -124,12 +124,10 @@
 parse_desktop_file(char *app, char *menu_path)
 {
    char *home, *eap_name;
-   int overwrite;
    G_Eap *eap;
    Desktop *desktop;
 
    home = get_home();
-   overwrite = get_overwrite();
    eap_name = get_eap_name(app);
 
 #ifdef DEBUG
@@ -202,7 +200,6 @@
         if (!f)
           {
              fprintf(stderr, "ERROR: Cannot Open Mapping File\n");
-             reject_count++;
              return;
           }
         snprintf(buff, sizeof(buff), "%s|!%s|!%s|!%s\n", eap->icon, eap->name, 
eap->window_class, eap->exec);
@@ -234,25 +231,8 @@
 
    if ((ecore_file_exists(path)) && (!overwrite))
      {
-        if (menu_path != NULL)
-          {
-             snprintf(order_path, sizeof(order_path), "%s" EFAVDIR "/Converted 
Menus/%s", home, menu_path);
-             modify_order(order_path, eap->eap_name);
-          }
-        else
-          {
-             category = NULL;
-             if (eap->categories != NULL)
-               {
-                  category = find_category(eap->categories);
-                  if (category != NULL)
-                    {
-                       snprintf(order_path, sizeof(order_path), "%s" EFAVDIR 
"/Generated Menus/%s", home, category);
-                       modify_order(order_path, eap->eap_name);
-                    }
-               }
-             return;
-          }
+        not_over_count++;
+        return;
      }
 
    if (eap->icon != 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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to