forked from enlightenment/enlightenment
parent
0410c64a87
commit
5546f4109d
|
@ -14,13 +14,14 @@ static E_Fm2_Mime_Handler *bg_hdl = NULL;
|
||||||
|
|
||||||
struct _E_Bg_Image_Import_Handle
|
struct _E_Bg_Image_Import_Handle
|
||||||
{
|
{
|
||||||
struct {
|
struct
|
||||||
|
{
|
||||||
void (*func)(void *data, const char *edje_file);
|
void (*func)(void *data, const char *edje_file);
|
||||||
void *data;
|
void *data;
|
||||||
} cb;
|
} cb;
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
E_Util_Image_Import_Handle *importer;
|
E_Util_Image_Import_Handle *importer;
|
||||||
Eina_Bool canceled:1;
|
Eina_Bool canceled : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
|
@ -106,13 +107,17 @@ e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
|
||||||
if (!cfbg) continue;
|
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;
|
||||||
if (cfbg->zone == zone_num) spec++;
|
if (cfbg->zone == zone_num) spec++;
|
||||||
else if (cfbg->zone >= 0) continue;
|
else if (cfbg->zone >= 0)
|
||||||
|
continue;
|
||||||
if (cfbg->desk_x == desk_x) spec++;
|
if (cfbg->desk_x == desk_x) spec++;
|
||||||
else if (cfbg->desk_x >= 0) continue;
|
else if (cfbg->desk_x >= 0)
|
||||||
|
continue;
|
||||||
if (cfbg->desk_y == desk_y) spec++;
|
if (cfbg->desk_y == desk_y) spec++;
|
||||||
else if (cfbg->desk_y >= 0) continue;
|
else if (cfbg->desk_y >= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (spec <= current_spec) continue;
|
if (spec <= current_spec) continue;
|
||||||
bgfile = cfbg->file;
|
bgfile = cfbg->file;
|
||||||
|
@ -207,7 +212,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((bgfile) && (bgfile[0])) ok = 1;
|
else if ((bgfile) && (bgfile[0]))
|
||||||
|
ok = 1;
|
||||||
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");
|
||||||
|
@ -225,8 +231,10 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
||||||
E_Desk *desk;
|
E_Desk *desk;
|
||||||
|
|
||||||
if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start;
|
if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start;
|
||||||
else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk;
|
else if (transition == E_BG_TRANSITION_DESK)
|
||||||
else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change;
|
trans = e_config->transition_desk;
|
||||||
|
else if (transition == E_BG_TRANSITION_CHANGE)
|
||||||
|
trans = e_config->transition_change;
|
||||||
if ((!trans) || (!trans[0])) transition = E_BG_TRANSITION_NONE;
|
if ((!trans) || (!trans[0])) transition = E_BG_TRANSITION_NONE;
|
||||||
|
|
||||||
desk = e_desk_current_get(zone);
|
desk = e_desk_current_get(zone);
|
||||||
|
@ -615,7 +623,6 @@ e_bg_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __UNU
|
||||||
EAPI int
|
EAPI int
|
||||||
e_bg_handler_test(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
|
e_bg_handler_test(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!path) return 0;
|
if (!path) return 0;
|
||||||
|
|
||||||
if (_e_bg_file_edje_check(path))
|
if (_e_bg_file_edje_check(path))
|
||||||
|
@ -690,7 +697,7 @@ _e_bg_image_import_dialog_done(void *data, const char *path, Eina_Bool ok, Eina_
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aborted:
|
aborted:
|
||||||
if (handle->cb.func)
|
if (handle->cb.func)
|
||||||
{
|
{
|
||||||
handle->cb.func(handle->cb.data, NULL);
|
handle->cb.func(handle->cb.data, NULL);
|
||||||
|
@ -728,3 +735,4 @@ _e_bg_handler_image_imported(void *data __UNUSED__, const char *image_path)
|
||||||
e_bg_update();
|
e_bg_update();
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue