mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
Add flag to suppress redraw on node creation.
This commit is contained in:
parent
895954a1e1
commit
afaf24378b
@ -332,7 +332,8 @@ static nserror cookie_manager_create_cookie_node(
|
||||
parent->folder, TREE_REL_FIRST_CHILD,
|
||||
cookie->data, cookie,
|
||||
cm_ctx.built ? TREE_CREATE_NONE :
|
||||
TREE_CREATE_SUPPRESS_RESIZE);
|
||||
TREE_CREATE_SUPPRESS_RESIZE |
|
||||
TREE_CREATE_SUPPRESS_REDRAW);
|
||||
if (err != NSERROR_OK) {
|
||||
cookie_manager_free_treeview_field_data(cookie);
|
||||
free(cookie);
|
||||
@ -412,7 +413,8 @@ static nserror cookie_manager_create_domain_folder(
|
||||
err = treeview_create_node_folder(cm_ctx.tree, &(f->folder),
|
||||
NULL, TREE_REL_FIRST_CHILD, &f->data, f,
|
||||
cm_ctx.built ? TREE_CREATE_NONE :
|
||||
TREE_CREATE_SUPPRESS_RESIZE);
|
||||
TREE_CREATE_SUPPRESS_RESIZE |
|
||||
TREE_CREATE_SUPPRESS_REDRAW);
|
||||
if (err != NSERROR_OK) {
|
||||
free((void *)f->data.value);
|
||||
free(f);
|
||||
|
@ -198,7 +198,8 @@ static nserror global_history_create_dir(enum global_history_folders f)
|
||||
&gh_ctx.folders[f].data,
|
||||
&gh_ctx.folders[f],
|
||||
gh_ctx.built ? TREE_CREATE_NONE :
|
||||
TREE_CREATE_SUPPRESS_RESIZE);
|
||||
TREE_CREATE_SUPPRESS_RESIZE |
|
||||
TREE_CREATE_SUPPRESS_REDRAW);
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -326,7 +327,8 @@ static nserror global_history_entry_insert(struct global_history_entry *e,
|
||||
err = treeview_create_node_entry(gh_ctx.tree, &(e->entry),
|
||||
parent, TREE_REL_FIRST_CHILD, e->data, e,
|
||||
gh_ctx.built ? TREE_CREATE_NONE :
|
||||
TREE_CREATE_SUPPRESS_RESIZE);
|
||||
TREE_CREATE_SUPPRESS_RESIZE |
|
||||
TREE_CREATE_SUPPRESS_REDRAW);
|
||||
if (err != NSERROR_OK) {
|
||||
return err;
|
||||
}
|
||||
|
@ -141,7 +141,8 @@ static nserror hotlist_entry_insert(struct hotlist_entry *e,
|
||||
|
||||
err = treeview_create_node_entry(hl_ctx.tree, &(e->entry),
|
||||
relation, rel, e->data, e, hl_ctx.built ?
|
||||
TREE_CREATE_NONE : TREE_CREATE_SUPPRESS_RESIZE);
|
||||
TREE_CREATE_NONE : TREE_CREATE_SUPPRESS_RESIZE |
|
||||
TREE_CREATE_SUPPRESS_REDRAW);
|
||||
if (err != NSERROR_OK) {
|
||||
return err;
|
||||
}
|
||||
@ -313,7 +314,8 @@ static nserror hotlist_add_folder_internal(
|
||||
|
||||
err = treeview_create_node_folder(hl_ctx.tree,
|
||||
&n, relation, rel, &f->data, f, hl_ctx.built ?
|
||||
TREE_CREATE_NONE : TREE_CREATE_SUPPRESS_RESIZE);
|
||||
TREE_CREATE_NONE : TREE_CREATE_SUPPRESS_RESIZE |
|
||||
TREE_CREATE_SUPPRESS_REDRAW);
|
||||
if (err != NSERROR_OK) {
|
||||
free((void *)title); /* Eww */
|
||||
free(f);
|
||||
|
@ -46,8 +46,9 @@ enum treeview_relationship {
|
||||
|
||||
typedef enum {
|
||||
TREE_CREATE_NONE = (0), /* No flags set */
|
||||
TREE_CREATE_SUPPRESS_RESIZE = (1 << 0) /* Suppress callback */
|
||||
} treeview_node_create_flags; /**< Relationship between nodes */
|
||||
TREE_CREATE_SUPPRESS_RESIZE = (1 << 0), /* Suppress callback */
|
||||
TREE_CREATE_SUPPRESS_REDRAW = (1 << 1) /* Suppress callback */
|
||||
} treeview_node_create_flags; /**< Node creation settings */
|
||||
|
||||
typedef enum {
|
||||
TREEVIEW_NO_FLAGS = (0), /**< No flags set */
|
||||
|
Loading…
Reference in New Issue
Block a user