[fractal] login: Use AdwEntryRow and AdwPasswordEntryRow



commit 09df14ed16c7ab1dab394594661148720deb992b
Author: Kévin Commaille <zecakeh tedomum fr>
Date:   Wed Sep 28 15:26:04 2022 +0200

    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 8b0d3e84e..d2b0b6144 100644
--- a/data/resources/ui/login.ui
+++ b/data/resources/ui/login.ui
@@ -75,7 +75,7 @@
                             <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
-                              <object class="ComponentsEntryRow" id="homeserver_entry">
+                              <object class="AdwEntryRow" id="homeserver_entry">
                                 <style>
                                   <class name="card"/>
                                 </style>
@@ -164,7 +164,7 @@
                           </object>
                         </child>
                         <child>
-                          <object class="ComponentsEntryRow" id="username_entry">
+                          <object class="AdwEntryRow" id="username_entry">
                             <style>
                               <class name="card"/>
                             </style>
@@ -176,7 +176,7 @@
                             <property name="orientation">vertical</property>
                             <property name="spacing">12</property>
                             <child>
-                              <object class="ComponentsPasswordEntryRow" id="password_entry">
+                              <object class="AdwPasswordEntryRow" id="password_entry">
                                 <style>
                                   <class name="card"/>
                                 </style>
@@ -247,4 +247,3 @@
     </child>
   </template>
 </interface>
-
diff --git a/src/login/mod.rs b/src/login/mod.rs
index 65ea55645..49a2b9bd6 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<gtk::Stack>,
         #[template_child]
-        pub homeserver_entry: TemplateChild<EntryRow>,
+        pub homeserver_entry: TemplateChild<adw::EntryRow>,
         #[template_child]
         pub homeserver_help: TemplateChild<gtk::Label>,
         #[template_child]
         pub password_title: TemplateChild<gtk::Label>,
         #[template_child]
-        pub username_entry: TemplateChild<EntryRow>,
+        pub username_entry: TemplateChild<adw::EntryRow>,
         #[template_child]
-        pub password_entry: TemplateChild<PasswordEntryRow>,
+        pub password_entry: TemplateChild<adw::PasswordEntryRow>,
         #[template_child]
         pub sso_box: TemplateChild<gtk::Box>,
         #[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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]