Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e_utils

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


Modified Files:
        main.c order.c parse.c 


Log Message:
Runs a lot faster when it doesn't have to generate eaps.  I've left the
eap generation code in for now, just commented it out.

===================================================================
RCS file: /cvs/e/e17/apps/e_utils/src/bin/e17genmenu/main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- main.c      17 Aug 2006 17:08:07 -0000      1.12
+++ main.c      19 Aug 2006 01:28:48 -0000      1.13
@@ -120,9 +120,9 @@
 {
    char path[PATH_MAX];
    double start, begin, paths, gen;
-//#ifdef DEBUG
+#ifdef DEBUG
    char *this_path;
-//#endif
+#endif
 
    /* Init E Stuff */
    _e17genmenu_init();
@@ -139,7 +139,7 @@
    ecore_desktop_init();
    paths = ecore_time_get() - begin;
 
-//#ifdef DEBUG
+#ifdef DEBUG
    /* You can iterate through the various path lists as needed. */
    ecore_list_goto_first(ecore_desktop_paths_config);
    while ((this_path = ecore_list_next(ecore_desktop_paths_config)) != NULL)
@@ -159,7 +159,7 @@
    ecore_list_goto_first(ecore_desktop_paths_kde_legacy);
    while ((this_path = ecore_list_next(ecore_desktop_paths_kde_legacy)) != 
NULL)
       printf("FDO kde legacy path = %s\n", this_path);
-//#endif
+#endif
 
 
    /* Just being paranoid, and cause people have removed these during testing. 
*/
@@ -188,20 +188,20 @@
 #ifdef DEBUG
    fprintf(stderr, "Regenerating Eapp Caches...\n");
 #endif
-   snprintf(path, sizeof(path), "enlightenment_eapp_cache_gen %s" EAPPDIR " 
-r", ecore_desktop_home_get());
-   system(path);
-   snprintf(path, sizeof(path), "enlightenment_eapp_cache_gen 
%s/.e/e/applications/favorite -r", ecore_desktop_home_get());
-   system(path);
+//   snprintf(path, sizeof(path), "enlightenment_eapp_cache_gen %s" EAPPDIR " 
-r", ecore_desktop_home_get());
+//   system(path);
+//   snprintf(path, sizeof(path), "enlightenment_eapp_cache_gen 
%s/.e/e/applications/favorite -r", ecore_desktop_home_get());
+//   system(path);
    cache_time += ecore_time_get() - begin;
 
-   
printf("********************************************************************************\n");
-   printf("* WARNING!                                                          
           *\n");
-   printf("*                                                                   
           *\n");
-   printf("* E17 will be completely unresponsive for a few minutes after this 
finishes    *\n");
-   printf("* running.  This is due to a bad interaction with the eap caching 
code when    *\n");
-   printf("* you generate a lot of eaps at once, like e17genmenu just did.  
raster is     *\n");
-   printf("* aware of this problem, and has a fix on his TODO list.            
           *\n");
-   
printf("********************************************************************************\n");
+//   
printf("********************************************************************************\n");
+//   printf("* WARNING!                                                        
             *\n");
+//   printf("*                                                                 
             *\n");
+//   printf("* E17 will be completely unresponsive for a few minutes after 
this finishes    *\n");
+//   printf("* running.  This is due to a bad interaction with the eap caching 
code when    *\n");
+//   printf("* you generate a lot of eaps at once, like e17genmenu just did.  
raster is     *\n");
+//   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 (%d not found), 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_found_count, not_over_count, cache_time);
===================================================================
RCS file: /cvs/e/e17/apps/e_utils/src/bin/e17genmenu/order.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- order.c     17 Aug 2006 17:08:07 -0000      1.3
+++ order.c     19 Aug 2006 01:28:48 -0000      1.4
@@ -65,7 +65,7 @@
    fprintf(stderr, "Modifying Order File %s\n", path2);
 #endif
 
-   entry = ecore_file_get_file(entry);
+//   entry = ecore_file_get_file(entry);
    list = ecore_list_new();
 
    /* Stat .order; Create If Not Found */
===================================================================
RCS file: /cvs/e/e17/apps/e_utils/src/bin/e17genmenu/parse.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- parse.c     17 Aug 2006 17:08:07 -0000      1.14
+++ parse.c     19 Aug 2006 01:28:48 -0000      1.15
@@ -183,9 +183,11 @@
 static void
 _parse_process_file(char *file, char *menu_path, G_Eap *eap)
 {
-   char *home, *category, *icon_size, *icon_theme;
-   char path[PATH_MAX], order_path[PATH_MAX];
-   int overwrite;
+   char *home, *category;
+//   char *icon_size, *icon_theme;
+//   char path[PATH_MAX];
+   char order_path[PATH_MAX];
+//   int overwrite;
 
    if (!eap)
       return;
@@ -195,27 +197,28 @@
 #endif
 
    /* Get Icon Options */
-   icon_size = get_icon_size();
-   icon_theme = get_icon_theme();
+//   icon_size = get_icon_size();
+//   icon_theme = get_icon_theme();
 
    home = ecore_desktop_home_get();
-   overwrite = get_overwrite();
+//   overwrite = get_overwrite();
 
-   snprintf(path, sizeof(path), "%s" EAPPDIR "/%s", home, eap->eap_name);
+//   snprintf(path, sizeof(path), "%s" EAPPDIR "/%s", home, eap->eap_name);
 
-   if ((ecore_file_exists(path)) && (!overwrite))
-        not_over_count++;
-   else
-      {
-         eap->icon_path = ecore_desktop_icon_find(eap->icon, icon_size, 
icon_theme);
-         write_icon(path, eap);
-      }
+//   if ((ecore_file_exists(path)) && (!overwrite))
+//        not_over_count++;
+//   else
+//      {
+//         eap->icon_path = ecore_desktop_icon_find(eap->icon, icon_size, 
icon_theme);
+//         write_icon(path, eap);
+//      }
 
    category = NULL;
    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);
+//        modify_order(order_path, eap->eap_name);
+        modify_order(order_path, file);
      }
    else if (eap->categories != NULL)
      {
@@ -223,7 +226,8 @@
         if (category != NULL)
           {
              snprintf(order_path, sizeof(order_path), "%s" EFAVDIR "/Generated 
Menus/%s", home, category);
-             modify_order(order_path, eap->eap_name);
+//             modify_order(order_path, eap->eap_name);
+             modify_order(order_path, file);
           }
      }
    return;



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