forked from enlightenment/enlightenment
Minor formatting fixes. Init some Evas_List vars to null first.
SVN revision: 32048
This commit is contained in:
parent
10a3fb5f21
commit
53d42f392b
|
@ -14,7 +14,7 @@ EAPI int E_EVENT_BG_UPDATE = 0;
|
||||||
EAPI int
|
EAPI int
|
||||||
e_bg_init(void)
|
e_bg_init(void)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l = NULL;
|
||||||
|
|
||||||
/* Register files in use */
|
/* Register files in use */
|
||||||
if (e_config->desktop_default_background)
|
if (e_config->desktop_default_background)
|
||||||
|
@ -23,7 +23,9 @@ e_bg_init(void)
|
||||||
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Config_Desktop_Background *cfbg;
|
E_Config_Desktop_Background *cfbg;
|
||||||
|
|
||||||
cfbg = l->data;
|
cfbg = l->data;
|
||||||
|
if (!cfbg) continue;
|
||||||
e_filereg_register(cfbg->file);
|
e_filereg_register(cfbg->file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +36,7 @@ e_bg_init(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
e_bg_shutdown(void)
|
e_bg_shutdown(void)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l = NULL;
|
||||||
|
|
||||||
/* Register files in use */
|
/* Register files in use */
|
||||||
if (e_config->desktop_default_background)
|
if (e_config->desktop_default_background)
|
||||||
|
@ -43,7 +45,9 @@ e_bg_shutdown(void)
|
||||||
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Config_Desktop_Background *cfbg;
|
E_Config_Desktop_Background *cfbg;
|
||||||
|
|
||||||
cfbg = l->data;
|
cfbg = l->data;
|
||||||
|
if (!cfbg) continue;
|
||||||
e_filereg_deregister(cfbg->file);
|
e_filereg_deregister(cfbg->file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +63,6 @@ EAPI const E_Config_Desktop_Background *
|
||||||
e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
|
e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
|
||||||
{
|
{
|
||||||
Evas_List *l, *ll, *entries;
|
Evas_List *l, *ll, *entries;
|
||||||
|
|
||||||
E_Config_Desktop_Background *bg = NULL;
|
E_Config_Desktop_Background *bg = NULL;
|
||||||
int current_spec = 0; /* how specific the setting is - we want the least general one that applies */
|
int current_spec = 0; /* how specific the setting is - we want the least general one that applies */
|
||||||
|
|
||||||
|
@ -72,7 +75,7 @@ e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
|
||||||
int spec;
|
int spec;
|
||||||
|
|
||||||
cfbg = l->data;
|
cfbg = l->data;
|
||||||
|
if (!cfbg) continue;
|
||||||
spec = 0;
|
spec = 0;
|
||||||
if (cfbg->container == container_num) spec++;
|
if (cfbg->container == container_num) spec++;
|
||||||
else if (cfbg->container >= 0) continue;
|
else if (cfbg->container >= 0) continue;
|
||||||
|
@ -133,9 +136,8 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
|
||||||
edje_file_collection_list_free(entries);
|
edje_file_collection_list_free(entries);
|
||||||
}
|
}
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
bgfile = e_theme_edje_file_get("base/theme/background",
|
||||||
bgfile = e_theme_edje_file_get("base/theme/background", "e/desktop/background");
|
"e/desktop/background");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return bgfile;
|
return bgfile;
|
||||||
|
@ -165,8 +167,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
||||||
const char *pfile = "";
|
const char *pfile = "";
|
||||||
|
|
||||||
edje_object_file_get(zone->bg_object, &pfile, NULL);
|
edje_object_file_get(zone->bg_object, &pfile, NULL);
|
||||||
if (!e_util_strcmp(pfile, bgfile))
|
if (!e_util_strcmp(pfile, bgfile)) return;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transition == E_BG_TRANSITION_NONE)
|
if (transition == E_BG_TRANSITION_NONE)
|
||||||
|
@ -278,7 +279,7 @@ e_bg_add(int container, int zone, int desk_x, int desk_y, char *file)
|
||||||
EAPI void
|
EAPI void
|
||||||
e_bg_del(int container, int zone, int desk_x, int desk_y)
|
e_bg_del(int container, int zone, int desk_x, int desk_y)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l = NULL;
|
||||||
E_Event_Bg_Update *ev;
|
E_Event_Bg_Update *ev;
|
||||||
|
|
||||||
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
||||||
|
@ -286,6 +287,7 @@ e_bg_del(int container, int zone, int desk_x, int desk_y)
|
||||||
E_Config_Desktop_Background *cfbg;
|
E_Config_Desktop_Background *cfbg;
|
||||||
|
|
||||||
cfbg = l->data;
|
cfbg = l->data;
|
||||||
|
if (!cfbg) continue;
|
||||||
if ((cfbg->container == container) && (cfbg->zone == zone) &&
|
if ((cfbg->container == container) && (cfbg->zone == zone) &&
|
||||||
(cfbg->desk_x == desk_x) && (cfbg->desk_y == desk_y))
|
(cfbg->desk_x == desk_x) && (cfbg->desk_y == desk_y))
|
||||||
{
|
{
|
||||||
|
@ -336,7 +338,6 @@ _e_bg_signal(void *data, Evas_Object *obj, const char *emission, const char *sou
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
zone = data;
|
zone = data;
|
||||||
|
|
||||||
if (zone->prev_bg_object)
|
if (zone->prev_bg_object)
|
||||||
{
|
{
|
||||||
evas_object_del(zone->prev_bg_object);
|
evas_object_del(zone->prev_bg_object);
|
||||||
|
|
Loading…
Reference in New Issue