fix indicator icon update by implement blocking update handler

This commit is contained in:
yggverse 2025-03-18 17:18:47 +02:00
parent a2f307f315
commit e91930a9d9
2 changed files with 38 additions and 23 deletions

View file

@ -404,3 +404,18 @@ fn home(entry: &Entry) -> Option<Uri> {
None
}
}
/// Update request text with indicator icon without given signal emission
fn update_blocked(
profile: &Profile,
entry: &Entry,
signal_handler_id: &gtk::glib::SignalHandlerId,
text: &str,
) {
use gtk::prelude::ObjectExt;
entry.block_signal(signal_handler_id);
entry.set_text(text);
entry.select_region(0, -1);
update_primary_icon(entry, profile);
entry.unblock_signal(signal_handler_id);
}