diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-11-25 22:43:23 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-11-25 22:43:23 +0000 |
commit | 7c65316f44f7a7073f1c43630844f6b14a61ed12 (patch) | |
tree | 8ccf104d20eace72520bc41c920b12b975bb3364 | |
parent | ae0b5ff460c3219ddd2be483a230ce8a91e4eacd (diff) | |
download | netsurf-7c65316f44f7a7073f1c43630844f6b14a61ed12.tar.gz netsurf-7c65316f44f7a7073f1c43630844f6b14a61ed12.tar.bz2 |
Fixed an issue with hotlist items outside the menu folder being added to the menu
in some circumstances.
svn path=/trunk/netsurf/; revision=5791
-rwxr-xr-x | amiga/menu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/amiga/menu.c b/amiga/menu.c index ec79537fc..6d7a406de 100755 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -304,7 +304,7 @@ void ami_menu_scan(struct tree *tree,struct NewMenu *menu) if(element && (strcmp(element->text,"Menu")==0)) { // found menu - ami_menu_scan_2(tree,node,&gen,&item,menu); + ami_menu_scan_2(tree,node->child,&gen,&item,menu); } } } @@ -321,12 +321,12 @@ void ami_menu_scan_2(struct tree *tree,struct node *root,WORD *gen,ULONG *item,s { element = tree_find_element(node, TREE_ELEMENT_TITLE); - if((*gen > 1) && (*gen < 4)) + if((*gen > 0) && (*gen < 3)) { if(*item >= AMI_MENU_HOTLIST_MAX) return; - if(*gen == 2) menu[*item].nm_Type = NM_ITEM; - if(*gen == 3) menu[*item].nm_Type = NM_SUB; + if(*gen == 1) menu[*item].nm_Type = NM_ITEM; + if(*gen == 2) menu[*item].nm_Type = NM_SUB; if(strcmp(element->text,"--")) { @@ -341,7 +341,6 @@ void ami_menu_scan_2(struct tree *tree,struct node *root,WORD *gen,ULONG *item,s element = tree_find_element(node, TREE_ELEMENT_URL); if(element && element->text) menu[*item].nm_UserData = (void *)element->text; - if(node->folder && (!node->child)) menu[*item].nm_Flags = NM_ITEMDISABLED; *item = *item + 1; |