[gnote] Add methods for getting/setting fuse settings



commit c563c73a111d36f5abbf7758db89f5da255ac4d2
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Dec 13 19:05:34 2020 +0200

    Add methods for getting/setting fuse settings

 src/preferences.cpp | 41 +++++++++++++++++++++++++++++++++++++++++
 src/preferences.hpp | 10 ++++++++++
 2 files changed, 51 insertions(+)
---
diff --git a/src/preferences.cpp b/src/preferences.cpp
index 75b28bec..91542458 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -81,6 +81,7 @@ namespace gnote {
     m_schemas[SCHEMA_GNOTE] = Gio::Settings::create(SCHEMA_GNOTE);
     m_schema_gnome_interface = Gio::Settings::create(SCHEMA_DESKTOP_GNOME_INTERFACE);
     m_schema_sync = Gio::Settings::create(SCHEMA_SYNC);
+    m_schema_sync_wdfs = Gio::Settings::create(SCHEMA_SYNC_WDFS);
 
     m_schema_gnome_interface->signal_changed(DESKTOP_GNOME_CLOCK_FORMAT).connect([this](const Glib::ustring 
&) {
       m_desktop_gnome_clock_format = m_schema_gnome_interface->get_string(DESKTOP_GNOME_CLOCK_FORMAT);
@@ -160,5 +161,45 @@ namespace gnote {
     m_schema_sync->set_int(SYNC_AUTOSYNC_TIMEOUT, value);
   }
 
+  int Preferences::sync_fuse_mount_timeout() const
+  {
+    return m_schema_sync_wdfs->get_int(SYNC_FUSE_MOUNT_TIMEOUT);
+  }
+
+  void Preferences::sync_fuse_mount_timeout(int value)
+  {
+    m_schema_sync_wdfs->set_int(SYNC_FUSE_MOUNT_TIMEOUT, value);
+  }
+
+  bool Preferences::sync_fuse_wdfs_accept_sllcert() const
+  {
+    return m_schema_sync_wdfs->get_boolean(SYNC_FUSE_WDFS_ACCEPT_SSLCERT);
+  }
+
+  void Preferences::sync_fuse_wdfs_accept_sllcert(bool value)
+  {
+    m_schema_sync_wdfs->set_boolean(SYNC_FUSE_WDFS_ACCEPT_SSLCERT, value);
+  }
+
+  Glib::ustring Preferences::sync_fuse_wdfs_url() const
+  {
+    return m_schema_sync_wdfs->get_string(SYNC_FUSE_WDFS_URL);
+  }
+
+  void Preferences::sync_fuse_wdfs_url(const Glib::ustring & value)
+  {
+    m_schema_sync_wdfs->set_string(SYNC_FUSE_WDFS_URL, value);
+  }
+
+  Glib::ustring Preferences::sync_fuse_wdfs_username() const
+  {
+    return m_schema_sync_wdfs->get_string(SYNC_FUSE_WDFS_USERNAME);
+  }
+
+  void Preferences::sync_fuse_wdfs_username(const Glib::ustring & value) const
+  {
+    m_schema_sync_wdfs->set_string(SYNC_FUSE_WDFS_USERNAME, value);
+  }
+
 }
 
diff --git a/src/preferences.hpp b/src/preferences.hpp
index d1236452..fa22f748 100644
--- a/src/preferences.hpp
+++ b/src/preferences.hpp
@@ -99,11 +99,21 @@ namespace gnote {
       }
     void sync_autosync_timeout(int value);
     sigc::signal<void> signal_sync_autosync_timeout_changed;
+
+    int sync_fuse_mount_timeout() const;
+    void sync_fuse_mount_timeout(int);
+    bool sync_fuse_wdfs_accept_sllcert() const;
+    void sync_fuse_wdfs_accept_sllcert(bool);
+    Glib::ustring sync_fuse_wdfs_url() const;
+    void sync_fuse_wdfs_url(const Glib::ustring &);
+    Glib::ustring sync_fuse_wdfs_username() const;
+    void sync_fuse_wdfs_username(const Glib::ustring &) const;
   private:
     Preferences(const Preferences &) = delete;
     std::map<Glib::ustring, Glib::RefPtr<Gio::Settings> > m_schemas;
     Glib::RefPtr<Gio::Settings> m_schema_gnome_interface;
     Glib::RefPtr<Gio::Settings> m_schema_sync;
+    Glib::RefPtr<Gio::Settings> m_schema_sync_wdfs;
 
     Glib::ustring m_desktop_gnome_clock_format;
     Glib::ustring m_desktop_gnome_font;


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