Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI: Lint"
name: "Lint"

on:
pull_request:
Expand Down
17 changes: 15 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if flathub
vala_flags += ['--define', 'FLATHUB']
endif

add_project_arguments(vala_flags, language: 'vala')


#================================
# Import the stylesheet
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -266,7 +271,6 @@ Please wait while the app remembers all the things...
return 0;
}

hold ();
activate ();
return 0;
}
Expand Down
18 changes: 13 additions & 5 deletions src/Constants.vala
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
* 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)
*/
//vala-lint=skip-file

/**
* I just dump all my constants here
Expand All @@ -12,25 +13,26 @@ 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

// 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;
Expand All @@ -47,6 +49,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",
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/NoteData.vala
Original file line number Diff line number Diff line change
@@ -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)
*/


Expand Down
2 changes: 1 addition & 1 deletion src/Objects/Themes.vala
Original file line number Diff line number Diff line change
@@ -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)
*/

/*************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/Zoom.vala
Original file line number Diff line number Diff line change
@@ -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)
*/

/*************************************************/
Expand Down
6 changes: 3 additions & 3 deletions src/Objects/Zoomkind.vala → src/Objects/ZoomType.vala
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/*
* 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)
*/

/*************************************************/
/**
* 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;}

Expand Down
2 changes: 1 addition & 1 deletion src/Services/ColorController.vala
Original file line number Diff line number Diff line change
@@ -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)
*/

/*************************************************/
Expand Down
5 changes: 4 additions & 1 deletion src/Services/NoteManager.vala
Original file line number Diff line number Diff line change
@@ -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)
*/

/**
Expand Down Expand Up @@ -136,6 +136,9 @@ public class Jorts.NoteManager : Object {
};

storage.save (array);
#if HAS_GTK422
application.save ();
#endif
}

/*************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/Services/ScribblyController.vala
Original file line number Diff line number Diff line change
@@ -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)
*/

/*************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Storage.vala
Original file line number Diff line number Diff line change
@@ -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)
*/

/**
Expand Down
14 changes: 7 additions & 7 deletions src/Services/ZoomController.vala
Original file line number Diff line number Diff line change
@@ -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)
*/

/*************************************************/
Expand Down Expand Up @@ -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 zoomtype) {
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
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
default: return; // vala-lint=double-spaces
}
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Libportal.vala
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Random.vala
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Views/NoteView.vala
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
9 changes: 4 additions & 5 deletions src/Views/PreferencesView.vala
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand Down
Loading
Loading