added an option for the shelf to let itself be overlapped by maximized windows

SVN revision: 26282
This commit is contained in:
Viktor Kojouharov 2006-10-01 20:10:37 +00:00
parent d34318fae3
commit b54e1cdc4c
6 changed files with 20 additions and 8 deletions

View File

@ -120,6 +120,7 @@ e_config_init(void)
E_CONFIG_VAL(D, T, fit_size, UCHAR);
E_CONFIG_VAL(D, T, style, STR);
E_CONFIG_VAL(D, T, size, INT);
E_CONFIG_VAL(D, T, overlap, INT);
_e_config_desktop_bg_edd = E_CONFIG_DD_NEW("E_Config_Desktop_Background", E_Config_Desktop_Background);
#undef T
@ -1112,7 +1113,7 @@ e_config_init(void)
{
E_Config_Shelf *cf_es;
#define CFG_SHELF(_name, _con, _zone, _pop, _lay, _orient, _fita, _fits, _style, _size) \
#define CFG_SHELF(_name, _con, _zone, _pop, _lay, _orient, _fita, _fits, _style, _size, _overlap) \
cf_es = E_NEW(E_Config_Shelf, 1); \
cf_es->name = evas_stringshare_add(_name); \
cf_es->container = _con; \
@ -1124,30 +1125,31 @@ e_config_init(void)
cf_es->fit_size = _fits; \
cf_es->style = evas_stringshare_add(_style); \
cf_es->size = _size; \
cf_es->overlap = _overlap; \
e_config->shelves = evas_list_append(e_config->shelves, cf_es)
/* shelves for 4 zones on head 0 by default */
CFG_SHELF("shelf", 0, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
1, 0, "default", 40, 0);
CFG_SHELF("shelf", 0, 1,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
1, 0, "default", 40, 0);
CFG_SHELF("shelf", 0, 2,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
1, 0, "default", 40, 0);
CFG_SHELF("shelf", 0, 3,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
1, 0, "default", 40, 0);
/* shelves for heada 1, 2, and 3 by default */
CFG_SHELF("shelf", 1, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
1, 0, "default", 40, 0);
CFG_SHELF("shelf", 2, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
1, 0, "default", 40, 0);
CFG_SHELF("shelf", 3, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
1, 0, "default", 40, 0);
}
{
E_Config_Gadcon *cf_gc;

View File

@ -360,6 +360,7 @@ struct _E_Config_Shelf
unsigned char fit_size;
const char *style;
int size;
int overlap;
};
struct _E_Config_Mime_Icon

View File

@ -216,6 +216,7 @@ _cb_add(void *data, void *data2)
cfg->fit_size = 0;
cfg->style = evas_stringshare_add("default");
cfg->size = 40;
cfg->overlap = 0;
e_config->shelves = evas_list_append(e_config->shelves, cfg);
e_config_save_queue();

View File

@ -34,6 +34,7 @@ struct _E_Config_Dialog_Data
int fit_size;
int size;
int layering;
int overlapping;
};
/* a nice easy setup function that does the dirty work */
@ -113,6 +114,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->fit_along = cfdata->escfg->fit_along;
cfdata->fit_size = cfdata->escfg->fit_size;
cfdata->size = cfdata->escfg->size;
cfdata->overlapping = cfdata->escfg->overlap;
if (cfdata->size <= 24)
cfdata->basic_size = 24;
else if (cfdata->size <= 32)
@ -332,6 +334,8 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
}
}
cfdata->escfg->overlap = cfdata->overlapping;
if (restart)
{
zone = cfdata->es->zone;
@ -440,6 +444,8 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Below Everything"), 0, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Allow windows to overlap the shelf"), &(cfdata->overlapping));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o2, of, 1, 1, 0.5);
of = e_widget_frametable_add(evas, _("Layout"), 1);

View File

@ -135,6 +135,7 @@ e_maximize_border_shelf_fill(E_Border *bd, int *x1, int *y1, int *x2, int *y2, E
E_Shelf *es;
es = l->data;
if (es->cfg->overlap) continue;
if (es->zone != bd->zone) continue;
OBSTACLE(es->x + es->zone->x, es->y + es->zone->y,
es->x + es->zone->x + es->w, es->y + es->zone->y + es->h);

View File

@ -314,6 +314,7 @@ e_shelf_save(E_Shelf *es)
cf_es->style = evas_stringshare_add(es->style);
cf_es->fit_along = es->fit_along;
cf_es->fit_size = es->fit_size;
cf_es->overlap = 0;
es->cfg = cf_es;
}
e_config_save_queue();