mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
parent
06496f96b0
commit
4142f02892
2 changed files with 9 additions and 2 deletions
|
@ -55,7 +55,7 @@
|
|||
<property name="valign">center</property>
|
||||
<property name="selectable">True</property>
|
||||
<style>
|
||||
<class name="account-otp"/>
|
||||
<class name="numeric" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use crate::models::Account;
|
||||
use glib::clone;
|
||||
use gtk::{gio, glib, prelude::*, subclass::prelude::*, CompositeTemplate};
|
||||
use gtk::{gio, gdk, glib, prelude::*, subclass::prelude::*, CompositeTemplate};
|
||||
use gtk_macros::{action, get_action};
|
||||
use std::cell::RefCell;
|
||||
|
||||
|
@ -35,6 +35,13 @@ mod imp {
|
|||
|
||||
fn class_init(klass: &mut Self::Class) {
|
||||
Self::bind_template(klass);
|
||||
|
||||
klass.add_binding_action(
|
||||
gdk::Key::c,
|
||||
gdk::ModifierType::CONTROL_MASK,
|
||||
"account.copy-otp",
|
||||
None,
|
||||
);
|
||||
}
|
||||
|
||||
fn instance_init(obj: &subclass::InitializingObject<Self>) {
|
||||
|
|
Loading…
Add table
Reference in a new issue