Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e.h e_fdo_menu_to_order.c e_main.c
Log Message:
fdo header and src more e compliant :)
onefang - some data to go on for debian - segv land galore though deep inside
ecore_desktop. cant track right now. also leaks... i smell leaks.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- e.h 14 Aug 2006 21:56:13 -0000 1.51
+++ e.h 22 Aug 2006 23:39:08 -0000 1.52
@@ -62,6 +62,7 @@
#include <Ecore_File.h>
#include <Ecore_X_Atoms.h>
#include <Ecore_X_Cursor.h>
+#include <Ecore_Desktop.h>
#include <Eet.h>
#include <Edje.h>
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fdo_menu_to_order.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_fdo_menu_to_order.c 22 Aug 2006 23:20:12 -0000 1.2
+++ e_fdo_menu_to_order.c 22 Aug 2006 23:39:08 -0000 1.3
@@ -1,22 +1,4 @@
-/* This file currently lives in two places, the source code for E and the
source code for e_utils e17genmenu
- *
- * It will soon go away from e17genmenu. It still needs to be cleaned up to E
coding specs.
- *
- * The standard includes will be replaced with "e.h" when this is no longer
needed for e17genmenu.
- *
- * FIXME: .order file usage in here and in e_apps.c need to be reviewed.
- */
-
-#include "config.h"
-#include "e_fdo_menu_to_order.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
-#include <string.h>
-#include <Ecore.h>
-#include <Ecore_Desktop.h>
-#include <Ecore_File.h>
+#include "e.h"
//#define DEBUG 1
@@ -29,29 +11,52 @@
EAPI void
e_fdo_menu_to_order(void)
{
+ int i;
+ /* i added all the files i see in /etc/xdg/menus on debian. maybe we
+ * should list the contents of the xdg menu dir and load every *.menu file
+ * ?
+ */
+ const char *menu_names[9] =
+ {
+ "applications.menu",
+ "gnome-applications.menu",
+ "gnome-preferences.menu",
+ "gnome-settings.menu",
+ "kde-applications.menu",
+ "kde-information.menu",
+ "kde-screensavers.menu",
+ "kde-settings.menu",
+ "debian-menu.menu"
+ };
char *menu_file;
-
- /* Find the main menu file. */
- menu_file = ecore_desktop_paths_file_find(ecore_desktop_paths_menus,
"applications.menu", -1, NULL, NULL);
- if (menu_file)
- {
- char *path;
-
- path = ecore_file_get_dir(menu_file);
- if (path)
- {
- Ecore_Desktop_Tree *menus;
-
- /* 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, _e_menu_make_apps,
path);
- }
- free(path);
- }
- }
+
+ for (i = 0; i < 9; i++)
+ {
+ /* Find the main menu file. */
+ menu_file = ecore_desktop_paths_file_find(ecore_desktop_paths_menus,
+ menu_names[i], -1, NULL,
NULL);
+ if (menu_file)
+ {
+ char *path;
+
+ path = ecore_file_get_dir(menu_file);
+ if (path)
+ {
+ Ecore_Desktop_Tree *menus;
+
+ /* 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, _e_menu_make_apps,
path);
+ }
+ free(path);
+ // FIXME: leak: menus?
+ }
+ // FIXME: leak: menu_file?
+ }
+ }
}
static int
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -3 -r1.179 -r1.180
--- e_main.c 22 Aug 2006 00:56:03 -0000 1.179
+++ e_main.c 22 Aug 2006 23:39:08 -0000 1.180
@@ -885,7 +885,8 @@
snprintf(buf, sizeof(buf), "%s/.e/e/applications/menu/all/.order", homedir);
if (!ecore_file_exists(buf))
{
- e_fdo_menu_to_order();
+// leave it to manual generation for now - ecore_desktop segv's badly.
+// e_fdo_menu_to_order();
}
/* FIXME: THIS is to get people started - shoudl be in a wizard */
snprintf(buf, sizeof(buf), "%s/.e/e/fileman/favorites", homedir);
-------------------------------------------------------------------------
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