From 09df14ed16c7ab1dab394594661148720deb992b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 28 Sep 2022 15:26:04 +0200 Subject: [PATCH] login: Use AdwEntryRow and AdwPasswordEntryRow --- data/resources/ui/login.ui | 7 +++---- src/login/mod.rs | 18 ++++++++---------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/data/resources/ui/login.ui b/data/resources/ui/login.ui index 8b0d3e84..d2b0b614 100644 --- a/data/resources/ui/login.ui +++ b/data/resources/ui/login.ui @@ -75,7 +75,7 @@ vertical 6 - + @@ -164,7 +164,7 @@ - + @@ -176,7 +176,7 @@ vertical 12 - + @@ -247,4 +247,3 @@ - diff --git a/src/login/mod.rs b/src/login/mod.rs index 65ea5564..49a2b9bd 100644 --- a/src/login/mod.rs +++ b/src/login/mod.rs @@ -22,10 +22,8 @@ use idp_button::IdpButton; use login_advanced_dialog::LoginAdvancedDialog; use crate::{ - components::{EntryRow, PasswordEntryRow, SpinnerButton}, - gettext_f, spawn, spawn_tokio, toast, - user_facing_error::UserFacingError, - Session, + components::SpinnerButton, gettext_f, spawn, spawn_tokio, toast, + user_facing_error::UserFacingError, Session, }; mod imp { @@ -50,15 +48,15 @@ mod imp { #[template_child] pub main_stack: TemplateChild, #[template_child] - pub homeserver_entry: TemplateChild, + pub homeserver_entry: TemplateChild, #[template_child] pub homeserver_help: TemplateChild, #[template_child] pub password_title: TemplateChild, #[template_child] - pub username_entry: TemplateChild, + pub username_entry: TemplateChild, #[template_child] - pub password_entry: TemplateChild, + pub password_entry: TemplateChild, #[template_child] pub sso_box: TemplateChild, #[template_child] @@ -178,19 +176,19 @@ mod imp { obj.update_next_action(); self.homeserver_entry - .connect_activated(clone!(@weak obj => move|_| { + .connect_entry_activated(clone!(@weak obj => move|_| { obj.default_widget().activate(); })); self.homeserver_entry .connect_changed(clone!(@weak obj => move |_| obj.update_next_action())); self.username_entry - .connect_activated(clone!(@weak obj => move|_| { + .connect_entry_activated(clone!(@weak obj => move|_| { obj.default_widget().activate(); })); self.username_entry .connect_changed(clone!(@weak obj => move |_| obj.update_next_action())); self.password_entry - .connect_activated(clone!(@weak obj => move|_| { + .connect_entry_activated(clone!(@weak obj => move|_| { obj.default_widget().activate(); })); self.password_entry