From 40a2f8622cceec6b0a34027ba299381f7d24a49d Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Tue, 19 Jun 2012 23:46:57 +0000 Subject: fix history redraw by calling the window specific redraw function from gui_poll(), also switch hotlist redraw to to hotlist specific redraw function. svn path=/trunk/netsurf/; revision=13977 --- atari/gui.c | 6 ++++-- atari/history.c | 10 +--------- atari/history.h | 16 ++++++++++++++++ atari/hotlist.h | 4 ++-- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/atari/gui.c b/atari/gui.c index d0039d8a9..fef8fcb62 100755 --- a/atari/gui.c +++ b/atari/gui.c @@ -65,7 +65,8 @@ #include "atari/statusbar.h" #include "atari/toolbar.h" #include "atari/verify_ssl.h" -#include "atari/hotlist.h" +#include "atari/hotlist.h" +#include "atari/history.h" #include "atari/login.h" #include "atari/global_evnt.h" #include "atari/encoding.h" @@ -149,7 +150,8 @@ void gui_poll(bool active) if( evnt.timer != 0 && !active ){ /* this suits for stuff with lower priority */ /* TBD: really be spare on redraws??? */ - atari_treeview_redraw( hl.tv ); + hotlist_redraw(); + global_history_redraw(); } } diff --git a/atari/history.c b/atari/history.c index ee47edeba..683d6a588 100755 --- a/atari/history.c +++ b/atari/history.c @@ -39,15 +39,7 @@ extern char * tree_directory_icon_name; -struct s_atari_global_history { - WINDOW * window; - NSTREEVIEW tv; /*< The history treeview handle. */ - bool open; - bool init; -}; - -static struct s_atari_global_history gl_history; - +struct s_atari_global_history gl_history; void global_history_add_recent( const char *url ) diff --git a/atari/history.h b/atari/history.h index 0dd571d01..bfea9ec1d 100755 --- a/atari/history.h +++ b/atari/history.h @@ -24,9 +24,25 @@ #include "desktop/tree.h" #include "atari/treeview.h" +struct s_atari_global_history { + WINDOW * window; + NSTREEVIEW tv; /*< The history treeview handle. */ + bool open; + bool init; +}; + +extern struct s_atari_global_history gl_history; + bool global_history_init( void ); void global_history_destroy( void ); void global_history_open( void ); void global_history_close( void ); +inline void global_history_redraw( void ); +inline void global_history_redraw( void ) +{ + atari_treeview_redraw( gl_history.tv ); +} + + #endif diff --git a/atari/hotlist.h b/atari/hotlist.h index 27e9eba6e..70b4d8a70 100755 --- a/atari/hotlist.h +++ b/atari/hotlist.h @@ -39,11 +39,11 @@ void hotlist_open( void ); void hotlist_close( void ); void hotlist_destroy( void ); void atari_hotlist_add_page( const char * url, const char * title ); - + inline void hotlist_redraw( void ); inline void hotlist_redraw( void ) { atari_treeview_redraw( hl.tv ); } -#endif \ No newline at end of file +#endif -- cgit v1.2.3