mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
parent
31ae00c2a7
commit
918e299842
3 changed files with 7 additions and 4 deletions
|
@ -45,7 +45,7 @@
|
|||
<child type="start">
|
||||
<object class="GtkButton" id="add_btn">
|
||||
<property name="receives_default">True</property>
|
||||
<property name="action_name">win.add-account</property>
|
||||
<property name="action_name">win.add_account</property>
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -211,7 +211,7 @@ mod imp {
|
|||
app.set_accels_for_action("app.preferences", &["<primary>comma"]);
|
||||
app.set_accels_for_action("win.show-help-overlay", &["<primary>question"]);
|
||||
app.set_accels_for_action("win.search", &["<primary>f"]);
|
||||
app.set_accels_for_action("win.add-account", &["<primary>n"]);
|
||||
app.set_accels_for_action("win.add_account", &["<primary>n"]);
|
||||
app.set_accels_for_action("add.scan-qr", &["<primary>t"]);
|
||||
|
||||
app.set_locked(has_set_password);
|
||||
|
|
|
@ -10,7 +10,7 @@ use glib::signal::Inhibit;
|
|||
use glib::subclass::prelude::*;
|
||||
use glib::{clone, glib_object_subclass, glib_wrapper};
|
||||
use gtk::{prelude::*, CompositeTemplate};
|
||||
use gtk_macros::action;
|
||||
use gtk_macros::{action, get_action};
|
||||
use once_cell::sync::OnceCell;
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
|
@ -257,11 +257,14 @@ impl Window {
|
|||
|
||||
action!(
|
||||
self,
|
||||
"add-account",
|
||||
"add_account",
|
||||
clone!(@weak self as win => move |_,_| {
|
||||
win.open_add_account();
|
||||
})
|
||||
);
|
||||
app.bind_property("locked", &get_action!(self, @add_account), "enabled")
|
||||
.flags(glib::BindingFlags::INVERT_BOOLEAN | glib::BindingFlags::SYNC_CREATE)
|
||||
.build();
|
||||
|
||||
let password_entry = self_.password_entry.get();
|
||||
action!(
|
||||
|
|
Loading…
Add table
Reference in a new issue