mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 12:53:42 +02:00
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
This commit is contained in:
parent
edc7dc26fe
commit
5b4e05c553
3 changed files with 14 additions and 14 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue