* Revert the ubuntu fix coz it breaks fedora core.

* Try a quick work around for that reported memory eating loop.

I'll fix these properly later today.


SVN revision: 27062
This commit is contained in:
David Walter Seikel 2006-11-12 02:48:34 +00:00
parent c08e0a8af8
commit 7b069b1ce0
3 changed files with 14 additions and 18 deletions

View File

@ -841,6 +841,7 @@ ecore_desktop_get_command(Ecore_Desktop * desktop, Ecore_List * files, int fill)
{ {
Ecore_List *result; Ecore_List *result;
char *sub_result = NULL, *params = NULL; char *sub_result = NULL, *params = NULL;
int is_single;
result = ecore_list_new(); result = ecore_list_new();
if (!result) return NULL; if (!result) return NULL;
@ -912,9 +913,10 @@ if (files)
ecore_dlist_goto_first(command); ecore_dlist_goto_first(command);
while ((p = ecore_dlist_next(command)) != NULL) while ((p = ecore_dlist_next(command)) != NULL)
{ {
int do_file = 0, is_single = 0, is_URL = 0, is_directory = 0, is_file = 0; int do_file = 0, is_URL = 0, is_directory = 0, is_file = 0;
t = NULL; t = NULL;
is_single = 0;
if (p[0] == '%') if (p[0] == '%')
switch (p[1]) switch (p[1])
{ {
@ -1111,7 +1113,7 @@ if (files)
* go back and do it all again for the next file. * go back and do it all again for the next file.
*/ */
} }
while((fill) && (files) && (ecore_list_current(files))); while((is_single) && (fill) && (files) && (ecore_list_current(files)));
error: error:
if (params) free(params); if (params) free(params);

View File

@ -27,7 +27,7 @@ _ecore_desktop_icon_theme_cache_check(Ecore_Desktop_Icon_Theme *icon_theme);
/* FIXME: We need a way for the client to disable searching for any of these that they don't support. */ /* FIXME: We need a way for the client to disable searching for any of these that they don't support. */
static const char *ext[] = static const char *ext[] =
{ "", ".edj", ".png", ".svgz", ".svg", ".xpm", NULL }; /* "" is in case the icon already has an extension, search for that first. */ { "", ".edj", ".png", /* ".svgz", ".svg", */ ".xpm", NULL }; /* "" is in case the icon already has an extension, search for that first. */
static int init_count = 0; static int init_count = 0;
static Ecore_Hash *icon_theme_cache = NULL; static Ecore_Hash *icon_theme_cache = NULL;

View File

@ -587,21 +587,15 @@ _ecore_desktop_menu_unxml(const void *data, Ecore_Desktop_Tree * tree,
else else
{ {
if ((sub->size == 3) if ((sub->size == 3)
&& (sub->elements[1].type == && (sub->elements[1].type == ECORE_DESKTOP_TREE_ELEMENT_TYPE_STRING)
ECORE_DESKTOP_TREE_ELEMENT_TYPE_STRING) && (((char *)sub->elements[1].element)[0] != '<'))
&&
(((char *)sub->elements[1].
element)[0] != '<'))
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
sprintf(temp, "%s %s", snprintf(temp, PATH_MAX, "%s %s",
(char *)sub-> (char *)sub->elements[0].element,
elements[0].element, (char *)sub->elements[1].element);
(char *)sub-> ecore_desktop_tree_extend(menu, temp);
elements[1].element);
ecore_desktop_tree_extend(menu,
temp);
result = 1; result = 1;
} }
else else
@ -1565,9 +1559,9 @@ _ecore_desktop_menu_generate(const void *data, Ecore_Desktop_Tree * tree,
elements[i].element; elements[i].element;
if (generate_data.rule->size > 0) if (generate_data.rule->size > 0)
{ {
/* FIXME: This might not be correct, but it fixes ubuntu. */ /* FIXME: This is not correct, it fixes ubuntu, but breaks FC5. */
while (generate_data.rule->elements[0].type == ECORE_DESKTOP_TREE_ELEMENT_TYPE_TREE) // while (generate_data.rule->elements[0].type == ECORE_DESKTOP_TREE_ELEMENT_TYPE_TREE)
generate_data.rule = (Ecore_Desktop_Tree *) generate_data.rule->elements[0].element; // generate_data.rule = (Ecore_Desktop_Tree *) generate_data.rule->elements[0].element;
if (((char *)generate_data.rule->elements[0]. if (((char *)generate_data.rule->elements[0].
element)[0] == 'I') element)[0] == 'I')
{ {