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
1 change: 1 addition & 0 deletions po/POTFILES
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ src/Views/PreferencesView.vala
src/Widgets/ActionBar.vala
src/Widgets/EditableLabel.vala
src/Widgets/EditableLabel.vala
src/Widgets/HyperTextView.vala
src/Widgets/Popover.vala
src/Widgets/PopoverWidgets/ColorBox.vala
src/Widgets/PopoverWidgets/MonospaceBox.vala
Expand Down
2 changes: 1 addition & 1 deletion src/Services/ColorController.vala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
public class Jorts.ColorController : Object {

private weak Jorts.StickyNoteWindow window;
private unowned Jorts.StickyNoteWindow window;

private Jorts.Themes _theme;
public Jorts.Themes theme {
Expand Down
8 changes: 6 additions & 2 deletions src/Services/NoteManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public class Jorts.NoteManager : Object {
private static NoteData? last_deleted = null;

private Jorts.Application application;
public Gee.ArrayList<StickyNoteWindow> open_notes;
public Gee.ArrayList<unowned StickyNoteWindow> open_notes;
public Jorts.Storage storage;

public NoteManager (Jorts.Application app) {
this.application = app;
}

construct {
open_notes = new Gee.ArrayList<StickyNoteWindow> ();
open_notes = new Gee.ArrayList<unowned StickyNoteWindow> ();
storage = new Jorts.Storage ();
}

Expand All @@ -40,6 +40,7 @@ public class Jorts.NoteManager : Object {
Json.Array loaded_data = storage.load ();

if (loaded_data.get_length () == 0) {

var note_data = new NoteData ();
note_data.theme = DEFAULT_THEME;

Expand Down Expand Up @@ -103,6 +104,9 @@ public class Jorts.NoteManager : Object {
application.remove_window ((Gtk.Window)note);

note.close ();
note.dispose ();
note.destroy ();
note = null;

immediately_save ();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/ScribblyController.vala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class Jorts.ScribblyController : Object {

private const string STYLE_SCRIBBLED = "scribbled";
private weak Jorts.StickyNoteWindow window;
private unowned Jorts.StickyNoteWindow window;

private bool _scribble;
public bool scribble {
Expand Down
2 changes: 1 addition & 1 deletion src/Services/ZoomController.vala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class Jorts.ZoomController : Object {

private static bool is_control_key_pressed = false;
private weak Jorts.StickyNoteWindow window {get; set;}
private unowned Jorts.StickyNoteWindow window {get; set;}

// Avoid setting this unless it is to restore a specific value, do_set_zoom does not check input
private int _old_zoom;
Expand Down
4 changes: 1 addition & 3 deletions src/Views/NoteView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@
app.set_accels_for_action (ACTION_PREFIX + ACTION_SHOW_MENU, {"<Control>G", "<Control>O"});
app.set_accels_for_action (ACTION_PREFIX + ACTION_TOGGLE_MONO, {"<Control>m"});




orientation = VERTICAL;
spacing = 0;

Expand Down Expand Up @@ -142,6 +139,7 @@
private void action_toggle_mono () {monospace = !monospace;}

~NoteView () {
actionbar.destroy ();
debug ("Destroyed");
}
}
4 changes: 4 additions & 0 deletions src/Widgets/EditableLabel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,8 @@ public class Jorts.EditableLabel : Granite.Bin {
}
remove_css_class (STYLE_MONOSPACE);
}

~EditableLabel () {
debug ("Destroyed");
}
}
Loading