forked from enlightenment/enlightenment
add pager config option just for enabling live window previews -- off by default
SVN revision: 73587
This commit is contained in:
parent
eef8d26710
commit
558c9e0285
|
@ -29,7 +29,7 @@ struct _E_Config_Dialog_Data
|
||||||
Evas_Object *ob1, *ob2, *ob3;
|
Evas_Object *ob1, *ob2, *ob3;
|
||||||
Eina_List *popup_list, *urgent_list;
|
Eina_List *popup_list, *urgent_list;
|
||||||
} gui;
|
} gui;
|
||||||
int drag_resist, flip_desk, show_desk_names, disable_live_preview;
|
int drag_resist, flip_desk, show_desk_names, disable_live_preview, live_windows;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
@ -105,6 +105,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->btn.desk = pager_config->btn_desk;
|
cfdata->btn.desk = pager_config->btn_desk;
|
||||||
cfdata->flip_desk = pager_config->flip_desk;
|
cfdata->flip_desk = pager_config->flip_desk;
|
||||||
cfdata->disable_live_preview = pager_config->disable_live_preview;
|
cfdata->disable_live_preview = pager_config->disable_live_preview;
|
||||||
|
cfdata->live_windows = pager_config->live_windows;
|
||||||
cfdata->show_desk_names = pager_config->show_desk_names;
|
cfdata->show_desk_names = pager_config->show_desk_names;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,9 +132,12 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
|
||||||
ow = e_widget_check_add(evas, _("Show desktop names"),
|
ow = e_widget_check_add(evas, _("Show desktop names"),
|
||||||
&(cfdata->show_desk_names));
|
&(cfdata->show_desk_names));
|
||||||
e_widget_framelist_object_append(of, ow);
|
e_widget_framelist_object_append(of, ow);
|
||||||
ow = e_widget_check_add(evas, _("Disable live preview"),
|
ow = e_widget_check_add(evas, _("Disable desktop image preview"),
|
||||||
&(cfdata->disable_live_preview));
|
&(cfdata->disable_live_preview));
|
||||||
e_widget_framelist_object_append(of, ow);
|
e_widget_framelist_object_append(of, ow);
|
||||||
|
ow = e_widget_check_add(evas, _("Enable window preview (Needs Comp)"),
|
||||||
|
&(cfdata->live_windows));
|
||||||
|
e_widget_framelist_object_append(of, ow);
|
||||||
e_widget_list_object_append(ol, of, 1, 0, 0.5);
|
e_widget_list_object_append(ol, of, 1, 0, 0.5);
|
||||||
|
|
||||||
of = e_widget_framelist_add(evas, _("Popup"), 0);
|
of = e_widget_framelist_add(evas, _("Popup"), 0);
|
||||||
|
@ -154,6 +158,7 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
pager_config->popup = cfdata->popup.show;
|
pager_config->popup = cfdata->popup.show;
|
||||||
pager_config->flip_desk = cfdata->flip_desk;
|
pager_config->flip_desk = cfdata->flip_desk;
|
||||||
pager_config->disable_live_preview = cfdata->disable_live_preview;
|
pager_config->disable_live_preview = cfdata->disable_live_preview;
|
||||||
|
pager_config->live_windows = cfdata->live_windows;
|
||||||
pager_config->show_desk_names = cfdata->show_desk_names;
|
pager_config->show_desk_names = cfdata->show_desk_names;
|
||||||
pager_config->popup_urgent = cfdata->popup.urgent_show;
|
pager_config->popup_urgent = cfdata->popup.urgent_show;
|
||||||
_pager_cb_config_updated();
|
_pager_cb_config_updated();
|
||||||
|
@ -167,6 +172,7 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
|
||||||
if ((int)pager_config->popup != cfdata->popup.show) return 1;
|
if ((int)pager_config->popup != cfdata->popup.show) return 1;
|
||||||
if ((int)pager_config->flip_desk != cfdata->flip_desk) return 1;
|
if ((int)pager_config->flip_desk != cfdata->flip_desk) return 1;
|
||||||
if ((int)pager_config->disable_live_preview != cfdata->disable_live_preview) return 1;
|
if ((int)pager_config->disable_live_preview != cfdata->disable_live_preview) return 1;
|
||||||
|
if ((int)pager_config->live_windows != cfdata->live_windows) return 1;
|
||||||
if ((int)pager_config->show_desk_names != cfdata->show_desk_names) return 1;
|
if ((int)pager_config->show_desk_names != cfdata->show_desk_names) return 1;
|
||||||
if ((int)pager_config->popup_urgent != cfdata->popup.urgent_show) return 1;
|
if ((int)pager_config->popup_urgent != cfdata->popup.urgent_show) return 1;
|
||||||
|
|
||||||
|
@ -189,9 +195,12 @@ _adv_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *c
|
||||||
ow = e_widget_check_add(evas, _("Show desktop names"),
|
ow = e_widget_check_add(evas, _("Show desktop names"),
|
||||||
&(cfdata->show_desk_names));
|
&(cfdata->show_desk_names));
|
||||||
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
|
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
|
||||||
ow = e_widget_check_add(evas, _("Disable live preview"),
|
ow = e_widget_check_add(evas, _("Disable desktop image preview"),
|
||||||
&(cfdata->disable_live_preview));
|
&(cfdata->disable_live_preview));
|
||||||
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
|
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
|
||||||
|
ow = e_widget_check_add(evas, _("Enable window preview (Needs Comp)"),
|
||||||
|
&(cfdata->live_windows));
|
||||||
|
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
|
||||||
ow = e_widget_label_add(evas, _("Resistance to dragging"));
|
ow = e_widget_label_add(evas, _("Resistance to dragging"));
|
||||||
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
|
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
|
||||||
ow = e_widget_slider_add(evas, 1, 0, _("%.0f px"), 0.0, 10.0, 1.0, 0, NULL,
|
ow = e_widget_slider_add(evas, 1, 0, _("%.0f px"), 0.0, 10.0, 1.0, 0, NULL,
|
||||||
|
@ -301,6 +310,7 @@ _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
pager_config->popup_speed = cfdata->popup.speed;
|
pager_config->popup_speed = cfdata->popup.speed;
|
||||||
pager_config->flip_desk = cfdata->flip_desk;
|
pager_config->flip_desk = cfdata->flip_desk;
|
||||||
pager_config->disable_live_preview = cfdata->disable_live_preview;
|
pager_config->disable_live_preview = cfdata->disable_live_preview;
|
||||||
|
pager_config->live_windows = cfdata->live_windows;
|
||||||
pager_config->popup_urgent = cfdata->popup.urgent_show;
|
pager_config->popup_urgent = cfdata->popup.urgent_show;
|
||||||
pager_config->popup_urgent_stick = cfdata->popup.urgent_stick;
|
pager_config->popup_urgent_stick = cfdata->popup.urgent_stick;
|
||||||
pager_config->popup_urgent_focus = cfdata->popup.urgent_focus;
|
pager_config->popup_urgent_focus = cfdata->popup.urgent_focus;
|
||||||
|
@ -322,6 +332,7 @@ _adv_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata
|
||||||
{
|
{
|
||||||
if ((int)pager_config->popup != cfdata->popup.show) return 1;
|
if ((int)pager_config->popup != cfdata->popup.show) return 1;
|
||||||
if ((int)pager_config->disable_live_preview != cfdata->disable_live_preview) return 1;
|
if ((int)pager_config->disable_live_preview != cfdata->disable_live_preview) return 1;
|
||||||
|
if ((int)pager_config->live_windows != cfdata->live_windows) return 1;
|
||||||
if ((int)pager_config->show_desk_names != cfdata->show_desk_names) return 1;
|
if ((int)pager_config->show_desk_names != cfdata->show_desk_names) return 1;
|
||||||
if ((int)pager_config->popup_urgent != cfdata->popup.urgent_show) return 1;
|
if ((int)pager_config->popup_urgent != cfdata->popup.urgent_show) return 1;
|
||||||
if (pager_config->popup_speed != cfdata->popup.speed) return 1;
|
if (pager_config->popup_speed != cfdata->popup.speed) return 1;
|
||||||
|
|
|
@ -48,7 +48,7 @@ struct _Pager
|
||||||
unsigned char just_dragged : 1;
|
unsigned char just_dragged : 1;
|
||||||
Evas_Coord dnd_x, dnd_y;
|
Evas_Coord dnd_x, dnd_y;
|
||||||
Pager_Desk *active_drop_pd;
|
Pager_Desk *active_drop_pd;
|
||||||
Eina_Bool disable_live_preview : 1;
|
Eina_Bool live_windows : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Pager_Desk
|
struct _Pager_Desk
|
||||||
|
@ -292,7 +292,7 @@ _pager_new(Evas *evas, E_Zone *zone)
|
||||||
p = E_NEW(Pager, 1);
|
p = E_NEW(Pager, 1);
|
||||||
p->inst = NULL;
|
p->inst = NULL;
|
||||||
p->popup = NULL;
|
p->popup = NULL;
|
||||||
p->disable_live_preview = pager_config->disable_live_preview;
|
p->live_windows = pager_config->live_windows;
|
||||||
p->o_table = e_table_add(evas);
|
p->o_table = e_table_add(evas);
|
||||||
e_table_homogenous_set(p->o_table, 1);
|
e_table_homogenous_set(p->o_table, 1);
|
||||||
p->zone = zone;
|
p->zone = zone;
|
||||||
|
@ -693,7 +693,7 @@ _pager_window_new(Pager_Desk *pd, E_Border *border)
|
||||||
pw->o_window = o;
|
pw->o_window = o;
|
||||||
e_theme_edje_object_set(o, "base/theme/modules/pager",
|
e_theme_edje_object_set(o, "base/theme/modules/pager",
|
||||||
"e/modules/pager/window");
|
"e/modules/pager/window");
|
||||||
if (pager_config->disable_live_preview)
|
if (!pager_config->live_windows)
|
||||||
{
|
{
|
||||||
edje_object_signal_emit(o, "e,preview,off", "e");
|
edje_object_signal_emit(o, "e,preview,off", "e");
|
||||||
o = e_border_icon_add(border, evas_object_evas_get(pd->pager->o_table));
|
o = e_border_icon_add(border, evas_object_evas_get(pd->pager->o_table));
|
||||||
|
@ -986,7 +986,7 @@ _pager_cb_config_updated(void)
|
||||||
if (!pager_config) return;
|
if (!pager_config) return;
|
||||||
EINA_LIST_FOREACH(pagers, l, p)
|
EINA_LIST_FOREACH(pagers, l, p)
|
||||||
{
|
{
|
||||||
if (p->disable_live_preview != pager_config->disable_live_preview)
|
if (p->live_windows != pager_config->live_windows)
|
||||||
{
|
{
|
||||||
_pager_empty(p);
|
_pager_empty(p);
|
||||||
_pager_fill(p);
|
_pager_fill(p);
|
||||||
|
@ -995,6 +995,14 @@ _pager_cb_config_updated(void)
|
||||||
{
|
{
|
||||||
EINA_LIST_FOREACH(p->desks, ll, pd)
|
EINA_LIST_FOREACH(p->desks, ll, pd)
|
||||||
{
|
{
|
||||||
|
if (pager_config->disable_live_preview)
|
||||||
|
edje_object_signal_emit(pd->o_desk, "e,preview,off", "e");
|
||||||
|
else
|
||||||
|
edje_object_signal_emit(pd->o_desk, "e,preview,on", "e");
|
||||||
|
if (pd->current)
|
||||||
|
edje_object_signal_emit(pd->o_desk, "e,state,selected", "e");
|
||||||
|
else
|
||||||
|
edje_object_signal_emit(pd->o_desk, "e,state,unselected", "e");
|
||||||
if (pager_config->show_desk_names)
|
if (pager_config->show_desk_names)
|
||||||
edje_object_signal_emit(pd->o_desk, "e,name,show", "e");
|
edje_object_signal_emit(pd->o_desk, "e,name,show", "e");
|
||||||
else
|
else
|
||||||
|
@ -1440,7 +1448,7 @@ _pager_cb_event_border_icon_change(void *data __UNUSED__, int type __UNUSED__, v
|
||||||
evas_object_del(pw->o_icon);
|
evas_object_del(pw->o_icon);
|
||||||
pw->o_icon = NULL;
|
pw->o_icon = NULL;
|
||||||
}
|
}
|
||||||
if (pager_config->disable_live_preview)
|
if (!pager_config->live_windows)
|
||||||
{
|
{
|
||||||
o = e_border_icon_add(ev->border,
|
o = e_border_icon_add(ev->border,
|
||||||
evas_object_evas_get(p->o_table));
|
evas_object_evas_get(p->o_table));
|
||||||
|
@ -1965,7 +1973,7 @@ _pager_window_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __U
|
||||||
"e/modules/pager/window");
|
"e/modules/pager/window");
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
if (pager_config->disable_live_preview)
|
if (!pager_config->live_windows)
|
||||||
{
|
{
|
||||||
oo = e_border_icon_add(pw->border, drag->evas);
|
oo = e_border_icon_add(pw->border, drag->evas);
|
||||||
if (oo)
|
if (oo)
|
||||||
|
@ -2377,7 +2385,7 @@ _pager_desk_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
|
||||||
o = edje_object_add(drag->evas);
|
o = edje_object_add(drag->evas);
|
||||||
e_theme_edje_object_set(o, "base/theme/modules/pager",
|
e_theme_edje_object_set(o, "base/theme/modules/pager",
|
||||||
"e/modules/pager/window");
|
"e/modules/pager/window");
|
||||||
if (!pager_config->disable_live_preview)
|
if (pager_config->live_windows)
|
||||||
{
|
{
|
||||||
if (e_manager_comp_evas_get(pw->border->zone->container->manager))
|
if (e_manager_comp_evas_get(pw->border->zone->container->manager))
|
||||||
{
|
{
|
||||||
|
@ -2878,6 +2886,7 @@ e_modapi_init(E_Module *m)
|
||||||
E_CONFIG_VAL(D, T, btn_desk, UCHAR);
|
E_CONFIG_VAL(D, T, btn_desk, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, flip_desk, UCHAR);
|
E_CONFIG_VAL(D, T, flip_desk, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, disable_live_preview, UCHAR);
|
E_CONFIG_VAL(D, T, disable_live_preview, UCHAR);
|
||||||
|
E_CONFIG_VAL(D, T, live_windows, UCHAR);
|
||||||
|
|
||||||
pager_config = e_config_domain_load("module.pager", conf_edd);
|
pager_config = e_config_domain_load("module.pager", conf_edd);
|
||||||
|
|
||||||
|
@ -2912,6 +2921,7 @@ e_modapi_init(E_Module *m)
|
||||||
E_CONFIG_LIMIT(pager_config->btn_noplace, 0, 32);
|
E_CONFIG_LIMIT(pager_config->btn_noplace, 0, 32);
|
||||||
E_CONFIG_LIMIT(pager_config->btn_desk, 0, 32);
|
E_CONFIG_LIMIT(pager_config->btn_desk, 0, 32);
|
||||||
E_CONFIG_LIMIT(pager_config->disable_live_preview, 0, 1);
|
E_CONFIG_LIMIT(pager_config->disable_live_preview, 0, 1);
|
||||||
|
E_CONFIG_LIMIT(pager_config->live_windows, 0, 1);
|
||||||
|
|
||||||
pager_config->handlers = eina_list_append
|
pager_config->handlers = eina_list_append
|
||||||
(pager_config->handlers, ecore_event_handler_add
|
(pager_config->handlers, ecore_event_handler_add
|
||||||
|
|
|
@ -32,6 +32,7 @@ struct _Config
|
||||||
unsigned int btn_desk;
|
unsigned int btn_desk;
|
||||||
unsigned int flip_desk;
|
unsigned int flip_desk;
|
||||||
unsigned int disable_live_preview;
|
unsigned int disable_live_preview;
|
||||||
|
unsigned int live_windows;
|
||||||
|
|
||||||
/* just config state */
|
/* just config state */
|
||||||
E_Module *module;
|
E_Module *module;
|
||||||
|
|
Loading…
Reference in New Issue