From aadf8eb7f17bc21c1be32948daf0edc4967e36da Mon Sep 17 00:00:00 2001 From: teamcons Date: Sun, 22 Feb 2026 16:38:26 +0100 Subject: [PATCH 1/9] update SPDX --- src/Constants.vala | 6 ++---- src/Objects/NoteData.vala | 2 +- src/Objects/Themes.vala | 2 +- src/Objects/Zoom.vala | 2 +- src/Objects/Zoomkind.vala | 2 +- src/Services/ColorController.vala | 2 +- src/Services/NoteManager.vala | 2 +- src/Services/ScribblyController.vala | 2 +- src/Services/Storage.vala | 2 +- src/Services/ZoomController.vala | 2 +- src/Utils/Libportal.vala | 2 +- src/Utils/Random.vala | 2 +- src/Views/NoteView.vala | 2 +- src/Views/PreferencesView.vala | 2 +- src/Widgets/ActionBar.vala | 2 +- src/Widgets/EditableLabel.vala | 2 +- src/Widgets/Popover.vala | 2 +- src/Widgets/PopoverWidgets/ColorBox.vala | 2 +- src/Widgets/PopoverWidgets/ColorPill.vala | 2 +- src/Widgets/PopoverWidgets/MonospaceBox.vala | 2 +- src/Widgets/PopoverWidgets/ZoomBox.vala | 2 +- src/Widgets/PreferencesWidgets/SettingsSwitch.vala | 2 +- src/Widgets/TextView.vala | 2 +- src/Windows/PreferenceWindow.vala | 2 +- src/Windows/StickyNoteWindow.vala | 2 +- 25 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/Constants.vala b/src/Constants.vala index c4b44850..3e3f8872 100644 --- a/src/Constants.vala +++ b/src/Constants.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** @@ -12,13 +12,11 @@ namespace Jorts.Constants { /*************************************************/ const string RDNN = "io.github.elly_code.jorts"; - const string DONATE_LINK = "https://ko-fi.com/teamcons"; + const string DONATE_LINK = "https://ko-fi.com/teamcons/tip"; // signature theme #if HALLOWEEN const Jorts.Themes DEFAULT_THEME = Jorts.Themes.ORANGE; -#elif CLASSIC - const Jorts.Themes DEFAULT_THEME = Jorts.Themes.BANANA; #else const Jorts.Themes DEFAULT_THEME = Jorts.Themes.BLUEBERRY; #endif diff --git a/src/Objects/NoteData.vala b/src/Objects/NoteData.vala index bad5f1ca..fd833535 100644 --- a/src/Objects/NoteData.vala +++ b/src/Objects/NoteData.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ diff --git a/src/Objects/Themes.vala b/src/Objects/Themes.vala index ce763565..8c7c5564 100644 --- a/src/Objects/Themes.vala +++ b/src/Objects/Themes.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /*************************************************/ diff --git a/src/Objects/Zoom.vala b/src/Objects/Zoom.vala index 85e42cf2..65562d06 100644 --- a/src/Objects/Zoom.vala +++ b/src/Objects/Zoom.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /*************************************************/ diff --git a/src/Objects/Zoomkind.vala b/src/Objects/Zoomkind.vala index 9c7657c7..fb2d7367 100644 --- a/src/Objects/Zoomkind.vala +++ b/src/Objects/Zoomkind.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /*************************************************/ diff --git a/src/Services/ColorController.vala b/src/Services/ColorController.vala index ab718164..5eca0e22 100644 --- a/src/Services/ColorController.vala +++ b/src/Services/ColorController.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /*************************************************/ diff --git a/src/Services/NoteManager.vala b/src/Services/NoteManager.vala index 714ff51b..2b0eda4b 100644 --- a/src/Services/NoteManager.vala +++ b/src/Services/NoteManager.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Services/ScribblyController.vala b/src/Services/ScribblyController.vala index 19e7970b..10c2d0db 100644 --- a/src/Services/ScribblyController.vala +++ b/src/Services/ScribblyController.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /*************************************************/ diff --git a/src/Services/Storage.vala b/src/Services/Storage.vala index faeacb3a..6d860218 100644 --- a/src/Services/Storage.vala +++ b/src/Services/Storage.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Services/ZoomController.vala b/src/Services/ZoomController.vala index 14cd4af7..e5a2eb47 100644 --- a/src/Services/ZoomController.vala +++ b/src/Services/ZoomController.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /*************************************************/ diff --git a/src/Utils/Libportal.vala b/src/Utils/Libportal.vala index 719b1ea2..d74f7de2 100644 --- a/src/Utils/Libportal.vala +++ b/src/Utils/Libportal.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ namespace Jorts.Utils { diff --git a/src/Utils/Random.vala b/src/Utils/Random.vala index 8f462642..5518c68d 100644 --- a/src/Utils/Random.vala +++ b/src/Utils/Random.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /* CONTENT diff --git a/src/Views/NoteView.vala b/src/Views/NoteView.vala index d90966a7..60cff3f1 100644 --- a/src/Views/NoteView.vala +++ b/src/Views/NoteView.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ public class Jorts.NoteView : Gtk.Box { diff --git a/src/Views/PreferencesView.vala b/src/Views/PreferencesView.vala index 6d2a59af..59bebf20 100644 --- a/src/Views/PreferencesView.vala +++ b/src/Views/PreferencesView.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ public class Jorts.PreferencesView : Gtk.Box { diff --git a/src/Widgets/ActionBar.vala b/src/Widgets/ActionBar.vala index 5866c08a..0e810248 100644 --- a/src/Widgets/ActionBar.vala +++ b/src/Widgets/ActionBar.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Widgets/EditableLabel.vala b/src/Widgets/EditableLabel.vala index ae3a48d0..c8e854ff 100644 --- a/src/Widgets/EditableLabel.vala +++ b/src/Widgets/EditableLabel.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Widgets/Popover.vala b/src/Widgets/Popover.vala index aa8708e4..eef447f4 100644 --- a/src/Widgets/Popover.vala +++ b/src/Widgets/Popover.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Widgets/PopoverWidgets/ColorBox.vala b/src/Widgets/PopoverWidgets/ColorBox.vala index 3e070eb9..f6776840 100644 --- a/src/Widgets/PopoverWidgets/ColorBox.vala +++ b/src/Widgets/PopoverWidgets/ColorBox.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Widgets/PopoverWidgets/ColorPill.vala b/src/Widgets/PopoverWidgets/ColorPill.vala index 8892e4d5..94beb0da 100644 --- a/src/Widgets/PopoverWidgets/ColorPill.vala +++ b/src/Widgets/PopoverWidgets/ColorPill.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /* diff --git a/src/Widgets/PopoverWidgets/MonospaceBox.vala b/src/Widgets/PopoverWidgets/MonospaceBox.vala index 6748fd7c..90735ae2 100644 --- a/src/Widgets/PopoverWidgets/MonospaceBox.vala +++ b/src/Widgets/PopoverWidgets/MonospaceBox.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Widgets/PopoverWidgets/ZoomBox.vala b/src/Widgets/PopoverWidgets/ZoomBox.vala index fb375f87..16979411 100644 --- a/src/Widgets/PopoverWidgets/ZoomBox.vala +++ b/src/Widgets/PopoverWidgets/ZoomBox.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Widgets/PreferencesWidgets/SettingsSwitch.vala b/src/Widgets/PreferencesWidgets/SettingsSwitch.vala index 25d1d970..8e018dfd 100644 --- a/src/Widgets/PreferencesWidgets/SettingsSwitch.vala +++ b/src/Widgets/PreferencesWidgets/SettingsSwitch.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Widgets/TextView.vala b/src/Widgets/TextView.vala index c96a9d5a..bde1453b 100644 --- a/src/Widgets/TextView.vala +++ b/src/Widgets/TextView.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ /** diff --git a/src/Windows/PreferenceWindow.vala b/src/Windows/PreferenceWindow.vala index a838f3f7..10afab2c 100644 --- a/src/Windows/PreferenceWindow.vala +++ b/src/Windows/PreferenceWindow.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ diff --git a/src/Windows/StickyNoteWindow.vala b/src/Windows/StickyNoteWindow.vala index 4a76be8a..e9ef4f85 100644 --- a/src/Windows/StickyNoteWindow.vala +++ b/src/Windows/StickyNoteWindow.vala @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2017-2024 Lains - * 2025 Stella & Charlie (teamcons.carrd.co) * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) + * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ From 3d4b08affef6ba2658f94958f34219fdf004a504 Mon Sep 17 00:00:00 2001 From: teamcons Date: Sun, 22 Feb 2026 17:03:50 +0100 Subject: [PATCH 2/9] expand constant usage --- src/Application.vala | 1 - src/Constants.vala | 11 ++++++++++- src/Views/PreferencesView.vala | 7 +++---- src/Widgets/ActionBar.vala | 18 ++++++++++-------- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/Application.vala b/src/Application.vala index 225322d3..07ffc082 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -266,7 +266,6 @@ Please wait while the app remembers all the things... return 0; } - hold (); activate (); return 0; } diff --git a/src/Constants.vala b/src/Constants.vala index 3e3f8872..561ff141 100644 --- a/src/Constants.vala +++ b/src/Constants.vala @@ -24,11 +24,14 @@ namespace Jorts.Constants { // in ms const int DEBOUNCE = 900; + // CSS + const string STYLE_THEMEDBUTTON = Constants.STYLE_THEMEDBUTTON; + // We need to say stop at some point const int ZOOM_MAX = 300; const int DEFAULT_ZOOM = 100; const int ZOOM_MIN = 20; - const bool DEFAULT_MONO = false; + const bool DEFAULT_MONO = false; // For new stickies const int DEFAULT_WIDTH = 290; @@ -45,6 +48,12 @@ namespace Jorts.Constants { const int DEFAULT_PREF_HEIGHT = 270; #endif + + // Autocomplete save me + const string KEY_SCRIBBLY = "scribbly-mode-active"; + const string KEY_HIDEBAR = "hide-bar"; + const string KEY_LIST = "list-item-start"; + // Used by random_emote () for the emote selection menu const string[] EMOTES = { "face-angel-symbolic", diff --git a/src/Views/PreferencesView.vala b/src/Views/PreferencesView.vala index 59bebf20..0d58e0ad 100644 --- a/src/Views/PreferencesView.vala +++ b/src/Views/PreferencesView.vala @@ -63,8 +63,7 @@ lists_box.append (list_label); lists_box.append (list_entry); - Application.gsettings.bind ( - "list-item-start", + Application.gsettings.bind (Constants.KEY_LIST, list_entry, "text", SettingsBindFlags.DEFAULT); @@ -81,7 +80,7 @@ var scribbly_box = new Jorts.SettingsSwitch ( _("Scribble mode"), _("Scribble text of unfocused notes (Ctrl+H)"), - "scribbly-mode-active"); + Constants.KEY_SCRIBBLY); settingsbox.append (scribbly_box); @@ -94,7 +93,7 @@ ///TRANSLATORS: Instead of bottom bar you can also use "Action bar" or "button bar" _("Hide bottom bar"), _("Keyboard shortcuts will still function (Ctrl+T)"), - "hide-bar"); + Constants.KEY_HIDEBAR); settingsbox.append (hidebar_box); diff --git a/src/Widgets/ActionBar.vala b/src/Widgets/ActionBar.vala index 0e810248..7d92e2b1 100644 --- a/src/Widgets/ActionBar.vala +++ b/src/Widgets/ActionBar.vala @@ -31,7 +31,7 @@ ) }; new_item.action_name = Application.ACTION_PREFIX + Application.ACTION_NEW; - new_item.add_css_class ("themedbutton"); + new_item.add_css_class (Constants.STYLE_THEMEDBUTTON); var delete_item = new Gtk.Button () { icon_name = "edit-delete-symbolic", @@ -42,7 +42,7 @@ _("Delete sticky note") ) }; - delete_item.add_css_class ("themedbutton"); + delete_item.add_css_class (Constants.STYLE_THEMEDBUTTON); delete_item.action_name = StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_DELETE; /* **** RIGHT **** */ @@ -55,7 +55,7 @@ _("Toggle list") ) }; - list_button.add_css_class ("themedbutton"); + list_button.add_css_class (Constants.STYLE_THEMEDBUTTON); list_button.action_name = StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_TOGGLE_LIST; emojichooser_popover = new Gtk.EmojiChooser (); @@ -69,7 +69,7 @@ _("Insert emoji") ) }; - emoji_button.add_css_class ("themedbutton"); + emoji_button.add_css_class (Constants.STYLE_THEMEDBUTTON); emoji_button.popover = emojichooser_popover; menu_button = new Gtk.MenuButton () { @@ -82,7 +82,7 @@ ) }; menu_button.direction = Gtk.ArrowType.UP; - menu_button.add_css_class ("themedbutton"); + menu_button.add_css_class (Constants.STYLE_THEMEDBUTTON); /* **** Widget **** */ actionbar = new Gtk.ActionBar () { @@ -106,7 +106,7 @@ // Hide the list button if user has specified no list item symbol on_prefix_changed (); - Application.gsettings.changed["list-item-start"].connect (on_prefix_changed); + Application.gsettings.changed[Constants.KEY_LIST].connect (on_prefix_changed); } @@ -115,7 +115,9 @@ * StickyNoteWindow will decide itself whether to show immediately or not */ public void reveal_bind () { - Application.gsettings.bind ("hide-bar", this.actionbar, "revealed", SettingsBindFlags.INVERT_BOOLEAN); + Application.gsettings.bind (Constants.KEY_HIDEBAR, + this.actionbar, "revealed", + SettingsBindFlags.INVERT_BOOLEAN); } // Skip the current icon to avoid picking it twice @@ -130,6 +132,6 @@ } private void on_prefix_changed () { - list_button.visible = (Application.gsettings.get_string ("list-item-start") != ""); + list_button.visible = (Application.gsettings.get_string (Constants.KEY_LIST) != ""); } } From ea55cc5ed746a386a67f32f83f8b6475432be89d Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 24 Feb 2026 16:27:43 +0100 Subject: [PATCH 3/9] update workflows --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/workflows/CI.yml | 6 +++--- .github/workflows/lint.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 2741a5b9..262f7e0e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -54,7 +54,7 @@ body: options: - I installed from Flathub (all Linuxes) - I installed from Appcenter (elementary OS) - - I built it from sources (with Meson+Ninja) + - I built it from sources (with Meson+Ninja, or from AUR) validations: required: true diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7606cc52..92e03f5b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,15 +15,15 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/elementary/flatpak-platform/runtime:8 + image: ghcr.io/elementary/flatpak-platform/runtime:8.2 options: --privileged steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + uses: flatpak/flatpak-github-actions/flatpak-builder@v6.6 with: bundle: jorts.flatpak manifest-path: io.github.elly_code.jorts.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 55dc6216..f652d38a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: "CI: Lint" +name: "Lint" on: pull_request: From c3fc636ab382523852d9767750a4a46a3d5850f6 Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 24 Feb 2026 17:23:21 +0100 Subject: [PATCH 4/9] linter skip constants --- src/Constants.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Constants.vala b/src/Constants.vala index 561ff141..9ce8f951 100644 --- a/src/Constants.vala +++ b/src/Constants.vala @@ -4,6 +4,7 @@ * 2025 Contributions from the ellie_Commons community (github.com/ellie-commons/) * 2025-2026 Stella & Charlie (teamcons.carrd.co) */ +//vala-lint=skip-file /** * I just dump all my constants here From f95eaca219af32e536cc166d44789a59399eabe5 Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 24 Feb 2026 18:07:43 +0100 Subject: [PATCH 5/9] gate gtk in meson for flathub and future gtk versions --- meson.build | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 79a0109f..af32d782 100644 --- a/meson.build +++ b/meson.build @@ -39,7 +39,7 @@ if flathub vala_flags += ['--define', 'FLATHUB'] endif -add_project_arguments(vala_flags, language: 'vala') + #================================ # Import the stylesheet @@ -64,12 +64,25 @@ gresource = gnome.compile_resources( #================================ # dependencies + + +gtk422 = dependency('gtk4', version: '>= 4.22', required: false) + +if gtk422.found() + gtk_dep = gtk422 + vala_flags = ['--define', 'HAS_GTK422'] + +else + gtk_dep = dependency('gtk4') +endif + +add_project_arguments(vala_flags, language: 'vala') dependencies = [ dependency('granite-7'), dependency('gobject-2.0'), dependency('json-glib-1.0'), dependency('gee-0.8'), - dependency('gtk4'), + gtk_dep, ] # We need to compile an icon into the exe to avoid "missing icon" icon at every turn From 1c7cb90980f1e56dedf2fa18adfb0c8bd6b13bc5 Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 24 Feb 2026 20:12:10 +0100 Subject: [PATCH 6/9] implement the new save state thingie (initial, we got work lads!) --- src/Application.vala | 5 +++++ src/Services/NoteManager.vala | 3 +++ src/Windows/StickyNoteWindow.vala | 29 +++++++++++++++++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/Application.vala b/src/Application.vala index 07ffc082..af117eb7 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -166,6 +166,11 @@ Please wait while the app remembers all the things... Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); Intl.textdomain (GETTEXT_PACKAGE); +#if HAS_GTK422 + support_save = true; + autosave_interval = 0; +#endif + //add_main_option_entries (CMD_OPTION_ENTRIES); manager = new Jorts.NoteManager (this); } diff --git a/src/Services/NoteManager.vala b/src/Services/NoteManager.vala index 2b0eda4b..3dd283ea 100644 --- a/src/Services/NoteManager.vala +++ b/src/Services/NoteManager.vala @@ -136,6 +136,9 @@ public class Jorts.NoteManager : Object { }; storage.save (array); +#if HAS_GTK422 + application.save (); +#endif } /*************************************************/ diff --git a/src/Windows/StickyNoteWindow.vala b/src/Windows/StickyNoteWindow.vala index e9ef4f85..8ccd035f 100644 --- a/src/Windows/StickyNoteWindow.vala +++ b/src/Windows/StickyNoteWindow.vala @@ -13,8 +13,7 @@ * Can be packaged into a noteData file for convenient storage * Reports to the NoteManager for saving */ -public class Jorts.StickyNoteWindow : Gtk.Window { - +public class Jorts.StickyNoteWindow : Gtk.ApplicationWindow { public Jorts.NoteView view; public Popover popover; public TextView textview; @@ -132,6 +131,12 @@ public class Jorts.StickyNoteWindow : Gtk.Window { } else { bind_hidebar (); } + +#if HAS_GTK422 + // Check what we can save + save_state.connect (on_save_state); + restore_state.connect (on_restore_state); +#endif } @@ -215,4 +220,24 @@ public class Jorts.StickyNoteWindow : Gtk.Window { private void action_zoom_out () {zoom_controller.zoom_out ();} private void action_zoom_default () {zoom_controller.zoom_default ();} private void action_zoom_in () {zoom_controller.zoom_in ();} + +#if HAS_GTK422 + private bool on_save_state (VariantDict state) { + state.insert_value ("title", new GLib.Variant ("s", data.title)); + state.insert_value ("content", new GLib.Variant ("s", data.content)); + state.insert_value ("color", new GLib.Variant ("s", data.theme.to_string ())); + state.insert_value ("mono", new GLib.Variant ("s", data.monospace.to_string ())); + state.insert_value ("zoom", new GLib.Variant ("s", data.zoom.to_string ())); + return false; + } + + // Check what we can save + private bool on_restore_state (VariantDict state) { + + var title_v =state.lookup_value ("title", GLib.VariantType.STRING); + print ("\n" + title_v.get_string ()); + + return true; + } +#endif } From e630ba6923c060fded910b9738af100c36322348 Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 24 Feb 2026 20:49:00 +0100 Subject: [PATCH 7/9] Follow naming convention for zoom change enum --- src/Objects/{Zoomkind.vala => ZoomType.vala} | 4 ++-- src/Services/ZoomController.vala | 10 +++++----- src/Widgets/Popover.vala | 2 +- src/Widgets/PopoverWidgets/ZoomBox.vala | 10 +++++----- src/meson.build | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename src/Objects/{Zoomkind.vala => ZoomType.vala} (88%) diff --git a/src/Objects/Zoomkind.vala b/src/Objects/ZoomType.vala similarity index 88% rename from src/Objects/Zoomkind.vala rename to src/Objects/ZoomType.vala index fb2d7367..28a2ee55 100644 --- a/src/Objects/Zoomkind.vala +++ b/src/Objects/ZoomType.vala @@ -9,13 +9,13 @@ /** * Used in a signal to tell windows in which way to change zoom */ - public enum Jorts.Zoomkind { + public enum Jorts.ZoomType { ZOOM_OUT, DEFAULT_ZOOM, ZOOM_IN, NONE; - public static Zoomkind from_delta (double delta) { + public static ZoomType from_delta (double delta) { if (delta == 0) {return NONE;} diff --git a/src/Services/ZoomController.vala b/src/Services/ZoomController.vala index e5a2eb47..7f97cb8b 100644 --- a/src/Services/ZoomController.vala +++ b/src/Services/ZoomController.vala @@ -30,12 +30,12 @@ public class Jorts.ZoomController : Object { /** * Handler. Wraps a zoom enum into the correct function- */ - public void zoom_changed (Jorts.Zoomkind zoomkind) { + public void zoom_changed (Jorts.ZoomType zoomkind) { debug ("Zoom changed!"); switch (zoomkind) { - case Zoomkind.ZOOM_IN: zoom_in (); return; // vala-lint=double-spaces - case Zoomkind.DEFAULT_ZOOM: zoom_default (); return; // vala-lint=double-spaces - case Zoomkind.ZOOM_OUT: zoom_out (); return; // vala-lint=double-spaces + case ZoomType.ZOOM_IN: zoom_in (); return; // vala-lint=double-spaces + case ZoomType.DEFAULT_ZOOM: zoom_default (); return; // vala-lint=double-spaces + case ZoomType.ZOOM_OUT: zoom_out (); return; // vala-lint=double-spaces default: return; // vala-lint=double-spaces } } @@ -116,7 +116,7 @@ public class Jorts.ZoomController : Object { return Gdk.EVENT_PROPAGATE; } - zoom_changed (Zoomkind.from_delta (dy)); + zoom_changed (ZoomType.from_delta (dy)); debug ("Go! Zoooommmmm"); return Gdk.EVENT_PROPAGATE; diff --git a/src/Widgets/Popover.vala b/src/Widgets/Popover.vala index eef447f4..6f5470a6 100644 --- a/src/Widgets/Popover.vala +++ b/src/Widgets/Popover.vala @@ -28,7 +28,7 @@ public class Jorts.Popover : Gtk.Popover { public int zoom { set {font_size_box.zoom = value;}} public signal void theme_changed (Jorts.Themes selected); - public signal void zoom_changed (Jorts.Zoomkind zoomkind); + public signal void zoom_changed (Jorts.ZoomType zoomkind); public signal void monospace_changed (bool if_monospace); static construct diff --git a/src/Widgets/PopoverWidgets/ZoomBox.vala b/src/Widgets/PopoverWidgets/ZoomBox.vala index 16979411..811d2fc5 100644 --- a/src/Widgets/PopoverWidgets/ZoomBox.vala +++ b/src/Widgets/PopoverWidgets/ZoomBox.vala @@ -8,7 +8,7 @@ /** * Horizontal box with a +, label, and -, representing zoom controls * Gives off zoom_changed signal to tell the user has clicked one of three -* The signal transmits a Jorts.Zoomkind Enum +* The signal transmits a Jorts.ZoomType Enum */ public class Jorts.ZoomBox : Gtk.Box { @@ -26,7 +26,7 @@ public class Jorts.ZoomBox : Gtk.Box { } } - public signal void zoom_changed (Jorts.Zoomkind zoomkind); + public signal void zoom_changed (Jorts.ZoomType zoomkind); construct { orientation = Gtk.Orientation.HORIZONTAL; @@ -69,14 +69,14 @@ public class Jorts.ZoomBox : Gtk.Box { } private void zoom_out () { - zoom_changed (Zoomkind.ZOOM_OUT); + zoom_changed (ZoomType.ZOOM_OUT); } private void zoom_default () { - zoom_changed (Zoomkind.DEFAULT_ZOOM); + zoom_changed (ZoomType.DEFAULT_ZOOM); } private void zoom_in () { - zoom_changed (Zoomkind.ZOOM_IN); + zoom_changed (ZoomType.ZOOM_IN); } } diff --git a/src/meson.build b/src/meson.build index faa95d87..87144846 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,5 +1,5 @@ sources = files ( - 'Objects' / 'Zoomkind.vala', + 'Objects' / 'ZoomType.vala', 'Objects' / 'Zoom.vala', 'Objects' / 'Themes.vala', 'Objects' / 'NoteData.vala', From 7b03de1b08e3391ae134d91432e0e888152a155d Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 24 Feb 2026 20:56:13 +0100 Subject: [PATCH 8/9] rename zoomkind to zoomtype --- src/Services/ZoomController.vala | 4 ++-- src/Widgets/Popover.vala | 4 ++-- src/Widgets/PopoverWidgets/ZoomBox.vala | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Services/ZoomController.vala b/src/Services/ZoomController.vala index 7f97cb8b..f125a03b 100644 --- a/src/Services/ZoomController.vala +++ b/src/Services/ZoomController.vala @@ -30,9 +30,9 @@ public class Jorts.ZoomController : Object { /** * Handler. Wraps a zoom enum into the correct function- */ - public void zoom_changed (Jorts.ZoomType zoomkind) { + public void zoom_changed (Jorts.ZoomType zoomtype) { debug ("Zoom changed!"); - switch (zoomkind) { + switch (zoomtype) { case ZoomType.ZOOM_IN: zoom_in (); return; // vala-lint=double-spaces case ZoomType.DEFAULT_ZOOM: zoom_default (); return; // vala-lint=double-spaces case ZoomType.ZOOM_OUT: zoom_out (); return; // vala-lint=double-spaces diff --git a/src/Widgets/Popover.vala b/src/Widgets/Popover.vala index 6f5470a6..e158a3a9 100644 --- a/src/Widgets/Popover.vala +++ b/src/Widgets/Popover.vala @@ -28,7 +28,7 @@ public class Jorts.Popover : Gtk.Popover { public int zoom { set {font_size_box.zoom = value;}} public signal void theme_changed (Jorts.Themes selected); - public signal void zoom_changed (Jorts.ZoomType zoomkind); + public signal void zoom_changed (Jorts.ZoomType zoomtype); public signal void monospace_changed (bool if_monospace); static construct @@ -71,7 +71,7 @@ public class Jorts.Popover : Gtk.Popover { // Propagate settings changes to the higher level color_box.theme_changed.connect ((theme) => {theme_changed (theme);}); monospace_box.monospace_changed.connect (on_monospace_changed); - font_size_box.zoom_changed.connect ((zoomkind) => {zoom_changed (zoomkind);}); + font_size_box.zoom_changed.connect ((zoomtype) => {zoom_changed (zoomtype);}); // Allow scrolling shenanigans from popover var keypress_controller = new Gtk.EventControllerKey (); diff --git a/src/Widgets/PopoverWidgets/ZoomBox.vala b/src/Widgets/PopoverWidgets/ZoomBox.vala index 811d2fc5..33b01d2c 100644 --- a/src/Widgets/PopoverWidgets/ZoomBox.vala +++ b/src/Widgets/PopoverWidgets/ZoomBox.vala @@ -26,7 +26,7 @@ public class Jorts.ZoomBox : Gtk.Box { } } - public signal void zoom_changed (Jorts.ZoomType zoomkind); + public signal void zoom_changed (Jorts.ZoomType zoomtype); construct { orientation = Gtk.Orientation.HORIZONTAL; From 30b51eb3654ffee8691de63e3306caa06fa526d9 Mon Sep 17 00:00:00 2001 From: teamcons Date: Mon, 2 Mar 2026 21:51:04 +0100 Subject: [PATCH 9/9] add a devel manifest --- data/Application.css | 7 ++ .../{jorts.desktop.in => jorts.desktop.in.in} | 10 +- ...jorts.gschema.xml => jorts.gschema.xml.in} | 2 +- ...tainfo.xml.in => jorts.metainfo.xml.in.in} | 9 +- data/meson.build | 107 +++++++++++++----- io.github.elly_code.jorts.devel.yml | 65 +++++++++++ meson.build | 33 ++++-- meson_options.txt | 3 +- po/meson.build | 2 +- src/Application.vala | 4 +- src/Config.vala.in | 5 +- src/Constants.vala | 3 +- src/Windows/PreferenceWindow.vala | 3 + src/Windows/StickyNoteWindow.vala | 5 + src/meson.build | 2 +- 15 files changed, 202 insertions(+), 58 deletions(-) rename data/{jorts.desktop.in => jorts.desktop.in.in} (73%) rename data/{jorts.gschema.xml => jorts.gschema.xml.in} (90%) rename data/{jorts.metainfo.xml.in => jorts.metainfo.xml.in.in} (97%) create mode 100644 io.github.elly_code.jorts.devel.yml diff --git a/data/Application.css b/data/Application.css index adb547f8..6366fd92 100644 --- a/data/Application.css +++ b/data/Application.css @@ -164,3 +164,10 @@ window.animated editablelabel, window.animated actionbar image { transition: color 750ms cubic-bezier(0.4, 0, 0.2, 1); } + +/* Devel builds get these. Libadwaita has that too, but we do not use it. */ +window.devel { + border-style: solid; + border-width: 3px; + border-color: @warning_color; +} \ No newline at end of file diff --git a/data/jorts.desktop.in b/data/jorts.desktop.in.in similarity index 73% rename from data/jorts.desktop.in rename to data/jorts.desktop.in.in index 0b95141c..6ab536d5 100644 --- a/data/jorts.desktop.in +++ b/data/jorts.desktop.in.in @@ -1,11 +1,11 @@ [Desktop Entry] Type=Application Version=1.5 -Name=Jorts +Name=@APP_NAME@ GenericName=Sticky notes Comment=Write down notes, reminders, random thoughts and other short-term informations -Icon=io.github.elly_code.jorts -Exec=io.github.elly_code.jorts +Icon=@APP_ID@ +Exec=@APP_ID@ Terminal=false Actions=NewNote;Preferences; Categories=Office;GTK; @@ -16,9 +16,9 @@ SingleMainWindow=false [Desktop Action NewNote] Name=New sticky note Icon=list-add -Exec=io.github.elly_code.jorts --new-note +Exec=@APP_ID@ --new-note [Desktop Action Preferences] Name=Show Preferences Icon=open-menu -Exec=io.github.elly_code.jorts --preferences +Exec=@APP_ID@ --preferences diff --git a/data/jorts.gschema.xml b/data/jorts.gschema.xml.in similarity index 90% rename from data/jorts.gschema.xml rename to data/jorts.gschema.xml.in index 694d73cc..880ce511 100644 --- a/data/jorts.gschema.xml +++ b/data/jorts.gschema.xml.in @@ -1,6 +1,6 @@ - + false Change font to an illegible one diff --git a/data/jorts.metainfo.xml.in b/data/jorts.metainfo.xml.in.in similarity index 97% rename from data/jorts.metainfo.xml.in rename to data/jorts.metainfo.xml.in.in index 2f9c5a0a..39117dea 100644 --- a/data/jorts.metainfo.xml.in +++ b/data/jorts.metainfo.xml.in.in @@ -1,10 +1,11 @@ - io.github.elly_code.jorts + @APP_ID@ CC0-1.0 GPL-3.0+ + @APP_ID@.desktop - Jorts + @APP_NAME@ Write on colourful little squares

Neither jeans nor shorts, just like jorts!

@@ -18,7 +19,6 @@

This is a fork of an old version of "Notejot" by lainsce. The community liked it so much, we thought it would be great to revive it!

- io.github.elly_code.jorts.desktop io.github.ellie_commons.jorts @@ -68,9 +68,6 @@ pointing touch - - 1 - diff --git a/data/meson.build b/data/meson.build index 98b65f4e..01d19c39 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,34 +1,6 @@ -#======== SETTINGS ======== -install_data ( - 'jorts.gschema.xml', - install_dir: get_option('datadir') / 'glib-2.0' / 'schemas', - rename: meson.project_name() + '.gschema.xml' -) - # metainfo confuses windows, and icons are if not windows_build - #======== Internationalization ======== - #Translate and install our .desktop file - i18n.merge_file( - input: 'jorts.desktop.in', - output: meson.project_name() + '.desktop', - po_dir: meson.project_source_root() / 'po' / 'extra', - type: 'desktop', - install: true, - install_dir: get_option('datadir') / 'applications' - ) - - #======== Metainfo ======== - #Translate and install our .metainfo file - i18n.merge_file( - input: 'jorts.metainfo.xml.in', - output: meson.project_name() + '.metainfo.xml', - po_dir: meson.project_source_root() / 'po' / 'extra', - install: true, - install_dir: get_option('datadir') / 'metainfo' - ) - #======== ICONS ======== # Install our icons in all the required sizes # "variant" variable has been declared earlier in the base meson @@ -38,20 +10,93 @@ if not windows_build install_data( 'icons' / variant / 'hicolor' / i + '.png', install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps', - rename: meson.project_name() + '.png' + rename: app_id + '.png' ) install_data( 'icons' / variant / 'hicolor@2' / i + '@2.png', install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps', - rename: meson.project_name() + '.png' + rename: app_id + '.png' ) endforeach install_data( 'icons' / variant / 'scalable.svg', install_dir: get_option('datadir') / 'icons' / 'scalable' / 'apps', - rename: meson.project_name() + '.svg' + rename: app_id + '.svg' + ) + + + # Inject some variables into the desktop file before merging in the translations + desktop_conf = configuration_data() + desktop_conf.set('APP_NAME', app_name) + desktop_conf.set('APP_ID', app_id) + desktop_file_in = configure_file( + input: 'jorts.desktop.in.in', + output: '@0@.desktop.in'.format(app_id), + configuration: desktop_conf, + ) + + desktop_file = i18n.merge_file( + input: desktop_file_in, + output: '@0@.desktop'.format(app_id), + po_dir: meson.project_source_root() / 'po', + type: 'desktop', + install: true, + install_dir: get_option('datadir') / 'applications', + ) + + + # Inject some variables into the metainfo file before merging in the translations + appstream_conf = configuration_data() + appstream_conf.set('APP_NAME', app_name) + appstream_conf.set('APP_ID', app_id) + appstream_conf.set('GETTEXT_PACKAGE', app_id) + appstream_file_in = configure_file( + input: 'jorts.metainfo.xml.in.in', + output: '@0@.metainfo.xml.in'.format(app_id), + configuration: appstream_conf, + ) + + appstream_file = i18n.merge_file( + input: appstream_file_in, + output: '@0@.metainfo.xml'.format(app_id), + po_dir: meson.project_source_root() / 'po', + install: true, + install_dir: get_option('datadir') / 'metainfo', ) + + + # Test definitions + desktop_utils = find_program('desktop-file-validate', required: false) + if desktop_utils.found() + test('Validate desktop file', desktop_utils, args: [desktop_file]) + endif + + appstreamcli = find_program('appstreamcli', required: false, disabler: true) + test('Validate appstream file', + appstreamcli, + args: ['validate', '--no-net', '--explain', appstream_file], + ) endif + +gschema_conf = configuration_data() +gschema_conf.set('APP_ID', app_id) +gschema_file = configure_file( + input: 'jorts.gschema.xml.in', + output: '@0@.gschema.xml'.format(app_id), + configuration: gschema_conf, +) + +install_data( + gschema_file, + install_dir: get_option('datadir') / 'glib-2.0' / 'schemas', +) + +compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true) +test('Validate schema file', +compile_schemas, +args: ['--strict', '--dry-run', meson.current_source_dir()], +) + diff --git a/io.github.elly_code.jorts.devel.yml b/io.github.elly_code.jorts.devel.yml new file mode 100644 index 00000000..e12b8e84 --- /dev/null +++ b/io.github.elly_code.jorts.devel.yml @@ -0,0 +1,65 @@ +# +# This is danger +# +id: io.github.elly_code.jorts.devel +# elementary SDK is not available on Flathub, so use the elementary BaseApp instead +base: io.elementary.BaseApp +base-version: 'circe-25.08' +runtime: org.gnome.Platform +runtime-version: '49' +sdk: org.gnome.Sdk +command: io.github.elly_code.jorts.devel + +tags: ['devel'] +desktop-file-name-prefix: '(devel)' + +finish-args: + - '--share=ipc' + - '--device=dri' + - '--socket=fallback-x11' + - '--socket=wayland' + +cleanup: + - '/include' + - '/lib/pkgconfig' + - '/man' + - '/share/doc' + - '/share/gtk-doc' + - '/share/man' + - '/share/pkgconfig' + - '/share/installed-tests' + - '*.la' + - '*.a' + +modules: + # Needed for the Scribbly mode + # It should be present by default on elementary OS, but better not assume it is the case + - name: RedactedScript + buildsystem: simple + build-commands: + - install -Dm0644 RedactedScript-Regular.ttf -t ${FLATPAK_DEST}/share/fonts + - install -Dm0644 OFL.txt -t ${FLATPAK_DEST}/share/doc/redacted-font + - install -Dm0644 AUTHORS.txt -t ${FLATPAK_DEST}/share/doc/redacted-font + - install -Dm0644 README.md -t ${FLATPAK_DEST}/share/doc/redacted-font + sources: + - type: file + url: https://github.com/christiannaths/redacted-font/raw/63e542017bab347ba9be54d7d99b99d4754c3d97/RedactedScript/fonts/ttf/RedactedScript-Regular.ttf + sha256: 1ebaab9642a2f43fa33f449760469903143fd1d08b2433eb6c15e28602d9360d + - type: file + url: https://raw.githubusercontent.com/christiannaths/redacted-font/284dfb0397d1911c3388f72389f08b3c13446134/OFL.txt + sha256: ed836da2ff14b9b2d04001057e03c0531afdd2626bf66a612b17124589f58efa + - type: file + url: https://raw.githubusercontent.com/christiannaths/redacted-font/284dfb0397d1911c3388f72389f08b3c13446134/AUTHORS.txt + sha256: 84977eeb6e582a6d10bea0eda40e1c6dfdc8904309c6011932a9e2632c727043 + - type: file + url: https://raw.githubusercontent.com/christiannaths/redacted-font/284dfb0397d1911c3388f72389f08b3c13446134/README.md + sha256: e594f7f6bf03f7b11897d219184e215466cdfb9a8268b54cb7d5a626482dd722 + + - name: jorts + buildsystem: meson + config-opts: + - -Dvariant=['default'] + - -Ddevelopment=true + sources: + - type: dir + path: . diff --git a/meson.build b/meson.build index af32d782..2559cf8c 100644 --- a/meson.build +++ b/meson.build @@ -1,20 +1,36 @@ # Name our project -project('io.github.elly_code.jorts', ['vala', 'c'], +project( + 'io.github.elly_code.jorts', + 'vala', 'c', version: '4.0.1' ) +app_name = 'Jorts' +app_id = meson.project_name() +app_version = meson.project_version() + +vala_flags = [] +if get_option('development') + app_id += '.devel' + name_prefix = '(devel) ' + vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip() + version_suffix = '-@0@'.format (vcs_tag) + vala_flags += ['--define', 'DEVEL'] + +else + name_prefix = '' + version_suffix = '' +endif + + gnome = import('gnome') i18n = import('i18n') -add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c') +add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (app_id), language:'c') windows_build = build_machine.system() == 'windows' #================================ -# Set flags for icon variants, and target in the case of windows builds - -vala_flags = [] - # Cool icon variants variant = get_option('variant')[0] @@ -47,7 +63,10 @@ endif ## Set de config data config_data = configuration_data() config_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir')) -config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name()) +config_data.set_quoted('GETTEXT_PACKAGE', app_id) +config_data.set_quoted('APP_NAME', app_name) +config_data.set_quoted('APP_ID', app_id) +config_data.set_quoted('APP_VERSION', app_version) config_file = configure_file( input: 'src/Config.vala.in', output: '@BASENAME@', diff --git a/meson_options.txt b/meson_options.txt index 6ac14e8e..50fed8bd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,4 +8,5 @@ option('flathub', type : 'boolean', value : false, description : 'Slight modifications for Flathub' -) \ No newline at end of file +) +option('development', type: 'boolean', value: false, description: 'If this is a development build') \ No newline at end of file diff --git a/po/meson.build b/po/meson.build index e672ff71..f2c04f0a 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1,4 +1,4 @@ -i18n.gettext(meson.project_name(), +i18n.gettext(app_id, args: '--directory=' + meson.project_source_root(), preset: 'glib' ) diff --git a/src/Application.vala b/src/Application.vala index af117eb7..67828157 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -72,7 +72,7 @@ public class Jorts.Application : Gtk.Application { public Application () { Object (flags: ApplicationFlags.HANDLES_COMMAND_LINE, - application_id: Jorts.Constants.RDNN); + application_id: APP_ID); } /*************************************************/ @@ -155,7 +155,7 @@ Please wait while the app remembers all the things... /*************************************************/ static construct { - gsettings = new GLib.Settings (Jorts.Constants.RDNN); + gsettings = new GLib.Settings (APP_ID); } /*************************************************/ diff --git a/src/Config.vala.in b/src/Config.vala.in index a3c7bd42..53908282 100644 --- a/src/Config.vala.in +++ b/src/Config.vala.in @@ -1,2 +1,5 @@ public const string GETTEXT_PACKAGE = @GETTEXT_PACKAGE@; -public const string LOCALEDIR = @LOCALEDIR@; \ No newline at end of file +public const string LOCALEDIR = @LOCALEDIR@; +public const string APP_NAME = @APP_NAME@; +public const string APP_ID = @APP_ID@; +public const string APP_VERSION = @APP_VERSION@; \ No newline at end of file diff --git a/src/Constants.vala b/src/Constants.vala index 9ce8f951..48326315 100644 --- a/src/Constants.vala +++ b/src/Constants.vala @@ -12,7 +12,6 @@ namespace Jorts.Constants { /*************************************************/ - const string RDNN = "io.github.elly_code.jorts"; const string DONATE_LINK = "https://ko-fi.com/teamcons/tip"; // signature theme @@ -26,7 +25,7 @@ namespace Jorts.Constants { const int DEBOUNCE = 900; // CSS - const string STYLE_THEMEDBUTTON = Constants.STYLE_THEMEDBUTTON; + const string STYLE_THEMEDBUTTON = "themedbutton"; // We need to say stop at some point const int ZOOM_MAX = 300; diff --git a/src/Windows/PreferenceWindow.vala b/src/Windows/PreferenceWindow.vala index 10afab2c..298dc65b 100644 --- a/src/Windows/PreferenceWindow.vala +++ b/src/Windows/PreferenceWindow.vala @@ -24,6 +24,9 @@ public class Jorts.PreferenceWindow : Gtk.Window { application = app; +#if DEVEL + add_css_class ("devel"); +#endif /********************************************/ /* HEADERBAR BS */ diff --git a/src/Windows/StickyNoteWindow.vala b/src/Windows/StickyNoteWindow.vala index 8ccd035f..760a2f41 100644 --- a/src/Windows/StickyNoteWindow.vala +++ b/src/Windows/StickyNoteWindow.vala @@ -62,6 +62,11 @@ public class Jorts.StickyNoteWindow : Gtk.ApplicationWindow { debug ("[STICKY NOTE] New StickyNoteWindow instance!"); application = app; +#if DEVEL + add_css_class ("devel"); +#endif + + var actions = new SimpleActionGroup (); actions.add_action_entries (ACTION_ENTRIES, this); insert_action_group ("win", actions); diff --git a/src/meson.build b/src/meson.build index 87144846..79fd70cc 100644 --- a/src/meson.build +++ b/src/meson.build @@ -44,7 +44,7 @@ endif # win_subsystem doesnt seem to bother standard builds executable( - meson.project_name(), + app_id, gresource, config_file, sources,