summaryrefslogtreecommitdiff
path: root/src/fe-common/core/printtext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common/core/printtext.c')
-rw-r--r--src/fe-common/core/printtext.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c
index a5eaa38f..01ef2dcd 100644
--- a/src/fe-common/core/printtext.c
+++ b/src/fe-common/core/printtext.c
@@ -170,13 +170,13 @@ static void print_line(TEXT_DEST_REC *dest, const char *text)
g_return_if_fail(dest != NULL);
g_return_if_fail(text != NULL);
-
+
theme = window_get_theme(dest->window);
tmp = format_get_level_tag(theme, dest);
str = !theme->info_eol ? format_add_linestart(text, tmp) :
format_add_lineend(text, tmp);
g_free_not_null(tmp);
-
+
/* send both the formatted + stripped (for logging etc.) */
stripped = strip_codes(str);
signal_emit_id(signal_print_text, 3, dest, str, stripped);
@@ -413,6 +413,18 @@ void printtext_gui(const char *text)
g_free(str);
}
+/* Like printtext_gui(), but don't expand % codes. */
+void printtext_gui_internal(const char *str)
+{
+ TEXT_DEST_REC dest;
+
+ g_return_if_fail(str != NULL);
+
+ memset(&dest, 0, sizeof(dest));
+
+ format_send_to_gui(&dest, str);
+}
+
static void msg_beep_check(TEXT_DEST_REC *dest)
{
if (dest->level != 0 && (dest->level & MSGLEVEL_NO_ACT) == 0 &&
@@ -434,7 +446,9 @@ static void sig_print_text(TEXT_DEST_REC *dest, const char *text)
if (dest->window == NULL) {
str = strip_codes(text);
+#ifndef SUPPRESS_PRINTF_FALLBACK
printf("NO WINDOWS: %s\n", str);
+#endif
g_free(str);
return;
}