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
This commit is contained in:
Ole Loots 2012-06-19 23:46:57 +00:00
parent 3b5c782c16
commit 40a2f8622c
4 changed files with 23 additions and 13 deletions

View File

@ -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();
}
}

View File

@ -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 )

View File

@ -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

View File

@ -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
#endif