1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

theme fixes

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@880 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-11-26 05:08:11 +00:00 committed by cras
parent 8c02aa15b4
commit 7fbc915516
4 changed files with 102 additions and 5 deletions

81
colorless.theme Normal file
View File

@ -0,0 +1,81 @@
abstracts = {
# generic
line_start = "-!- ";
hilight = "%_$0-%_";
error = "$0-";
channel = "%_$0-%_";
nick = "%_$0-%_";
nickhost = "[$0-]";
server = "%_$0-%_";
reason = "[$0-]";
# channel specific messages
channick_hilight = "$0-";
chanhost_hilight = "{nickhost $0-}";
channick = "$0-";
chanhost = "{nickhost $0-}";
channelhilight = "$0-";
ban = "$0-";
# messages
msgnick = "<$0-> %|";
msgownnick = "$0-";
msgchannel = ":$0-";
msgme = "%_$0-%_";
privmsg = "[$0-] "
privmsgnick = "$0-"
privmsghost = "($0-)";
ownprivmsg = "[$0-] ";
ownprivmsgdest = "($0-)";
# actions
action = " * $0- ";
ownaction = "{action $0-}";
pvtaction = " (*) $0- ";
pvtaction_query = "{action $0-}";
pubaction = "{action $0-}";
# notices
ownnotice = "[$0-] ";
ownnotice_target = "($0-)";
notice = "-$0-- ";
pubnotice_channel = ":$0-";
pvtnotice_nick = "($0-)";
servernotice = "!$0- ";
# ctcp
ownctcp = "[$0-] ";
ownctcp_target = "($0-)";
ctcp = "$0-";
# wall
ownwall = "[$0-] ";
ownwall_channel = "/$0-";
# wallops
wallop = "$0-: ";
wallop_nick = "$0-";
wallop_action = " * $0- ";
# netsplits
netsplit = "$0-";
netjoin = "$0-";
# /names list
names_nickstat = "%_$0-%_";
names_users = "[$0-]";
names_channel = "$0-";
# dcc
dcc = "$0-";
dccfile = "%_$0-%_";
dccownmsg = "[$0-] ";
dccownnick = "($0)";
dccownaction = "{action $0-}";
dccmsg = "[$0-] "
dccmsghost = "($0-)";
dccquerynick = "$0-";
dccaction = " (*dcc*) $0- %|";
};

View File

@ -12,17 +12,19 @@ abstracts = {
# generic # generic
line_start = "%B-%W!%B-%n "; line_start = "%B-%W!%B-%n ";
hilight = "%_$0-%_"; hilight = "%_$0-%_";
error = "%R$0-%n";
channel = "%_$0-%_"; channel = "%_$0-%_";
nick = "%_$0-%_"; nick = "%_$0-%_";
nickhost = "[$0-]";
server = "%_$0-%_"; server = "%_$0-%_";
reason = "[$0-]"; reason = "[$0-]";
# channel specific messages # channel specific messages
channick_hilight = "%C$0-%n"; channick_hilight = "%C$0-%n";
chanhost_hilight = "[%c$0-%n]"; chanhost_hilight = "{nickhost %c$0-%n}";
channick = "%c$0-%n"; channick = "%c$0-%n";
chanhost = "[$0-]"; chanhost = "{nickhost $0-}";
channelhilight = "%c$0-%n"; channelhilight = "%c$0-%n";
ban = "%c$0-%n"; ban = "%c$0-%n";
@ -48,7 +50,7 @@ abstracts = {
ownnotice = "[%r$0-]%n "; ownnotice = "[%r$0-]%n ";
ownnotice_target = "%K(%R$0-%K)"; ownnotice_target = "%K(%R$0-%K)";
notice = "%K-%M$0-%K-%n "; notice = "%K-%M$0-%K-%n ";
pubnotice_channel = "%K:%m$0"; pubnotice_channel = "%K:%m$0-";
pvtnotice_nick = "%K(%m$0-%K)"; pvtnotice_nick = "%K(%m$0-%K)";
servernotice = "%g!$0-%n "; servernotice = "%g!$0-%n ";
@ -80,7 +82,7 @@ abstracts = {
dccfile = "%_$0-%_"; dccfile = "%_$0-%_";
dccownmsg = "[%r$0-%n] "; dccownmsg = "[%r$0-%n] ";
dccownnick = "%K(%R$1%K)%n"; dccownnick = "%K(%R$0-%K)%n";
dccownaction = "{action $0-}"; dccownaction = "{action $0-}";
dccmsg = "[%G$0-%n] " dccmsg = "[%G$0-%n] "
dccmsghost = "%K(%g$0-%K)%n"; dccmsghost = "%K(%g$0-%K)%n";

View File

@ -274,6 +274,20 @@ static char *theme_format_expand_abstract(THEME_REC *theme,
data = theme_format_expand_data(theme, formatp, default_color, data = theme_format_expand_data(theme, formatp, default_color,
NULL, 0); NULL, 0);
len = strlen(data);
if (len > 1 && isdigit(data[len-1]) && data[len-2] == '$') {
/* ends with $<digit> .. this breaks things if next
character is digit or '-' */
char digit, *tmp;
tmp = data;
digit = tmp[len-1];
tmp[len-1] = '\0';
data = g_strdup_printf("%s{%c}", tmp, digit);
g_free(tmp);
}
ret = parse_special_string(abstract, NULL, NULL, data, NULL); ret = parse_special_string(abstract, NULL, NULL, data, NULL);
g_free(abstract); g_free(abstract);
g_free(data); g_free(data);

View File

@ -118,7 +118,7 @@ FORMAT_REC fecommon_irc_formats[] = {
{ "own_notice", "{ownnotice notice{ownnotice_target $0}}$1", 2, { 0, 0 } }, { "own_notice", "{ownnotice notice{ownnotice_target $0}}$1", 2, { 0, 0 } },
{ "own_action", "{ownaction $0}$1", 2, { 0, 0 } }, { "own_action", "{ownaction $0}$1", 2, { 0, 0 } },
{ "own_ctcp", "{ownctcp ctcp{ownctcp_target $0}}$1 $2", 3, { 0, 0, 0 } }, { "own_ctcp", "{ownctcp ctcp{ownctcp_target $0}}$1 $2", 3, { 0, 0, 0 } },
{ "own_wall", "{ownwall Wall{ownwall_channel}}$1", 2, { 0, 0 } }, { "own_wall", "{ownwall Wall{ownwall_channel $0}}$1", 2, { 0, 0 } },
/* ---- */ /* ---- */
{ NULL, "Received messages", 0 }, { NULL, "Received messages", 0 },