Add recursive expand/contract functions to hotlist, global history, and cookie manager modules.

This commit is contained in:
Michael Drake 2013-09-03 11:28:02 +01:00
parent b56d684a31
commit c2375339a1
6 changed files with 90 additions and 0 deletions

View File

@ -859,3 +859,17 @@ int cookie_manager_get_height(void)
return treeview_get_height(cm_ctx.tree);
}
/* Exported interface, documented in cookie_manager.h */
nserror cookie_manager_expand(bool only_folders)
{
return treeview_expand(cm_ctx.tree, only_folders);
}
/* Exported interface, documented in cookie_manager.h */
nserror cookie_manager_contract(bool all)
{
return treeview_contract(cm_ctx.tree, all);
}

View File

@ -116,4 +116,20 @@ bool cookie_manager_has_selection(void);
*/
int cookie_manager_get_height(void);
/**
* Expand the treeview's nodes
*
* \param only_folders Iff true, only folders are expanded.
* \return NSERROR_OK on success, appropriate error otherwise
*/
nserror cookie_manager_expand(bool only_folders);
/**
* Contract the treeview's nodes
*
* \param all Iff false, only entries are contracted.
* \return NSERROR_OK on success, appropriate error otherwise
*/
nserror cookie_manager_contract(bool all);
#endif

View File

@ -966,3 +966,17 @@ int global_history_get_height(void)
return treeview_get_height(gh_ctx.tree);
}
/* Exported interface, documented in global_history.h */
nserror global_history_expand(bool only_folders)
{
return treeview_expand(gh_ctx.tree, only_folders);
}
/* Exported interface, documented in global_history.h */
nserror global_history_contract(bool all)
{
return treeview_contract(gh_ctx.tree, all);
}

View File

@ -116,4 +116,20 @@ bool global_history_has_selection(void);
*/
int global_history_get_height(void);
/**
* Expand the treeview's nodes
*
* \param only_folders Iff true, only folders are expanded.
* \return NSERROR_OK on success, appropriate error otherwise
*/
nserror global_history_expand(bool only_folders);
/**
* Contract the treeview's nodes
*
* \param all Iff false, only entries are contracted.
* \return NSERROR_OK on success, appropriate error otherwise
*/
nserror global_history_contract(bool all);
#endif

View File

@ -1423,3 +1423,17 @@ int hotlist_get_height(void)
return treeview_get_height(hl_ctx.tree);
}
/* Exported interface, documented in hotlist.h */
nserror hotlist_expand(bool only_folders)
{
return treeview_expand(hl_ctx.tree, only_folders);
}
/* Exported interface, documented in hotlist.h */
nserror hotlist_contract(bool all)
{
return treeview_contract(hl_ctx.tree, all);
}

View File

@ -164,4 +164,20 @@ void hotlist_edit_selection(void);
*/
int hotlist_get_height(void);
/**
* Expand the treeview's nodes
*
* \param only_folders Iff true, only folders are expanded.
* \return NSERROR_OK on success, appropriate error otherwise
*/
nserror hotlist_expand(bool only_folders);
/**
* Contract the treeview's nodes
*
* \param all Iff false, only entries are contracted.
* \return NSERROR_OK on success, appropriate error otherwise
*/
nserror hotlist_contract(bool all);
#endif