[gnome-menus] [libmenu] Fix layout processing for Menuname nodes



commit 7dba2d5302b539e24131e669e2db26f3c16e1547
Author: Vincent Untz <vuntz gnome org>
Date:   Mon Mar 15 09:27:44 2010 +0100

    [libmenu] Fix layout processing for Menuname nodes
    
    Because of the scope of a variable, no submenu were matching Menuname
    nodes in the layouts, making all the Menuname nodes non-working.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=612585

 libmenu/gmenu-tree.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libmenu/gmenu-tree.c b/libmenu/gmenu-tree.c
index f27315a..7ec9e86 100644
--- a/libmenu/gmenu-tree.c
+++ b/libmenu/gmenu-tree.c
@@ -3838,7 +3838,7 @@ preprocess_layout_info (GMenuTree          *tree,
       subdir_l = directory->subdirs;
       while (subdir_l != NULL)
         {
-          GMenuTreeDirectory *subdir = subdir_l->data;
+          subdir = subdir_l->data;
 
           if (!strcmp (subdir->name, name))
             break;
@@ -3849,6 +3849,8 @@ preprocess_layout_info (GMenuTree          *tree,
           /* we do not want to use Menuname on a menu that appeared via
            * inlining: without inlining, the Menuname wouldn't have matched
            * anything, and we want to keep the same behavior */
+          /* FIXME: might not be true if the layout node comes from a
+           * DefaultLayout */
           if (subdir_l == last_subdir)
             {
               subdir_l = NULL;



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