From a3da855cddff3c3c71311af6ce3e7629a459024d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sat, 22 Jul 2017 23:18:26 +0200 Subject: Add application config for GUI QT5 stored in .config/org.the_jk/tp.Monitor.conf on Linux GTK stored in dconf --- src/gui_config.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/gui_config.cc (limited to 'src/gui_config.cc') diff --git a/src/gui_config.cc b/src/gui_config.cc new file mode 100644 index 0000000..5fa5506 --- /dev/null +++ b/src/gui_config.cc @@ -0,0 +1,32 @@ +// -*- mode: c++; c-basic-offset: 2; -*- + +#include "common.hh" + +#include "gui_config.hh" + +#include + +bool GuiConfig::load_name(std::string const& UNUSED(name)) { + return false; +} + +bool GuiConfig::load_file(std::string const& UNUSED(filename)) { + return false; +} + +bool GuiConfig::get(std::string const& key, bool fallback) { + auto ret = static_cast(this)->get(key, nullptr); + if (!ret) return fallback; + return strcmp(ret, "true") == 0; +} + +bool GuiConfig::good() const { + return true; +} + +std::string const& GuiConfig::last_error() const { + return EMPTY; +} + +// static +std::string const GuiConfig::EMPTY; -- cgit v1.2.3-70-g09d2