Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
menus.c
Log Message:
Fix "Background Error! 1 references remain".
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -3 -r1.155 -r1.156
--- menus.c 20 Nov 2004 17:55:12 -0000 1.155
+++ menus.c 17 Dec 2004 20:06:11 -0000 1.156
@@ -953,16 +953,11 @@
bg = FindItem(bgid, 0, LIST_FINDBY_NAME, LIST_TYPE_BACKGROUND);
- if (bg && (!exists(thumb) || moddate(thumb) < moddate(file)))
- {
- /* The thumbnail is gone or outdated - regererate */
- BackgroundDestroy(bg);
- bg = NULL;
- }
-
- if (bg)
+ if (bg && exists(thumb) && moddate(thumb) > moddate(file))
return bg;
+ /* The thumbnail is gone or outdated - regererate */
+
im = imlib_load_image(file);
if (!im)
return NULL;
@@ -984,6 +979,10 @@
imlib_save_image(thumb);
imlib_free_image_and_decache();
+ /* Quit if the background itself already exists */
+ if (bg)
+ return bg;
+
scr_asp = (VRoot.w << 16) / VRoot.h;
im_asp = (width << 16) / height;
if (width == height)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs