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:
parent
9b5ac6cfbe
commit
a5f362a0ab
|
@ -391,18 +391,23 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->bg = strdup(cfbg->file);
|
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);
|
cfdata->bg = strdup(e_config->desktop_default_background);
|
||||||
else
|
|
||||||
cfdata->use_theme_bg = 1;
|
|
||||||
|
|
||||||
if (cfdata->bg)
|
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());
|
snprintf(path, sizeof(path), "%s/data/backgrounds", e_prefix_data_get());
|
||||||
if (!strncmp(cfdata->bg, path, strlen(path)))
|
if (!strncmp(cfdata->bg, path, strlen(path)))
|
||||||
cfdata->fmdir = 1;
|
cfdata->fmdir = 1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
cfdata->use_theme_bg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
|
|
@ -88,7 +88,6 @@ e_widget_deskpreview_desk_add(Evas *evas, E_Zone *zone, int x, int y, int tw, in
|
||||||
const char *bgfile;
|
const char *bgfile;
|
||||||
E_Widget_Desk_Data *dd = NULL;
|
E_Widget_Desk_Data *dd = NULL;
|
||||||
|
|
||||||
|
|
||||||
bgfile = e_bg_file_get(zone->container->num, zone->num, x, y);
|
bgfile = e_bg_file_get(zone->container->num, zone->num, x, y);
|
||||||
|
|
||||||
/* wrap desks in a widget (to set min size) */
|
/* 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);
|
e_widget_sub_object_add(obj, o);
|
||||||
dd->thumb = o;
|
dd->thumb = o;
|
||||||
|
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue