diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-07 22:26:55 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-07 22:26:55 +0000 |
commit | 1d211a16da60819b769e0805329dd218fa43b8e0 (patch) | |
tree | 4a3a08515b899c99532a1c643a0dd86a748c8020 /src/gui/curses/gui-curses-status.c | |
parent | f8c913a77ac493b4823bd7e9c64eff0b2aef67d8 (diff) | |
download | weechat-1d211a16da60819b769e0805329dd218fa43b8e0.zip |
Added missing modes (channel & user), now all modes are allowed (bug #16606), added "%m" for completion with self nick (on current server)
Diffstat (limited to 'src/gui/curses/gui-curses-status.c')
-rw-r--r-- | src/gui/curses/gui-curses-status.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/gui/curses/gui-curses-status.c b/src/gui/curses/gui-curses-status.c index 3d7317c9a..ad77dfcd9 100644 --- a/src/gui/curses/gui-curses-status.c +++ b/src/gui/curses/gui-curses-status.c @@ -44,7 +44,7 @@ gui_status_draw (t_gui_buffer *buffer, int erase) t_gui_window *ptr_win; t_weechat_hotlist *ptr_hotlist; char format[32], str_nicks[32], *more; - int i, first_mode, x, server_pos, server_total; + int x, server_pos, server_total; int display_name, names_count; /* make gcc happy */ @@ -171,28 +171,10 @@ gui_status_draw (t_gui_buffer *buffer, int erase) wprintw (GUI_CURSES(ptr_win)->win_status, "("); gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_status, COLOR_WIN_STATUS); - i = 0; - first_mode = 1; - while (CHANNEL(ptr_win->buffer)->modes[i]) - { - if (CHANNEL(ptr_win->buffer)->modes[i] != ' ') - { - if (first_mode) - { - wprintw (GUI_CURSES(ptr_win)->win_status, "+"); - first_mode = 0; - } - wprintw (GUI_CURSES(ptr_win)->win_status, "%c", - CHANNEL(ptr_win->buffer)->modes[i]); - } - i++; - } - if (CHANNEL(ptr_win->buffer)->modes[CHANNEL_MODE_KEY] != ' ') - wprintw (GUI_CURSES(ptr_win)->win_status, ",%s", - CHANNEL(ptr_win->buffer)->key); - if (CHANNEL(ptr_win->buffer)->modes[CHANNEL_MODE_LIMIT] != ' ') - wprintw (GUI_CURSES(ptr_win)->win_status, ",%d", - CHANNEL(ptr_win->buffer)->limit); + if (CHANNEL(ptr_win->buffer)->modes + && (strcmp (CHANNEL(ptr_win->buffer)->modes, "+") != 0)) + wprintw (GUI_CURSES(ptr_win)->win_status, "%s", + CHANNEL(ptr_win->buffer)->modes); gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_status, COLOR_WIN_STATUS_DELIMITERS); wprintw (GUI_CURSES(ptr_win)->win_status, ")"); |