diff options
-rw-r--r-- | src/fe-common/core/printtext.c | 15 | ||||
-rw-r--r-- | src/fe-common/core/printtext.h | 1 | ||||
-rw-r--r-- | src/perl/ui/Themes.xs | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c index 0e409ecd..24aba66d 100644 --- a/src/fe-common/core/printtext.c +++ b/src/fe-common/core/printtext.c @@ -49,16 +49,23 @@ void printformat_module_dest_args(const char *module, TEXT_DEST_REC *dest, char *arglist[MAX_FORMAT_PARAMS]; char buffer[DEFAULT_FORMAT_ARGLIST_SIZE]; FORMAT_REC *formats; - THEME_REC *theme; - char *str; - - theme = window_get_theme(dest->window); formats = g_hash_table_lookup(default_formats, module); format_read_arglist(va, &formats[formatnum], arglist, sizeof(arglist)/sizeof(char *), buffer, sizeof(buffer)); + printformat_module_dest_charargs(module, dest, formatnum, arglist); +} + +void printformat_module_dest_charargs(const char *module, TEXT_DEST_REC *dest, + int formatnum, char **arglist) +{ + THEME_REC *theme; + char *str; + + theme = window_get_theme(dest->window); + if (!sending_print_starting) { sending_print_starting = TRUE; signal_emit_id(signal_print_starting, 1, dest); diff --git a/src/fe-common/core/printtext.h b/src/fe-common/core/printtext.h index 463f3572..66ba28f4 100644 --- a/src/fe-common/core/printtext.h +++ b/src/fe-common/core/printtext.h @@ -11,6 +11,7 @@ void printformat_module_dest(const char *module, TEXT_DEST_REC *dest, int format void printformat_module_args(const char *module, void *server, const char *target, int level, int formatnum, va_list va); void printformat_module_window_args(const char *module, WINDOW_REC *window, int level, int formatnum, va_list va); void printformat_module_dest_args(const char *module, TEXT_DEST_REC *dest, int formatnum, va_list va); +void printformat_module_dest_charargs(const char *module, TEXT_DEST_REC *dest, int formatnum, char **arglist); 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); diff --git a/src/perl/ui/Themes.xs b/src/perl/ui/Themes.xs index 76675e7b..86507546 100644 --- a/src/perl/ui/Themes.xs +++ b/src/perl/ui/Themes.xs @@ -2,8 +2,7 @@ static void printformat_perl(TEXT_DEST_REC *dest, char *format, char **arglist) { - THEME_REC *theme; - char *module, *str; + char *module; int formatnum; module = g_strdup(perl_get_package()); @@ -14,14 +13,7 @@ static void printformat_perl(TEXT_DEST_REC *dest, char *format, char **arglist) return; } - theme = dest->window->theme == NULL ? current_theme : - dest->window->theme; - signal_emit("print format", 5, theme, module, - dest, GINT_TO_POINTER(formatnum), arglist); - - str = format_get_text_theme_charargs(theme, module, dest, formatnum, arglist); - if (*str != '\0') printtext_dest(dest, "%s", str); - g_free(str); + printformat_module_dest_charargs(module, dest, formatnum, arglist); g_free(module); } |