[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] [PATCH] hide border menu if borders are locked



This simple patch hides the borders menu if the borders are locked.



--
Chady 'Leviathan' Kassouf
http://chady.net/
Index: e_int_border_menu.c
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_border_menu.c,v
retrieving revision 1.35
diff -u -r1.35 e_int_border_menu.c
--- e_int_border_menu.c	20 Jul 2006 11:41:12 -0000	1.35
+++ e_int_border_menu.c	20 Jul 2006 14:06:53 -0000
@@ -140,13 +140,16 @@
 			     (char *)e_theme_edje_file_get("base/theme/borders",
 							   "widgets/border/default/remember"),
 			     "widgets/border/default/remember");
-   mi = e_menu_item_new(m);
-   e_menu_item_label_set(mi, _("Borders"));
-   e_menu_item_callback_set(mi, _e_border_menu_cb_border, bd);
-   e_menu_item_icon_edje_set(mi,
+   if (!bd->lock_border)
+     {
+        mi = e_menu_item_new(m);
+        e_menu_item_label_set(mi, _("Borders"));
+        e_menu_item_callback_set(mi, _e_border_menu_cb_border, bd);
+        e_menu_item_icon_edje_set(mi,
 			     (char *)e_theme_edje_file_get("base/theme/borders",
 							   "widgets/border/default/borders"),
 			     "widgets/border/default/borders");
+     }
 
    if (!bd->sticky)
      {