Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
a0b536b
Make absolutely super sure the window is deleted (some of it stays in…
teamcons Nov 7, 2025
ed4cd67
Merge branch 'main' into Working-branch
teamcons Nov 9, 2025
bb33d1c
add more specific class
teamcons Nov 10, 2025
25e1240
Merge branch 'Working-branch' of https://github.com/ellie-commons/jor…
teamcons Nov 10, 2025
92efad7
use more specific class naming, and use % instead of em
teamcons Nov 10, 2025
fbd7deb
Forgot this
teamcons Nov 10, 2025
10fbaa3
Programmatical to_class
teamcons Nov 10, 2025
0ba2509
forgot comma
teamcons Nov 10, 2025
80d769d
metainfo
teamcons Nov 10, 2025
0e27d10
Trim README
teamcons Nov 10, 2025
054c4f9
sweep out deprecated theme
teamcons Nov 10, 2025
7e44325
retire from_string
teamcons Nov 10, 2025
3bb77a2
move libportal out
teamcons Nov 10, 2025
8584002
Correct wrong zoom class name
teamcons Nov 10, 2025
54d41ee
forgor semicolons
teamcons Nov 10, 2025
7cc4763
oops
teamcons Nov 10, 2025
d4fd590
bin unused function, make random the default
teamcons Nov 10, 2025
8dcc666
bin static functions, use an enum for zoom
teamcons Nov 10, 2025
a9ab5ca
Introduce a ZoomController to deal with this shit
teamcons Nov 10, 2025
8600390
Retire old now unused zomconvert
teamcons Nov 10, 2025
2b55a3e
use static stylesheets
teamcons Nov 10, 2025
b49f695
DRY and future proof by making a custom widget
teamcons Nov 10, 2025
b22b185
do not keep hidden preferences
teamcons Nov 10, 2025
71c0d6c
retire old themer service as we now statically do the stylesheets
teamcons Nov 10, 2025
1183130
move debounce to the manager
teamcons Nov 10, 2025
80cb68a
Avoid agressively theming everything
teamcons Nov 10, 2025
4f396bf
Fully clickable editablelabel
teamcons Nov 10, 2025
16c6162
update PO
teamcons Nov 10, 2025
54cbfb8
remove unused
teamcons Nov 10, 2025
1a25b1a
Restore padding
teamcons Nov 10, 2025
3b4e55e
Add a ctrl+scroll thingy
teamcons Nov 11, 2025
4a0dfe9
LETS GOOOOO
teamcons Nov 11, 2025
8822c61
woops
teamcons Nov 11, 2025
b01315a
hmmmm
teamcons Nov 11, 2025
7ccfe22
try make it build
teamcons Nov 11, 2025
b02c77a
handler
teamcons Nov 11, 2025
746a476
introduce a scribblycontroller
teamcons Nov 11, 2025
927b915
Cast as widget
teamcons Nov 11, 2025
e1d26a2
fix build mistake
teamcons Nov 11, 2025
00eb38f
skip the on focus gtk settings bullshit
teamcons Nov 11, 2025
826d39f
Zoom which now functions
teamcons Nov 11, 2025
95df5bb
Update PO and restore some theming bullshit
teamcons Nov 11, 2025
0cde18b
this should be a debug
teamcons Nov 11, 2025
c639632
remove old strings
teamcons Nov 11, 2025
b1d944c
remove unused
teamcons Nov 11, 2025
4a5ba14
this one too
teamcons Nov 11, 2025
91170d9
Rebuild
Nov 11, 2025
588149c
updated size and branding
teamcons Nov 12, 2025
93c6ab0
auto version
teamcons Nov 12, 2025
5c09b7d
Avoid not being allowed to keep writing
teamcons Nov 12, 2025
4f3683c
fix some pissy bug where ctrl blocks text editing
teamcons Nov 12, 2025
58f74b3
fix menus changing size and line spacing
teamcons Nov 12, 2025
715685b
rename window specific actions and make them available for the popove…
teamcons Nov 13, 2025
e0a8f25
update metainfo
teamcons Nov 13, 2025
02c776c
emojichooser causes issue from popover
teamcons Nov 13, 2025
3904c52
Merge branch 'main' into Working-branch
teamcons Nov 13, 2025
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
1 change: 1 addition & 0 deletions data/jorts.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<li>Version 4 to align with Gtk version</li>
<li>Ctrl+Scroll to zoom-in, zoom-out</li>
<li>More zoom options</li>
<li>Keyboard shortcuts work from popover now</li>
<li>A couple visual bugfixes as well!</li>
<li>Various under the hood performance improvements</li>
</ul>
Expand Down
42 changes: 21 additions & 21 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class Jorts.Application : Gtk.Application {
public const string ACTION_PREFIX = "app.";
public const string ACTION_QUIT = "action_quit";
public const string ACTION_NEW = "action_new";
public const string ACTION_DELETE = "action_delete";
public const string ACTION_TOGGLE_SCRIBBLY = "action_toggle_scribbly";
public const string ACTION_TOGGLE_ACTIONBAR = "action_toggle_actionbar";
public const string ACTION_SHOW_PREFERENCES = "action_show_preferences";
Expand Down Expand Up @@ -89,29 +88,30 @@ public class Jorts.Application : Gtk.Application {
add_action_entries (ACTION_ENTRIES, this);
set_accels_for_action ("app.action_quit", {"<Control>Q"});
set_accels_for_action ("app.action_new", {"<Control>N"});
set_accels_for_action ("app.action_delete", {"<Control>W"});
set_accels_for_action ("app.action_save", {"<Control>S"});
set_accels_for_action ("app.action_zoom_out", {"<Control>minus", "<Control>KP_Subtract"});
set_accels_for_action ("app.action_zoom_default", {"<Control>equal", "<Control>0", "<Control>KP_0"});
set_accels_for_action ("app.action_zoom_in", {"<Control>plus", "<Control>KP_Add"});
set_accels_for_action ("app.action_toggle_scribbly", {"<Control>H"});
set_accels_for_action ("app.action_toggle_mono", {"<Control>m"});
set_accels_for_action ("app.action_toggle_actionbar", {"<Control>T"});
set_accels_for_action ("app.action_show_preferences", {"<Control>P"});
set_accels_for_action ("app.action_focus_title", {"<Control>L"});
set_accels_for_action ("app.action_show_emoji", {"<Control>period"});
set_accels_for_action ("app.action_show_menu", {"<Control>G", "<Control>O"});

set_accels_for_action ("app.action_theme_1", {"<Alt>1"});
set_accels_for_action ("app.action_theme_2", {"<Alt>2"});
set_accels_for_action ("app.action_theme_3", {"<Alt>3"});
set_accels_for_action ("app.action_theme_4", {"<Alt>4"});
set_accels_for_action ("app.action_theme_5", {"<Alt>5"});
set_accels_for_action ("app.action_theme_6", {"<Alt>6"});
set_accels_for_action ("app.action_theme_7", {"<Alt>7"});
set_accels_for_action ("app.action_theme_8", {"<Alt>8"});
set_accels_for_action ("app.action_theme_9", {"<Alt>9"});
set_accels_for_action ("app.action_theme_0", {"<Alt>0", "<Alt>KP_0"});
set_accels_for_action ("app.action_toggle_scribbly", {"<Control>H"});

set_accels_for_action ("win.action_delete", {"<Control>W"});
set_accels_for_action ("win.action_zoom_out", {"<Control>minus", "<Control>KP_Subtract"});
set_accels_for_action ("win.action_zoom_default", {"<Control>equal", "<Control>0", "<Control>KP_0"});
set_accels_for_action ("win.action_zoom_in", {"<Control>plus", "<Control>KP_Add"});
set_accels_for_action ("win.action_toggle_mono", {"<Control>m"});
set_accels_for_action ("win.action_focus_title", {"<Control>L"});
set_accels_for_action ("win.action_show_emoji", {"<Control>period"});
set_accels_for_action ("win.action_show_menu", {"<Control>G", "<Control>O"});

set_accels_for_action ("win.action_theme_1", {"<Alt>1"});
set_accels_for_action ("win.action_theme_2", {"<Alt>2"});
set_accels_for_action ("win.action_theme_3", {"<Alt>3"});
set_accels_for_action ("win.action_theme_4", {"<Alt>4"});
set_accels_for_action ("win.action_theme_5", {"<Alt>5"});
set_accels_for_action ("win.action_theme_6", {"<Alt>6"});
set_accels_for_action ("win.action_theme_7", {"<Alt>7"});
set_accels_for_action ("win.action_theme_8", {"<Alt>8"});
set_accels_for_action ("win.action_theme_9", {"<Alt>9"});
set_accels_for_action ("win.action_theme_0", {"<Alt>0", "<Alt>KP_0"});


// Force the eOS icon theme, and set the blueberry as fallback, if for some reason it fails for individual notes
Expand Down
29 changes: 29 additions & 0 deletions src/Views/PopoverView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,35 @@ public class Jorts.PopoverView : Gtk.Popover {
public signal void zoom_changed (Jorts.Zoomkind zoomkind);
public signal void monospace_changed (bool if_monospace);

static construct
{
add_binding_action(Gdk.Key.plus, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_ZOOM_IN, null);
add_binding_action(Gdk.Key.equal, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_ZOOM_DEFAULT, null);
add_binding_action(48, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_ZOOM_DEFAULT, null);
add_binding_action(Gdk.Key.minus, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_ZOOM_OUT, null);

add_binding_action(Gdk.Key.w, Gdk.ModifierType.CONTROL_MASK, Application.ACTION_PREFIX + Application.ACTION_NEW, null);
add_binding_action(Gdk.Key.w, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_DELETE, null);
add_binding_action(Gdk.Key.m, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_TOGGLE_MONO, null);
add_binding_action(Gdk.Key.g, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_SHOW_MENU, null);
add_binding_action(Gdk.Key.o, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_SHOW_MENU, null);
add_binding_action(Gdk.Key.l, Gdk.ModifierType.CONTROL_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_FOCUS_TITLE, null);

// Compiler whines about Gdk.Key.1 because name is a number so it doesnt see it.
// So we use magic numbers
add_binding_action(49, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_1, null);
add_binding_action(50, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_2, null);
add_binding_action(51, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_3, null);
add_binding_action(52, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_4, null);
add_binding_action(53, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_5, null);
add_binding_action(54, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_6, null);
add_binding_action(55, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_7, null);
add_binding_action(56, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_8, null);
add_binding_action(57, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_9, null);
add_binding_action(48, Gdk.ModifierType.ALT_MASK, StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_THEME_0, null);
}


/****************/
public PopoverView (Jorts.StickyNoteWindow window) {
position = Gtk.PositionType.TOP;
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/ActionBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
)
};
delete_item.add_css_class ("themedbutton");
delete_item.action_name = Application.ACTION_PREFIX + Application.ACTION_DELETE;
delete_item.action_name = StickyNoteWindow.ACTION_PREFIX + StickyNoteWindow.ACTION_DELETE;

/* **** RIGHT **** */
emojichooser_popover = new Gtk.EmojiChooser ();
Expand Down
43 changes: 22 additions & 21 deletions src/Windows/StickyNoteWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,31 @@ public class Jorts.StickyNoteWindow : Gtk.Window {
private Gtk.EventControllerKey keypress_controller;
private Gtk.EventControllerScroll scroll_controller;

private const string ACTION_PREFIX = "app.";
private const string ACTION_SHOW_EMOJI = "action_show_emoji";
private const string ACTION_SHOW_MENU = "action_show_menu";
private const string ACTION_FOCUS_TITLE = "action_focus_title";
private const string ACTION_ZOOM_OUT = "action_zoom_out";
private const string ACTION_ZOOM_DEFAULT = "action_zoom_default";
private const string ACTION_ZOOM_IN = "action_zoom_in";
private const string ACTION_TOGGLE_MONO = "action_toggle_mono";

private const string ACTION_THEME_1 = "action_theme_1";
private const string ACTION_THEME_2 = "action_theme_2";
private const string ACTION_THEME_3 = "action_theme_3";
private const string ACTION_THEME_4 = "action_theme_4";
private const string ACTION_THEME_5 = "action_theme_5";
private const string ACTION_THEME_6 = "action_theme_6";
private const string ACTION_THEME_7 = "action_theme_7";
private const string ACTION_THEME_8 = "action_theme_8";
private const string ACTION_THEME_9 = "action_theme_9";
private const string ACTION_THEME_0 = "action_theme_0";
public const string ACTION_PREFIX = "win.";
public const string ACTION_SHOW_EMOJI = "action_show_emoji";
public const string ACTION_SHOW_MENU = "action_show_menu";
public const string ACTION_FOCUS_TITLE = "action_focus_title";
public const string ACTION_ZOOM_OUT = "action_zoom_out";
public const string ACTION_ZOOM_DEFAULT = "action_zoom_default";
public const string ACTION_ZOOM_IN = "action_zoom_in";
public const string ACTION_TOGGLE_MONO = "action_toggle_mono";
public const string ACTION_DELETE = "action_delete";

public const string ACTION_THEME_1 = "action_theme_1";
public const string ACTION_THEME_2 = "action_theme_2";
public const string ACTION_THEME_3 = "action_theme_3";
public const string ACTION_THEME_4 = "action_theme_4";
public const string ACTION_THEME_5 = "action_theme_5";
public const string ACTION_THEME_6 = "action_theme_6";
public const string ACTION_THEME_7 = "action_theme_7";
public const string ACTION_THEME_8 = "action_theme_8";
public const string ACTION_THEME_9 = "action_theme_9";
public const string ACTION_THEME_0 = "action_theme_0";

public static Gee.MultiMap<string, string> action_accelerators;

private const GLib.ActionEntry[] ACTION_ENTRIES = {
{ Application.ACTION_DELETE, action_delete},
{ ACTION_DELETE, action_delete},
{ ACTION_SHOW_EMOJI, action_show_emoji},
{ ACTION_SHOW_MENU, action_show_menu},
{ ACTION_FOCUS_TITLE, action_focus_title},
Expand All @@ -82,7 +83,7 @@ public class Jorts.StickyNoteWindow : Gtk.Window {

var actions = new SimpleActionGroup ();
actions.add_action_entries (ACTION_ENTRIES, this);
insert_action_group ("app", actions);
insert_action_group ("win", actions);


zoomcontroller = new Jorts.ZoomController (this);
Expand Down