forked from enlightenment/enlightenment
Tiling2: Added a config to disable floating mode.
This commit is contained in:
parent
99e8b518f2
commit
8254aa45b2
|
@ -182,6 +182,8 @@ _basic_create_widgets(E_Config_Dialog * cfd EINA_UNUSED, Evas * evas,
|
|||
_("Show window titles"), &cfdata->config.show_titles));
|
||||
e_widget_framelist_object_append(of, e_widget_check_add(evas,
|
||||
_("Tile dialog windows"), &cfdata->config.tile_dialogs));
|
||||
e_widget_framelist_object_append(of, e_widget_check_add(evas,
|
||||
_("Enable floating split-mode"), &cfdata->config.have_floating_mode));
|
||||
|
||||
LIST_ADD(o, of);
|
||||
|
||||
|
@ -235,6 +237,7 @@ _basic_apply_data(E_Config_Dialog * cfd EINA_UNUSED,
|
|||
|
||||
tiling_g.config->tile_dialogs = cfdata->config.tile_dialogs;
|
||||
tiling_g.config->show_titles = cfdata->config.show_titles;
|
||||
tiling_g.config->have_floating_mode = cfdata->config.have_floating_mode;
|
||||
|
||||
/* Check if the layout for one of the vdesks has changed */
|
||||
for (l = tiling_g.config->vdesks; l; l = l->next)
|
||||
|
|
|
@ -702,6 +702,13 @@ _tiling_split_type_next(void)
|
|||
Eina_List *itr;
|
||||
_G.split_type = (_G.split_type + 1) % TILING_SPLIT_LAST;
|
||||
|
||||
/* If we don't allow floating, skip it. */
|
||||
if (!tiling_g.config->have_floating_mode &&
|
||||
(_G.split_type == TILING_SPLIT_FLOAT))
|
||||
{
|
||||
_G.split_type = (_G.split_type + 1) % TILING_SPLIT_LAST;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(tiling_g.gadget_instances, itr, inst)
|
||||
{
|
||||
_gadget_icon_set(inst);
|
||||
|
@ -1244,6 +1251,7 @@ e_modapi_init(E_Module * m)
|
|||
|
||||
E_CONFIG_VAL(_G.config_edd, Config, tile_dialogs, INT);
|
||||
E_CONFIG_VAL(_G.config_edd, Config, show_titles, INT);
|
||||
E_CONFIG_VAL(_G.config_edd, Config, have_floating_mode, INT);
|
||||
|
||||
E_CONFIG_LIST(_G.config_edd, Config, vdesks, _G.vdesk_edd);
|
||||
E_CONFIG_VAL(_G.vdesk_edd, struct _Config_vdesk, x, INT);
|
||||
|
@ -1257,10 +1265,12 @@ e_modapi_init(E_Module * m)
|
|||
tiling_g.config = E_NEW(Config, 1);
|
||||
tiling_g.config->tile_dialogs = 1;
|
||||
tiling_g.config->show_titles = 1;
|
||||
tiling_g.config->have_floating_mode = 1;
|
||||
}
|
||||
|
||||
E_CONFIG_LIMIT(tiling_g.config->tile_dialogs, 0, 1);
|
||||
E_CONFIG_LIMIT(tiling_g.config->show_titles, 0, 1);
|
||||
E_CONFIG_LIMIT(tiling_g.config->have_floating_mode, 0, 1);
|
||||
|
||||
for (l = tiling_g.config->vdesks; l; l = l->next)
|
||||
{
|
||||
|
|
|
@ -41,6 +41,7 @@ struct _Config
|
|||
{
|
||||
int tile_dialogs;
|
||||
int show_titles;
|
||||
int have_floating_mode;
|
||||
Eina_List *vdesks;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue