Enlightenment CVS committal
Author : onefang
Project : e17
Module : apps/e_utils
Dir : e17/apps/e_utils/src/bin/e17genmenu
Modified Files:
Makefile.am menus.c
Added Files:
e_fdo_menu_to_order.c e_fdo_menu_to_order.h
Log Message:
Mostly just shuffling things around in preparation for the next big step.
===================================================================
RCS file: /cvs/e/e17/apps/e_utils/src/bin/e17genmenu/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Makefile.am 11 Aug 2006 13:50:04 -0000 1.4
+++ Makefile.am 22 Aug 2006 00:45:19 -0000 1.5
@@ -15,8 +15,8 @@
bin_PROGRAMS = e17genmenu
-e17genmenu_SOURCES = main.c global.c menus.c parse.c eaps.c order.c sort.c
+e17genmenu_SOURCES = main.c global.c e_fdo_menu_to_order.c menus.c parse.c
eaps.c order.c sort.c
-noinst_HEADERS = global.h menus.h parse.h eaps.h order.h sort.h
+noinst_HEADERS = global.h e_fdo_menu_to_order.h menus.h parse.h eaps.h order.h
sort.h
e17genmenu_LDADD = @EET_LIBS@ @ECORE_LIBS@ @ENGRAVE_LIBS@
===================================================================
RCS file: /cvs/e/e17/apps/e_utils/src/bin/e17genmenu/menus.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- menus.c 20 Aug 2006 03:47:45 -0000 1.10
+++ menus.c 22 Aug 2006 00:45:19 -0000 1.11
@@ -2,21 +2,18 @@
#include "config.h"
#include "parse.h"
#include "menus.h"
+#include "e_fdo_menu_to_order.h"
//#define DEBUG 1
extern int menu_count, item_count;
extern double generate_time;
-static int _menu_make_apps(const void *data, Ecore_Desktop_Tree * tree, int
element, int level);
-static void _menu_dump_each_hash_node(void *value, void *user_data);
void
make_menus()
{
char *d;
- char *menu = "applications.menu";
- char *menu_file;
double begin;
d = get_desktop_dir();
@@ -46,28 +43,7 @@
}
printf("Converting freedesktop.org (fdo) menus.\n");
- /* Find the main menu file. */
- menu_file = ecore_desktop_paths_file_find(ecore_desktop_paths_menus,
menu, -1, NULL, NULL);
- if (menu_file)
- {
- char *path;
-
- path = ecore_file_get_dir(menu_file);
- if (path)
- {
- Ecore_Desktop_Tree *menus = NULL;
-
- /* convert the xml into menus */
- menus = ecore_desktop_menu_get(menu_file);
- if (menus)
- {
- /* create the .eap and order files from the menu */
- ecore_desktop_tree_foreach(menus, 0, _menu_make_apps,
path);
- }
- }
- if (path) free(path);
- }
-
+ e_fdo_menu_to_order();
}
if (d)
@@ -146,44 +122,4 @@
ecore_list_destroy(files);
if (file)
free(file);
-}
-
-static int
-_menu_make_apps(const void *data, Ecore_Desktop_Tree * tree, int element, int
level)
-{
- if (tree->elements[element].type == ECORE_DESKTOP_TREE_ELEMENT_TYPE_STRING)
- {
- if (strncmp((char *)tree->elements[element].element, "<MENU ", 6) == 0)
- {
- char *name, *path;
- Ecore_Hash *pool, *apps;
-
- name = (char *)tree->elements[element].element;
- path = (char *)tree->elements[element + 1].element;
- pool = (Ecore_Hash *) tree->elements[element + 2].element;
- apps = (Ecore_Hash *) tree->elements[element + 4].element;
-#ifdef DEBUG
- printf("MAKING MENU - %s \t\t%s\n", path, name);
-#endif
- menu_count++;
- ecore_hash_for_each_node(apps, _menu_dump_each_hash_node,
&path[11]);
- }
- }
- return 0;
-}
-
-static void
-_menu_dump_each_hash_node(void *value, void *user_data)
-{
- Ecore_Hash_Node *node;
- char *file, *path;
-
- path = (char *)user_data;
- node = (Ecore_Hash_Node *) value;
- file = (char *)node->value;
-#ifdef DEBUG
- printf("MAKING EAP %s -> %s\n", path, file);
-#endif
- item_count++;
- parse_desktop_file(strdup(file), path);
}
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs