aboutsummaryrefslogtreecommitdiff
path: root/include/datetime/locations-settings.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-16 16:44:06 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-16 16:44:06 -0600
commit9c81a4d60d06b1f33001602cd0cde9844c9233a6 (patch)
treec51fc804711036346fb207498650e51cb9eabf40 /include/datetime/locations-settings.h
parent78d0a231c12c159d1130ec080efab472f59851af (diff)
downloadayatana-indicator-datetime-9c81a4d60d06b1f33001602cd0cde9844c9233a6.tar.gz
ayatana-indicator-datetime-9c81a4d60d06b1f33001602cd0cde9844c9233a6.tar.bz2
ayatana-indicator-datetime-9c81a4d60d06b1f33001602cd0cde9844c9233a6.zip
update SettingsLocations class to use the "Settings" class instead of using GSettings directly.
Diffstat (limited to 'include/datetime/locations-settings.h')
-rw-r--r--include/datetime/locations-settings.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/datetime/locations-settings.h b/include/datetime/locations-settings.h
index eaabf73..4072736 100644
--- a/include/datetime/locations-settings.h
+++ b/include/datetime/locations-settings.h
@@ -22,18 +22,15 @@
#include <datetime/locations.h> // base class
-#include <glib.h>
-#include <gio/gio.h>
+#include <datetime/settings.h>
+#include <datetime/timezones.h>
namespace unity {
namespace indicator {
namespace datetime {
-class Timezones;
-
/**
- * \brief Settings implentation which builds its list from the
- * user's GSettings and from the Timezones passed in the ctor.
+ * \brief #Locations implementation which builds its list from the #Settings.
*/
class SettingsLocations: public Locations
{
@@ -42,15 +39,12 @@ public:
* @param[in] schemaId the settings schema to load
* @param[in] timezones the timezones to always show first in the list
*/
- SettingsLocations (const std::string& schemaId,
+ SettingsLocations (const std::shared_ptr<Settings>& settings,
const std::shared_ptr<Timezones>& timezones);
-protected:
- std::unique_ptr<GSettings,std::function<void(GSettings*)>> m_settings;
- std::shared_ptr<Timezones> m_timezones;
-
private:
- static void onSettingsChanged (gpointer gself);
+ std::shared_ptr<Settings> m_settings;
+ std::shared_ptr<Timezones> m_timezones;
void reload();
};