[fractal/fractal-next] application: use FrctlApplication as name



commit a8a6882cdab6e8f13c256bdc0d1339c13ee862d0
Author: Julian Sparber <julian sparber net>
Date:   Sun Feb 14 02:04:07 2021 +0100

    application: use FrctlApplication as name

 src/application.rs    | 24 ++++++++++++------------
 src/main.rs           |  4 ++--
 src/widgets/window.rs |  2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/application.rs b/src/application.rs
index 996a14bb..03cd95e9 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -16,13 +16,13 @@ mod imp {
     use glib::subclass;
 
     #[derive(Debug)]
-    pub struct ExampleApplication {
+    pub struct FrctlApplication {
         pub window: OnceCell<WeakRef<FrctlWindow>>,
     }
 
-    impl ObjectSubclass for ExampleApplication {
-        const NAME: &'static str = "ExampleApplication";
-        type Type = super::ExampleApplication;
+    impl ObjectSubclass for FrctlApplication {
+        const NAME: &'static str = "FrctlApplication";
+        type Type = super::FrctlApplication;
         type ParentType = gtk::Application;
         type Interfaces = ();
         type Instance = subclass::simple::InstanceStruct<Self>;
@@ -37,11 +37,11 @@ mod imp {
         }
     }
 
-    impl ObjectImpl for ExampleApplication {}
+    impl ObjectImpl for FrctlApplication {}
 
-    impl gio::subclass::prelude::ApplicationImpl for ExampleApplication {
+    impl gio::subclass::prelude::ApplicationImpl for FrctlApplication {
         fn activate(&self, app: &Self::Type) {
-            debug!("GtkApplication<ExampleApplication>::activate");
+            debug!("GtkApplication<FrctlApplication>::activate");
 
             if let Some(window) = self.window.get() {
                 let window = window.upgrade().unwrap();
@@ -65,20 +65,20 @@ mod imp {
         }
 
         fn startup(&self, app: &Self::Type) {
-            debug!("GtkApplication<ExampleApplication>::startup");
+            debug!("GtkApplication<FrctlApplication>::startup");
             self.parent_startup(app);
         }
     }
 
-    impl GtkApplicationImpl for ExampleApplication {}
+    impl GtkApplicationImpl for FrctlApplication {}
 }
 
 glib::wrapper! {
-    pub struct ExampleApplication(ObjectSubclass<imp::ExampleApplication>)
+    pub struct FrctlApplication(ObjectSubclass<imp::FrctlApplication>)
         @extends gio::Application, gtk::Application, @implements gio::ActionMap, gio::ActionGroup;
 }
 
-impl ExampleApplication {
+impl FrctlApplication {
     pub fn new() -> Self {
         glib::Object::new(&[
             ("application-id", &Some(config::APP_ID)),
@@ -88,7 +88,7 @@ impl ExampleApplication {
     }
 
     fn get_main_window(&self) -> FrctlWindow {
-        imp::ExampleApplication::from_instance(self)
+        imp::FrctlApplication::from_instance(self)
             .window
             .get()
             .unwrap()
diff --git a/src/main.rs b/src/main.rs
index 7a2ec43b..e7903f45 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,7 +4,7 @@ mod config;
 mod widgets;
 
 use adw;
-use application::ExampleApplication;
+use application::FrctlApplication;
 use config::{GETTEXT_PACKAGE, LOCALEDIR, RESOURCES_FILE};
 use gettextrs::*;
 use gtk::gdk::Display;
@@ -33,6 +33,6 @@ fn main() {
         .unwrap()
         .add_resource_path("/org/gnome/FractalNext/icons");
 
-    let app = ExampleApplication::new();
+    let app = FrctlApplication::new();
     app.run();
 }
diff --git a/src/widgets/window.rs b/src/widgets/window.rs
index 379ed6af..7f6d8287 100644
--- a/src/widgets/window.rs
+++ b/src/widgets/window.rs
@@ -1,4 +1,4 @@
-use crate::application::ExampleApplication;
+use crate::application::FrctlApplication;
 use crate::config::{APP_ID, PROFILE};
 use crate::widgets::FrctlLogin;
 use crate::widgets::FrctlSession;


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