diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-01-16 16:42:36 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-01-16 16:42:36 -0600 |
commit | 78d0a231c12c159d1130ec080efab472f59851af (patch) | |
tree | dba583d436241c1ef9ea18014cb6d3284ff314d5 /include | |
parent | bcff13b6bce18604472e5954eb5ab7af4bb43b0f (diff) | |
download | ayatana-indicator-datetime-78d0a231c12c159d1130ec080efab472f59851af.tar.gz ayatana-indicator-datetime-78d0a231c12c159d1130ec080efab472f59851af.tar.bz2 ayatana-indicator-datetime-78d0a231c12c159d1130ec080efab472f59851af.zip |
update DesktopFormatter class to use the "Settings" class instead of using GSettings directly.
Diffstat (limited to 'include')
-rw-r--r-- | include/datetime/formatter.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/datetime/formatter.h b/include/datetime/formatter.h index 09ed035..d8736c7 100644 --- a/include/datetime/formatter.h +++ b/include/datetime/formatter.h @@ -23,8 +23,14 @@ #include <core/property.h> #include <core/signal.h> +#include <datetime/clock.h> +#include <datetime/settings.h> + #include <glib.h> +#include <string> +#include <memory> + namespace unity { namespace indicator { namespace datetime { @@ -109,13 +115,16 @@ private: class DesktopFormatter: public Formatter { public: - DesktopFormatter(const std::shared_ptr<Clock>&); - ~DesktopFormatter(); + DesktopFormatter(const std::shared_ptr<Clock>&, const std::shared_ptr<Settings>&); private: - class Impl; - friend Impl; - std::unique_ptr<Impl> p; + std::shared_ptr<Settings> m_settings; + + void rebuildHeaderFormat(); + const gchar* getFullTimeFormatString() const; + std::string getHeaderLabelFormatString() const; + const gchar* getDateFormat(bool show_day, bool show_date, bool show_year) const; + }; |