Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_box.c ewl_menubar.c 


Log Message:
- only change the boxes appearance if the current apperance was set by the
  box code.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_box.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_box.c   29 Dec 2005 19:37:43 -0000      1.19
+++ ewl_box.c   7 Jan 2006 21:04:38 -0000       1.20
@@ -213,9 +213,17 @@
 
        b->orientation = o;
 
-       if (b->orientation == EWL_ORIENTATION_HORIZONTAL)
+       /* We check the previous appearance here to make sure we only change
+        * the appearance if it is still set to box. Otherwise we might end
+        * up wipeing out the appearance of an inheriting widget (like
+        * menubar */
+       if ((b->orientation == EWL_ORIENTATION_HORIZONTAL)
+                       && (!strcmp(ewl_widget_appearance_get(EWL_WIDGET(b)),
+                                                               "vbox")))
                ewl_widget_appearance_set(EWL_WIDGET(b), "hbox");
-       else if (b->orientation == EWL_ORIENTATION_VERTICAL)
+       else if ((b->orientation == EWL_ORIENTATION_VERTICAL)
+                       && (!strcmp(ewl_widget_appearance_get(EWL_WIDGET(b)),
+                                                               "hbox")))
                ewl_widget_appearance_set(EWL_WIDGET(b), "vbox");
 
        ewl_widget_configure(EWL_WIDGET(b));
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_menubar.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_menubar.c       7 Jan 2006 15:49:18 -0000       1.9
+++ ewl_menubar.c       7 Jan 2006 21:04:38 -0000       1.10
@@ -41,7 +41,8 @@
        if (!mb)
                DRETURN_PTR(NULL, DLEVEL_STABLE);
 
-       ewl_menubar_orientation_set(EWL_MENUBAR(mb), 
EWL_ORIENTATION_HORIZONTAL);
+       ewl_menubar_orientation_set(EWL_MENUBAR(mb), 
+                               EWL_ORIENTATION_HORIZONTAL);
 
        DRETURN_PTR(mb, DLEVEL_STABLE);
 }
@@ -61,7 +62,8 @@
        if (!mb)
                DRETURN_PTR(NULL, DLEVEL_STABLE);
 
-       ewl_menubar_orientation_set(EWL_MENUBAR(mb), EWL_ORIENTATION_VERTICAL);
+       ewl_menubar_orientation_set(EWL_MENUBAR(mb), 
+                               EWL_ORIENTATION_VERTICAL);
 
        DRETURN_PTR(mb, DLEVEL_STABLE);
 }
@@ -95,10 +97,8 @@
        ewl_container_add_notify_set(EWL_CONTAINER(mb->inner_box),
                                        ewl_menubar_cb_child_add);
 
-
        ewl_menubar_orientation_set(mb, EWL_ORIENTATION_HORIZONTAL);
 
-
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to