File tree Expand file tree Collapse file tree 5 files changed +10
-252
lines changed Expand file tree Collapse file tree 5 files changed +10
-252
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ Please wait while the app remembers all the things...
165165 /* Either we show all sticky notes, or we load everything lol */
166166 if (manager. open_notes. size > 0 ) {
167167 foreach (var window in manager. open_notes) {
168- if (window. visible) { window. present ();}
168+ if (window. visible) {window. present ();}
169169 }
170170 } else {
171171 manager. init ();
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111*/
1212public class Jorts.NoteManager : Object {
1313
14- private Gtk . Application application;
14+ private Jorts . Application application;
1515 public Gee . ArrayList<StickyNoteWindow > open_notes;
1616 public Jorts . Storage storage;
1717
1818 public NoteManager (Jorts .Application app ) {
19- Object ( application: app) ;
19+ this . application = app;
2020 }
2121
2222 construct {
@@ -41,9 +41,11 @@ public class Jorts.NoteManager : Object {
4141 create_note (note_data);
4242
4343 } else {
44- foreach (Json . Node json_data in loaded_data. get_elements ()) {
44+ foreach (var json_data in loaded_data. get_elements()) {
4545 var json_obj = json_data. dup_object ();
4646 var note_data = new NoteData .from_json (json_obj);
47+
48+ print (" \n Loaded: " + note_data. title);
4749 create_note (note_data);
4850 }
4951 }
@@ -75,8 +77,10 @@ public class Jorts.NoteManager : Object {
7577
7678 /* LETSGO */
7779 open_notes. add (note);
80+ note. show ();
7881 note. present ();
79- note. changed. connect (save_all. begin);
82+ note. changed. connect (save_all);
83+
8084 }
8185
8286 /* ************************************************/
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1414* save() takes a Json.Node instead of an NoteData[] so we avoid looping twice through all notes
1515* It is agressively persistent in
1616*/
17- public class Jorts.Storage {
17+ public class Jorts.Storage : Object {
1818
1919 private const string FILENAME = " saved_state.json" ;
2020 private const string FILENAME_BACKUP = " backup_state.json" ;
You can’t perform that action at this time.
0 commit comments