[patch] Option to turn off "Day changed"

Jonas Häggqvist <[email protected]> Sat, 23 Oct 2004 15:21:39 +0200
Newsgroups gmane.network.irc.irssi.devel
Message-ID <20041023132139.GA1114@cherub>
A simple thing that's been bothering me (slightly) for a while. The "Day
changed" timestamp annoys me (and isn't really useful to me) and I see
no way of turning it off.

Here follows a (very) simple patch that should add a "print_day_changed"
option. Default behaviour is unchanged.

I haven't tested it yet, because of some problems (entirely my fault, I
expect) with building irssi, but it's a two-line patch, so I figured I
might as well send it in untested.

-- 
Jonas Häggqvist
rasher(at)rasher(dot)dk
                                                   -- Watch this space
irssi-0.8.9-print_day_changes.patch (text/plain, 821 B)
--- irssi-0.8.9/src/fe-common/core/fe-windows.c	2003-01-30 17:30:02.000000000 +0100
+++ irssi-0.8.9.new/src/fe-common/core/fe-windows.c	2004-10-23 00:28:07.000000000 +0200
@@ -583,7 +583,8 @@
                 str[0] = '\0';
 	g_free(format);
 
-	printtext_string_window(window, MSGLEVEL_NEVER, str);
+	if (settings_get_bool("print_day_changes"))
+		printtext_string_window(window, MSGLEVEL_NEVER, str);
 }
 
 static void sig_print_text(void)
@@ -650,6 +651,7 @@
 	settings_add_bool("lookandfeel", "windows_auto_renumber", TRUE);
 	settings_add_bool("lookandfeel", "window_check_level_first", FALSE);
 	settings_add_level("lookandfeel", "window_default_level", "NONE");
+	settings_add_bool("lookandfeel", "print_day_changes", TRUE);
 
 	read_settings();
 	signal_add("server looking", (SIGNAL_FUNC) sig_server_connected);
signature.asc (application/pgp-signature, 240 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAkF6WuMACgkQwjIPcvP1DCAN5gCfQD6UJ+YAP+V4vMa0rASxrPen
2L8An3CMb1pF53x/asSLryXoFD3mXZ/M
=949r
-----END PGP SIGNATURE-----