summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2004-02-29 21:16:22 +0000
committerSebastien Helleu <flashcode@flashtux.org>2004-02-29 21:16:22 +0000
commit0bd38072f2217b9baa3620b0cee0bc0e79bd225d (patch)
treed76c06d751d0e1f2ee96b7ccdadf63d18f7dfbaa /src/gui
parent81da0f41d7053f0358784b560b302b86e464b290 (diff)
downloadweechat-0bd38072f2217b9baa3620b0cee0bc0e79bd225d.zip
Display channel modes when joining channel that already exists (i.e. with modes already set)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-display.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index 883121251..12a314b26 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -826,7 +826,7 @@ gui_draw_window_status (t_gui_window *window)
{
t_gui_window *ptr_win;
char format_more[32];
- int i;
+ int i, first_mode;
/* TODO: manage splitted windows! */
if (window != gui_current_window)
@@ -919,13 +919,21 @@ gui_draw_window_status (t_gui_window *window)
if (gui_current_window == CHANNEL(ptr_win)->window)
{
/* display channel modes */
- wprintw (window->win_status, "(+");
+ wprintw (window->win_status, "(");
i = 0;
+ first_mode = 1;
while (CHANNEL(ptr_win)->modes[i])
{
if (CHANNEL(ptr_win)->modes[i] != ' ')
+ {
+ if (first_mode)
+ {
+ wprintw (window->win_status, "+");
+ first_mode = 0;
+ }
wprintw (window->win_status, "%c",
CHANNEL(ptr_win)->modes[i]);
+ }
i++;
}
if (CHANNEL(ptr_win)->modes[CHANNEL_MODE_KEY] != ' ')