From 53d595ba7fd05f392853c1c6cb3c58b03949a247 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 15 Apr 2002 14:06:57 +0000 Subject: [PATCH] fixed several signal leaks git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2683 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-common-core.c | 2 +- src/fe-common/core/keyboard.c | 5 +++++ src/fe-common/irc/fe-netjoin.c | 4 ++++ src/fe-text/gui-readline.c | 8 ++++++-- src/fe-text/textbuffer-reformat.c | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index 3c1d5870..f356aa28 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -240,7 +240,7 @@ void fe_common_core_deinit(void) fe_queries_deinit(); fe_messages_deinit(); - fe_ignore_messages_init(); + fe_ignore_messages_deinit(); theme_unregister(); themes_deinit(); diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index 8b764fce..10b42307 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -842,6 +842,11 @@ void keyboard_init(void) void keyboard_deinit(void) { + key_unbind("command", (SIGNAL_FUNC) sig_command); + key_unbind("key", (SIGNAL_FUNC) sig_key); + key_unbind("multi", (SIGNAL_FUNC) sig_multi); + key_unbind("nothing", (SIGNAL_FUNC) sig_nothing); + while (keyinfos != NULL) keyinfo_remove(keyinfos->data); g_hash_table_destroy(keys); diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c index 7d720362..400b198c 100644 --- a/src/fe-common/irc/fe-netjoin.c +++ b/src/fe-common/irc/fe-netjoin.c @@ -429,4 +429,8 @@ void fe_netjoin_deinit(void) } signal_remove("setup changed", (SIGNAL_FUNC) read_settings); + + signal_remove("message quit", (SIGNAL_FUNC) msg_quit); + signal_remove("message join", (SIGNAL_FUNC) msg_join); + signal_remove("message mode", (SIGNAL_FUNC) msg_mode); } diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 145273b7..c23b42c7 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -665,11 +665,11 @@ void gui_readline_init(void) /* window managing */ key_bind("previous_window", "Previous window", "^P", NULL, (SIGNAL_FUNC) key_previous_window); - key_bind("left_window", "Window in left", "meta-left", NULL, (SIGNAL_FUNC) key_left_window); key_bind("next_window", "Next window", "^N", NULL, (SIGNAL_FUNC) key_next_window); - key_bind("right_window", "Window in right", "meta-right", NULL, (SIGNAL_FUNC) key_right_window); key_bind("upper_window", "Upper window", "meta-up", NULL, (SIGNAL_FUNC) key_upper_window); key_bind("lower_window", "Lower window", "meta-down", NULL, (SIGNAL_FUNC) key_lower_window); + key_bind("left_window", "Window in left", "meta-left", NULL, (SIGNAL_FUNC) key_left_window); + key_bind("right_window", "Window in right", "meta-right", NULL, (SIGNAL_FUNC) key_right_window); key_bind("active_window", "Go to next window with the highest activity", "meta-a", NULL, (SIGNAL_FUNC) key_active_window); key_bind("next_window_item", "Next channel/query", "^X", NULL, (SIGNAL_FUNC) key_next_window_item); key_bind("previous_window_item", "Previous channel/query", NULL, NULL, (SIGNAL_FUNC) key_previous_window_item); @@ -737,13 +737,17 @@ void gui_readline_deinit(void) key_unbind("yank_from_cutbuffer", (SIGNAL_FUNC) key_yank_from_cutbuffer); key_unbind("transpose_characters", (SIGNAL_FUNC) key_transpose_characters); + key_unbind("send_line", (SIGNAL_FUNC) key_send_line); key_unbind("word_completion", (SIGNAL_FUNC) key_word_completion); + key_unbind("erase_completion", (SIGNAL_FUNC) key_erase_completion); key_unbind("check_replaces", (SIGNAL_FUNC) key_check_replaces); key_unbind("previous_window", (SIGNAL_FUNC) key_previous_window); key_unbind("next_window", (SIGNAL_FUNC) key_next_window); key_unbind("upper_window", (SIGNAL_FUNC) key_upper_window); key_unbind("lower_window", (SIGNAL_FUNC) key_lower_window); + key_unbind("left_window", (SIGNAL_FUNC) key_left_window); + key_unbind("right_window", (SIGNAL_FUNC) key_right_window); key_unbind("active_window", (SIGNAL_FUNC) key_active_window); key_unbind("next_window_item", (SIGNAL_FUNC) key_next_window_item); key_unbind("previous_window_item", (SIGNAL_FUNC) key_previous_window_item); diff --git a/src/fe-text/textbuffer-reformat.c b/src/fe-text/textbuffer-reformat.c index da75a5a8..62f17f0d 100644 --- a/src/fe-text/textbuffer-reformat.c +++ b/src/fe-text/textbuffer-reformat.c @@ -275,6 +275,6 @@ void textbuffer_reformat_deinit(void) g_string_free(format, TRUE); signal_remove("print format", (SIGNAL_FUNC) sig_print_format); - signal_remove("print text finished", (SIGNAL_FUNC) sig_gui_printtext_finished); + signal_remove("gui print text finished", (SIGNAL_FUNC) sig_gui_printtext_finished); signal_remove("setup changed", (SIGNAL_FUNC) read_settings); }