summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-04-10 07:01:35 -0700
committerStefano Karapetsas <[email protected]>2013-04-10 07:01:35 -0700
commitecaa2ae13be51532247ffab3d7eed29f9357c9f9 (patch)
tree6fd1e7f246712588df021862bf795ada2e2ab8e6
parenta7bc9b989b256591a5567eb287d6e0816f4e412e (diff)
parent255c76e8c9d0c2226df1e66e7463cdcd54aa7f8e (diff)
downloadlibmateweather-ecaa2ae13be51532247ffab3d7eed29f9357c9f9.tar.bz2
libmateweather-ecaa2ae13be51532247ffab3d7eed29f9357c9f9.tar.xz
Merge pull request #8 from muesli4/master
Making the notification in libmateweather an optional feature
-rw-r--r--libmateweather/mateweather-prefs.c2
-rw-r--r--libmateweather/mateweather-prefs.h1
-rw-r--r--libmateweather/org.mate.weather.gschema.xml.in.in5
3 files changed, 8 insertions, 0 deletions
diff --git a/libmateweather/mateweather-prefs.c b/libmateweather/mateweather-prefs.c
index 3795d7a..84ac379 100644
--- a/libmateweather/mateweather-prefs.c
+++ b/libmateweather/mateweather-prefs.c
@@ -52,6 +52,8 @@ mateweather_prefs_load (MateWeatherPrefs *prefs, GSettings *settings)
g_free (radar);
g_free (coordinates);
+ prefs->show_notifications =
+ g_settings_get_boolean (settings, "show-notifications");
prefs->update_interval =
g_settings_get_int (settings, "auto-update-interval");
prefs->update_interval = MAX (prefs->update_interval, 60);
diff --git a/libmateweather/mateweather-prefs.h b/libmateweather/mateweather-prefs.h
index bb5924c..c7a3743 100644
--- a/libmateweather/mateweather-prefs.h
+++ b/libmateweather/mateweather-prefs.h
@@ -38,6 +38,7 @@ typedef struct _MateWeatherPrefs MateWeatherPrefs;
struct _MateWeatherPrefs {
WeatherLocation *location;
+ gboolean show_notifications;
gint update_interval; /* in seconds */
gboolean update_enabled;
gboolean detailed;
diff --git a/libmateweather/org.mate.weather.gschema.xml.in.in b/libmateweather/org.mate.weather.gschema.xml.in.in
index c78ece4..2289b38 100644
--- a/libmateweather/org.mate.weather.gschema.xml.in.in
+++ b/libmateweather/org.mate.weather.gschema.xml.in.in
@@ -33,6 +33,11 @@
<value nick="miles" value="4"/>
</enum>
<schema id="org.mate.weather">
+ <key name="show-notifications" type="b">
+ <default>false</default>
+ <_summary>Show notifications</_summary>
+ <_description>Determines whether the applet shows a notification on each update.</_description>
+ </key>
<key name="auto-update" type="b">
<default>true</default>
<_summary>Update the data automatically</_summary>