1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Ctrl-X changes IRC server in stats/msgs/empty windows.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@312 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-06-10 19:16:25 +00:00 committed by cras
parent f877d934b3
commit ff86916dc3
2 changed files with 25 additions and 3 deletions

View File

@ -367,12 +367,33 @@ static void sig_window_goto_active(void)
static void sig_prev_window_item(void)
{
signal_emit("command window item prev", 3, "", active_win->active_server, active_win->active);
SERVER_REC *server;
GSList *pos;
if (active_win->items != NULL)
signal_emit("command window item prev", 3, "", active_win->active_server, active_win->active);
else if (active_win->active_server != NULL) {
/* change server */
pos = g_slist_find(servers, active_win->active_server);
server = pos->next != NULL ? pos->next->data : servers->data;
signal_emit("command window server", 3, server->tag, active_win->active_server, active_win->active);
}
}
static void sig_next_window_item(void)
{
signal_emit("command window item next", 3, "", active_win->active_server, active_win->active);
SERVER_REC *server;
int index;
if (active_win->items != NULL)
signal_emit("command window item next", 3, "", active_win->active_server, active_win->active);
else if (active_win->active_server != NULL) {
/* change server */
index = g_slist_index(servers, active_win->active_server);
server = index > 0 ? g_slist_nth(servers, index-1)->data :
g_slist_last(servers)->data;
signal_emit("command window server", 3, server->tag, active_win->active_server, active_win->active);
}
}
static void sig_addchar(const char *data)

View File

@ -225,7 +225,7 @@ static void statusbar_channel(SBAR_ITEM_REC *item, int ypos)
mode = NULL;
mode_size = 0;
size_needed = 3 + strlen(winnum) + (server == NULL ? 0 : strlen(server->tag));
size_needed = 3 + strlen(winnum) + (server == NULL ? 0 : (17+strlen(server->tag)));
}
else
{
@ -264,6 +264,7 @@ static void statusbar_channel(SBAR_ITEM_REC *item, int ypos)
{
/* server tag */
set_color((1 << 4)+7); addstr(server->tag);
addstr(" (change with ^X)");
}
else if (channame[0] != '\0')
{