[fractal/fractal-next] refelct some widget hierarchy in the folder structure
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/fractal-next] refelct some widget hierarchy in the folder structure
- Date: Sat, 27 Mar 2021 09:01:32 +0000 (UTC)
commit 154425f1a090a22b9dfa8aa99eaa423ec2dc78e9
Author: Julian Sparber <julian sparber net>
Date: Thu Mar 11 11:39:44 2021 +0100
refelct some widget hierarchy in the folder structure
src/application.rs | 2 +-
src/{widgets => }/login.rs | 0
src/main.rs | 10 ++++++++--
src/meson.build | 11 +++++------
src/{widgets => session}/content.rs | 0
src/{widgets/session.rs => session/mod.rs} | 7 +++++--
src/{widgets => session}/sidebar.rs | 0
src/widgets/mod.rs | 11 -----------
src/{widgets => }/window.rs | 6 +++---
9 files changed, 22 insertions(+), 25 deletions(-)
---
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/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::*;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]