about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml3
-rw-r--r--build-aux/flatpak/com.lakoliu.Furtherance.Devel.json58
-rw-r--r--data/icons/hicolor/scalable/apps/com.lakoliu.Furtherance.Devel.svg58
-rw-r--r--data/icons/meson.build8
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt11
-rw-r--r--src/config.rs.in1
-rw-r--r--src/main.rs4
-rw-r--r--src/meson.build5
-rw-r--r--src/settings_manager.rs2
-rw-r--r--src/ui/history_box.rs8
-rw-r--r--src/ui/window.rs6
13 files changed, 159 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c977cd5..4740756 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -205,7 +205,7 @@ dependencies = [
 
 [[package]]
 name = "furtherance"
-version = "0.1.0"
+version = "1.0.0"
 dependencies = [
  "chrono",
  "dbus",
diff --git a/Cargo.toml b/Cargo.toml
index 0283d90..09fa4d5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "furtherance"
-version = "0.1.0"
+version = "1.0.0"
+authors = ["Ricky Kresslein <rk@lakoliu.com>"]
 edition = "2018"
 
 [dependencies]
diff --git a/build-aux/flatpak/com.lakoliu.Furtherance.Devel.json b/build-aux/flatpak/com.lakoliu.Furtherance.Devel.json
new file mode 100644
index 0000000..4f2d826
--- /dev/null
+++ b/build-aux/flatpak/com.lakoliu.Furtherance.Devel.json
@@ -0,0 +1,58 @@
+{
+    "app-id" : "com.lakoliu.Furtherance.Devel",
+    "runtime" : "org.gnome.Platform",
+    "runtime-version" : "master",
+    "sdk" : "org.gnome.Sdk",
+    "sdk-extensions" : [
+        "org.freedesktop.Sdk.Extension.rust-stable"
+    ],
+    "command" : "furtherance",
+    "tags" : [
+        "nightly"
+    ],
+    "finish-args" : [
+        "--share=network",
+        "--share=ipc",
+        "--socket=fallback-x11",
+        "--device=dri",
+        "--socket=wayland",
+        "--socket=session-bus"
+    ],
+    "build-options" : {
+        "append-path" : "/usr/lib/sdk/rust-stable/bin",
+        "build-args" : [
+            "--share=network"
+        ],
+        "env" : {
+            "RUST_BACKTRACE" : "1",
+            "RUST_LOG" : "furtherance=debug"
+        }
+    },
+    "cleanup" : [
+        "/include",
+        "/lib/pkgconfig",
+        "/man",
+        "/share/doc",
+        "/share/gtk-doc",
+        "/share/man",
+        "/share/pkgconfig",
+        "*.la",
+        "*.a"
+    ],
+    "modules" : [
+        {
+            "name" : "furtherance",
+            "builddir" : true,
+            "buildsystem" : "meson",
+            "config-opts" : [
+                "-Dprofile=development"
+            ],
+            "sources" : [
+                {
+                    "type" : "git",
+                    "url" : "file:///home/ricky/Documents/SoftwareDev/Rust/furtherance"
+                }
+            ]
+        }
+    ]
+}
diff --git a/data/icons/hicolor/scalable/apps/com.lakoliu.Furtherance.Devel.svg b/data/icons/hicolor/scalable/apps/com.lakoliu.Furtherance.Devel.svg
new file mode 100644
index 0000000..fea4fe3
--- /dev/null
+++ b/data/icons/hicolor/scalable/apps/com.lakoliu.Furtherance.Devel.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   width="161mm"
+   height="161mm"
+   viewBox="0 0 161 161"
+   version="1.1"
+   id="svg5"
+   inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+   sodipodi:docname="furtherance_logo_devel-simple-square.svg"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview7"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:document-units="mm"
+     showgrid="false"
+     inkscape:zoom="0.65477694"
+     inkscape:cx="-20.617708"
+     inkscape:cy="310.02924"
+     inkscape:window-width="1920"
+     inkscape:window-height="1131"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="layer1" />
+  <defs
+     id="defs2" />
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-43.512234,-66.387247)">
+    <g
+       id="g1180"
+       transform="translate(17.186527,-0.10954936)">
+      <path
+         id="text1508"
+         style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:105.833px;line-height:1.25;font-family:Dosis;-inkscape-font-specification:'Dosis Ultra-Bold';fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.566104"
+         d="m 111.71275,67.03838 c -32.525231,3.582643 -65.720815,32.316458 -67.114986,65.26751 19.297759,30.58788 38.595517,61.17577 57.893276,91.76365 17.91027,4.3573 38.64424,3.01719 54.37306,-6.32991 0.44412,-5.60695 -4.24012,-9.69391 -6.65299,-14.3645 -6.2697,-9.93765 -12.53939,-19.87529 -18.80908,-29.81294 11.63102,-7.423 23.42584,-14.6063 34.95101,-22.1842 5.06481,-3.48706 1.70704,-9.39771 -1.03664,-13.18063 -4.82488,-7.35059 -9.12041,-15.08858 -14.32182,-22.1641 -4.4622,-4.55206 -9.84132,0.001 -13.94043,2.55665 -9.61671,6.0671 -19.23343,12.13421 -28.85014,18.20131 -4.18838,-6.63928 -8.376768,-13.27855 -12.565152,-19.91783 16.800742,-10.68631 33.768182,-21.128644 50.462842,-31.970223 5.86616,-4.415562 0.44425,-10.764726 -2.33862,-15.24531 l -0.17449,-0.276541 -15.81978,-2.77873 z m 10.2176,6.206941 c 2.85325,2.471102 -1.67318,3.272155 -3.26546,4.737218 -18.23474,11.504197 -36.469478,23.008391 -54.704217,34.512591 11.518282,18.25762 23.036563,36.51525 34.554845,54.77287 14.555082,-9.18258 29.110152,-18.36516 43.665232,-27.54774 2.85329,2.4711 -1.67315,3.27215 -3.26545,4.73719 -13.06387,8.2418 -26.12774,16.48359 -39.191609,24.72539 9.424279,14.93796 18.848549,29.87591 28.272829,44.81387 -2.4711,2.85328 -3.27213,-1.67317 -4.73717,-3.26547 C 102.45207,177.74995 81.644802,144.76865 60.837529,111.78735 81.201803,98.940007 101.56608,86.092664 121.93035,73.245321 Z"
+         inkscape:export-filename="/home/ricky/Pictures/Furtherance/Furtherance-logo-256.png"
+         inkscape:export-xdpi="40.620335"
+         inkscape:export-ydpi="40.620335" />
+      <path
+         id="path860"
+         style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:105.833px;line-height:1.25;font-family:Dosis;-inkscape-font-specification:'Dosis Ultra-Bold';fill:#ffd42a;fill-opacity:1;stroke:none;stroke-width:0.566105"
+         d="M 113.09352,66.908145 C 79.825881,69.884469 46.312454,98.843451 44.597789,132.306 c 1.335374,2.11656 2.670749,4.23313 4.006124,6.3497 5.71593,-6.3593 11.43186,-12.7186 17.14779,-19.0779 -1.638143,-2.59674 -3.276286,-5.19348 -4.914428,-7.79022 9.241644,-5.9176 18.675487,-11.60735 27.796934,-17.667444 8.153101,-9.070664 16.306201,-18.141327 24.459311,-27.211991 z m 34.61907,9.136394 c -5.5199,6.141055 -11.03981,12.282109 -16.55971,18.423164 5.36546,-3.623735 11.25926,-6.558462 16.19217,-10.750643 2.07916,-2.078972 1.68192,-5.314351 0.36754,-7.672521 z M 82.802859,100.60738 c -6.280754,3.96255 -12.561507,7.9251 -18.842261,11.88765 1.421757,1.14054 2.493859,6.40033 4.18013,4.42465 4.887377,-5.43743 9.774753,-10.87487 14.662131,-16.3123 z m 60.325511,14.29008 c -11.75709,7.0973 -23.26501,14.62705 -34.92448,21.89376 -2.07481,-3.28886 -4.14961,-6.57772 -6.22442,-9.86658 -5.663396,6.30073 -11.326789,12.60147 -16.990182,18.9022 4.17046,6.61097 8.340921,13.22193 12.511381,19.8329 15.209231,-16.92076 30.418471,-33.84152 45.627701,-50.76228 z m 22.06429,23.1035 c -9.85694,10.96626 -19.71387,21.93251 -29.5708,32.89877 10.22461,-6.5353 20.61263,-12.83149 30.73139,-19.52171 5.39104,-3.84171 1.48352,-9.36323 -1.16059,-13.37706 z m -81.776402,9.57616 c -5.715931,6.35913 -11.43186,12.71826 -17.147791,19.07739 4.170632,6.61079 8.341267,13.22159 12.511899,19.83238 5.715929,-6.35913 11.43186,-12.71826 17.147789,-19.07739 -4.170632,-6.61079 -8.341265,-13.22158 -12.511897,-19.83238 z m 48.739142,27.17922 c -5.66339,6.30073 -11.32678,12.60147 -16.99018,18.90221 4.02387,6.37807 8.04775,12.75615 12.07162,19.13423 5.66339,-6.30074 11.32678,-12.60147 16.99018,-18.90221 -4.02387,-6.37807 -8.04775,-12.75615 -12.07162,-19.13423 z m -18.56269,20.65197 c -5.71593,6.3593 -11.43186,12.7186 -17.147789,19.07791 4.680749,6.30754 6.758559,16.57973 18.867579,11.57293 3.45044,-3.83887 6.90087,-7.67774 10.35131,-11.51661 -4.0237,-6.37807 -8.0474,-12.75615 -12.0711,-19.13423 z" />
+    </g>
+  </g>
+</svg>
diff --git a/data/icons/meson.build b/data/icons/meson.build
index 7ffa296..43c5da6 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -1,13 +1,13 @@
-application_id = 'com.lakoliu.Furtherance'
-
 scalable_dir = join_paths('hicolor', 'scalable', 'apps')
 install_data(
-  join_paths(scalable_dir, ('@0@.svg').format(application_id)),
+  join_paths(scalable_dir, ('@0@.svg').format(app_id)),
   install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
 )
 
+
+
 symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
 install_data(
-  join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)),
+  join_paths(symbolic_dir, 'com.lakoliu.Furtherance-symbolic.svg'),
   install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir)
 )
diff --git a/meson.build b/meson.build
index 3d0b4df..c9b3580 100644
--- a/meson.build
+++ b/meson.build
@@ -16,6 +16,12 @@ dependency('libadwaita-1', version: '>=1.0.0')
 
 name       = 'Furtherance'
 app_id     = 'com.lakoliu.Furtherance'
+profile    = get_option('profile')
+
+# Change app id during development
+if profile == 'development'
+  app_id = '@0@.Devel'.format(app_id)
+endif
 
 i18n = import('i18n')
 
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..97c7b70
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,11 @@
+option (
+  'profile',
+  type: 'combo',
+  choices: [
+    'default',
+    'beta',
+    'development'
+  ],
+  value: 'default'
+)
+	
diff --git a/src/config.rs.in b/src/config.rs.in
index 4005031..6429916 100644
--- a/src/config.rs.in
+++ b/src/config.rs.in
@@ -19,3 +19,4 @@ pub static GETTEXT_PACKAGE: &str = @GETTEXT_PACKAGE@;
 pub static LOCALEDIR: &str = @LOCALEDIR@;
 pub static PKGDATADIR: &str = @PKGDATADIR@;
 pub static APP_ID: &str = @APP_ID@;
+pub static PROFILE: &str = @PROFILE@;
diff --git a/src/main.rs b/src/main.rs
index a4959c0..d9b299e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -22,7 +22,7 @@ mod settings_manager;
 
 use self::application::FurtheranceApplication;
 
-use config::{GETTEXT_PACKAGE, LOCALEDIR, PKGDATADIR};
+use config::{GETTEXT_PACKAGE, LOCALEDIR, PKGDATADIR, APP_ID};
 use gettextrs::{bind_textdomain_codeset, bindtextdomain, textdomain};
 use gtk::{gio, glib};
 use gtk::prelude::*;
@@ -47,7 +47,7 @@ fn main() {
     // Create a new GtkApplication. The application manages our main loop,
     // application windows, integration with the window manager/compositor, and
     // desktop features such as file opening and single-instance applications.
-    let app = FurtheranceApplication::new("com.lakoliu.Furtherance", &gio::ApplicationFlags::empty());
+    let app = FurtheranceApplication::new(APP_ID, &gio::ApplicationFlags::empty());
 
     glib::set_application_name("Furtherance");
 
diff --git a/src/meson.build b/src/meson.build
index 66df479..c689689 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -14,6 +14,7 @@ conf.set_quoted('GETTEXT_PACKAGE', 'furtherance')
 conf.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
 conf.set_quoted('PKGDATADIR', pkgdatadir)
 conf.set_quoted('APP_ID', app_id)
+conf.set_quoted('PROFILE', profile)
 
 configure_file(
     input: 'config.rs.in',
@@ -39,13 +40,11 @@ rust_sources = files(
   'ui/history_box.rs',
   'ui/window.rs',
 
-  'settings_manager.rs',
-
   'application.rs',
   'config.rs',
   'main.rs',
-
   'database.rs',
+  'settings_manager.rs',
 )
 
 sources = [cargo_sources, rust_sources]
diff --git a/src/settings_manager.rs b/src/settings_manager.rs
index 0343cdc..66c1092 100644
--- a/src/settings_manager.rs
+++ b/src/settings_manager.rs
@@ -18,7 +18,7 @@ use gtk::{gio, gio::prelude::*, glib};
 use crate::config;
 
 pub fn get_settings() -> gio::Settings {
-    let app_id = config::APP_ID;
+    let app_id = config::APP_ID.trim_end_matches(".Devel");
     gio::Settings::new(app_id)
 }
 
diff --git a/src/ui/history_box.rs b/src/ui/history_box.rs
index 4de6dce..459c751 100644
--- a/src/ui/history_box.rs
+++ b/src/ui/history_box.rs
@@ -22,6 +22,7 @@ use glib::subclass;
 use crate::ui::FurTasksPage;
 use crate::FurtheranceApplication;
 use crate::database;
+use crate::config;
 
 enum View {
     Loading,
@@ -92,6 +93,13 @@ impl FurHistoryBox {
         } else {
             self.set_view(View::Empty);
         }
+
+        // Change "empty" page icon for development mode
+        let imp = imp::FurHistoryBox::from_instance(self);
+        if config::PROFILE == "development" {
+            imp.welcome_page.set_icon_name(Some("com.lakoliu.Furtherance.Devel"));
+        }
+
     }
 
     fn set_view(&self, view: View) {
diff --git a/src/ui/window.rs b/src/ui/window.rs
index 3106306..92c8282 100644
--- a/src/ui/window.rs
+++ b/src/ui/window.rs
@@ -31,6 +31,7 @@ use crate::ui::FurHistoryBox;
 use crate::FurtheranceApplication;
 use crate::database;
 use crate::settings_manager;
+use crate::config;
 
 mod imp {
     use super::*;
@@ -155,7 +156,10 @@ impl FurtheranceWindow {
         let stop_time = Rc::new(RefCell::new(Local::now()));
 
         // Development mode
-        // self.add_css_class("devel");
+        if config::PROFILE == "development" {
+            self.add_css_class("devel");
+        }
+
 
         imp.start_button.connect_clicked(clone!(
             @weak self as this,