summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-03 14:38:01 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-03 14:38:01 +0100
commitb9e3f7ae3d8164f6a7037028af96a88b03a277b9 (patch)
tree5830b297733e089a7f74a5aa9f47c632d18463aa /desktop
parent42afcf918f06a64a0a0ec97f9228755a51a976ce (diff)
downloadnetsurf-b9e3f7ae3d8164f6a7037028af96a88b03a277b9.tar.gz
netsurf-b9e3f7ae3d8164f6a7037028af96a88b03a277b9.tar.bz2
Ensure tree height is provided when treeview building is complete.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/cookie_manager.c3
-rw-r--r--desktop/global_history.c13
-rw-r--r--desktop/hotlist.c3
-rw-r--r--desktop/treeview.c2
4 files changed, 16 insertions, 5 deletions
diff --git a/desktop/cookie_manager.c b/desktop/cookie_manager.c
index b7897067f..c2ccb0ac4 100644
--- a/desktop/cookie_manager.c
+++ b/desktop/cookie_manager.c
@@ -789,6 +789,9 @@ nserror cookie_manager_init(struct core_window_callback_table *cw_t,
* the treeview is built. */
cm_ctx.built = true;
+ /* Inform client of window height */
+ treeview_get_height(cm_ctx.tree);
+
LOG(("Generated cookie manager data"));
return NSERROR_OK;
diff --git a/desktop/global_history.c b/desktop/global_history.c
index 449fdccbf..a4919e981 100644
--- a/desktop/global_history.c
+++ b/desktop/global_history.c
@@ -767,11 +767,6 @@ nserror global_history_init(struct core_window_callback_table *cw_t,
return err;
}
- /* History tree is built
- * We suppress the treeview height callback on entry insertion before
- * the treeview is built. */
- gh_ctx.built = true;
-
/* Expand the "Today" folder node */
err = treeview_node_expand(gh_ctx.tree,
gh_ctx.folders[GH_TODAY].folder);
@@ -779,6 +774,14 @@ nserror global_history_init(struct core_window_callback_table *cw_t,
return err;
}
+ /* History tree is built
+ * We suppress the treeview height callback on entry insertion before
+ * the treeview is built. */
+ gh_ctx.built = true;
+
+ /* Inform client of window height */
+ treeview_get_height(gh_ctx.tree);
+
LOG(("Loaded global history"));
return NSERROR_OK;
diff --git a/desktop/hotlist.c b/desktop/hotlist.c
index 2e71582dd..70453ccd9 100644
--- a/desktop/hotlist.c
+++ b/desktop/hotlist.c
@@ -1089,6 +1089,9 @@ nserror hotlist_init(struct core_window_callback_table *cw_t,
* the treeview is built. */
hl_ctx.built = true;
+ /* Inform client of window height */
+ treeview_get_height(hl_ctx.tree);
+
LOG(("Loaded hotlist"));
return NSERROR_OK;
diff --git a/desktop/treeview.c b/desktop/treeview.c
index a2c9e0de5..f9b984c25 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -3428,6 +3428,8 @@ int treeview_get_height(treeview *tree)
assert(tree != NULL);
assert(tree->root != NULL);
+ tree->cw_t->update_size(tree->cw_h, -1, tree->root->height);
+
return tree->root->height;
}