diff options
| author | Joan Moreau <jom@grosjo.net> | 2021-01-17 17:36:03 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2021-01-17 17:54:48 +0100 |
| commit | 461b00170782106b6fd4d2c2a43d06260aedd985 (patch) | |
| tree | b7ad6705298ca8981d7052d905cc59e6a33aa055 /lib | |
| parent | bd88b9058d098ea0302919547a10e75a927b95b1 (diff) | |
| download | grauphel-grosjo-more-note-fields.tar.gz grauphel-grosjo-more-note-fields.zip | |
Add missing standard fields (Tomboy legacy):grosjo-more-note-fields
- Window position X and Y
- Window height and width
- Cursor position
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/notestorage.php | 27 |
1 files changed, 27 insertions, 0 deletions
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'}, ); } |
