application: use FrctlApplication as name
This commit is contained in:
parent
9e8fa8aab5
commit
a8a6882cda
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue