[gnome-menus] [libmenu] Do not always inherit parent DefaultLayout attributes



commit 7a6b5b5a292357357f4458820b6e8f851472c592
Author: Vincent Untz <vuntz gnome org>
Date:   Fri Jun 26 23:42:59 2009 +0200

    [libmenu] Do not always inherit parent DefaultLayout attributes
    
    We should not use the parent DefaultLayout attributes when there no
    DefaultLayout children for the child but there are DefaultLayout
    attributes for the child.
    
    Ie, if the child has <DefaultLayout inline="true"/>, then it used to
    keep inheriting the parent DefaultLayout attributes, and then possibly
    lose the inline="true".

 libmenu/gmenu-tree.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libmenu/gmenu-tree.c b/libmenu/gmenu-tree.c
index be6eea8..7fd486a 100644
--- a/libmenu/gmenu-tree.c
+++ b/libmenu/gmenu-tree.c
@@ -3170,7 +3170,8 @@ set_default_layout_values (GMenuTreeDirectory *parent,
    * the DefaultLayout node) but it doesn't meant the default layout values
    * (ie, DefaultLayout attributes) aren't different from the global defaults.
    */
-  if (child->default_layout_info != NULL)
+  if (child->default_layout_info != NULL ||
+      child->default_layout_values.mask != MENU_LAYOUT_VALUES_NONE)
     return;
 
   child->default_layout_values = parent->default_layout_values;



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