forked from enlightenment/enlightenment
remove manager references in desk name/profile configs
This commit is contained in:
parent
a94668927c
commit
dedf4cd896
|
@ -211,8 +211,6 @@ _e_config_edd_init(Eina_Bool old)
|
|||
#undef D
|
||||
#define T E_Config_Desktop_Name
|
||||
#define D _e_config_desktop_name_edd
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(D, T, "container", manager, EET_T_INT);
|
||||
E_CONFIG_VAL(D, T, manager /*container */, INT);
|
||||
E_CONFIG_VAL(D, T, zone, INT);
|
||||
E_CONFIG_VAL(D, T, desk_x, INT);
|
||||
E_CONFIG_VAL(D, T, desk_y, INT);
|
||||
|
@ -223,7 +221,6 @@ _e_config_edd_init(Eina_Bool old)
|
|||
#undef D
|
||||
#define T E_Config_Desktop_Window_Profile
|
||||
#define D _e_config_desktop_window_profile_edd
|
||||
E_CONFIG_VAL(D, T, manager, INT);
|
||||
E_CONFIG_VAL(D, T, zone, INT);
|
||||
E_CONFIG_VAL(D, T, desk_x, INT);
|
||||
E_CONFIG_VAL(D, T, desk_y, INT);
|
||||
|
|
|
@ -550,7 +550,6 @@ struct _E_Config_Desktop_Background
|
|||
|
||||
struct _E_Config_Desktop_Name
|
||||
{
|
||||
int manager;
|
||||
int zone;
|
||||
int desk_x;
|
||||
int desk_y;
|
||||
|
@ -559,7 +558,6 @@ struct _E_Config_Desktop_Name
|
|||
|
||||
struct _E_Config_Desktop_Window_Profile
|
||||
{
|
||||
int manager;
|
||||
int zone;
|
||||
int desk_x;
|
||||
int desk_y;
|
||||
|
|
|
@ -67,8 +67,6 @@ e_desk_new(E_Zone *zone, int x, int y)
|
|||
/* Get current desktop's name */
|
||||
EINA_LIST_FOREACH(e_config->desktop_names, l, cfname)
|
||||
{
|
||||
if ((cfname->manager >= 0) &&
|
||||
((int)e_comp->num != cfname->manager)) continue;
|
||||
if ((cfname->zone >= 0) &&
|
||||
((int)zone->num != cfname->zone)) continue;
|
||||
if ((cfname->desk_x != desk->x) || (cfname->desk_y != desk->y))
|
||||
|
@ -87,8 +85,6 @@ e_desk_new(E_Zone *zone, int x, int y)
|
|||
ok = 0;
|
||||
EINA_LIST_FOREACH(e_config->desktop_window_profiles, l, cfprof)
|
||||
{
|
||||
if ((cfprof->manager >= 0) &&
|
||||
((int)e_comp->num != cfprof->manager)) continue;
|
||||
if ((cfprof->zone >= 0) &&
|
||||
((int)zone->num != cfprof->zone)) continue;
|
||||
if ((cfprof->desk_x != desk->x) || (cfprof->desk_y != desk->y))
|
||||
|
@ -134,14 +130,13 @@ e_desk_name_set(E_Desk *desk, const char *name)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
e_desk_name_add(int manager, int zone, int desk_x, int desk_y, const char *name)
|
||||
e_desk_name_add(int zone, int desk_x, int desk_y, const char *name)
|
||||
{
|
||||
E_Config_Desktop_Name *cfname;
|
||||
|
||||
e_desk_name_del(manager, zone, desk_x, desk_y);
|
||||
e_desk_name_del(zone, desk_x, desk_y);
|
||||
|
||||
cfname = E_NEW(E_Config_Desktop_Name, 1);
|
||||
cfname->manager = manager;
|
||||
cfname->zone = zone;
|
||||
cfname->desk_x = desk_x;
|
||||
cfname->desk_y = desk_y;
|
||||
|
@ -151,14 +146,14 @@ e_desk_name_add(int manager, int zone, int desk_x, int desk_y, const char *name)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
e_desk_name_del(int manager, int zone, int desk_x, int desk_y)
|
||||
e_desk_name_del(int zone, int desk_x, int desk_y)
|
||||
{
|
||||
Eina_List *l = NULL;
|
||||
E_Config_Desktop_Name *cfname = NULL;
|
||||
|
||||
EINA_LIST_FOREACH(e_config->desktop_names, l, cfname)
|
||||
{
|
||||
if ((cfname->manager == manager) && (cfname->zone == zone) &&
|
||||
if ((cfname->zone == zone) &&
|
||||
(cfname->desk_x == desk_x) && (cfname->desk_y == desk_y))
|
||||
{
|
||||
e_config->desktop_names =
|
||||
|
@ -191,8 +186,6 @@ e_desk_name_update(void)
|
|||
|
||||
EINA_LIST_FOREACH(e_config->desktop_names, l, cfname)
|
||||
{
|
||||
if ((cfname->manager >= 0) &&
|
||||
((int)e_comp->num != cfname->manager)) continue;
|
||||
if ((cfname->zone >= 0) &&
|
||||
((int)zone->num != cfname->zone)) continue;
|
||||
if ((cfname->desk_x != d_x) ||
|
||||
|
@ -564,18 +557,16 @@ e_desk_window_profile_set(E_Desk *desk,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
e_desk_window_profile_add(int manager,
|
||||
int zone,
|
||||
e_desk_window_profile_add(int zone,
|
||||
int desk_x,
|
||||
int desk_y,
|
||||
const char *profile)
|
||||
{
|
||||
E_Config_Desktop_Window_Profile *cfprof;
|
||||
|
||||
e_desk_window_profile_del(manager, zone, desk_x, desk_y);
|
||||
e_desk_window_profile_del(zone, desk_x, desk_y);
|
||||
|
||||
cfprof = E_NEW(E_Config_Desktop_Window_Profile, 1);
|
||||
cfprof->manager = manager;
|
||||
cfprof->zone = zone;
|
||||
cfprof->desk_x = desk_x;
|
||||
cfprof->desk_y = desk_y;
|
||||
|
@ -584,8 +575,7 @@ e_desk_window_profile_add(int manager,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
e_desk_window_profile_del(int manager,
|
||||
int zone,
|
||||
e_desk_window_profile_del(int zone,
|
||||
int desk_x,
|
||||
int desk_y)
|
||||
{
|
||||
|
@ -594,8 +584,7 @@ e_desk_window_profile_del(int manager,
|
|||
|
||||
EINA_LIST_FOREACH(e_config->desktop_window_profiles, l, cfprof)
|
||||
{
|
||||
if (!((cfprof->manager == manager) &&
|
||||
(cfprof->zone == zone) &&
|
||||
if (!((cfprof->zone == zone) &&
|
||||
(cfprof->desk_x == desk_x) &&
|
||||
(cfprof->desk_y == desk_y)))
|
||||
continue;
|
||||
|
@ -633,8 +622,6 @@ e_desk_window_profile_update(void)
|
|||
|
||||
EINA_LIST_FOREACH(e_config->desktop_window_profiles, l, cfprof)
|
||||
{
|
||||
if ((cfprof->manager >= 0) &&
|
||||
((int)e_comp->num != cfprof->manager)) continue;
|
||||
if ((cfprof->zone >= 0) &&
|
||||
((int)zone->num != cfprof->zone)) continue;
|
||||
if ((cfprof->desk_x != d_x) ||
|
||||
|
|
|
@ -68,8 +68,8 @@ EINTERN int e_desk_init(void);
|
|||
EINTERN int e_desk_shutdown(void);
|
||||
EAPI E_Desk *e_desk_new(E_Zone *zone, int x, int y);
|
||||
EAPI void e_desk_name_set(E_Desk *desk, const char *name);
|
||||
EAPI void e_desk_name_add(int manager, int zone, int desk_x, int desk_y, const char *name);
|
||||
EAPI void e_desk_name_del(int manager, int zone, int desk_x, int desk_y);
|
||||
EAPI void e_desk_name_add(int zone, int desk_x, int desk_y, const char *name);
|
||||
EAPI void e_desk_name_del(int zone, int desk_x, int desk_y);
|
||||
EAPI void e_desk_name_update(void);
|
||||
EAPI void e_desk_show(E_Desk *desk);
|
||||
EAPI void e_desk_deskshow(E_Zone *zone);
|
||||
|
@ -86,8 +86,8 @@ EAPI void e_desk_row_remove(E_Zone *zone);
|
|||
EAPI void e_desk_col_add(E_Zone *zone);
|
||||
EAPI void e_desk_col_remove(E_Zone *zone);
|
||||
EAPI void e_desk_window_profile_set(E_Desk *desk, const char *profile);
|
||||
EAPI void e_desk_window_profile_add(int manager, int zone, int desk_x, int desk_y, const char *profile);
|
||||
EAPI void e_desk_window_profile_del(int manager, int zone, int desk_x, int desk_y);
|
||||
EAPI void e_desk_window_profile_add(int zone, int desk_x, int desk_y, const char *profile);
|
||||
EAPI void e_desk_window_profile_del(int zone, int desk_x, int desk_y);
|
||||
EAPI void e_desk_window_profile_update(void);
|
||||
|
||||
EAPI void e_desk_flip_cb_set(E_Desk_Flip_Cb cb, const void *data);
|
||||
|
|
|
@ -9,7 +9,6 @@ static Eina_Bool _cb_bg_change(void *data, int type, void *event);
|
|||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int man_num;
|
||||
int zone_num;
|
||||
int desk_x;
|
||||
int desk_y;
|
||||
|
@ -26,10 +25,10 @@ e_int_config_desk(Evas_Object *parent EINA_UNUSED, const char *params)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
int man_num, zone_num, dx, dy;
|
||||
int zone_num, dx, dy;
|
||||
|
||||
if (!params) return NULL;
|
||||
man_num = zone_num = dx = dy = -1;
|
||||
zone_num = dx = dy = -1;
|
||||
if (sscanf(params, "%i %i %i", &zone_num, &dx, &dy) != 4)
|
||||
return NULL;
|
||||
|
||||
|
@ -38,7 +37,6 @@ e_int_config_desk(Evas_Object *parent EINA_UNUSED, const char *params)
|
|||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||
cfdata->man_num = man_num;
|
||||
cfdata->zone_num = zone_num;
|
||||
cfdata->desk_x = dx;
|
||||
cfdata->desk_y = dy;
|
||||
|
@ -69,7 +67,6 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
|
||||
dn = l->data;
|
||||
if (!dn) continue;
|
||||
if (dn->manager != cfdata->man_num) continue;
|
||||
if (dn->zone != cfdata->zone_num) continue;
|
||||
if ((dn->desk_x != cfdata->desk_x) || (dn->desk_y != cfdata->desk_y))
|
||||
continue;
|
||||
|
@ -87,8 +84,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
ok = 0;
|
||||
EINA_LIST_FOREACH(e_config->desktop_window_profiles, l, prof)
|
||||
{
|
||||
if (!((prof->manager == cfdata->man_num) &&
|
||||
(prof->zone == cfdata->zone_num) &&
|
||||
if (!((prof->zone == cfdata->zone_num) &&
|
||||
(prof->desk_x == cfdata->desk_x) &&
|
||||
(prof->desk_y == cfdata->desk_y)))
|
||||
continue;
|
||||
|
@ -140,15 +136,15 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
if (!cfdata->profile[0])
|
||||
cfdata->profile = strdup(e_config->desktop_default_window_profile);
|
||||
e_desk_name_del(cfdata->man_num, cfdata->zone_num,
|
||||
e_desk_name_del(cfdata->zone_num,
|
||||
cfdata->desk_x, cfdata->desk_y);
|
||||
e_desk_name_add(cfdata->man_num, cfdata->zone_num,
|
||||
e_desk_name_add(cfdata->zone_num,
|
||||
cfdata->desk_x, cfdata->desk_y, cfdata->name);
|
||||
e_desk_name_update();
|
||||
|
||||
e_desk_window_profile_del(cfdata->man_num, cfdata->zone_num,
|
||||
e_desk_window_profile_del(cfdata->zone_num,
|
||||
cfdata->desk_x, cfdata->desk_y);
|
||||
e_desk_window_profile_add(cfdata->man_num, cfdata->zone_num,
|
||||
e_desk_window_profile_add(cfdata->zone_num,
|
||||
cfdata->desk_x, cfdata->desk_y, cfdata->profile);
|
||||
e_desk_window_profile_update();
|
||||
e_bg_del(cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
|
||||
|
|
Loading…
Reference in New Issue