[gnote] Make open_notes_in_new_window caching setting



commit 69edace20aa0b5dde763d5cca785308a5a6dcc33
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sat Dec 19 15:16:22 2020 +0200

    Make open_notes_in_new_window caching setting

 src/preferences.cpp | 3 ++-
 src/preferences.hpp | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/preferences.cpp b/src/preferences.cpp
index 661ececb..15046b5a 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -136,6 +136,7 @@ namespace gnote {
     SETUP_CACHED_KEY(m_schema_gnote, enable_custom_font, ENABLE_CUSTOM_FONT, boolean);
     SETUP_CACHED_KEY(m_schema_gnote, note_rename_behavior, NOTE_RENAME_BEHAVIOR, int);
     SETUP_CACHED_KEY(m_schema_gnote, custom_font_face, CUSTOM_FONT_FACE, string);
+    SETUP_CACHED_KEY(m_schema_gnote, open_notes_in_new_window, OPEN_NOTES_IN_NEW_WINDOW, boolean);
 
     SETUP_CACHED_KEY(m_schema_gnome_interface, desktop_gnome_clock_format, DESKTOP_GNOME_CLOCK_FORMAT, 
string);
     SETUP_CACHED_KEY(m_schema_gnome_interface, desktop_gnome_font, DESKTOP_GNOME_FONT, string);
@@ -167,7 +168,7 @@ namespace gnote {
   DEFINE_GETTER_SETTER_BOOL(m_schema_gnote, enable_auto_bulleted_lists, ENABLE_AUTO_BULLETED_LISTS)
   DEFINE_GETTER_SETTER_BOOL(m_schema_gnote, enable_close_note_on_escape, ENABLE_CLOSE_NOTE_ON_ESCAPE)
   DEFINE_CACHING_SETTER_INT(m_schema_gnote, note_rename_behavior, NOTE_RENAME_BEHAVIOR)
-  DEFINE_GETTER_SETTER_BOOL(m_schema_gnote, open_notes_in_new_window, OPEN_NOTES_IN_NEW_WINDOW)
+  DEFINE_CACHING_SETTER_BOOL(m_schema_gnote, open_notes_in_new_window, OPEN_NOTES_IN_NEW_WINDOW)
   DEFINE_GETTER_SETTER_STRING(m_schema_gnote, start_note_uri, START_NOTE_URI)
   DEFINE_CACHING_SETTER_STRING(m_schema_gnote, custom_font_face, CUSTOM_FONT_FACE)
 
diff --git a/src/preferences.hpp b/src/preferences.hpp
index c99fc23a..cb44c18d 100644
--- a/src/preferences.hpp
+++ b/src/preferences.hpp
@@ -91,7 +91,7 @@ namespace gnote {
     GNOTE_PREFERENCES_SETTING_BOOL(enable_auto_bulleted_lists)
     GNOTE_PREFERENCES_SETTING_BOOL(enable_close_note_on_escape)
     GNOTE_PREFERENCES_CACHING_SETTING(note_rename_behavior, int)
-    GNOTE_PREFERENCES_SETTING_BOOL(open_notes_in_new_window)
+    GNOTE_PREFERENCES_CACHING_SETTING(open_notes_in_new_window, bool)
     GNOTE_PREFERENCES_SETTING_STRING(start_note_uri)
     GNOTE_PREFERENCES_CACHING_SETTING(custom_font_face, const Glib::ustring &)
 
@@ -132,6 +132,7 @@ namespace gnote {
     bool m_enable_url_links;
     bool m_enable_wikiwords;
     bool m_enable_custom_font;
+    bool m_open_notes_in_new_window;
   };
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]