Gray out find in conversation button

This commit is contained in:
Daniel Y 2023-01-09 18:46:01 +00:00 committed by Cédric Bellegarde
parent a1f227dd1b
commit e9f3ac5276
2 changed files with 7 additions and 1 deletions

View file

@ -1816,9 +1816,11 @@ public class Application.MainWindow :
bool sensitive = (count != NONE);
bool multiple = (count == MULTIPLE);
get_window_action(ACTION_FIND_IN_CONVERSATION).set_enabled(
bool find_in_enabled = (
sensitive && !multiple && this.is_conversation_viewer_shown
);
get_window_action(ACTION_FIND_IN_CONVERSATION).set_enabled(find_in_enabled);
this.conversation_headerbar.set_find_sensitive(find_in_enabled);
bool reply_sensitive = (
sensitive &&

View file

@ -56,4 +56,8 @@ public class Components.ConversationHeaderBar : Gtk.Bin {
remove(header);
add(this.conversation_header);
}
public void set_find_sensitive(bool is_sensitive) {
this.find_button.sensitive = is_sensitive;
}
}