summaryrefslogtreecommitdiff
path: root/src/modules/wizard/page_060.c
blob: c648666a200f49bf4c2b562e5f0518045c1640f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "e.h"
#include "e_mod_main.h"

static int focus_mode = 1;

EAPI int
wizard_page_init(E_Wizard_Page *pg)
{
   return 1;
}
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg)
{
   return 1;
}
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
   Evas_Object *o, *of, *ob;
   E_Radio_Group *rg;
   
   o = e_widget_list_add(pg->evas, 1, 0);
   e_wizard_title_set(_("Window Focus"));
   
   of = e_widget_framelist_add(pg->evas, _("Focus mode"), 0);

   rg = e_widget_radio_group_new(&focus_mode);
   
   ob = e_widget_radio_add(pg->evas, _("Click to focus windows"), 0, rg);
   e_widget_framelist_object_append(of, ob);
   evas_object_show(ob);
   ob = e_widget_radio_add(pg->evas, _("Mouse over focuses windows"), 1, rg);
   e_widget_framelist_object_append(of, ob);
   evas_object_show(ob);
   
   e_widget_list_object_append(o, of, 0, 0, 0.5);
   evas_object_show(ob);
   evas_object_show(of);

   e_wizard_page_show(o);
   pg->data = of;
   return 1; /* 1 == show ui, and wait for user, 0 == just continue */
}
EAPI int
wizard_page_hide(E_Wizard_Page *pg)
{
   evas_object_del(pg->data);
   return 1;
}
EAPI int
wizard_page_apply(E_Wizard_Page *pg)
{
   if (!focus_mode)
     {
	// FIXME: click to focus
     }
   else
     {
	// FIXME: sloppy focus
     }
   return 1;
}