diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-09-12 11:09:05 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-09-12 11:09:05 +0100 |
commit | 667dc146ae5651d1ed07bcaf53770c204453fd0e (patch) | |
tree | 15f448b72081cf5156f19d45c4441c61082d6d0d | |
parent | 5b457faf5f1898b02b33f5ddcd3ddb7a2ca2e924 (diff) | |
download | netsurf-667dc146ae5651d1ed07bcaf53770c204453fd0e.tar.gz netsurf-667dc146ae5651d1ed07bcaf53770c204453fd0e.tar.bz2 |
Fix buttons in the least convaluted way possible
-rw-r--r-- | amiga/tree.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/amiga/tree.c b/amiga/tree.c index 532077352..aba072350 100644 --- a/amiga/tree.c +++ b/amiga/tree.c @@ -496,13 +496,12 @@ void ami_tree_update_buttons(struct treeview_window *twin) { if(twin->type == AMI_TREE_SSLCERT) return; - if(tree_node_has_selection(tree_get_root(twin->tree))) - { + if(((twin->type == AMI_TREE_HOTLIST) && (hotlist_has_selection())) || + ((twin->type == AMI_TREE_COOKIES) && (cookie_manager_has_selection())) || + ((twin->type == AMI_TREE_HISTORY) && (global_history_has_selection()))) { OnMenu(twin->win, AMI_TREE_MENU_DELETE); OnMenu(twin->win, AMI_TREE_MENU_CLEAR); - } - else - { + } else { OffMenu(twin->win, AMI_TREE_MENU_DELETE); OffMenu(twin->win, AMI_TREE_MENU_CLEAR); } |