forked from enlightenment/enlightenment
parent
472f87ff96
commit
f25d473428
|
@ -73,10 +73,9 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
||||||
(zone->container->num != cfbg->container)) continue;
|
(zone->container->num != cfbg->container)) continue;
|
||||||
if ((cfbg->zone >= 0) &&
|
if ((cfbg->zone >= 0) &&
|
||||||
(zone->num != cfbg->zone)) continue;
|
(zone->num != cfbg->zone)) continue;
|
||||||
if ((!cfbg->desk) || (strlen(cfbg->desk) == 0)) continue;
|
|
||||||
desk = e_desk_current_get(zone);
|
desk = e_desk_current_get(zone);
|
||||||
if (!desk) continue;
|
if (!desk) continue;
|
||||||
if (strcmp(cfbg->desk, desk->name)) continue;
|
if ((cfbg->desk_x != desk->x) || (cfbg->desk_y != desk->y)) continue;
|
||||||
ok = edje_object_file_set(o, cfbg->file,
|
ok = edje_object_file_set(o, cfbg->file,
|
||||||
"desktop/background");
|
"desktop/background");
|
||||||
break;
|
break;
|
||||||
|
@ -119,21 +118,22 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
e_bg_add(int container, int zone, char *desk, char *file)
|
e_bg_add(int container, int zone, int desk_x, int desk_y, char *file)
|
||||||
{
|
{
|
||||||
E_Config_Desktop_Background *cfbg;
|
E_Config_Desktop_Background *cfbg;
|
||||||
|
|
||||||
e_bg_del(container, zone, desk);
|
e_bg_del(container, zone, desk_x, desk_y);
|
||||||
cfbg = E_NEW(E_Config_Desktop_Background, 1);
|
cfbg = E_NEW(E_Config_Desktop_Background, 1);
|
||||||
cfbg->container = container;
|
cfbg->container = container;
|
||||||
cfbg->zone = zone;
|
cfbg->zone = zone;
|
||||||
cfbg->desk = strdup(desk);
|
cfbg->desk_x = desk_x;
|
||||||
|
cfbg->desk_y = desk_y;
|
||||||
cfbg->file = strdup(file);
|
cfbg->file = strdup(file);
|
||||||
e_config->desktop_backgrounds = evas_list_append(e_config->desktop_backgrounds, cfbg);
|
e_config->desktop_backgrounds = evas_list_append(e_config->desktop_backgrounds, cfbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
e_bg_del(int container, int zone, char *desk)
|
e_bg_del(int container, int zone, int desk_x, int desk_y)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
|
||||||
|
@ -143,10 +143,9 @@ e_bg_del(int container, int zone, char *desk)
|
||||||
|
|
||||||
cfbg = l->data;
|
cfbg = l->data;
|
||||||
if ((cfbg->container == container) && (cfbg->zone == zone) &&
|
if ((cfbg->container == container) && (cfbg->zone == zone) &&
|
||||||
(!strcmp(cfbg->desk, desk)))
|
(cfbg->desk_x == desk_x) && (cfbg->desk_y == desk_y))
|
||||||
{
|
{
|
||||||
e_config->desktop_backgrounds = evas_list_remove_list(e_config->desktop_backgrounds, l);
|
e_config->desktop_backgrounds = evas_list_remove_list(e_config->desktop_backgrounds, l);
|
||||||
IF_FREE(cfbg->desk);
|
|
||||||
IF_FREE(cfbg->file);
|
IF_FREE(cfbg->file);
|
||||||
free(cfbg);
|
free(cfbg);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -15,8 +15,8 @@ typedef enum {
|
||||||
#define E_BG_H
|
#define E_BG_H
|
||||||
|
|
||||||
EAPI void e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition);
|
EAPI void e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition);
|
||||||
EAPI void e_bg_add(int container, int zone, char *desk, char *file);
|
EAPI void e_bg_add(int container, int zone, int desk_x, int desk_y, char *file);
|
||||||
EAPI void e_bg_del(int container, int zone, char *desk);
|
EAPI void e_bg_del(int container, int zone, int desk_x, int desk_y);
|
||||||
EAPI void e_bg_update(void);
|
EAPI void e_bg_update(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,7 +45,8 @@ e_config_init(void)
|
||||||
#define D _e_config_desktop_bg_edd
|
#define D _e_config_desktop_bg_edd
|
||||||
E_CONFIG_VAL(D, T, container, INT);
|
E_CONFIG_VAL(D, T, container, INT);
|
||||||
E_CONFIG_VAL(D, T, zone, INT);
|
E_CONFIG_VAL(D, T, zone, INT);
|
||||||
E_CONFIG_VAL(D, T, desk, STR);
|
E_CONFIG_VAL(D, T, desk_x, INT);
|
||||||
|
E_CONFIG_VAL(D, T, desk_y, INT);
|
||||||
E_CONFIG_VAL(D, T, file, STR);
|
E_CONFIG_VAL(D, T, file, STR);
|
||||||
|
|
||||||
_e_config_path_append_edd = E_CONFIG_DD_NEW("E_Path_Dir", E_Path_Dir);
|
_e_config_path_append_edd = E_CONFIG_DD_NEW("E_Path_Dir", E_Path_Dir);
|
||||||
|
|
|
@ -172,7 +172,8 @@ struct _E_Config_Desktop_Background
|
||||||
{
|
{
|
||||||
int container;
|
int container;
|
||||||
int zone;
|
int zone;
|
||||||
char *desk;
|
int desk_x;
|
||||||
|
int desk_y;
|
||||||
char *file;
|
char *file;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2844,16 +2844,16 @@ break;
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
#define HDL E_IPC_OP_DESKTOP_BG_ADD
|
#define HDL E_IPC_OP_DESKTOP_BG_ADD
|
||||||
#if (TYPE == E_REMOTE_OPTIONS)
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
OP("-desktop-bg-add", 4, "Add a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desktop name OPT4 = bg file path", 0, HDL)
|
OP("-desktop-bg-add", 5, "Add a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desk_x. OPT4 = desk_y. OPT5 = bg file path", 0, HDL)
|
||||||
#elif (TYPE == E_REMOTE_OUT)
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
REQ_3INT_3STRING_START(HDL);
|
REQ_4INT_2STRING_START(HDL);
|
||||||
REQ_3INT_3STRING_END(atoi(params[0]), atoi(params[1]), 0, params[2], params[3], "", HDL);
|
REQ_4INT_2STRING_END(atoi(params[0]), atoi(params[1]), atoi(params[2]), atoi(params[3]), params[4], "", HDL);
|
||||||
#elif (TYPE == E_WM_IN)
|
#elif (TYPE == E_WM_IN)
|
||||||
INT3_STRING3(v, HDL);
|
INT4_STRING2(v, HDL);
|
||||||
e_bg_add(v->val1, v->val2, v->str1, v->str2);
|
e_bg_add(v->val1, v->val2, v->val3, v->val4, v->str1);
|
||||||
e_bg_update();
|
e_bg_update();
|
||||||
SAVE;
|
SAVE;
|
||||||
END_INT3_STRING3(v);
|
END_INT4_STRING2(v);
|
||||||
#elif (TYPE == E_REMOTE_IN)
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
#endif
|
#endif
|
||||||
#undef HDL
|
#undef HDL
|
||||||
|
@ -2861,16 +2861,16 @@ break;
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
#define HDL E_IPC_OP_DESKTOP_BG_DEL
|
#define HDL E_IPC_OP_DESKTOP_BG_DEL
|
||||||
#if (TYPE == E_REMOTE_OPTIONS)
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
OP("-desktop-bg-del", 3, "Delete a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desktop name", 0, HDL)
|
OP("-desktop-bg-del", 4, "Delete a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desk_x. OPT4 = desk_y.", 0, HDL)
|
||||||
#elif (TYPE == E_REMOTE_OUT)
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
REQ_3INT_3STRING_START(HDL);
|
REQ_4INT_2STRING_START(HDL);
|
||||||
REQ_3INT_3STRING_END(atoi(params[0]), atoi(params[1]), 0, params[2], "", "", HDL);
|
REQ_4INT_2STRING_END(atoi(params[0]), atoi(params[1]), atoi(params[2]), atoi(params[3]), "", "", HDL);
|
||||||
#elif (TYPE == E_WM_IN)
|
#elif (TYPE == E_WM_IN)
|
||||||
INT3_STRING3(v, HDL);
|
INT4_STRING2(v, HDL);
|
||||||
e_bg_del(v->val1, v->val2, v->str1);
|
e_bg_del(v->val1, v->val2, v->val3, v->val4);
|
||||||
e_bg_update();
|
e_bg_update();
|
||||||
SAVE;
|
SAVE;
|
||||||
END_INT3_STRING3(v);
|
END_INT4_STRING2(v);
|
||||||
#elif (TYPE == E_REMOTE_IN)
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
#endif
|
#endif
|
||||||
#undef HDL
|
#undef HDL
|
||||||
|
@ -2882,14 +2882,14 @@ break;
|
||||||
#elif (TYPE == E_REMOTE_OUT)
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
REQ_NULL(HDL);
|
REQ_NULL(HDL);
|
||||||
#elif (TYPE == E_WM_IN)
|
#elif (TYPE == E_WM_IN)
|
||||||
SEND_INT3_STRING3_LIST(e_config->desktop_backgrounds, E_Config_Desktop_Background, cfbg, v, HDL);
|
SEND_INT4_STRING2_LIST(e_config->desktop_backgrounds, E_Config_Desktop_Background, cfbg, v, HDL);
|
||||||
v->val1 = cfbg->container;
|
v->val1 = cfbg->container;
|
||||||
v->val2 = cfbg->zone;
|
v->val2 = cfbg->zone;
|
||||||
v->val3 = 0;
|
v->val3 = cfbg->desk_x;
|
||||||
v->str1 = cfbg->desk;
|
v->val4 = cfbg->desk_y;
|
||||||
v->str2 = cfbg->file;
|
v->str1 = cfbg->file;
|
||||||
v->str3 = "";
|
v->str2 = "";
|
||||||
END_SEND_INT3_STRING3_LIST(v, E_IPC_OP_DESKTOP_BG_LIST_REPLY);
|
END_SEND_INT4_STRING2_LIST(v, E_IPC_OP_DESKTOP_BG_LIST_REPLY);
|
||||||
#elif (TYPE == E_REMOTE_IN)
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
#endif
|
#endif
|
||||||
#undef HDL
|
#undef HDL
|
||||||
|
@ -2900,10 +2900,10 @@ break;
|
||||||
#elif (TYPE == E_REMOTE_OUT)
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
#elif (TYPE == E_WM_IN)
|
#elif (TYPE == E_WM_IN)
|
||||||
#elif (TYPE == E_REMOTE_IN)
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
INT3_STRING3_LIST(v, HDL);
|
INT4_STRING2_LIST(v, HDL);
|
||||||
printf("REPLY: BG CONTAINER=%i ZONE=%i DESK=\"%s\" FILE=\"%s\"\n",
|
printf("REPLY: BG CONTAINER=%i ZONE=%i DESK_X=%i DESK_Y=%i FILE=\"%s\"\n",
|
||||||
v->val1, v->val2, v->str1, v->str2);
|
v->val1, v->val2, v->val3, v->val4, v->str1);
|
||||||
END_INT3_STRING3_LIST(v);
|
END_INT4_STRING2_LIST(v);
|
||||||
#endif
|
#endif
|
||||||
#undef HDL
|
#undef HDL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue