diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-15 09:31:25 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-15 09:31:25 +0000 |
commit | 612c061605b78ce975eb7b23f76bf7abf3fff5bf (patch) | |
tree | c9534444f27115111c5382dac27affd9ac195ea8 | |
parent | 6eaf1611993c610a87ca661f5a837f372e46b6fb (diff) | |
download | irssi-612c061605b78ce975eb7b23f76bf7abf3fff5bf.zip |
A bit kludge fix for perl statusbar items breaking prompt changes at
startup. Now the entry isn't destroyed until the statusbar is, and there can
be only one entry per statusbar (well, who would want more anyway :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2447 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-text/statusbar-items.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c index ac98c77a..7612510a 100644 --- a/src/fe-text/statusbar-items.c +++ b/src/fe-text/statusbar-items.c @@ -344,13 +344,13 @@ static void item_input(SBAR_ITEM_REC *item, int get_size_only) { GUI_ENTRY_REC *rec; - rec = g_hash_table_lookup(input_entries, item); + rec = g_hash_table_lookup(input_entries, item->bar); if (rec == NULL) { rec = gui_entry_create(item->xpos, item->bar->real_ypos, item->size, settings_get_bool("term_utf8")); gui_entry_set_active(rec); - g_hash_table_insert(input_entries, item, rec); + g_hash_table_insert(input_entries, item->bar, rec); } if (get_size_only) { @@ -364,14 +364,14 @@ static void item_input(SBAR_ITEM_REC *item, int get_size_only) gui_entry_redraw(rec); /* FIXME: this is only necessary with ^L.. */ } -static void sig_statusbar_item_destroyed(SBAR_ITEM_REC *item) +static void sig_statusbar_destroyed(STATUSBAR_REC *bar) { GUI_ENTRY_REC *rec; - rec = g_hash_table_lookup(input_entries, item); + rec = g_hash_table_lookup(input_entries, bar); if (rec != NULL) { gui_entry_destroy(rec); - g_hash_table_remove(input_entries, item); + g_hash_table_remove(input_entries, bar); } } @@ -421,7 +421,7 @@ void statusbar_items_init(void) /* input */ input_entries = g_hash_table_new((GHashFunc) g_direct_hash, (GCompareFunc) g_direct_equal); - signal_add("statusbar item destroyed", (SIGNAL_FUNC) sig_statusbar_item_destroyed); + signal_add("statusbar destroyed", (SIGNAL_FUNC) sig_statusbar_destroyed); read_settings(); signal_add("setup changed", (SIGNAL_FUNC) read_settings); @@ -451,7 +451,7 @@ void statusbar_items_deinit(void) g_source_remove(lag_timeout_tag); /* input */ - signal_remove("statusbar item destroyed", (SIGNAL_FUNC) sig_statusbar_item_destroyed); + signal_remove("statusbar destroyed", (SIGNAL_FUNC) sig_statusbar_destroyed); g_hash_table_destroy(input_entries); signal_remove("setup changed", (SIGNAL_FUNC) read_settings); |