diff --git a/src/application.rs b/src/application.rs index 15ebf1e3..fa1f596a 100644 --- a/src/application.rs +++ b/src/application.rs @@ -1,5 +1,5 @@ use crate::config; -use crate::widgets::FrctlWindow; +use crate::FrctlWindow; use gettextrs::gettext; use gio::ApplicationFlags; use glib::clone; diff --git a/src/widgets/login.rs b/src/login.rs similarity index 100% rename from src/widgets/login.rs rename to src/login.rs diff --git a/src/main.rs b/src/main.rs index e7903f45..14bffe77 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,16 @@ mod application; #[rustfmt::skip] mod config; -mod widgets; +mod login; +mod session; +mod window; + +use self::application::FrctlApplication; +use self::login::FrctlLogin; +use self::session::FrctlSession; +use self::window::FrctlWindow; use adw; -use application::FrctlApplication; use config::{GETTEXT_PACKAGE, LOCALEDIR, RESOURCES_FILE}; use gettextrs::*; use gtk::gdk::Display; diff --git a/src/meson.build b/src/meson.build index 27d59b67..befbf1f3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -22,12 +22,11 @@ sources = files( 'application.rs', 'config.rs', 'main.rs', - 'widgets/window.rs', - 'widgets/content.rs', - 'widgets/sidebar.rs', - 'widgets/login.rs', - 'widgets/mod.rs', - 'widgets/session.rs', + 'window.rs', + 'login.rs', + 'session/mod.rs', + 'session/content.rs', + 'session/sidebar.rs', ) custom_target( diff --git a/src/widgets/content.rs b/src/session/content.rs similarity index 100% rename from src/widgets/content.rs rename to src/session/content.rs diff --git a/src/widgets/session.rs b/src/session/mod.rs similarity index 94% rename from src/widgets/session.rs rename to src/session/mod.rs index 0f3b222b..adf7afdb 100644 --- a/src/widgets/session.rs +++ b/src/session/mod.rs @@ -1,5 +1,8 @@ -use crate::widgets::FrctlContent; -use crate::widgets::FrctlSidebar; +mod content; +mod sidebar; + +use self::content::FrctlContent; +use self::sidebar::FrctlSidebar; use adw; use adw::subclass::prelude::BinImpl; use gtk::subclass::prelude::*; diff --git a/src/widgets/sidebar.rs b/src/session/sidebar.rs similarity index 100% rename from src/widgets/sidebar.rs rename to src/session/sidebar.rs diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs deleted file mode 100644 index 126ba693..00000000 --- a/src/widgets/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -mod content; -mod login; -mod session; -mod sidebar; -mod window; - -pub use crate::widgets::content::FrctlContent; -pub use crate::widgets::login::FrctlLogin; -pub use crate::widgets::session::FrctlSession; -pub use crate::widgets::sidebar::FrctlSidebar; -pub use crate::widgets::window::FrctlWindow; diff --git a/src/widgets/window.rs b/src/window.rs similarity index 97% rename from src/widgets/window.rs rename to src/window.rs index 7f6d8287..0f86dea3 100644 --- a/src/widgets/window.rs +++ b/src/window.rs @@ -1,7 +1,7 @@ -use crate::application::FrctlApplication; use crate::config::{APP_ID, PROFILE}; -use crate::widgets::FrctlLogin; -use crate::widgets::FrctlSession; +use crate::FrctlApplication; +use crate::FrctlLogin; +use crate::FrctlSession; use adw::subclass::prelude::AdwApplicationWindowImpl; use glib::signal::Inhibit; use gtk::subclass::prelude::*;