summaryrefslogtreecommitdiff
path: root/src/perl/ui
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2009-01-10 15:00:06 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2009-01-10 15:00:06 +0000
commit5b4e05c55366ab66a4d75c09ed7a9ad45fb8f194 (patch)
treeb022b80e58687262df8fd0c5c020b300a884d723 /src/perl/ui
parentedc7dc26fe4b949d8fd8a912ae198140753a5c96 (diff)
downloadirssi-5b4e05c55366ab66a4d75c09ed7a9ad45fb8f194.zip
Factor out printformat_module_dest_charargs function from
printformat_module_dest_args and use it in printformat_perl to remove code duplication. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4979 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/ui')
-rw-r--r--src/perl/ui/Themes.xs12
1 files changed, 2 insertions, 10 deletions
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);
}