[gnote] Ditch file monitor from gnote sync client (causes random crashes and does seem to be of any use



commit 863dad3924941935ff4f3332cfbaae4772cd314e
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Mar 9 23:08:06 2020 +0200

    Ditch file monitor from gnote sync client (causes random crashes and does seem to be of any use

 src/synchronization/gnotesyncclient.cpp | 13 -------------
 src/synchronization/gnotesyncclient.hpp |  3 ---
 2 files changed, 16 deletions(-)
---
diff --git a/src/synchronization/gnotesyncclient.cpp b/src/synchronization/gnotesyncclient.cpp
index 9929d73f..f48e6f21 100644
--- a/src/synchronization/gnotesyncclient.cpp
+++ b/src/synchronization/gnotesyncclient.cpp
@@ -55,12 +55,6 @@ namespace sync {
   {
     m_local_manifest_file_path = Glib::build_filename(IGnote::conf_dir(), LOCAL_MANIFEST_FILE_NAME);
     Glib::RefPtr<Gio::File> manifest = Gio::File::create_for_path(m_local_manifest_file_path);
-    if(manifest) {
-      m_file_watcher = manifest->monitor_file();
-      m_file_watcher->signal_changed()
-        .connect(sigc::mem_fun(*this, &GnoteSyncClient::on_changed));
-    }
-
     parse(m_local_manifest_file_path);
 
     manager.signal_note_deleted
@@ -77,13 +71,6 @@ namespace sync {
   }
 
 
-  void GnoteSyncClient::on_changed(const Glib::RefPtr<Gio::File>&, const Glib::RefPtr<Gio::File>&,
-                                   Gio::FileMonitorEvent)
-  {
-    parse(m_local_manifest_file_path);
-  }
-
-
   void GnoteSyncClient::read_updated_note_atts(sharp::XmlReader & reader)
   {
     Glib::ustring guid, rev;
diff --git a/src/synchronization/gnotesyncclient.hpp b/src/synchronization/gnotesyncclient.hpp
index 35d836b8..081bc803 100644
--- a/src/synchronization/gnotesyncclient.hpp
+++ b/src/synchronization/gnotesyncclient.hpp
@@ -65,14 +65,11 @@ namespace sync {
     static const char *LOCAL_MANIFEST_FILE_NAME;
 
     void note_deleted_handler(const NoteBase::Ptr &);
-    void on_changed(const Glib::RefPtr<Gio::File>&, const Glib::RefPtr<Gio::File>&,
-                    Gio::FileMonitorEvent);
     void write(const Glib::ustring & manifest_path);
     void read_updated_note_atts(sharp::XmlReader & reader);
     void read_deleted_note_atts(sharp::XmlReader & reader);
     void read_notes(sharp::XmlReader & reader, void (GnoteSyncClient::*read_note_atts)(sharp::XmlReader&));
 
-    Glib::RefPtr<Gio::FileMonitor> m_file_watcher;
     Glib::DateTime m_last_sync_date;
     int m_last_sync_rev;
     Glib::ustring m_server_id;


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