Fix screen refresh issue (spotted by franky)
The message "Reading <JID> history file...", when loading a big history file,
was displayed too late.
--- a/mcabber/src/histolog.c Tue Aug 21 22:45:53 2007 +0200
+++ b/mcabber/src/histolog.c Wed Aug 22 22:19:33 2007 +0200
@@ -193,8 +193,10 @@
// If file is large (> 3MB here), display a message to inform the user
// (it can take a while...)
if (!fstat(fileno(fp), &bufstat)) {
- if (bufstat.st_size > 3145728)
- scr_LogPrint(LPRINT_LOGNORM, "Reading <%s> history file...", bjid);
+ if (bufstat.st_size > 3145728) {
+ scr_LogPrint(LPRINT_NORMAL, "Reading <%s> history file...", bjid);
+ scr_DoUpdate();
+ }
}
max_num_of_blocks = get_max_history_blocks();
--- a/mcabber/src/logprint.h Tue Aug 21 22:45:53 2007 +0200
+++ b/mcabber/src/logprint.h Wed Aug 22 22:19:33 2007 +0200
@@ -12,6 +12,8 @@
void scr_LogPrint(unsigned int flag, const char *fmt, ...);
+inline void scr_DoUpdate(void);
+
#endif /* __LOGPRINT_H__ */
/* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */
--- a/mcabber/src/screen.h Tue Aug 21 22:45:53 2007 +0200
+++ b/mcabber/src/screen.h Wed Aug 22 22:19:33 2007 +0200
@@ -100,8 +100,6 @@
void scr_Getch(keycode *kcode);
int process_key(keycode kcode);
-inline void scr_DoUpdate(void);
-
void scr_InitLocaleCharSet(void);
void scr_InitCurses(void);
void scr_TerminateCurses(void);