[fractal/fractal-next] login: Move to its own module
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/fractal-next] login: Move to its own module
- Date: Mon, 28 Mar 2022 20:35:01 +0000 (UTC)
commit c1a97472b405706e3075825a75a45775478835e2
Author: Kévin Commaille <zecakeh tedomum fr>
Date: Sat Mar 26 18:32:57 2022 +0100
login: Move to its own module
data/resources/resources.gresource.xml | 2 +-
data/resources/ui/{idp-button.ui => login-idp-button.ui} | 0
po/POTFILES.in | 2 +-
src/{ => login}/idp_button.rs | 2 +-
src/{ => login}/login_advanced_dialog.rs | 0
src/{login.rs => login/mod.rs} | 8 ++++++--
src/main.rs | 2 --
7 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/data/resources/resources.gresource.xml b/data/resources/resources.gresource.xml
index 2b4f94aaf..f9eb156f3 100644
--- a/data/resources/resources.gresource.xml
+++ b/data/resources/resources.gresource.xml
@@ -73,9 +73,9 @@
<file compressed="true" preprocess="xml-stripblanks"
alias="event-source-dialog.ui">ui/event-source-dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="greeter.ui">ui/greeter.ui</file>
<file compressed="true" preprocess="xml-stripblanks"
alias="identity-verification-widget.ui">ui/identity-verification-widget.ui</file>
- <file compressed="true" preprocess="xml-stripblanks" alias="idp-button.ui">ui/idp-button.ui</file>
<file compressed="true" preprocess="xml-stripblanks"
alias="in-app-notification.ui">ui/in-app-notification.ui</file>
<file compressed="true" preprocess="xml-stripblanks"
alias="login-advanced-dialog.ui">ui/login-advanced-dialog.ui</file>
+ <file compressed="true" preprocess="xml-stripblanks"
alias="login-idp-button.ui">ui/login-idp-button.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="login.ui">ui/login.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="media-viewer.ui">ui/media-viewer.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="member-menu.ui">ui/member-menu.ui</file>
diff --git a/data/resources/ui/idp-button.ui b/data/resources/ui/login-idp-button.ui
similarity index 100%
rename from data/resources/ui/idp-button.ui
rename to data/resources/ui/login-idp-button.ui
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5b43e68d1..7a8aaf073 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -44,7 +44,7 @@ data/resources/ui/qr-code-scanner.ui
src/application.rs
src/components/editable_avatar.rs
src/error_page.rs
-src/login.rs
+src/login/mod.rs
src/secret.rs
src/session/account_settings/devices_page/device_list.rs
src/session/account_settings/devices_page/device_row.rs
diff --git a/src/idp_button.rs b/src/login/idp_button.rs
similarity index 98%
rename from src/idp_button.rs
rename to src/login/idp_button.rs
index ac459b808..0963b3b72 100644
--- a/src/idp_button.rs
+++ b/src/login/idp_button.rs
@@ -73,7 +73,7 @@ mod imp {
use super::*;
#[derive(Debug, Default, CompositeTemplate)]
- #[template(resource = "/org/gnome/FractalNext/idp-button.ui")]
+ #[template(resource = "/org/gnome/FractalNext/login-idp-button.ui")]
pub struct IdpButton {
pub brand: Cell<IdpBrand>,
pub id: RefCell<Option<String>>,
diff --git a/src/login_advanced_dialog.rs b/src/login/login_advanced_dialog.rs
similarity index 100%
rename from src/login_advanced_dialog.rs
rename to src/login/login_advanced_dialog.rs
diff --git a/src/login.rs b/src/login/mod.rs
similarity index 99%
rename from src/login.rs
rename to src/login/mod.rs
index 8ad9aadf4..7c61fba5a 100644
--- a/src/login.rs
+++ b/src/login/mod.rs
@@ -20,10 +20,14 @@ use matrix_sdk::{
use tokio::task::JoinHandle;
use url::{ParseError, Url};
+mod idp_button;
+mod login_advanced_dialog;
+
+use idp_button::IdpButton;
+use login_advanced_dialog::LoginAdvancedDialog;
+
use crate::{
components::{SpinnerButton, Toast},
- idp_button::IdpButton,
- login_advanced_dialog::LoginAdvancedDialog,
spawn, spawn_tokio,
user_facing_error::UserFacingError,
Session,
diff --git a/src/main.rs b/src/main.rs
index 3ba18e61a..8a58c6cf6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,9 +11,7 @@ mod components;
mod contrib;
mod error_page;
mod greeter;
-mod idp_button;
mod login;
-mod login_advanced_dialog;
mod secret;
mod session;
mod user_facing_error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]