summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/bin/e_int_border_menu.c28
3 files changed, 29 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c35b80ecf..c3d3e41e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
2 2
3 * e_fm2_optimal_size_calc returns bool to indicate whether the returned size can be used 3 * e_fm2_optimal_size_calc returns bool to indicate whether the returned size can be used
4 * filemanager windows no longer resize to 0x0 when double clicked with no icons present 4 * filemanager windows no longer resize to 0x0 when double clicked with no icons present
5 * border menu now has top-level item to set borderless state
5 6
62013-04-26 Mike Blumenkrantz 72013-04-26 Mike Blumenkrantz
7 8
diff --git a/NEWS b/NEWS
index 949d05396..b133d33f4 100644
--- a/NEWS
+++ b/NEWS
@@ -137,6 +137,7 @@ Improvements:
137 * added new modes for notification display on multiple monitors 137 * added new modes for notification display on multiple monitors
138 * improve efm mouse movement detection for icons 138 * improve efm mouse movement detection for icons
139 * add check for vmware window in another spot to disable key remapping 139 * add check for vmware window in another spot to disable key remapping
140 * border menu now has top-level item to set borderless state
140 141
141Fixes: 142Fixes:
142 * IBar menu didn't allow to configure different icon sources, show contents menu even on empty IBar. 143 * IBar menu didn't allow to configure different icon sources, show contents menu even on empty IBar.
diff --git a/src/bin/e_int_border_menu.c b/src/bin/e_int_border_menu.c
index 3586a1bbe..ef12f6fc0 100644
--- a/src/bin/e_int_border_menu.c
+++ b/src/bin/e_int_border_menu.c
@@ -3,6 +3,7 @@
3static void _e_border_cb_border_menu_end(void *data, E_Menu *m); 3static void _e_border_cb_border_menu_end(void *data, E_Menu *m);
4static void _e_border_menu_cb_locks(void *data, E_Menu *m, E_Menu_Item *mi); 4static void _e_border_menu_cb_locks(void *data, E_Menu *m, E_Menu_Item *mi);
5static void _e_border_menu_cb_remember(void *data, E_Menu *m, E_Menu_Item *mi); 5static void _e_border_menu_cb_remember(void *data, E_Menu *m, E_Menu_Item *mi);
6static void _e_border_menu_cb_borderless(void *data, E_Menu *m, E_Menu_Item *mi);
6static void _e_border_menu_cb_border(void *data, E_Menu *m, E_Menu_Item *mi); 7static void _e_border_menu_cb_border(void *data, E_Menu *m, E_Menu_Item *mi);
7static void _e_border_menu_cb_close(void *data, E_Menu *m, E_Menu_Item *mi); 8static void _e_border_menu_cb_close(void *data, E_Menu *m, E_Menu_Item *mi);
8static void _e_border_menu_cb_iconify(void *data, E_Menu *m, E_Menu_Item *mi); 9static void _e_border_menu_cb_iconify(void *data, E_Menu *m, E_Menu_Item *mi);
@@ -99,6 +100,7 @@ e_int_border_menu_create(E_Border *bd)
99 Eina_List *l; 100 Eina_List *l;
100 E_Border_Menu_Hook *h; 101 E_Border_Menu_Hook *h;
101 char buf[128]; 102 char buf[128];
103 Eina_Bool borderless;
102 104
103 if (bd->border_menu) return; 105 if (bd->border_menu) return;
104 106
@@ -121,6 +123,7 @@ e_int_border_menu_create(E_Border *bd)
121 if (bd->desktop) 123 if (bd->desktop)
122 e_util_desktop_menu_item_icon_add(bd->desktop, 16, mi); 124 e_util_desktop_menu_item_icon_add(bd->desktop, 16, mi);
123 } 125 }
126 borderless = bd->borderless || (!bd->client.border.name) || (!e_util_strcmp("borderless", bd->client.border.name));
124 127
125 mi = e_menu_item_new(m); 128 mi = e_menu_item_new(m);
126 e_menu_item_label_set(mi, _("Window")); 129 e_menu_item_label_set(mi, _("Window"));
@@ -171,7 +174,7 @@ e_int_border_menu_create(E_Border *bd)
171 } 174 }
172 175
173 if ((!bd->lock_user_shade) && (!bd->fullscreen) && (!bd->maximized) && 176 if ((!bd->lock_user_shade) && (!bd->fullscreen) && (!bd->maximized) &&
174 ((!bd->client.border.name) || (strcmp("borderless", bd->client.border.name)))) 177 ((!bd->client.border.name) || (!borderless)))
175 { 178 {
176 mi = e_menu_item_new(m); 179 mi = e_menu_item_new(m);
177 e_menu_item_label_set(mi, _("Shade")); 180 e_menu_item_label_set(mi, _("Shade"));
@@ -184,6 +187,19 @@ e_int_border_menu_create(E_Border *bd)
184 "e/widgets/border/default/shade"); 187 "e/widgets/border/default/shade");
185 } 188 }
186 189
190 if ((!bd->fullscreen) && (!bd->lock_border) && (!bd->shading) && (!bd->shaded))
191 {
192 mi = e_menu_item_new(m);
193 e_menu_item_label_set(mi, _("Borderless"));
194 e_menu_item_check_set(mi, 1);
195 e_menu_item_toggle_set(mi, borderless);
196 e_menu_item_callback_set(mi, _e_border_menu_cb_borderless, bd);
197 e_menu_item_icon_edje_set(mi,
198 e_theme_edje_file_get("base/theme/borders",
199 "e/widgets/border/default/borderless"),
200 "e/widgets/border/default/borderless");
201 }
202
187 if (!bd->lock_close) 203 if (!bd->lock_close)
188 { 204 {
189 mi = e_menu_item_new(m); 205 mi = e_menu_item_new(m);
@@ -292,6 +308,16 @@ _e_border_menu_cb_border(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNU
292} 308}
293 309
294static void 310static void
311_e_border_menu_cb_borderless(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi)
312{
313 E_Border *bd = data;
314
315 BD_CHANGED(bd);
316 bd->client.border.changed = 1;
317 bd->borderless = mi->toggle;
318}
319
320static void
295_e_border_menu_cb_close(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) 321_e_border_menu_cb_close(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
296{ 322{
297 E_Border *bd; 323 E_Border *bd;