diff options
author | Vincent Sanders <vince@kyllikki.org> | 2017-03-01 12:50:30 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2017-03-01 12:50:30 +0000 |
commit | 2f5e5620e218d317d5e853fd4ee9d9123b346610 (patch) | |
tree | 51a288d24f3f84699723ace7aed23eaa1f1d4df2 /desktop/browser_history.c | |
parent | e72b89ac3d691acb5c306c1565eaa1e559495ec8 (diff) | |
download | netsurf-2f5e5620e218d317d5e853fd4ee9d9123b346610.tar.gz netsurf-2f5e5620e218d317d5e853fd4ee9d9123b346610.tar.bz2 |
Change interface to system colours to allow reporting of errors
Allow system colour interface to report errors instead of silently
failing and propogate the errors. This also fixes teh system colour
documentation.
Diffstat (limited to 'desktop/browser_history.c')
-rw-r--r-- | desktop/browser_history.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/desktop/browser_history.c b/desktop/browser_history.c index 10154b780..cf70c4700 100644 --- a/desktop/browser_history.c +++ b/desktop/browser_history.c @@ -478,17 +478,27 @@ static bool browser_window_history__enumerate_entry( /* exported interface documented in desktop/browser_history.h */ nserror browser_window_history_create(struct browser_window *bw) { + nserror res; struct history *history; - pstyle_bg.fill_colour = ns_system_colour_char("Window"); + res = ns_system_colour_char("Window", &pstyle_bg.fill_colour); + if (res != NSERROR_OK) { + return res; + } pfstyle_node.background = pstyle_bg.fill_colour; pfstyle_node_sel.background = pstyle_bg.fill_colour; - pstyle_line.stroke_colour = ns_system_colour_char("GrayText"); + res = ns_system_colour_char("GrayText", &pstyle_line.stroke_colour); + if (res != NSERROR_OK) { + return res; + } pstyle_rect.stroke_colour = pstyle_line.stroke_colour; pfstyle_node.foreground = pstyle_line.stroke_colour; - pstyle_rect_sel.stroke_colour = ns_system_colour_char("Highlight"); + res = ns_system_colour_char("Highlight", &pstyle_rect_sel.stroke_colour); + if (res != NSERROR_OK) { + return res; + } pfstyle_node_sel.foreground = pstyle_rect_sel.stroke_colour; bw->history = NULL; |