1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-15 04:28:09 -04:00

Added TXT_WINDOW_LEVEL, changed most of the /WINDOW commands to print

output to active window, not status window.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1152 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-28 03:52:29 +00:00 committed by cras
parent 2e2f9194fa
commit 90e0d79d2a
3 changed files with 19 additions and 13 deletions

View File

@ -34,6 +34,7 @@ FORMAT_REC fecommon_core_formats[] = {
{ "daychange", "Day changed to $[-2.0]{0} $3 $2", 4, { 1, 1, 1, 0 } },
{ "talking_with", "You are now talking with {nick $0}", 1, { 0 } },
{ "refnum_too_low", "Window number must be greater than 1", 0 },
{ "window_level", "Window level is now $0", 1, { 0 } },
{ "windowlist_header", "Ref Name Active item Server Level", 0 },
{ "windowlist_line", "$[3]0 %|$[20]1 $[15]2 $[15]3 $4", 5, { 1, 0, 0, 0, 0 } },
{ "windowlist_footer", "", 0 },

View File

@ -12,6 +12,7 @@ enum {
TXT_DAYCHANGE,
TXT_TALKING_WITH,
TXT_REFNUM_TOO_LOW,
TXT_WINDOW_LEVEL,
TXT_WINDOWLIST_HEADER,
TXT_WINDOWLIST_LINE,
TXT_WINDOWLIST_FOOTER,

View File

@ -173,8 +173,8 @@ static void cmd_window_level(const char *data)
level = active_win->level == 0 ? g_strdup("NONE") :
bits2level(active_win->level);
printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
"Window level is now %s", level);
printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
TXT_WINDOW_LEVEL, level);
g_free(level);
}
@ -186,12 +186,16 @@ static void cmd_window_server(const char *data)
g_return_if_fail(data != NULL);
server = server_find_tag(data);
if (server == NULL)
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_UNKNOWN_SERVER_TAG, data);
else if (active_win->active == NULL) {
if (server == NULL) {
printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
TXT_UNKNOWN_SERVER_TAG, data);
} else if (active_win->active == NULL) {
window_change_server(active_win, server);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_SERVER_CHANGED, server->tag, server->connrec->address,
server->connrec->chatnet == NULL ? "" : server->connrec->chatnet);
printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
TXT_SERVER_CHANGED,
server->tag, server->connrec->address,
server->connrec->chatnet == NULL ? "" :
server->connrec->chatnet);
}
}
@ -257,8 +261,8 @@ static void cmd_window_number(const char *data)
num = atoi(refnum);
if (num < 1) {
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_REFNUM_TOO_LOW);
printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
TXT_REFNUM_TOO_LOW);
} else {
window_set_refnum(active_win, num);
active_win->sticky_refnum =
@ -400,11 +404,11 @@ static void cmd_window_theme(const char *data)
active_win->theme = theme_load(data);
if (active_win->theme != NULL) {
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_WINDOW_THEME_CHANGED, data);
printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
TXT_WINDOW_THEME_CHANGED, data);
} else {
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_THEME_NOT_FOUND, data);
printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
TXT_THEME_NOT_FOUND, data);
}
}