mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
A bit more better utf8 support, still not a good input line.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2355 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
46b318b831
commit
2c3216d10c
4 changed files with 54 additions and 21 deletions
|
|
@ -347,7 +347,8 @@ static void item_input(SBAR_ITEM_REC *item, int get_size_only)
|
|||
rec = g_hash_table_lookup(input_entries, item);
|
||||
if (rec == NULL) {
|
||||
rec = gui_entry_create(item->xpos, item->bar->real_ypos,
|
||||
item->size);
|
||||
item->size,
|
||||
settings_get_bool("term_utf8"));
|
||||
gui_entry_set_active(rec);
|
||||
g_hash_table_insert(input_entries, item, rec);
|
||||
}
|
||||
|
|
@ -374,6 +375,14 @@ static void sig_statusbar_item_destroyed(SBAR_ITEM_REC *item)
|
|||
}
|
||||
}
|
||||
|
||||
static void read_settings(void)
|
||||
{
|
||||
if (active_entry != NULL) {
|
||||
gui_entry_set_utf8(active_entry,
|
||||
settings_get_bool("term_utf8"));
|
||||
}
|
||||
}
|
||||
|
||||
void statusbar_items_init(void)
|
||||
{
|
||||
settings_add_int("misc", "lag_min_show", 100);
|
||||
|
|
@ -413,6 +422,9 @@ void statusbar_items_init(void)
|
|||
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);
|
||||
|
||||
read_settings();
|
||||
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
||||
}
|
||||
|
||||
void statusbar_items_deinit(void)
|
||||
|
|
@ -441,4 +453,6 @@ void statusbar_items_deinit(void)
|
|||
/* input */
|
||||
signal_remove("statusbar item destroyed", (SIGNAL_FUNC) sig_statusbar_item_destroyed);
|
||||
g_hash_table_destroy(input_entries);
|
||||
|
||||
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue