diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-display.c | 32 | ||||
-rw-r--r-- | src/gui/gui.h | 1 |
2 files changed, 31 insertions, 2 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index 0c1fdcab5..b978bb38d 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -604,6 +604,9 @@ gui_draw_buffer_chat (t_gui_buffer *buffer, int erase) gui_window_set_color (ptr_win->win_chat, COLOR_WIN_CHAT); mvwprintw (ptr_win->win_chat, i, 0, " %-16s %s", ptr_dcc->nick, ptr_dcc->filename); + if (ptr_dcc->filename_suffix > 0) + wprintw (ptr_win->win_chat, " (.%d)", + ptr_dcc->filename_suffix); gui_window_set_color (ptr_win->win_chat, COLOR_WIN_CHAT); mvwprintw (ptr_win->win_chat, i + 1, 0, " %s ", (ptr_dcc->type == DCC_FILE_RECV) ? @@ -1008,8 +1011,12 @@ gui_draw_buffer_status (t_gui_buffer *buffer, int erase) COLOR_WIN_STATUS_DATA_HIGHLIGHT); break; } - wprintw (ptr_win->win_status, "%d", - ptr_hotlist->buffer->number); + if (ptr_hotlist->buffer->dcc) + wprintw (ptr_win->win_status, "%d/DCC", + ptr_hotlist->buffer->number); + else + wprintw (ptr_win->win_status, "%d", + ptr_hotlist->buffer->number); gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); if (ptr_hotlist->next_hotlist) @@ -1341,6 +1348,27 @@ gui_switch_to_buffer (t_gui_window *window, t_gui_buffer *buffer) } /* + * gui_get_dcc_buffer: get pointer to DCC buffer (DCC buffer created if not existing) + */ + +t_gui_buffer * +gui_get_dcc_buffer () +{ + t_gui_buffer *ptr_buffer; + + /* check if dcc buffer exists */ + for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer) + { + if (BUFFER_IS_DCC (ptr_buffer)) + break; + } + if (ptr_buffer) + return ptr_buffer; + else + return gui_buffer_new (gui_current_window, NULL, NULL, 1, 0); +} + +/* * gui_switch_to_dcc_buffer: switch to dcc buffer (create it if it does not exist) */ diff --git a/src/gui/gui.h b/src/gui/gui.h index 4f44ba8d8..aca1d2620 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -263,6 +263,7 @@ extern void gui_draw_buffer_infobar (t_gui_buffer *, int); extern void gui_draw_buffer_input (t_gui_buffer *, int); extern void gui_redraw_buffer (t_gui_buffer *); extern void gui_switch_to_buffer (t_gui_window *, t_gui_buffer *); +extern t_gui_buffer *gui_get_dcc_buffer (); extern void gui_switch_to_dcc_buffer (); extern void gui_switch_to_previous_buffer (t_gui_window *); extern void gui_switch_to_next_buffer (t_gui_window *); |