tasks - add options to show windows form all desks/screens
@feat
This commit is contained in:
parent
d2b860702e
commit
0e4b8509dd
|
@ -4,7 +4,8 @@
|
|||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
Evas_Object *icon, *text;
|
||||
int show_all;
|
||||
int show_all_desktops;
|
||||
int show_all_screens;
|
||||
int minw, minh;
|
||||
int icon_only;
|
||||
int text_only;
|
||||
|
@ -41,7 +42,8 @@ _config_tasks_module(Config_Item *ci)
|
|||
static void
|
||||
_fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
cfdata->show_all = ci->show_all;
|
||||
cfdata->show_all_desktops = ci->show_all_desktops;
|
||||
cfdata->show_all_screens = ci->show_all_screens;
|
||||
cfdata->minw = ci->minw;
|
||||
cfdata->minh = ci->minh;
|
||||
cfdata->icon_only = ci->icon_only;
|
||||
|
@ -87,7 +89,10 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
|
|||
|
||||
of = e_widget_framelist_add(evas, _("Display"), 0);
|
||||
ob = e_widget_check_add(evas, _("Show windows from all desktops"),
|
||||
&(cfdata->show_all));
|
||||
&(cfdata->show_all_desktops));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Show windows from all screens"),
|
||||
&(cfdata->show_all_screens));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
cfdata->icon = ob = e_widget_check_add(evas, _("Show icon only"),
|
||||
&(cfdata->icon_only));
|
||||
|
@ -133,7 +138,8 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
Config_Item *ci;
|
||||
|
||||
ci = cfd->data;
|
||||
ci->show_all = cfdata->show_all;
|
||||
ci->show_all_desktops = cfdata->show_all_desktops;
|
||||
ci->show_all_screens = cfdata->show_all_screens;
|
||||
ci->minw = cfdata->minw;
|
||||
ci->minh = cfdata->minh;
|
||||
ci->icon_only = cfdata->icon_only;
|
||||
|
|
|
@ -120,7 +120,8 @@ e_modapi_init(E_Module *m)
|
|||
#define T Config_Item
|
||||
#define D conf_item_edd
|
||||
E_CONFIG_VAL(D, T, id, STR);
|
||||
E_CONFIG_VAL(D, T, show_all, INT);
|
||||
E_CONFIG_VAL(D, T, show_all_desktops, INT);
|
||||
E_CONFIG_VAL(D, T, show_all_screens, INT);
|
||||
E_CONFIG_VAL(D, T, minw, INT);
|
||||
E_CONFIG_VAL(D, T, minh, INT);
|
||||
E_CONFIG_VAL(D, T, preview_size, INT);
|
||||
|
@ -145,7 +146,8 @@ e_modapi_init(E_Module *m)
|
|||
|
||||
config = E_NEW(Config_Item, 1);
|
||||
config->id = eina_stringshare_add("0");
|
||||
config->show_all = 0;
|
||||
config->show_all_desktops = 0;
|
||||
config->show_all_screens = 0;
|
||||
config->minw = 100;
|
||||
config->minh = 32;
|
||||
config->preview = 0;
|
||||
|
@ -603,13 +605,19 @@ _tasks_item_check_add(Tasks *tasks, E_Client *ec)
|
|||
if (ec->stack.prev) return 1;
|
||||
if (_tasks_item_find(tasks, ec)) return 1;
|
||||
if (!tasks->config) return 1;
|
||||
if (!(tasks->config->show_all))
|
||||
|
||||
if (!(tasks->config->show_all_desktops))
|
||||
{
|
||||
if (ec->zone != tasks->zone) return 1;
|
||||
if ((ec->desk != e_desk_current_get(ec->zone)) &&
|
||||
(!ec->sticky))
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!(tasks->config->show_all_screens))
|
||||
{
|
||||
if (ec->zone != tasks->zone) return 1;
|
||||
}
|
||||
|
||||
_tasks_item_add(tasks, ec);
|
||||
return 0;
|
||||
}
|
||||
|
@ -780,7 +788,8 @@ _tasks_config_item_get(const char *id)
|
|||
|
||||
config = E_NEW(Config_Item, 1);
|
||||
config->id = eina_stringshare_add(id);
|
||||
config->show_all = 0;
|
||||
config->show_all_desktops = 0;
|
||||
config->show_all_screens = 0;
|
||||
config->minw = 100;
|
||||
config->minh = 32;
|
||||
|
||||
|
@ -1039,7 +1048,7 @@ _tasks_cb_item_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
|
|||
|
||||
if (ev->button == 1)
|
||||
{
|
||||
if (!item->client->sticky && item->tasks->config->show_all)
|
||||
if (!item->client->sticky && item->tasks->config->show_all_desktops)
|
||||
e_desk_show(item->client->desk);
|
||||
if (evas_key_modifier_is_set(ev->modifiers, "Alt"))
|
||||
{
|
||||
|
@ -1089,7 +1098,7 @@ _tasks_cb_item_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
|
|||
}
|
||||
else if (ev->button == 2)
|
||||
{
|
||||
if (!item->client->sticky && item->tasks->config->show_all)
|
||||
if (!item->client->sticky && item->tasks->config->show_all_desktops)
|
||||
e_desk_show(item->client->desk);
|
||||
evas_object_raise(item->client->frame);
|
||||
evas_object_focus_set(item->client->frame, 1);
|
||||
|
|
|
@ -18,7 +18,8 @@ struct _Config
|
|||
struct _Config_Item
|
||||
{
|
||||
const char *id;
|
||||
int show_all;
|
||||
int show_all_desktops;
|
||||
int show_all_screens;
|
||||
int minw, minh;
|
||||
int preview_size;
|
||||
Eina_Bool icon_only;
|
||||
|
|
Loading…
Reference in New Issue