Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
backgrounds.c
Log Message:
Fix background configuration when background is NONE.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- backgrounds.c 18 Feb 2006 08:30:03 -0000 1.59
+++ backgrounds.c 20 Feb 2006 18:56:36 -0000 1.60
@@ -54,6 +54,7 @@
#if ENABLE_COLOR_MODIFIERS
ColorModifierClass *cmclass;
#endif
+ char external;
char keepim;
unsigned int ref_count; /* bg */
unsigned int use_count; /* pmap */
@@ -323,6 +324,8 @@
ESetColor(&(bg->bg_solid), 160, 160, 160);
if (solid)
bg->bg_solid = *solid;
+ else
+ bg->external = 1;
if (bgn)
bg->bg.file = Estrdup(bgn);
bg->bg_tile = tile;
@@ -1053,7 +1056,7 @@
int
BackgroundIsNone(const Background * bg)
{
- return (bg) ? !strcmp(bg->name, "NONE") : 1;
+ return (bg) ? bg->external : 1;
}
static Imlib_Image *
@@ -2127,12 +2130,8 @@
}
SoundPlay("SOUND_SETTINGS_BG");
- if (!bg || BackgroundIsNone(bg))
- {
- Esnprintf(s, sizeof(s), "__NEWBG_%i", (unsigned)time(NULL));
- bg = BackgroundCreate(s, NULL, NULL, 1, 1, 0, 0, 0, 0, NULL, 1,
- 512, 512, 0, 0);
- }
+ if (!bg)
+ bg = BackgroundFind("NONE");
tmp_bg = bg;
BG_GetValues();
@@ -2402,6 +2401,7 @@
char valu[FILEPATH_LEN_MAX];
int len;
Background *bg;
+ XColor xclr;
if (!p)
return;
@@ -2409,7 +2409,8 @@
bg = BackgroundFind(name);
if (!bg)
{
- bg = BackgroundCreate(name, NULL, NULL, 0, 0, 0,
+ ESetColor(&xclr, 0, 0, 0);
+ bg = BackgroundCreate(name, &xclr, NULL, 0, 0, 0,
0, 0, 0, NULL, 0, 0, 0, 0, 0);
if (!bg)
{
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs