changeset 1274:c33b5b6fbf08

Fix screen refresh issue (spotted by franky) The message "Reading <JID> history file...", when loading a big history file, was displayed too late.
author Mikael Berthe <mikael@lilotux.net>
date Wed, 22 Aug 2007 22:19:33 +0200
parents b17ab2782ce5
children 6bfae7f2e8a5
files mcabber/src/histolog.c mcabber/src/logprint.h mcabber/src/screen.h
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);