Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e_utils

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


Modified Files:
        fdo_menus.c global.c global.h main.c menus.c 


Log Message:
Enable DEBUG in some source files to help with testing on other peoples boxes.

Proper path to e.png.

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/fdo_menus.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- fdo_menus.c 7 Mar 2006 21:58:24 -0000       1.1
+++ fdo_menus.c 9 Mar 2006 03:06:25 -0000       1.2
@@ -22,6 +22,8 @@
 #include "parse.h"
 #include "xmlame.h"
 
+#define DEBUG 1
+
 extern double convert_time;
 
 struct _fdo_menus_expand_apps_data
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/global.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- global.c    7 Mar 2006 21:58:24 -0000       1.1
+++ global.c    9 Mar 2006 03:06:25 -0000       1.2
@@ -149,6 +149,7 @@
           }
      }
    /* Doesn't this tie us specifically to KDE ? */
+//   return "crystalsvg";
    return "hicolor";
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/global.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- global.h    7 Mar 2006 21:58:24 -0000       1.1
+++ global.h    9 Mar 2006 03:06:25 -0000       1.2
@@ -11,7 +11,7 @@
 #define MAX_PATH 4096
 #define EFAVDIR "/.e/e/applications/favorite"
 #define EAPPDIR "/.e/e/applications/all"
-#define DEFAULTICON PACKAGE_DATA_DIR"/icons/e.png"
+#define DEFAULTICON PACKAGE_DATA_DIR"/data/e17genmenu/icons/e.png"
 
 typedef struct _G_Eap G_Eap;
 struct _G_Eap
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/main.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- main.c      7 Mar 2006 21:58:24 -0000       1.1
+++ main.c      9 Mar 2006 03:06:25 -0000       1.2
@@ -8,6 +8,8 @@
 #include "fdo_paths.h"
 #include "xmlame.h"
 
+#define DEBUG 1
+
 /* Function Prototypes */
 void _e17genmenu_backup(void);
 void _e17genmenu_help(void);
@@ -25,100 +27,6 @@
    backup_eaps();
 }
 
-#if 1
-void
-_e17genmenu_test_fdo_paths()
-{
-   int i;
-   char *path;
-   char *menu = "applications.menu";
-
-   printf("Testing FDO paths\n");
-
-   fdo_paths_init();
-   parse_ini_init();
-
-   /* You can iterate through the various path lists as needed. */
-   for (i = 0; i < fdo_paths_config->size; i++)
-      printf("FDO config path = %s\n", (char 
*)fdo_paths_config->elements[i].element);
-   for (i = 0; i < fdo_paths_menus->size; i++)
-      printf("FDO menu path = %s\n", (char 
*)fdo_paths_menus->elements[i].element);
-   for (i = 0; i < fdo_paths_directories->size; i++)
-      printf("FDO directory path = %s\n", (char 
*)fdo_paths_directories->elements[i].element);
-   for (i = 0; i < fdo_paths_desktops->size; i++)
-      printf("FDO desktop path = %s\n", (char 
*)fdo_paths_desktops->elements[i].element);
-   for (i = 0; i < fdo_paths_icons->size; i++)
-      printf("FDO icon path = %s\n", (char 
*)fdo_paths_icons->elements[i].element);
-   for (i = 0; i < fdo_paths_kde_legacy->size; i++)
-      printf("FDO kde legacy path = %s\n", (char 
*)fdo_paths_kde_legacy->elements[i].element);
-
-   /* First, find the main menu file. */
-   path = fdo_paths_search_for_file(FDO_PATHS_TYPE_MENU, menu, 1, NULL, NULL);
-   if (path)
-     {
-        char *directory = "Applications.directory";
-        char *desktop = "xterm.desktop";
-        char *icon = "tux.png";
-        Dumb_Tree *menus = NULL;
-
-        printf("\n\nPath to %s is %s\n", menu, path);
-
-        /* convert the xml into menus */
-        menus = fdo_menus_get(path, NULL, 0);
-        free(path);
-
-        /* During the processing of the menu file, you will need to search for 
-         * .directory files, .desktop files, and icons.
-         */
-        path = fdo_paths_search_for_file(FDO_PATHS_TYPE_DIRECTORY, directory, 
1, NULL, NULL);
-        if (path)
-          {
-             printf("Path to %s is %s\n", directory, path);
-             free(path);
-          }
-
-        path = fdo_paths_search_for_file(FDO_PATHS_TYPE_DESKTOP, desktop, 1, 
NULL, NULL);
-        if (path)
-          {
-             Ecore_Hash *desktop_hash;
-
-             printf("Path to %s is %s\n", desktop, path);
-             desktop_hash = parse_ini_file(path);
-             if (desktop_hash)
-               {
-               }
-             free(path);
-          }
-
-        path = fdo_paths_search_for_file(FDO_PATHS_TYPE_ICON, icon, 1, NULL, 
NULL);
-        if (path)
-          {
-             printf("Path to %s is %s\n", icon, path);
-             free(path);
-          }
-     }
-   path = find_icon("tux");
-   if (path)
-     {
-        printf("Path to tux is %s\n", path);
-        free(path);
-     }
-   path = find_icon("blah");
-   if (path)
-     {
-        printf("Path to blah is %s\n", path);
-        free(path);
-     }
-
-   parse_ini_shutdown();
-   fdo_paths_shutdown();
-
-   _e17genmenu_shutdown();
-
-   exit(0);
-}
-#endif
-
 void
 _e17genmenu_help()
 {
@@ -154,8 +62,6 @@
                 _e17genmenu_help();
              if ((strstr(argv[i], "--backup")) || (strstr(argv[i], "-b")))
                 _e17genmenu_backup();
-             if ((strstr(argv[i], "--test")) || (strstr(argv[i], "-z")))
-                _e17genmenu_test_fdo_paths();
           }
      }
 }
@@ -221,6 +127,9 @@
 {
    char path[MAX_PATH];
    double start, begin, paths, gen;
+#ifdef DEBUG
+   int i;
+#endif
 
    /* Init E Stuff */
    _e17genmenu_init();
@@ -228,7 +137,6 @@
    start = ecore_time_get();
    /* Parse Arguments */
    _e17genmenu_parseargs(argc, argv);
-//_e17genmenu_test_fdo_paths();  /* For debugging purposes, makes it easier to 
gdb this. */
 
    /* Set App Args */
    ecore_app_args_set(argc, (const char **)argv);
@@ -239,6 +147,22 @@
    paths = ecore_time_get() - begin;
    parse_ini_init();
 
+#ifdef DEBUG
+   /* You can iterate through the various path lists as needed. */
+   for (i = 0; i < fdo_paths_config->size; i++)
+      printf("FDO config path = %s\n", (char 
*)fdo_paths_config->elements[i].element);
+   for (i = 0; i < fdo_paths_menus->size; i++)
+      printf("FDO menu path = %s\n", (char 
*)fdo_paths_menus->elements[i].element);
+   for (i = 0; i < fdo_paths_directories->size; i++)
+      printf("FDO directory path = %s\n", (char 
*)fdo_paths_directories->elements[i].element);
+   for (i = 0; i < fdo_paths_desktops->size; i++)
+      printf("FDO desktop path = %s\n", (char 
*)fdo_paths_desktops->elements[i].element);
+   for (i = 0; i < fdo_paths_icons->size; i++)
+      printf("FDO icon path = %s\n", (char 
*)fdo_paths_icons->elements[i].element);
+   for (i = 0; i < fdo_paths_kde_legacy->size; i++)
+      printf("FDO kde legacy path = %s\n", (char 
*)fdo_paths_kde_legacy->elements[i].element);
+#endif
+
    /* Just being paranoid, and cause people have removed these during testing. 
*/
    snprintf(path, sizeof(path), "%s/.e/e/applications/all", get_home());
    ecore_file_mkpath(path);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17genmenu/menus.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- menus.c     7 Mar 2006 21:58:24 -0000       1.1
+++ menus.c     9 Mar 2006 03:06:25 -0000       1.2
@@ -5,6 +5,8 @@
 #include "parse.h"
 #include "menus.h"
 
+#define DEBUG 1
+
 extern int menu_count, item_count;
 
 static int _menu_make_apps(const void *data, Dumb_Tree * tree, int element, 
int level);




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