From 667dc146ae5651d1ed07bcaf53770c204453fd0e Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 12 Sep 2013 11:09:05 +0100 Subject: Fix buttons in the least convaluted way possible --- amiga/tree.c | 9 ++++----- 1 file 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); } -- cgit v1.2.3