rename find action to escape

This commit is contained in:
yggverse 2024-12-16 16:31:35 +02:00
parent 4c572fada6
commit 94b8227088
5 changed files with 12 additions and 12 deletions

View File

@ -152,7 +152,7 @@ impl App {
format!(
"{}.{}",
browser.action.id,
browser.action.focus.simple_action.name()
browser.action.escape.simple_action.name()
),
&["Escape"],
),

View File

@ -69,7 +69,7 @@ impl Browser {
}
});
action.focus.connect_activate({
action.escape.connect_activate({
let widget = widget.clone();
move || {
widget.application_window.set_focus(gtk::Window::NONE);

View File

@ -1,14 +1,14 @@
mod about;
mod close;
mod debug;
mod focus;
mod escape;
mod profile;
mod update;
use about::About;
use close::Close;
use debug::Debug;
use focus::Focus;
use escape::Escape;
use profile::Profile;
use update::Update;
@ -25,7 +25,7 @@ pub struct Action {
pub about: Rc<About>,
pub close: Rc<Close>,
pub debug: Rc<Debug>,
pub focus: Rc<Focus>,
pub escape: Rc<Escape>,
pub profile: Rc<Profile>,
pub update: Rc<Update>,
// Group
@ -42,7 +42,7 @@ impl Action {
let about = Rc::new(About::new());
let close = Rc::new(Close::new());
let debug = Rc::new(Debug::new());
let focus = Rc::new(Focus::new());
let escape = Rc::new(Escape::new());
let profile = Rc::new(Profile::new());
let update = Rc::new(Update::new());
@ -56,7 +56,7 @@ impl Action {
simple_action_group.add_action(&about.simple_action);
simple_action_group.add_action(&close.simple_action);
simple_action_group.add_action(&debug.simple_action);
simple_action_group.add_action(&focus.simple_action);
simple_action_group.add_action(&escape.simple_action);
simple_action_group.add_action(&profile.simple_action);
simple_action_group.add_action(&update.simple_action);
@ -65,7 +65,7 @@ impl Action {
about,
close,
debug,
focus,
escape,
profile,
update,
id,

View File

@ -1,11 +1,11 @@
use gtk::{gio::SimpleAction, glib::uuid_string_random, prelude::ActionExt};
/// [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) wrapper for `Focus` action of `Browser` group
pub struct Focus {
/// [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) wrapper for `Escape` action of `Browser` group
pub struct Escape {
pub simple_action: SimpleAction,
}
impl Focus {
impl Escape {
// Constructors
/// Create new `Self`

View File

@ -159,7 +159,7 @@ impl Page {
const DEFAULT_MAX_REDIRECT_COUNT: usize = 10;
// Move focus out from navigation entry
self.browser_action.focus.activate();
self.browser_action.escape.activate();
// Initially disable find action
self.window_action.find.simple_action.set_enabled(false);