diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-09-03 11:28:02 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-09-03 11:28:02 +0100 |
commit | c2375339a1556d687ce0ccc8bec633a8737f585e (patch) | |
tree | 736b737a3b9366dd5b4d3f6f063980802517d352 /desktop | |
parent | b56d684a312a39f6cfb93b3ef60d0df2feb9a017 (diff) | |
download | netsurf-c2375339a1556d687ce0ccc8bec633a8737f585e.tar.gz netsurf-c2375339a1556d687ce0ccc8bec633a8737f585e.tar.bz2 |
Add recursive expand/contract functions to hotlist, global history, and cookie manager modules.
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/cookie_manager.c | 14 | ||||
-rw-r--r-- | desktop/cookie_manager.h | 16 | ||||
-rw-r--r-- | desktop/global_history.c | 14 | ||||
-rw-r--r-- | desktop/global_history.h | 16 | ||||
-rw-r--r-- | desktop/hotlist.c | 14 | ||||
-rw-r--r-- | desktop/hotlist.h | 16 |
6 files changed, 90 insertions, 0 deletions
diff --git a/desktop/cookie_manager.c b/desktop/cookie_manager.c index d9fd21cbf..b7897067f 100644 --- a/desktop/cookie_manager.c +++ b/desktop/cookie_manager.c @@ -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); +} + diff --git a/desktop/cookie_manager.h b/desktop/cookie_manager.h index 4da85a895..86111f349 100644 --- a/desktop/cookie_manager.h +++ b/desktop/cookie_manager.h @@ -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 diff --git a/desktop/global_history.c b/desktop/global_history.c index d20eb37e1..449fdccbf 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -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); +} + diff --git a/desktop/global_history.h b/desktop/global_history.h index a720d3016..9e0b74963 100644 --- a/desktop/global_history.h +++ b/desktop/global_history.h @@ -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 diff --git a/desktop/hotlist.c b/desktop/hotlist.c index ce9156308..2e71582dd 100644 --- a/desktop/hotlist.c +++ b/desktop/hotlist.c @@ -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); +} + diff --git a/desktop/hotlist.h b/desktop/hotlist.h index d192eaa48..ff95d660b 100644 --- a/desktop/hotlist.h +++ b/desktop/hotlist.h @@ -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 |