Package: irssi
Version: 0.8.15-2
Severity: normal
Tags: patch

 irssi has the hide_server_tags option to never show server tags, but when 
that is set to off it only shows tags for servers that aren't the current
server for the window.  This patch adds an option to show the server tag 
even for the current server (to maintain consistency I've called it 
hide_current_server_tag with a default of yes).

J.

-- System Information:
Debian Release: 6.0.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages irssi depends on:
ii  libc6                  2.11.3-4          Embedded GNU C Library: Shared lib
ii  libglib2.0-0           2.24.2-1          The GLib library of C routines
ii  libncurses5            5.7+20100313-5    shared libraries for terminal hand
ii  libperl5.10            5.10.1-17squeeze4 shared Perl library
ii  libssl0.9.8            0.9.8o-4squeeze13 SSL shared libraries
ii  perl                   5.10.1-17squeeze4 Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.1 5.10.1-17squeeze4 minimal Perl system

irssi recommends no packages.

Versions of packages irssi suggests:
ii  irssi-scripts                 20100512   collection of scripts for irssi

-- no debconf information
diff -ruw irssi-0.8.15-orig/src/fe-common/core/formats.c irssi-0.8.15/src/fe-common/core/formats.c
--- irssi-0.8.15-orig/src/fe-common/core/formats.c	2010-04-03 17:19:24.000000000 +0100
+++ irssi-0.8.15/src/fe-common/core/formats.c	2013-02-08 18:32:13.000000000 +0000
@@ -39,7 +39,8 @@
 static const char *format_boldfores = "KBGCRMYW";
 
 static int signal_gui_print_text;
-static int hide_text_style, hide_server_tags, hide_colors;
+static int hide_text_style, hide_server_tags, 
+  hide_current_server_tag, hide_colors;
 
 static int timestamp_level;
 static int timestamp_timeout;
@@ -664,7 +665,8 @@
 		return NULL;
 
 	if ((dest->flags & PRINT_FLAG_SET_SERVERTAG) == 0) {
-		if (dest->window->active != NULL &&
+	  if (hide_current_server_tag &&
+	      dest->window->active != NULL &&
 		    dest->window->active->server == dest->server)
 			return NULL;
 
@@ -1079,6 +1081,7 @@
 	timestamp_timeout = settings_get_time("timestamp_timeout")/1000;
 
 	hide_server_tags = settings_get_bool("hide_server_tags");
+	hide_current_server_tag = settings_get_bool("hide_current_server_tag");
 	hide_text_style = settings_get_bool("hide_text_style");
 	hide_colors = hide_text_style || settings_get_bool("hide_colors");
 }

Reply via email to