diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-06-18 19:53:57 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-06-18 19:53:57 +0100 |
commit | 4e0f960e3c892569c62cfa10a7b993a79aaef3b3 (patch) | |
tree | 5013565eca9130dda7900549ac3e7bdcb9aa93ce /desktop/global_history.c | |
parent | 7cd0bacaf624502cac27088b2ee4e6d37b3aea00 (diff) | |
download | netsurf-4e0f960e3c892569c62cfa10a7b993a79aaef3b3.tar.gz netsurf-4e0f960e3c892569c62cfa10a7b993a79aaef3b3.tar.bz2 |
Write up the rest of the fucntion comments.
Diffstat (limited to 'desktop/global_history.c')
-rw-r--r-- | desktop/global_history.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/desktop/global_history.c b/desktop/global_history.c index c03c25409..e415c10da 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -105,7 +105,8 @@ static struct global_history_entry *global_history_find(nsurl *url) /** * Initialise the treeview directories * - * \return true on success, false on memory exhaustion + * \param f Ident for folder to create + * \return NSERROR_OK on success, appropriate error otherwise */ static nserror global_history_create_dir(enum global_history_folders f) { @@ -236,6 +237,13 @@ static inline nserror global_history_get_parent_treeview_node( } +/** + * Set a global history entry's data from the url_data. + * + * \param e Global history entry to set up + * \param url_data Data associated with entry's URL + * \return NSERROR_OK on success, appropriate error otherwise + */ static nserror global_history_create_treeview_field_data( struct global_history_entry *e, const struct url_data *data) @@ -309,6 +317,21 @@ static nserror global_history_entry_insert(struct global_history_entry *e, } +/** + * Add an entry to the global history (creates the entry). + * + * If the treeview has already been created, the entry will be added to the + * treeview. Otherwise, the entry will have to be added to the treeview later. + * + * When we first create the global history we create it without the treeview, to + * simplfy sorting the entries. + * + * \param url URL for entry to add to history + * \param slot Global histroy slot to contain history entry + * \param data URL data for the entry + * \param got_treeview Whether the treeview has been created already + * \return NSERROR_OK on success, or appropriate error otherwise + */ static nserror global_history_add_entry_internal(nsurl *url, int slot, const struct url_data *data, bool got_treeview) { |