From 461b00170782106b6fd4d2c2a43d06260aedd985 Mon Sep 17 00:00:00 2001 From: Joan Moreau Date: Sun, 17 Jan 2021 17:36:03 +0100 Subject: Add missing standard fields (Tomboy legacy): - Window position X and Y - Window height and width - Cursor position --- lib/notestorage.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'lib') diff --git a/lib/notestorage.php b/lib/notestorage.php index 7898637..5dc503b 100644 --- a/lib/notestorage.php +++ b/lib/notestorage.php @@ -95,6 +95,9 @@ class NoteStorage 'pinned', 'tags', 'title', + 'x', 'y', 'width', 'height', + 'selection-bound-position', + 'cursor-position', ); $changed = array(); @@ -250,6 +253,14 @@ class NoteStorage 'open-on-startup' => false, 'pinned' => false, 'tags' => array(), + + 'x' => 20, + 'y' => 20, + 'width' => -1, + 'height' => -1, + + 'cursor-position' => 0, + 'selection-bound-position' => 0, ); } @@ -521,6 +532,14 @@ class NoteStorage 'pinned' => (bool) $row['note_pinned'], 'tags' => json_decode($row['note_tags']), + 'x' => (int) $row['note_x'], + 'y' => (int) $row['note_y'], + 'height' => (int) $row['note_height'], + 'width' => (int) $row['note_width'], + + 'selection-bound-position' => (int) $row['note_selection_bound_position'], + 'cursor-position' => (int) $row['note_cursor_position'], + 'last-sync-revision' => (int) $row['note_last_sync_revision'], ); } @@ -542,6 +561,14 @@ class NoteStorage 'note_pinned' => (int) $note->pinned, 'note_tags' => json_encode($note->tags), + 'note_x' => (int) $note->{'x'}, + 'note_y' => (int) $note->{'y'}, + 'note_height' => (int) $note->{'height'}, + 'note_width' => (int) $note->{'width'}, + + 'note_selection_bound_position' => (int) $note->{'selection-bound-position'}, + 'note_cursor_position' => (int) $note->{'cursor-position'}, + 'note_last_sync_revision' => $note->{'last-sync-revision'}, ); } -- cgit v1.2.3