forked from enlightenment/enlightenment
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. SVN revision: 25046
This commit is contained in:
parent
2a5a0cd8ec
commit
2c54568bfb
|
@ -62,6 +62,7 @@
|
||||||
#include <Ecore_File.h>
|
#include <Ecore_File.h>
|
||||||
#include <Ecore_X_Atoms.h>
|
#include <Ecore_X_Atoms.h>
|
||||||
#include <Ecore_X_Cursor.h>
|
#include <Ecore_X_Cursor.h>
|
||||||
|
#include <Ecore_Desktop.h>
|
||||||
#include <Eet.h>
|
#include <Eet.h>
|
||||||
#include <Edje.h>
|
#include <Edje.h>
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,4 @@
|
||||||
/* This file currently lives in two places, the source code for E and the source code for e_utils e17genmenu
|
#include "e.h"
|
||||||
*
|
|
||||||
* 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>
|
|
||||||
|
|
||||||
//#define DEBUG 1
|
//#define DEBUG 1
|
||||||
|
|
||||||
|
@ -29,10 +11,30 @@ static int _e_search_list(Ecore_List *list, const char *search);
|
||||||
EAPI void
|
EAPI void
|
||||||
e_fdo_menu_to_order(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;
|
char *menu_file;
|
||||||
|
|
||||||
|
for (i = 0; i < 9; i++)
|
||||||
|
{
|
||||||
/* Find the main menu file. */
|
/* Find the main menu file. */
|
||||||
menu_file = ecore_desktop_paths_file_find(ecore_desktop_paths_menus, "applications.menu", -1, NULL, NULL);
|
menu_file = ecore_desktop_paths_file_find(ecore_desktop_paths_menus,
|
||||||
|
menu_names[i], -1, NULL, NULL);
|
||||||
if (menu_file)
|
if (menu_file)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
|
@ -50,6 +52,9 @@ e_fdo_menu_to_order(void)
|
||||||
ecore_desktop_tree_foreach(menus, 0, _e_menu_make_apps, path);
|
ecore_desktop_tree_foreach(menus, 0, _e_menu_make_apps, path);
|
||||||
}
|
}
|
||||||
free(path);
|
free(path);
|
||||||
|
// FIXME: leak: menus?
|
||||||
|
}
|
||||||
|
// FIXME: leak: menu_file?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -885,7 +885,8 @@ _e_main_dirs_init(void)
|
||||||
snprintf(buf, sizeof(buf), "%s/.e/e/applications/menu/all/.order", homedir);
|
snprintf(buf, sizeof(buf), "%s/.e/e/applications/menu/all/.order", homedir);
|
||||||
if (!ecore_file_exists(buf))
|
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 */
|
/* FIXME: THIS is to get people started - shoudl be in a wizard */
|
||||||
snprintf(buf, sizeof(buf), "%s/.e/e/fileman/favorites", homedir);
|
snprintf(buf, sizeof(buf), "%s/.e/e/fileman/favorites", homedir);
|
||||||
|
|
Loading…
Reference in New Issue