From 78d0a231c12c159d1130ec080efab472f59851af Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 16 Jan 2014 16:42:36 -0600 Subject: update DesktopFormatter class to use the "Settings" class instead of using GSettings directly. --- include/datetime/formatter.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'include/datetime') 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 #include +#include +#include + #include +#include +#include + namespace unity { namespace indicator { namespace datetime { @@ -109,13 +115,16 @@ private: class DesktopFormatter: public Formatter { public: - DesktopFormatter(const std::shared_ptr&); - ~DesktopFormatter(); + DesktopFormatter(const std::shared_ptr&, const std::shared_ptr&); private: - class Impl; - friend Impl; - std::unique_ptr p; + std::shared_ptr 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; + }; -- cgit v1.2.3