2011-08-15 02:21:12 -07:00
|
|
|
/* Ask about focus mode */
|
2012-11-30 06:38:34 -08:00
|
|
|
#include "e_wizard.h"
|
2008-10-25 22:46:45 -07:00
|
|
|
|
2008-10-26 02:04:05 -07:00
|
|
|
static int focus_mode = 1;
|
2012-11-30 02:46:48 -08:00
|
|
|
/*
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
2012-11-26 04:40:31 -08:00
|
|
|
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
2011-08-15 02:21:12 -07:00
|
|
|
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2012-11-30 02:46:48 -08:00
|
|
|
*/
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
|
|
|
wizard_page_show(E_Wizard_Page *pg)
|
|
|
|
{
|
|
|
|
Evas_Object *o, *of, *ob;
|
2008-10-26 02:04:05 -07:00
|
|
|
E_Radio_Group *rg;
|
2011-08-16 04:26:02 -07:00
|
|
|
|
|
|
|
if (e_config->focus_policy == E_FOCUS_CLICK) focus_mode = 0;
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2008-10-25 22:46:45 -07:00
|
|
|
o = e_widget_list_add(pg->evas, 1, 0);
|
|
|
|
e_wizard_title_set(_("Window Focus"));
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2011-08-15 02:21:12 -07:00
|
|
|
of = e_widget_framelist_add(pg->evas, _("Focus by ..."), 0);
|
2008-10-26 02:04:05 -07:00
|
|
|
|
|
|
|
rg = e_widget_radio_group_new(&focus_mode);
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2011-08-15 02:21:12 -07:00
|
|
|
ob = e_widget_radio_add(pg->evas, _("Click"), 0, rg);
|
2008-10-25 22:46:45 -07:00
|
|
|
e_widget_framelist_object_append(of, ob);
|
2008-10-26 02:04:05 -07:00
|
|
|
evas_object_show(ob);
|
2011-08-15 02:21:12 -07:00
|
|
|
ob = e_widget_radio_add(pg->evas, _("Mouse Over"), 1, rg);
|
2008-10-26 02:04:05 -07:00
|
|
|
e_widget_framelist_object_append(of, ob);
|
|
|
|
evas_object_show(ob);
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2008-10-26 02:04:05 -07:00
|
|
|
e_widget_list_object_append(o, of, 0, 0, 0.5);
|
2008-10-25 22:46:45 -07:00
|
|
|
evas_object_show(of);
|
|
|
|
|
|
|
|
e_wizard_page_show(o);
|
2011-08-30 17:05:44 -07:00
|
|
|
// pg->data = o;
|
2008-10-25 22:46:45 -07:00
|
|
|
return 1; /* 1 == show ui, and wait for user, 0 == just continue */
|
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
2011-09-04 10:06:02 -07:00
|
|
|
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
2008-10-26 02:04:05 -07:00
|
|
|
if (!focus_mode)
|
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
e_config->focus_policy = E_FOCUS_CLICK;
|
|
|
|
e_config->focus_setting = E_FOCUS_NEW_WINDOW;
|
|
|
|
e_config->pass_click_on = 1;
|
|
|
|
e_config->always_click_to_raise = 0;
|
|
|
|
e_config->always_click_to_focus = 0;
|
|
|
|
e_config->focus_last_focused_per_desktop = 1;
|
|
|
|
e_config->pointer_slide = 0;
|
2012-11-26 05:37:19 -08:00
|
|
|
e_config->winlist_warp_while_selecting = 0;
|
|
|
|
e_config->winlist_warp_at_end = 0;
|
2008-10-26 02:04:05 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
e_config->focus_policy = E_FOCUS_SLOPPY;
|
|
|
|
e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
|
|
|
|
e_config->pass_click_on = 1;
|
|
|
|
e_config->always_click_to_raise = 0;
|
|
|
|
e_config->always_click_to_focus = 0;
|
|
|
|
e_config->focus_last_focused_per_desktop = 1;
|
|
|
|
e_config->pointer_slide = 1;
|
2008-10-26 02:04:05 -07:00
|
|
|
}
|
2011-08-30 17:05:44 -07:00
|
|
|
// evas_object_del(pg->data);
|
2011-08-15 02:21:12 -07:00
|
|
|
return 1;
|
|
|
|
}
|
2012-11-30 02:46:48 -08:00
|
|
|
/*
|
2011-08-15 02:21:12 -07:00
|
|
|
EAPI int
|
|
|
|
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
|
|
|
|
{
|
2008-10-25 22:46:45 -07:00
|
|
|
return 1;
|
|
|
|
}
|
2012-11-30 02:46:48 -08:00
|
|
|
*/
|