Compare commits
No commits in common. "a7d6d82ec2e948b1c1830295031e971fc5094100" and "b9aa434278c7e94484dbace3de9c43b180d255ba" have entirely different histories.
a7d6d82ec2
...
b9aa434278
|
@ -976,7 +976,6 @@ checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6"
|
||||||
name = "fitnesstrax"
|
name = "fitnesstrax"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ft-core",
|
|
||||||
"gio",
|
"gio",
|
||||||
"glib",
|
"glib",
|
||||||
"glib-build-tools 0.18.0",
|
"glib-build-tools 0.18.0",
|
||||||
|
|
|
@ -7,7 +7,6 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
adw = { version = "0.5", package = "libadwaita", features = [ "v1_2" ] }
|
adw = { version = "0.5", package = "libadwaita", features = [ "v1_2" ] }
|
||||||
ft-core = { path = "../core" }
|
|
||||||
gio = { version = "0.18" }
|
gio = { version = "0.18" }
|
||||||
glib = { version = "0.18" }
|
glib = { version = "0.18" }
|
||||||
gtk = { version = "0.7", package = "gtk4", features = [ "v4_8" ] }
|
gtk = { version = "0.7", package = "gtk4", features = [ "v4_8" ] }
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<schemalist>
|
|
||||||
<schema id="com.luminescent-dreams.fitnesstrax.dev" path="/com/luminescent-dreams/fitnesstrax/dev/">
|
|
||||||
<key name="series-path" type="s">
|
|
||||||
<default>""</default>
|
|
||||||
<summary>Path to the series</summary>
|
|
||||||
</key>
|
|
||||||
</schema>
|
|
||||||
</schemalist>
|
|
|
@ -1,12 +1,7 @@
|
||||||
|
use fitnesstrax;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
const APP_ID_DEV: &str = "com.luminescent-dreams.fitnesstrax.dev";
|
|
||||||
const APP_ID_PROD: &str = "com.luminescent-dreams.fitnesstrax";
|
|
||||||
|
|
||||||
const RESOURCE_BASE_PATH_DEV: &str = "/com/luminescent-dreams/fitnesstrax/dev/";
|
|
||||||
const RESOURCE_BASE_PATH_PROD: &str = "/com/luminescent-dreams/fitnesstrax/";
|
|
||||||
|
|
||||||
struct AppState {}
|
struct AppState {}
|
||||||
|
|
||||||
struct AppWindow {
|
struct AppWindow {
|
||||||
|
@ -14,19 +9,11 @@ struct AppWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let (app_id, base_path) = if std::env::var_os("ENV") == Some("dev".into()) {
|
println!("Hello, world!");
|
||||||
(APP_ID_DEV, RESOURCE_BASE_PATH_DEV)
|
|
||||||
} else {
|
|
||||||
(APP_ID_PROD, RESOURCE_BASE_PATH_PROD)
|
|
||||||
};
|
|
||||||
|
|
||||||
let settings = gio::Settings::new(app_id);
|
|
||||||
|
|
||||||
println!("database path: {}", settings.string("series-path"));
|
|
||||||
|
|
||||||
let app = adw::Application::builder()
|
let app = adw::Application::builder()
|
||||||
.application_id(app_id)
|
.application_id("com.luminescent-dreams.fitnesstrax")
|
||||||
.resource_base_path(base_path)
|
.resource_base_path("/com/luminescent-dreams/fitnesstrax")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue