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
|
||||
e_bg_init(void)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
/* Register files in use */
|
||||
if (e_config->desktop_default_background)
|
||||
|
@ -23,7 +23,9 @@ e_bg_init(void)
|
|||
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
||||
{
|
||||
E_Config_Desktop_Background *cfbg;
|
||||
|
||||
cfbg = l->data;
|
||||
if (!cfbg) continue;
|
||||
e_filereg_register(cfbg->file);
|
||||
}
|
||||
|
||||
|
@ -34,7 +36,7 @@ e_bg_init(void)
|
|||
EAPI int
|
||||
e_bg_shutdown(void)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
/* Register files in use */
|
||||
if (e_config->desktop_default_background)
|
||||
|
@ -42,9 +44,11 @@ e_bg_shutdown(void)
|
|||
|
||||
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
||||
{
|
||||
E_Config_Desktop_Background *cfbg;
|
||||
cfbg = l->data;
|
||||
e_filereg_deregister(cfbg->file);
|
||||
E_Config_Desktop_Background *cfbg;
|
||||
|
||||
cfbg = l->data;
|
||||
if (!cfbg) continue;
|
||||
e_filereg_deregister(cfbg->file);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -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)
|
||||
{
|
||||
Evas_List *l, *ll, *entries;
|
||||
|
||||
E_Config_Desktop_Background *bg = NULL;
|
||||
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;
|
||||
|
||||
cfbg = l->data;
|
||||
|
||||
if (!cfbg) continue;
|
||||
spec = 0;
|
||||
if (cfbg->container == container_num) spec++;
|
||||
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);
|
||||
}
|
||||
if (!ok)
|
||||
{
|
||||
bgfile = e_theme_edje_file_get("base/theme/background", "e/desktop/background");
|
||||
}
|
||||
bgfile = e_theme_edje_file_get("base/theme/background",
|
||||
"e/desktop/background");
|
||||
}
|
||||
|
||||
return bgfile;
|
||||
|
@ -165,8 +167,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
|||
const char *pfile = "";
|
||||
|
||||
edje_object_file_get(zone->bg_object, &pfile, NULL);
|
||||
if (!e_util_strcmp(pfile, bgfile))
|
||||
return;
|
||||
if (!e_util_strcmp(pfile, bgfile)) return;
|
||||
}
|
||||
|
||||
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
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
cfbg = l->data;
|
||||
if (!cfbg) continue;
|
||||
if ((cfbg->container == container) && (cfbg->zone == zone) &&
|
||||
(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;
|
||||
|
||||
zone = data;
|
||||
|
||||
if (zone->prev_bg_object)
|
||||
{
|
||||
evas_object_del(zone->prev_bg_object);
|
||||
|
|
Loading…
Reference in New Issue