diff mcabber/src/histolog.c @ 1141:5be2408a6534

Add option "max_history_blocks"
author Mikael Berthe <mikael@lilotux.net>
date Tue, 06 Feb 2007 00:21:42 +0100
parents 8e12137fab20
children b8f5fe2d666a
line wrap: on
line diff
--- a/mcabber/src/histolog.c	Sun Feb 04 18:49:47 2007 +0100
+++ b/mcabber/src/histolog.c	Tue Feb 06 00:21:42 2007 +0100
@@ -135,6 +135,7 @@
   guint err = 0;
   guint ln = 0; // line number
   time_t starttime;
+  int max_num_of_blocks;
 
   if (!FileLoadLogs)
     return;
@@ -165,6 +166,8 @@
       scr_LogPrint(LPRINT_LOGNORM, "Reading <%s> history file...", bjid);
   }
 
+  max_num_of_blocks = get_max_history_blocks();
+
   starttime = 0L;
   if (settings_opt_get_int("max_history_age") > 0) {
     int maxdays = settings_opt_get_int("max_history_age");
@@ -252,7 +255,8 @@
       converted = from_utf8(&data[dataoffset+1]);
       if (converted) {
         xtext = ut_expand_tabs(converted); // Expand tabs
-        hbuf_add_line(p_buddyhbuf, xtext, timestamp, prefix_flags, width);
+        hbuf_add_line(p_buddyhbuf, xtext, timestamp, prefix_flags, width,
+                      max_num_of_blocks);
         if (xtext != converted)
           g_free(xtext);
         g_free(converted);