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:
parent
8fd09aa09f
commit
7ae96f540d
@ -334,6 +334,28 @@ void printtext_string(void *server, const char *target, int level, const char *t
|
|||||||
g_free(str);
|
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, ...)
|
void printtext_window(WINDOW_REC *window, int level, const char *text, ...)
|
||||||
{
|
{
|
||||||
TEXT_DEST_REC dest;
|
TEXT_DEST_REC dest;
|
||||||
|
@ -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(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(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_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_multiline(void *server, const char *target, int level, const char *format, const char *text);
|
||||||
void printtext_dest(TEXT_DEST_REC *dest, const char *text, ...);
|
void printtext_dest(TEXT_DEST_REC *dest, const char *text, ...);
|
||||||
|
@ -159,7 +159,7 @@ print(window, str, level=MSGLEVEL_CLIENTNOTICE)
|
|||||||
char *str
|
char *str
|
||||||
int level;
|
int level;
|
||||||
CODE:
|
CODE:
|
||||||
printtext_window(window, level, str);
|
printtext_string_window(window, level, str);
|
||||||
|
|
||||||
void
|
void
|
||||||
command(window, cmd)
|
command(window, cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user