summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-08-14 13:19:06 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-08-14 13:19:06 +0000
commit0d5e56919531ec2de74e0333b7f38ec87d3a4b07 (patch)
tree20eb8d425e965f725ef5abef2ecc6b03858d9d5a /src/fe-text
parent295d16536e11811f8290dbee57f8cb537296db07 (diff)
downloadirssi-0d5e56919531ec2de74e0333b7f38ec87d3a4b07.zip
Some internal changes how /SERVER command works. Added /SERVER PURGE
[<target>] command. The channel output is purged at /PART if the output queue is larger than 10. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1759 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/gui-printtext.c12
-rw-r--r--src/fe-text/gui-printtext.h2
-rw-r--r--src/fe-text/textbuffer-reformat.c6
3 files changed, 16 insertions, 4 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c
index 9444fdf3..5d94d877 100644
--- a/src/fe-text/gui-printtext.c
+++ b/src/fe-text/gui-printtext.c
@@ -44,6 +44,18 @@ void gui_printtext(int xpos, int ypos, const char *str)
next_xpos = next_ypos = -1;
}
+void gui_printtext_after(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str)
+{
+ GUI_WINDOW_REC *gui;
+
+ gui = WINDOW_GUI(dest->window);
+
+ gui->use_insert_after = TRUE;
+ gui->insert_after = prev;
+ format_send_to_gui(dest, str);
+ gui->use_insert_after = FALSE;
+}
+
static void remove_old_lines(TEXT_BUFFER_VIEW_REC *view)
{
LINE_REC *line;
diff --git a/src/fe-text/gui-printtext.h b/src/fe-text/gui-printtext.h
index 3b2098b7..44f2b44e 100644
--- a/src/fe-text/gui-printtext.h
+++ b/src/fe-text/gui-printtext.h
@@ -2,6 +2,7 @@
#define __GUI_PRINTTEXT_H
#include "gui-windows.h"
+#include "formats.h"
extern int mirc_colors[];
@@ -9,5 +10,6 @@ void gui_printtext_init(void);
void gui_printtext_deinit(void);
void gui_printtext(int xpos, int ypos, const char *str);
+void gui_printtext_after(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str);
#endif
diff --git a/src/fe-text/textbuffer-reformat.c b/src/fe-text/textbuffer-reformat.c
index 7e0d7b4f..d719c468 100644
--- a/src/fe-text/textbuffer-reformat.c
+++ b/src/fe-text/textbuffer-reformat.c
@@ -25,6 +25,7 @@
#include "formats.h"
#include "gui-windows.h"
+#include "gui-printtext.h"
#include "textbuffer.h"
static GString *format;
@@ -187,10 +188,7 @@ void textbuffer_reformat_line(WINDOW_REC *window, LINE_REC *line)
g_free(str);
g_free(prestr);
- gui->use_insert_after = TRUE;
- gui->insert_after = line_prev;
- format_send_to_gui(&dest, tmp);
- gui->use_insert_after = FALSE;
+ gui_printtext_after(&dest, line_prev, tmp);
g_free(tmp);
line = textbuffer_insert(gui->view->buffer, gui->insert_after,