Fix an issue with desk preview bg set always selecting Use Theme Bg.

Remove some duplicated code.
Minor formatting.


SVN revision: 27102
This commit is contained in:
Christopher Michael 2006-11-14 05:39:26 +00:00
parent 9b5ac6cfbe
commit a5f362a0ab
2 changed files with 10 additions and 7 deletions

View File

@ -391,18 +391,23 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->bg = strdup(cfbg->file);
}
}
if (!cfdata->bg && e_config->desktop_default_background)
if ((!cfdata->bg) && e_config->desktop_default_background)
cfdata->bg = strdup(e_config->desktop_default_background);
else
cfdata->use_theme_bg = 1;
if (cfdata->bg)
{
const char *f;
f = e_theme_edje_file_get("base/theme/backgrounds", "e/desktop/background");
if (!strcmp(cfdata->bg, f))
cfdata->use_theme_bg = 1;
snprintf(path, sizeof(path), "%s/data/backgrounds", e_prefix_data_get());
if (!strncmp(cfdata->bg, path, strlen(path)))
cfdata->fmdir = 1;
}
else
cfdata->use_theme_bg = 1;
}
static void *

View File

@ -88,7 +88,6 @@ e_widget_deskpreview_desk_add(Evas *evas, E_Zone *zone, int x, int y, int tw, in
const char *bgfile;
E_Widget_Desk_Data *dd = NULL;
bgfile = e_bg_file_get(zone->container->num, zone->num, x, y);
/* wrap desks in a widget (to set min size) */
@ -121,7 +120,6 @@ e_widget_deskpreview_desk_add(Evas *evas, E_Zone *zone, int x, int y, int tw, in
e_widget_sub_object_add(obj, o);
dd->thumb = o;
return obj;
}