summaryrefslogtreecommitdiff
path: root/src/perl/ui/UI.xs
diff options
context:
space:
mode:
Diffstat (limited to 'src/perl/ui/UI.xs')
-rw-r--r--src/perl/ui/UI.xs46
1 files changed, 2 insertions, 44 deletions
diff --git a/src/perl/ui/UI.xs b/src/perl/ui/UI.xs
index 8ad60bd7..963f6bbb 100644
--- a/src/perl/ui/UI.xs
+++ b/src/perl/ui/UI.xs
@@ -55,47 +55,6 @@ static void perl_text_dest_fill_hash(HV *hv, TEXT_DEST_REC *dest)
hv_store(hv, "hilight_color", 13, new_pv(dest->hilight_color), 0);
}
-void printformat_perl(TEXT_DEST_REC *dest, char *format, char **arglist)
-{
- THEME_REC *theme;
- char *module, *str;
- int formatnum;
-
- module = g_strdup(perl_get_package());
- theme = dest->window->theme == NULL ? current_theme :
- dest->window->theme;
-
- formatnum = format_find_tag(module, format);
- 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);
- g_free(module);
-}
-
-static void perl_unregister_theme(const char *package)
-{
- FORMAT_REC *formats;
- int n;
-
- formats = g_hash_table_lookup(default_formats, package);
- if (formats == NULL) return;
-
- for (n = 0; formats[n].def != NULL; n++) {
- g_free(formats[n].tag);
- g_free(formats[n].def);
- }
- g_free(formats);
- theme_unregister_module(package);
-}
-
-static void sig_script_destroy(PERL_SCRIPT_REC *script)
-{
- perl_unregister_theme(script->package);
-}
-
static PLAIN_OBJECT_INIT_REC fe_plains[] = {
{ "Irssi::UI::Process", (PERL_OBJECT_FUNC) perl_process_fill_hash },
{ "Irssi::UI::Window", (PERL_OBJECT_FUNC) perl_window_fill_hash },
@@ -118,13 +77,12 @@ CODE:
initialized = TRUE;
irssi_add_plains(fe_plains);
-
- signal_add("script destroy", (SIGNAL_FUNC) sig_script_destroy);
+ perl_themes_init();
void
deinit()
CODE:
- signal_remove("script destroy", (SIGNAL_FUNC) sig_script_destroy);
+ perl_themes_deinit();
BOOT:
irssi_boot(UI__Themes);