diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/Makefile | 2 | ||||
-rw-r--r-- | desktop/local_history.c | 7 | ||||
-rw-r--r-- | desktop/treeview.c | 11 |
3 files changed, 9 insertions, 11 deletions
diff --git a/desktop/Makefile b/desktop/Makefile index c3c876642..0d88b2bc9 100644 --- a/desktop/Makefile +++ b/desktop/Makefile @@ -13,7 +13,7 @@ desktop/version.c: testament $(OBJROOT)/testament.h # S_BROWSER are sources related to full browsers but are common # between RISC OS, GTK, BeOS and AmigaOS builds S_BROWSER := browser.c browser_window.c browser_history.c \ - download.c frames.c netsurf.c \ + download.c frames.c netsurf.c cw_helper.c \ save_complete.c save_text.c selection.c textinput.c gui_factory.c \ save_pdf.c font_haru.c diff --git a/desktop/local_history.c b/desktop/local_history.c index 2a8871afe..ddebbbe58 100644 --- a/desktop/local_history.c +++ b/desktop/local_history.c @@ -33,6 +33,7 @@ #include "netsurf/plotters.h" #include "netsurf/keypress.h" +#include "desktop/cw_helper.h" #include "desktop/gui_internal.h" #include "desktop/system_colour.h" #include "desktop/browser_private.h" @@ -294,9 +295,9 @@ local_history_scroll_to_cursor(struct local_history_session *session) cursor.y1 = cursor.y0 + LOCAL_HISTORY_HEIGHT + LOCAL_HISTORY_BOTTOM_MARGIN / 2; - session->cw_t->scroll_visible(session->core_window_handle, &cursor); - - return NSERROR_OK; + return cw_helper_scroll_visible(session->cw_t, + session->core_window_handle, + &cursor); } /* exported interface documented in desktop/local_history.h */ diff --git a/desktop/treeview.c b/desktop/treeview.c index a54f4cee8..807366422 100644 --- a/desktop/treeview.c +++ b/desktop/treeview.c @@ -39,11 +39,12 @@ #include "content/hlcache.h" #include "css/utils.h" -#include "desktop/system_colour.h" #include "desktop/knockout.h" #include "desktop/textarea.h" #include "desktop/treeview.h" +#include "desktop/cw_helper.h" #include "desktop/gui_internal.h" +#include "desktop/system_colour.h" /** * The maximum horizontal size a treeview can possibly be. @@ -404,9 +405,7 @@ static inline void treeview__cw_scroll_top( .y1 = tree_g.line_height, }; - if (tree->cw_t != NULL) { - tree->cw_t->scroll_visible(tree->cw_h, &r); - } + cw_helper_scroll_visible(tree->cw_t, tree->cw_h, &r); } @@ -584,9 +583,7 @@ static inline void treeview__cw_scroll_to_node( r.y1 += r.y0; /* Apply the Y offset to the second Y coordinate */ - if (tree->cw_t != NULL) { - tree->cw_t->scroll_visible(tree->cw_h, &r); - } + cw_helper_scroll_visible(tree->cw_t, tree->cw_h, &r); } |