mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 01:00:02 +00:00
rename find
action to escape
This commit is contained in:
parent
4c572fada6
commit
94b8227088
@ -152,7 +152,7 @@ impl App {
|
||||
format!(
|
||||
"{}.{}",
|
||||
browser.action.id,
|
||||
browser.action.focus.simple_action.name()
|
||||
browser.action.escape.simple_action.name()
|
||||
),
|
||||
&["Escape"],
|
||||
),
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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`
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user