summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-buffer.c20
-rw-r--r--src/gui/gui-common.c8
-rw-r--r--src/gui/gui.h1
3 files changed, 25 insertions, 4 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index e53379a04..034a221be 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -290,6 +290,26 @@ gui_buffer_search (char *server, char *channel)
}
/*
+ * gui_buffer_search_by_number: search a buffer by number
+ */
+
+t_gui_buffer *
+gui_buffer_search_by_number (int number)
+{
+ t_gui_buffer *ptr_buffer;
+
+ for (ptr_buffer = gui_buffers; ptr_buffer;
+ ptr_buffer = ptr_buffer->next_buffer)
+ {
+ if (ptr_buffer->number == number)
+ return ptr_buffer;
+ }
+
+ /* buffer not found */
+ return NULL;
+}
+
+/*
* gui_buffer_find_window: find a window displaying buffer
*/
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index f01e07dc7..edf0541b2 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -180,13 +180,13 @@ gui_add_to_line (t_gui_buffer *buffer, int type, char *nick, char *message)
buffer->notify_level)
{
if (buffer->last_line->line_with_highlight)
- hotlist_add (HOTLIST_HIGHLIGHT, SERVER(buffer), buffer);
+ hotlist_add (HOTLIST_HIGHLIGHT, SERVER(buffer), buffer, 0);
else if (BUFFER_IS_PRIVATE(buffer) && (buffer->last_line->line_with_message))
- hotlist_add (HOTLIST_PRIVATE, SERVER(buffer), buffer);
+ hotlist_add (HOTLIST_PRIVATE, SERVER(buffer), buffer, 0);
else if (buffer->last_line->line_with_message)
- hotlist_add (HOTLIST_MSG, SERVER(buffer), buffer);
+ hotlist_add (HOTLIST_MSG, SERVER(buffer), buffer, 0);
else
- hotlist_add (HOTLIST_LOW, SERVER(buffer), buffer);
+ hotlist_add (HOTLIST_LOW, SERVER(buffer), buffer, 0);
gui_status_draw (gui_current_window->buffer, 1);
}
}
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 9de39f1e5..d028bc748 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -83,6 +83,7 @@ extern void gui_window_print_log (t_gui_window *);
extern t_gui_buffer *gui_buffer_servers_search ();
extern t_gui_buffer *gui_buffer_new (t_gui_window *, void *, void *, int, int);
extern t_gui_buffer *gui_buffer_search (char *, char *);
+extern t_gui_buffer *gui_buffer_search_by_number (int);
extern t_gui_window *gui_buffer_find_window (t_gui_buffer *);
extern t_gui_buffer *gui_buffer_get_dcc (t_gui_window *);
extern void gui_buffer_clear (t_gui_buffer *);