1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Added printtext_string_window(), Irssi::UI::Window::print() uses it also

now.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2141 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-25 15:27:47 +00:00 committed by cras
parent 8fd09aa09f
commit 7ae96f540d
3 changed files with 24 additions and 1 deletions

View File

@ -334,6 +334,28 @@ void printtext_string(void *server, const char *target, int level, const char *t
g_free(str);
}
/* Like printtext_window(), but don't handle %s etc. */
void printtext_string_window(WINDOW_REC *window, int level, const char *text)
{
TEXT_DEST_REC dest;
char *str;
g_return_if_fail(text != NULL);
format_create_dest(&dest, NULL, NULL, level,
window != NULL ? window : active_win);
if (!sending_print_starting) {
sending_print_starting = TRUE;
signal_emit_id(signal_print_starting, 1, dest);
sending_print_starting = FALSE;
}
str = printtext_expand_formats(text, &dest.flags);
print_line(&dest, str);
g_free(str);
}
void printtext_window(WINDOW_REC *window, int level, const char *text, ...)
{
TEXT_DEST_REC dest;

View File

@ -12,6 +12,7 @@ void printformat_module_window_args(const char *module, WINDOW_REC *window, int
void printtext(void *server, const char *target, int level, const char *text, ...);
void printtext_string(void *server, const char *target, int level, const char *text);
void printtext_string_window(WINDOW_REC *window, int level, const char *text);
void printtext_window(WINDOW_REC *window, int level, const char *text, ...);
void printtext_multiline(void *server, const char *target, int level, const char *format, const char *text);
void printtext_dest(TEXT_DEST_REC *dest, const char *text, ...);

View File

@ -159,7 +159,7 @@ print(window, str, level=MSGLEVEL_CLIENTNOTICE)
char *str
int level;
CODE:
printtext_window(window, level, str);
printtext_string_window(window, level, str);
void
command(window, cmd)