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.xs21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/perl/ui/UI.xs b/src/perl/ui/UI.xs
index d427dd07..fc11c7ba 100644
--- a/src/perl/ui/UI.xs
+++ b/src/perl/ui/UI.xs
@@ -91,25 +91,9 @@ static void perl_unregister_theme(const char *package)
theme_unregister_module(package);
}
-static void sig_script_destroy(const char *type, const char *name,
- const char *package)
+static void sig_script_destroy(PERL_SCRIPT_REC *script)
{
- if (strcmp(type, "PERL") == 0)
- perl_unregister_theme(package);
-}
-
-static void sig_perl_stop(void)
-{
- GSList *tmp;
- char *package;
-
- /* themes */
- for (tmp = perl_scripts; tmp != NULL; tmp = tmp->next) {
- package = g_strdup_printf("Irssi::Script::%s",
- (char *) tmp->data);
- perl_unregister_theme(package);
- g_free(package);
- }
+ perl_unregister_theme(script->package);
}
static PLAIN_OBJECT_INIT_REC fe_plains[] = {
@@ -135,7 +119,6 @@ CODE:
irssi_add_plains(fe_plains);
signal_add("script destroy", (SIGNAL_FUNC) sig_script_destroy);
- signal_add("perl stop", (SIGNAL_FUNC) sig_perl_stop);
INCLUDE: Themes.xs