diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-11-27 20:07:26 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-11-27 20:07:26 +0000 |
commit | d169eefe5963b27a6e64fdfcfa34f59e22a27342 (patch) | |
tree | 246d60706506150d05be48644873a8771c801641 /desktop/tree.c | |
parent | 714f07c48b31ddd5f87f0cef891fbba08164529d (diff) | |
download | netsurf-d169eefe5963b27a6e64fdfcfa34f59e22a27342.tar.gz netsurf-d169eefe5963b27a6e64fdfcfa34f59e22a27342.tar.bz2 |
Allow new (blank) hotlist entries to be created in the currently-selected folder
(if there is one) as this gives the user more control where their additions are
being created.
Functionality can be enabled/disabled by passing true/false to
hotlist_add_folder/hotlist_add_entry.
svn path=/trunk/netsurf/; revision=13185
Diffstat (limited to 'desktop/tree.c')
-rw-r--r-- | desktop/tree.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/desktop/tree.c b/desktop/tree.c index 097408e87..7818b376d 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -132,7 +132,7 @@ struct node { bool selected; /**< Whether the node is selected */ bool expanded; /**< Whether the node is expanded */ bool folder; /**< Whether the node is a folder */ - bool def_folder; /**< Whether the node is the default folder */ + bool def_folder; /**< Whether the node is the default folder */ bool retain_in_memory; /**< Whether the node remains in memory after deletion */ bool deleted; /**< Whether the node is currently @@ -1654,6 +1654,18 @@ void tree_clear_default_folder_node(struct tree *tree) /** + * Returns the parent of a node + * + * \param node the node to get the parent of + * \return the node's parent + */ +struct node *tree_node_get_parent(struct node *node) +{ + return node->parent; +} + + +/** * Returns the first child of a node * * \param node the node to get the child of |