mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
fix indicator icon update by implement blocking update handler
This commit is contained in:
parent
a2f307f315
commit
e91930a9d9
2 changed files with 38 additions and 23 deletions
|
|
@ -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: >k::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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue