[gnote] Update notedirectorywatcher



commit a63cc5d894e9bce9c2523875a756a4319c817410
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sat Oct 12 15:20:42 2019 +0300

    Update notedirectorywatcher

 src/addins/notedirectorywatcher/notedirectorywatcher.desktop.in.in | 2 +-
 .../notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp  | 7 ++++---
 .../notedirectorywatcher/notedirectorywatcherpreferences.cpp       | 7 ++++---
 3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcher.desktop.in.in 
b/src/addins/notedirectorywatcher/notedirectorywatcher.desktop.in.in
index d304fe49..6a621f63 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcher.desktop.in.in
+++ b/src/addins/notedirectorywatcher/notedirectorywatcher.desktop.in.in
@@ -4,7 +4,7 @@ _Name=Note Directory Watcher
 _Description=Watch your Gnote note directory for changes to your notes.
 _Authors=Aurimas Černius and Tomboy original authors
 Category=Tools
-Version=0.3
+Version=0.4
 DefaultEnabled=false
 Module=libnotedirectorywatcher
 LibgnoteRelease=@LIBGNOTE_RELEASE@
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp 
b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
index 9778cde1..5754c3e0 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012-2014,2017 Aurimas Cernius
+ * Copyright (C) 2012-2014,2017,2019 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
 #include <glibmm/regex.h>
 
 #include "debug.hpp"
+#include "ignote.hpp"
 #include "notedirectorywatcherapplicationaddin.hpp"
 #include "notedirectorywatcherpreferencesfactory.hpp"
 #include "notemanager.hpp"
@@ -61,7 +62,7 @@ void NoteDirectoryWatcherApplicationAddin::initialize()
   m_signal_changed_cid = m_file_system_watcher->signal_changed()
     .connect(sigc::mem_fun(*this, &NoteDirectoryWatcherApplicationAddin::handle_file_system_change_event));
 
-  Glib::RefPtr<Gio::Settings> settings = 
gnote::Preferences::obj().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER);
+  Glib::RefPtr<Gio::Settings> settings = 
gnote::IGnote::obj().preferences().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER);
   m_check_interval = settings->get_int(CHECK_INTERVAL);
   sanitize_check_interval(settings);
   m_signal_settings_changed_cid = settings->signal_changed()
@@ -295,7 +296,7 @@ Glib::ustring NoteDirectoryWatcherApplicationAddin::make_uri(const Glib::ustring
 void NoteDirectoryWatcherApplicationAddin::on_settings_changed(const Glib::ustring & key)
 {
   if(key == CHECK_INTERVAL) {
-    Glib::RefPtr<Gio::Settings> settings = 
gnote::Preferences::obj().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER);
+    Glib::RefPtr<Gio::Settings> settings = 
gnote::IGnote::obj().preferences().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER);
     m_check_interval = settings->get_int(key);
     sanitize_check_interval(settings);
   }
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherpreferences.cpp 
b/src/addins/notedirectorywatcher/notedirectorywatcherpreferences.cpp
index 85e53ba1..8433ef28 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherpreferences.cpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherpreferences.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2014 Aurimas Cernius
+ * Copyright (C) 2014,2019 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
 
 #include <glibmm/i18n.h>
 
+#include "ignote.hpp"
 #include "notedirectorywatcherpreferences.hpp"
 #include "preferences.hpp"
 
@@ -39,13 +40,13 @@ NoteDirectoryWatcherPreferences::NoteDirectoryWatcherPreferences(gnote::NoteMana
   m_check_interval.signal_value_changed()
     .connect(sigc::mem_fun(*this, &NoteDirectoryWatcherPreferences::on_interval_changed));
   m_check_interval.set_value(
-    gnote::Preferences::obj().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER)->get_int(CHECK_INTERVAL));
+    
gnote::IGnote::obj().preferences().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER)->get_int(CHECK_INTERVAL));
   attach(m_check_interval, 1, 0, 1, 1);
 }
 
 void NoteDirectoryWatcherPreferences::on_interval_changed()
 {
-  gnote::Preferences::obj().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER)->set_int(
+  gnote::IGnote::obj().preferences().get_schema_settings(SCHEMA_NOTE_DIRECTORY_WATCHER)->set_int(
     CHECK_INTERVAL, m_check_interval.get_value_as_int());
 }
 


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