From bb4bda0b3a2dd71b2a8e248e33f7f63788171b9d Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 17 Dec 2010 11:10:22 +0000 Subject: When a hotlist entry edit ends by cancelling, rather than confirming the change, end the whole edit and don't pass onto next element for edit. svn path=/trunk/netsurf/; revision=11085 --- desktop/hotlist.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'desktop/hotlist.c') diff --git a/desktop/hotlist.c b/desktop/hotlist.c index cb5362050..dd29b6a84 100644 --- a/desktop/hotlist.c +++ b/desktop/hotlist.c @@ -64,10 +64,14 @@ static node_callback_resp hotlist_node_callback(void *user_data, const char *text; char *norm_text; bool is_folder = tree_node_is_folder(node); + bool cancelled = false; switch (msg_data->msg) { + case NODE_ELEMENT_EDIT_CANCELLED: + cancelled = true; + /* fall through */ case NODE_ELEMENT_EDIT_FINISHED: - if (creating_node && + if (creating_node && !cancelled && (is_folder == false) && (msg_data->flag == TREE_ELEMENT_TITLE)) { tree_url_node_edit_url(hotlist_tree, node); -- cgit v1.2.3