diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-17 07:39:22 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-17 07:39:22 +0000 |
commit | bbc33bff5e4ef2acee69dd45a5581231f466b3ac (patch) | |
tree | c4171b5bd170676d881810790c49dabce303146b /src/core/signals.c | |
parent | aac80846b89108414a81773ad4bcdaba4401663d (diff) | |
download | irssi-bbc33bff5e4ef2acee69dd45a5581231f466b3ac.zip |
/SET prompt, /SET prompt_window - Specifies the text in prompt.
'prompt' is used when channel or query is active in window and
'prompt_window' is used with empty windows.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1005 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/signals.c')
-rw-r--r-- | src/core/signals.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/core/signals.c b/src/core/signals.c index 710d0687..3c1e4281 100644 --- a/src/core/signals.c +++ b/src/core/signals.c @@ -146,25 +146,24 @@ static int signal_remove_from_lists(SIGNAL_REC *rec, int signal_id, return 0; } -/* unbind signal */ -void signal_remove(const char *signal, SIGNAL_FUNC func) +void signal_remove_id(int signal_id, SIGNAL_FUNC func) { SIGNAL_REC *rec; - int signal_id, found; - g_return_if_fail(signal != NULL); + g_return_if_fail(signal_id >= 0); g_return_if_fail(func != NULL); - signal_id = signal_get_uniq_id(signal); - rec = g_hash_table_lookup(signals, GINT_TO_POINTER(signal_id)); - found = rec == NULL ? 0 : + if (rec != NULL) signal_remove_from_lists(rec, signal_id, func); +} - if (!found) { - g_warning("signal_remove() : signal \"%s\" isn't " - "grabbed for %p", signal, func); - } +/* unbind signal */ +void signal_remove(const char *signal, SIGNAL_FUNC func) +{ + g_return_if_fail(signal != NULL); + + signal_remove_id(signal_get_uniq_id(signal), func); } /* Remove all NULL functions from signal list */ |