summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-10-17 11:51:46 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-10-17 11:51:46 +0000
commitbe4f5dfbab5e40116be28520874fbd4abf2fd6ab (patch)
treecce01ed50f7ad4a9137773d198629b8a8caa3b39 /src/bin
parent263febe6571d40b7ba2e2c662dce41579e891e70 (diff)
locks have been dialogified :)
SVN revision: 17628
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/Makefile.am4
-rw-r--r--src/bin/e_border.c126
-rw-r--r--src/bin/e_border.h4
-rw-r--r--src/bin/e_includes.h1
-rw-r--r--src/bin/e_int_border_locks.c364
-rw-r--r--src/bin/e_int_border_locks.h12
-rw-r--r--src/bin/e_widget.c2
7 files changed, 394 insertions, 119 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index d72c418..a45987d 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -94,7 +94,8 @@ e_widget_frametable.h \
94e_widget_table.h \ 94e_widget_table.h \
95e_config_dialog.h \ 95e_config_dialog.h \
96e_int_config_focus.h \ 96e_int_config_focus.h \
97e_icon_layout.h 97e_icon_layout.h \
98e_int_border_locks.h
98 99
99enlightenment_src = \ 100enlightenment_src = \
100e_user.c \ 101e_user.c \
@@ -171,6 +172,7 @@ e_widget_table.c \
171e_config_dialog.c \ 172e_config_dialog.c \
172e_int_config_focus.c \ 173e_int_config_focus.c \
173e_icon_layout.c \ 174e_icon_layout.c \
175e_int_border_locks.c \
174$(ENLIGHTENMENTHEADERS) 176$(ENLIGHTENMENTHEADERS)
175 177
176enlightenment_SOURCES = \ 178enlightenment_SOURCES = \
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index e3b82a5..51c3174 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -2723,23 +2723,10 @@ _e_border_menus_del(E_Border *bd)
2723{ 2723{
2724 int was_menu = 0; 2724 int was_menu = 0;
2725 2725
2726 if (bd->border_locks_menu) 2726 if (bd->border_locks_dialog)
2727 { 2727 {
2728 e_object_del(E_OBJECT(bd->border_locks_menu)); 2728 e_object_del(E_OBJECT(bd->border_locks_dialog));
2729 bd->border_locks_menu = NULL; 2729 bd->border_locks_dialog = NULL;
2730 was_menu = 1;
2731 }
2732 if (bd->border_locks_user_menu)
2733 {
2734 e_object_del(E_OBJECT(bd->border_locks_user_menu));
2735 bd->border_locks_user_menu = NULL;
2736 was_menu = 1;
2737 }
2738 if (bd->border_locks_application_menu)
2739 {
2740 e_object_del(E_OBJECT(bd->border_locks_application_menu));
2741 bd->border_locks_application_menu = NULL;
2742 was_menu = 1;
2743 } 2730 }
2744 if (bd->border_remember_menu) 2731 if (bd->border_remember_menu)
2745 { 2732 {
@@ -5699,40 +5686,6 @@ _e_border_cb_border_menu_end(void *data, E_Menu *m)
5699 } 5686 }
5700} 5687}
5701 5688
5702#define NEW_LOCK_FN(var) \
5703static void \
5704_e_border_menu_cb_##var(void *data, E_Menu *m, E_Menu_Item *mi) \
5705{ \
5706 E_Border *bd; \
5707 bd = data; \
5708 bd->var = e_menu_item_toggle_get(mi); \
5709 bd->changed = 1; \
5710}
5711
5712NEW_LOCK_FN(lock_user_location)
5713NEW_LOCK_FN(lock_client_location)
5714NEW_LOCK_FN(lock_user_size)
5715NEW_LOCK_FN(lock_client_size)
5716NEW_LOCK_FN(lock_user_stacking)
5717NEW_LOCK_FN(lock_client_stacking)
5718NEW_LOCK_FN(lock_user_iconify)
5719NEW_LOCK_FN(lock_client_iconify)
5720NEW_LOCK_FN(lock_user_desk)
5721NEW_LOCK_FN(lock_client_desk)
5722NEW_LOCK_FN(lock_user_sticky)
5723NEW_LOCK_FN(lock_client_sticky)
5724NEW_LOCK_FN(lock_user_shade)
5725NEW_LOCK_FN(lock_client_shade)
5726NEW_LOCK_FN(lock_user_maximize)
5727NEW_LOCK_FN(lock_client_maximize)
5728NEW_LOCK_FN(lock_user_fullscreen)
5729NEW_LOCK_FN(lock_client_fullscreen)
5730NEW_LOCK_FN(lock_border)
5731NEW_LOCK_FN(lock_close)
5732/*NEW_LOCK_FN(lock_focus_in)*/
5733/*NEW_LOCK_FN(lock_focus_out)*/
5734NEW_LOCK_FN(lock_life)
5735
5736static void 5689static void
5737_e_border_menu_cb_remember(void *data, E_Menu *m, E_Menu_Item *mi) 5690_e_border_menu_cb_remember(void *data, E_Menu *m, E_Menu_Item *mi)
5738{ 5691{
@@ -6177,6 +6130,14 @@ _e_border_menu_cb_remember_apply_run(void *data, E_Menu *m, E_Menu_Item *mi)
6177} 6130}
6178 6131
6179static void 6132static void
6133_e_border_menu_cb_locks(void *data, E_Menu *m, E_Menu_Item *mi)
6134{
6135 E_Border *bd;
6136 bd = data;
6137 e_int_border_locks(bd);
6138}
6139
6140static void
6180_e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key, Ecore_X_Time timestamp) 6141_e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key, Ecore_X_Time timestamp)
6181{ 6142{
6182 E_Menu *m; 6143 E_Menu *m;
@@ -6185,67 +6146,6 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key, Ecore_X_T
6185 if (bd->border_menu) return; 6146 if (bd->border_menu) return;
6186 6147
6187 m = e_menu_new(); 6148 m = e_menu_new();
6188 bd->border_locks_user_menu = m;
6189
6190#define NEW_LOCK_MI(txt, var) \
6191 mi = e_menu_item_new(m); \
6192 e_menu_item_label_set(mi, txt); \
6193 e_menu_item_check_set(mi, 1); \
6194 e_menu_item_toggle_set(mi, bd->var); \
6195 e_menu_item_callback_set(mi, _e_border_menu_cb_##var, bd);
6196
6197 NEW_LOCK_MI(_("Position"), lock_user_location);
6198 NEW_LOCK_MI(_("Size"), lock_user_size);
6199 NEW_LOCK_MI(_("Stacking"), lock_user_stacking);
6200 NEW_LOCK_MI(_("Iconify"), lock_user_iconify);
6201/* NEW_LOCK_MI(_("Virtual Desktop)"), lock_user_desk);*/
6202 NEW_LOCK_MI(_("Sticky"), lock_user_sticky);
6203 NEW_LOCK_MI(_("Shade"), lock_user_shade);
6204 NEW_LOCK_MI(_("Maximize"), lock_user_maximize);
6205 NEW_LOCK_MI(_("Fullscreen"), lock_user_fullscreen);
6206
6207 m = e_menu_new();
6208 bd->border_locks_application_menu = m;
6209
6210 NEW_LOCK_MI(_("Position"), lock_client_location);
6211 NEW_LOCK_MI(_("Size"), lock_client_size);
6212 NEW_LOCK_MI(_("Stacking"), lock_client_stacking);
6213 NEW_LOCK_MI(_("Iconify"), lock_client_iconify);
6214/* NEW_LOCK_MI(_("Virtual Desktop"), lock_client_desk);*/
6215 NEW_LOCK_MI(_("Sticky"), lock_client_sticky);
6216 NEW_LOCK_MI(_("Shade"), lock_client_shade);
6217 NEW_LOCK_MI(_("Maximize"), lock_client_maximize);
6218 NEW_LOCK_MI(_("Fullscreen"), lock_client_fullscreen);
6219
6220 m = e_menu_new();
6221 bd->border_locks_menu = m;
6222
6223 mi = e_menu_item_new(m);
6224 e_menu_item_label_set(mi, _("User"));
6225 e_menu_item_submenu_set(mi, bd->border_locks_user_menu);
6226 e_menu_item_icon_edje_set(mi,
6227 (char *)e_theme_edje_file_get("base/theme/borders",
6228 "widgets/border/default/locks_user"),
6229 "widgets/border/default/locks_user");
6230
6231 mi = e_menu_item_new(m);
6232 e_menu_item_label_set(mi, _("Application"));
6233 e_menu_item_submenu_set(mi, bd->border_locks_application_menu);
6234 e_menu_item_icon_edje_set(mi,
6235 (char *)e_theme_edje_file_get("base/theme/borders",
6236 "widgets/border/default/locks_application"),
6237 "widgets/border/default/locks_application");
6238
6239 mi = e_menu_item_new(m);
6240 e_menu_item_separator_set(mi, 1);
6241
6242 NEW_LOCK_MI(_("Border"), lock_border);
6243 NEW_LOCK_MI(_("Close"), lock_close);
6244/* NEW_LOCK_MI(_("Focus In"), lock_focus_in);*/
6245/* NEW_LOCK_MI(_("Focus Out"), lock_focus_out);*/
6246 NEW_LOCK_MI(_("Lifespan"), lock_life);
6247
6248 m = e_menu_new();
6249 bd->border_remember_menu = m; 6149 bd->border_remember_menu = m;
6250 6150
6251#define NEW_REMEMBER_MI(txt, flag, var, cb) \ 6151#define NEW_REMEMBER_MI(txt, flag, var, cb) \
@@ -6462,8 +6362,8 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key, Ecore_X_T
6462 e_menu_item_separator_set(mi, 1); 6362 e_menu_item_separator_set(mi, 1);
6463 6363
6464 mi = e_menu_item_new(m); 6364 mi = e_menu_item_new(m);
6465 e_menu_item_label_set(mi, _("Locks")); 6365 e_menu_item_label_set(mi, _("Window Locks"));
6466 e_menu_item_submenu_set(mi, bd->border_locks_menu); 6366 e_menu_item_callback_set(mi, _e_border_menu_cb_locks, bd);
6467 e_menu_item_icon_edje_set(mi, 6367 e_menu_item_icon_edje_set(mi,
6468 (char *)e_theme_edje_file_get("base/theme/borders", 6368 (char *)e_theme_edje_file_get("base/theme/borders",
6469 "widgets/border/default/locks"), 6369 "widgets/border/default/locks"),
diff --git a/src/bin/e_border.h b/src/bin/e_border.h
index 21c0f81..cb1a598 100644
--- a/src/bin/e_border.h
+++ b/src/bin/e_border.h
@@ -351,9 +351,7 @@ struct _E_Border
351 351
352 Evas_List *stick_desks; 352 Evas_List *stick_desks;
353 E_Menu *border_menu; 353 E_Menu *border_menu;
354 E_Menu *border_locks_menu; 354 E_Config_Dialog *border_locks_dialog;
355 E_Menu *border_locks_user_menu;
356 E_Menu *border_locks_application_menu;
357 E_Menu *border_remember_menu; 355 E_Menu *border_remember_menu;
358 E_Menu *border_stacking_menu; 356 E_Menu *border_stacking_menu;
359 Evas_List *pending_move_resize; 357 Evas_List *pending_move_resize;
diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h
index 6a34420..ee4cc0e 100644
--- a/src/bin/e_includes.h
+++ b/src/bin/e_includes.h
@@ -76,3 +76,4 @@
76#include "e_config_dialog.h" 76#include "e_config_dialog.h"
77#include "e_int_config_focus.h" 77#include "e_int_config_focus.h"
78#include "e_icon_layout.h" 78#include "e_icon_layout.h"
79#include "e_int_border_locks.h"
diff --git a/src/bin/e_int_border_locks.c b/src/bin/e_int_border_locks.c
new file mode 100644
index 0000000..3400f61
--- /dev/null
+++ b/src/bin/e_int_border_locks.c
@@ -0,0 +1,364 @@
1/*
2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
3 */
4#include "e.h"
5
6/* PROTOTYPES - same all the time */
7typedef struct _CFData CFData;
8
9static void *_create_data(E_Config_Dialog *cfd);
10static void _free_data(E_Config_Dialog *cfd, CFData *cfdata);
11static int _basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
12static int _advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
13static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
14static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
15
16/* Actual config data we will be playing with whil the dialog is active */
17struct _CFData
18{
19 E_Border *border;
20 /*- BASIC -*/
21 int do_what_i_say;
22 int protect_from_me;
23 int keep_my_border;
24 int important_window;
25 int remember_locks;
26 /*- ADVANCED -*/
27 struct {
28 struct {
29 int location;
30 int size;
31 int stacking;
32 int iconify;
33 int desk; // unused atm
34 int sticky;
35 int shade;
36 int maximize;
37 int fullscreen;
38 } user, client;
39 int border;
40 int close;
41 int focus_in; // unused atm
42 int focus_out; // unised atm
43 int life;
44
45 int remember;
46 } lock;
47};
48
49/* a nice easy setup function that does the dirty work */
50void
51e_int_border_locks(E_Border *bd)
52{
53 E_Config_Dialog *cfd;
54 E_Config_Dialog_View v;
55
56 /* methods */
57 v.create_cfdata = _create_data;
58 v.free_cfdata = _free_data;
59 v.basic.apply_cfdata = _basic_apply_data;
60 v.basic.create_widgets = _basic_create_widgets;
61 v.advanced.apply_cfdata = _advanced_apply_data;
62 v.advanced.create_widgets = _advanced_create_widgets;
63 /* create config diaolg for NULL object/data */
64 cfd = e_config_dialog_new(bd->zone->container,
65 _("Window Locks"), NULL, 0, &v, bd);
66}
67
68/**--CREATE--**/
69static void
70_fill_data(CFData *cfdata)
71{
72 cfdata->lock.user.location = (int)cfdata->border->lock_user_location & 0x1;
73 cfdata->lock.user.size = (int)cfdata->border->lock_user_size & 0x1;
74 cfdata->lock.user.stacking = (int)cfdata->border->lock_user_stacking & 0x1;
75 cfdata->lock.user.iconify = (int)cfdata->border->lock_user_iconify & 0x1;
76 cfdata->lock.user.desk = (int)cfdata->border->lock_user_desk & 0x1;
77 cfdata->lock.user.sticky = (int)cfdata->border->lock_user_sticky & 0x1;
78 cfdata->lock.user.shade = (int)cfdata->border->lock_user_shade & 0x1;
79 cfdata->lock.user.maximize = (int)cfdata->border->lock_user_maximize & 0x1;
80 cfdata->lock.user.fullscreen = (int)cfdata->border->lock_user_fullscreen & 0x1;
81 cfdata->lock.client.location = (int)cfdata->border->lock_client_location & 0x1;
82 cfdata->lock.client.size = (int)cfdata->border->lock_client_size & 0x1;
83 cfdata->lock.client.stacking = (int)cfdata->border->lock_client_stacking & 0x1;
84 cfdata->lock.client.iconify = (int)cfdata->border->lock_client_iconify & 0x1;
85 cfdata->lock.client.desk = (int)cfdata->border->lock_client_desk & 0x1;
86 cfdata->lock.client.sticky = (int)cfdata->border->lock_client_sticky & 0x1;
87 cfdata->lock.client.shade = (int)cfdata->border->lock_client_shade & 0x1;
88 cfdata->lock.client.maximize = (int)cfdata->border->lock_client_maximize & 0x1;
89 cfdata->lock.client.fullscreen = (int)cfdata->border->lock_client_fullscreen & 0x1;
90 cfdata->lock.border = (int)cfdata->border->lock_border & 0x1;
91 cfdata->lock.close = (int)cfdata->border->lock_close & 0x1;
92 cfdata->lock.focus_in = (int)cfdata->border->lock_focus_in & 0x1;
93 cfdata->lock.focus_out = (int)cfdata->border->lock_focus_out & 0x1;
94 cfdata->lock.life = (int)cfdata->border->lock_life & 0x1;
95 if ((cfdata->border->remember) &&
96 (cfdata->border->remember->apply & E_REMEMBER_APPLY_LOCKS))
97 cfdata->lock.remember = 1;
98
99 /* figure out basic config from the current locks */
100 if (cfdata->lock.user.location || cfdata->lock.user.size ||
101 cfdata->lock.user.stacking || cfdata->lock.user.iconify ||
102 cfdata->lock.user.desk || cfdata->lock.user.sticky ||
103 cfdata->lock.user.shade || cfdata->lock.user.maximize ||
104 cfdata->lock.user.fullscreen)
105 cfdata->protect_from_me = 1;
106 if (cfdata->lock.client.location || cfdata->lock.client.size ||
107 cfdata->lock.client.stacking || cfdata->lock.client.iconify ||
108 cfdata->lock.client.desk || cfdata->lock.client.sticky ||
109 cfdata->lock.client.shade || cfdata->lock.client.maximize ||
110 cfdata->lock.client.fullscreen)
111 cfdata->do_what_i_say = 1;
112 if (cfdata->lock.border)
113 cfdata->keep_my_border = 1;
114 if (cfdata->lock.close || cfdata->lock.life)
115 cfdata->important_window = 1;
116 cfdata->remember_locks = cfdata->lock.remember;
117}
118
119static void *
120_create_data(E_Config_Dialog *cfd)
121{
122 /* Create cfdata - cfdata is a temporary block of config data that this
123 * dialog will be dealing with while configuring. it will be applied to
124 * the running systems/config in the apply methods
125 */
126 CFData *cfdata;
127
128 cfdata = E_NEW(CFData, 1);
129 cfdata->border = cfd->data;
130 _fill_data(cfdata);
131 return cfdata;
132}
133
134static void
135_free_data(E_Config_Dialog *cfd, CFData *cfdata)
136{
137 /* Free the cfdata */
138 free(cfdata);
139}
140
141/**--APPLY--**/
142static int
143_basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
144{
145 /* Actually take our cfdata settings and apply them in real life */
146
147 if (cfdata->do_what_i_say)
148 {
149 cfdata->border->lock_client_location = 1;
150 cfdata->border->lock_client_size = 1;
151 cfdata->border->lock_client_stacking = 1;
152 cfdata->border->lock_client_iconify = 1;
153 cfdata->border->lock_client_desk = 0;
154 cfdata->border->lock_client_sticky = 1;
155 cfdata->border->lock_client_shade = 1;
156 cfdata->border->lock_client_maximize = 1;
157 cfdata->border->lock_client_fullscreen = 1;
158 }
159 if (cfdata->protect_from_me)
160 {
161 cfdata->border->lock_user_location = 1;
162 cfdata->border->lock_user_size = 1;
163 cfdata->border->lock_user_stacking = 1;
164 cfdata->border->lock_user_iconify = 1;
165 cfdata->border->lock_user_desk = 0;
166 cfdata->border->lock_user_sticky = 1;
167 cfdata->border->lock_user_shade = 1;
168 cfdata->border->lock_user_maximize = 1;
169 cfdata->border->lock_user_fullscreen = 1;
170 }
171 if (cfdata->important_window)
172 {
173 cfdata->border->lock_close = 1;
174 cfdata->border->lock_life = 1;
175 }
176 if (cfdata->keep_my_border)
177 {
178 cfdata->border->lock_border = 1;
179 }
180 if (cfdata->remember_locks)
181 {
182 if (!cfdata->border->remember)
183 {
184 cfdata->border->remember = e_remember_new();
185 if (cfdata->border->remember)
186 {
187 e_remember_use(cfdata->border->remember);
188 e_remember_update(cfdata->border->remember, cfdata->border);
189 cfdata->border->remember->match |= E_REMEMBER_MATCH_NAME;
190 cfdata->border->remember->match |= E_REMEMBER_MATCH_CLASS;
191 cfdata->border->remember->match |= E_REMEMBER_MATCH_ROLE;
192 cfdata->border->remember->match |= E_REMEMBER_MATCH_TYPE;
193 cfdata->border->remember->match |= E_REMEMBER_MATCH_TRANSIENT;
194 cfdata->border->remember->apply |= E_REMEMBER_APPLY_LOCKS;
195 }
196 }
197 }
198 else
199 {
200 if (cfdata->border->remember)
201 {
202 cfdata->border->remember->apply &= ~E_REMEMBER_APPLY_LOCKS;
203 if (cfdata->border->remember->apply == 0)
204 {
205 e_remember_unuse(cfdata->border->remember);
206 e_remember_del(cfdata->border->remember);
207 cfdata->border->remember = NULL;
208 }
209 }
210 }
211 e_config_save_queue();
212 return 1; /* Apply was OK */
213}
214
215static int
216_advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
217{
218 /* Actually take our cfdata settings and apply them in real life */
219 cfdata->border->lock_user_location = cfdata->lock.user.location;
220 cfdata->border->lock_user_size = cfdata->lock.user.size;
221 cfdata->border->lock_user_stacking = cfdata->lock.user.stacking;
222 cfdata->border->lock_user_iconify = cfdata->lock.user.iconify;
223 cfdata->border->lock_user_desk = cfdata->lock.user.desk;
224 cfdata->border->lock_user_sticky = cfdata->lock.user.sticky;
225 cfdata->border->lock_user_shade = cfdata->lock.user.shade;
226 cfdata->border->lock_user_maximize = cfdata->lock.user.maximize;
227 cfdata->border->lock_user_fullscreen = cfdata->lock.user.fullscreen;
228 cfdata->border->lock_client_location = cfdata->lock.client.location;
229 cfdata->border->lock_client_size = cfdata->lock.client.size;
230 cfdata->border->lock_client_stacking = cfdata->lock.client.stacking;
231 cfdata->border->lock_client_iconify = cfdata->lock.client.iconify;
232 cfdata->border->lock_client_desk = cfdata->lock.client.desk;
233 cfdata->border->lock_client_sticky = cfdata->lock.client.sticky;
234 cfdata->border->lock_client_shade = cfdata->lock.client.shade;
235 cfdata->border->lock_client_maximize = cfdata->lock.client.maximize;
236 cfdata->border->lock_client_fullscreen = cfdata->lock.client.fullscreen;
237 cfdata->border->lock_border = cfdata->lock.border;
238 cfdata->border->lock_close = cfdata->lock.close;
239 cfdata->border->lock_focus_in = cfdata->lock.focus_in;
240 cfdata->border->lock_focus_out = cfdata->lock.focus_out;
241 cfdata->border->lock_life = cfdata->lock.life;
242 if (cfdata->lock.remember)
243 {
244 if (!cfdata->border->remember)
245 {
246 cfdata->border->remember = e_remember_new();
247 if (cfdata->border->remember)
248 {
249 e_remember_use(cfdata->border->remember);
250 e_remember_update(cfdata->border->remember, cfdata->border);
251 cfdata->border->remember->match |= E_REMEMBER_MATCH_NAME;
252 cfdata->border->remember->match |= E_REMEMBER_MATCH_CLASS;
253 cfdata->border->remember->match |= E_REMEMBER_MATCH_ROLE;
254 cfdata->border->remember->match |= E_REMEMBER_MATCH_TYPE;
255 cfdata->border->remember->match |= E_REMEMBER_MATCH_TRANSIENT;
256 cfdata->border->remember->apply |= E_REMEMBER_APPLY_LOCKS;
257 }
258 }
259 }
260 else
261 {
262 if (cfdata->border->remember)
263 {
264 cfdata->border->remember->apply &= ~E_REMEMBER_APPLY_LOCKS;
265 if (cfdata->border->remember->apply == 0)
266 {
267 e_remember_unuse(cfdata->border->remember);
268 e_remember_del(cfdata->border->remember);
269 cfdata->border->remember = NULL;
270 }
271 }
272 }
273 e_config_save_queue();
274 return 1; /* Apply was OK */
275}
276
277/**--GUI--**/
278static Evas_Object *
279_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
280{
281 /* generate the core widget layout for a basic dialog */
282 Evas_Object *o, *ob, *of;
283
284 _fill_data(cfdata);
285 o = e_widget_list_add(evas, 0, 0);
286
287 of = e_widget_framelist_add(evas, _("Generic Locks"), 0);
288 ob = e_widget_check_add(evas, _("Lock the Window so it does only what I tell it to"), &(cfdata->do_what_i_say));
289 e_widget_framelist_object_append(of, ob);
290 ob = e_widget_check_add(evas, _("Protect this window from me accidentally changing it"), &(cfdata->protect_from_me));
291 e_widget_framelist_object_append(of, ob);
292 ob = e_widget_check_add(evas, _("Protect this window from being accidentally closed because it is important"), &(cfdata->important_window));
293 e_widget_framelist_object_append(of, ob);
294 ob = e_widget_check_add(evas, _("Do not allow the border to change on this window"), &(cfdata->keep_my_border));
295 e_widget_framelist_object_append(of, ob);
296 e_widget_list_object_append(o, of, 1, 1, 0.5);
297 ob = e_widget_check_add(evas, _("Remember these Locks for this window next time it appears"), &(cfdata->remember_locks));
298 e_widget_list_object_append(o, ob, 0, 0, 1.0);
299 return o;
300}
301
302static Evas_Object *
303_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
304{
305 /* generate the core widget layout for an advanced dialog */
306 Evas_Object *o, *ob, *of;
307 E_Radio_Group *rg;
308
309 _fill_data(cfdata);
310
311 o = e_widget_list_add(evas, 0, 0);
312
313 of = e_widget_frametable_add(evas, _("Lock program changing:"), 0);
314 ob = e_widget_check_add(evas, _("Position"), &(cfdata->lock.client.location));
315 e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
316 ob = e_widget_check_add(evas, _("Size"), &(cfdata->lock.client.size));
317 e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
318 ob = e_widget_check_add(evas, _("Stacking"), &(cfdata->lock.client.stacking));
319 e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 1);
320 ob = e_widget_check_add(evas, _("Iconified state"), &(cfdata->lock.client.iconify));
321 e_widget_frametable_object_append(of, ob, 0, 3, 1, 1, 1, 1, 1, 1);
322 ob = e_widget_check_add(evas, _("Stickiness"), &(cfdata->lock.client.sticky));
323 e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
324 ob = e_widget_check_add(evas, _("Shaded state"), &(cfdata->lock.client.shade));
325 e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
326 ob = e_widget_check_add(evas, _("Maximized state"), &(cfdata->lock.client.maximize));
327 e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 1);
328 ob = e_widget_check_add(evas, _("Fullscreen state"), &(cfdata->lock.client.fullscreen));
329 e_widget_frametable_object_append(of, ob, 1, 3, 1, 1, 1, 1, 1, 1);
330 e_widget_list_object_append(o, of, 1, 1, 0.5);
331
332 of = e_widget_frametable_add(evas, _("Lock me from changing:"), 0);
333 ob = e_widget_check_add(evas, _("Position"), &(cfdata->lock.user.location));
334 e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
335 ob = e_widget_check_add(evas, _("Size"), &(cfdata->lock.user.size));
336 e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
337 ob = e_widget_check_add(evas, _("Stacking"), &(cfdata->lock.user.stacking));
338 e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 1);
339 ob = e_widget_check_add(evas, _("Iconified state"), &(cfdata->lock.user.iconify));
340 e_widget_frametable_object_append(of, ob, 0, 3, 1, 1, 1, 1, 1, 1);
341 ob = e_widget_check_add(evas, _("Stickiness"), &(cfdata->lock.user.sticky));
342 e_widget_frametable_object_append(of, ob, 0, 4, 1, 1, 1, 1, 1, 1);
343 ob = e_widget_check_add(evas, _("Shaded state"), &(cfdata->lock.user.shade));
344 e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
345 ob = e_widget_check_add(evas, _("Maximized state"), &(cfdata->lock.user.maximize));
346 e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
347 ob = e_widget_check_add(evas, _("Fullscreen state"), &(cfdata->lock.user.fullscreen));
348 e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 1);
349 ob = e_widget_check_add(evas, _("The border style"), &(cfdata->lock.border));
350 e_widget_frametable_object_append(of, ob, 1, 3, 1, 1, 1, 1, 1, 1);
351 e_widget_list_object_append(o, of, 1, 1, 0.5);
352
353 of = e_widget_framelist_add(evas, _("Stop me from:"), 0);
354 ob = e_widget_check_add(evas, _("Closing the window"), &(cfdata->lock.close));
355 e_widget_framelist_object_append(of, ob);
356 ob = e_widget_check_add(evas, _("Exiting my login with this window open"), &(cfdata->lock.life));
357 e_widget_framelist_object_append(of, ob);
358 e_widget_list_object_append(o, of, 1, 1, 0.5);
359
360 ob = e_widget_check_add(evas, _("Remember these Locks"), &(cfdata->lock.remember));
361 e_widget_list_object_append(o, ob, 0, 0, 1.0);
362
363 return o;
364}
diff --git a/src/bin/e_int_border_locks.h b/src/bin/e_int_border_locks.h
new file mode 100644
index 0000000..1f0f596
--- /dev/null
+++ b/src/bin/e_int_border_locks.h
@@ -0,0 +1,12 @@
1/*
2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
3 */
4#ifdef E_TYPEDEFS
5#else
6#ifndef E_INT_BORDER_LOCKS_H
7#define E_INT_BORDER_LOCKS_H
8
9EAPI void e_int_border_locks(E_Border *bd);
10
11#endif
12#endif
diff --git a/src/bin/e_widget.c b/src/bin/e_widget.c
index a71fd06..9aa054f 100644
--- a/src/bin/e_widget.c
+++ b/src/bin/e_widget.c
@@ -417,7 +417,6 @@ e_widget_disabled_set(Evas_Object *obj, int disabled)
417 { 417 {
418 Evas_Object *o, *parent; 418 Evas_Object *o, *parent;
419 419
420 printf("disable focused %p!\n", obj);
421 parent = obj; 420 parent = obj;
422 for (;;) 421 for (;;)
423 { 422 {
@@ -425,7 +424,6 @@ e_widget_disabled_set(Evas_Object *obj, int disabled)
425 if (!o) break; 424 if (!o) break;
426 parent = o; 425 parent = o;
427 } 426 }
428 printf("jump %p\n", parent);
429 e_widget_focus_jump(parent, 1); 427 e_widget_focus_jump(parent, 1);
430 } 428 }
431 if (sd->disable_func) sd->disable_func(obj); 429 if (sd->disable_func) sd->disable_func(obj);