diff options
author | muesli4 <[email protected]> | 2013-04-10 09:04:50 +0200 |
---|---|---|
committer | muesli4 <[email protected]> | 2013-04-10 09:04:50 +0200 |
commit | 255c76e8c9d0c2226df1e66e7463cdcd54aa7f8e (patch) | |
tree | 6fd1e7f246712588df021862bf795ada2e2ab8e6 | |
parent | a7bc9b989b256591a5567eb287d6e0816f4e412e (diff) | |
download | libmateweather-255c76e8c9d0c2226df1e66e7463cdcd54aa7f8e.tar.bz2 libmateweather-255c76e8c9d0c2226df1e66e7463cdcd54aa7f8e.tar.xz |
Added "show-notifications" boolean to GSchema and to the MateWeatherPrefs struct.
-rw-r--r-- | libmateweather/mateweather-prefs.c | 2 | ||||
-rw-r--r-- | libmateweather/mateweather-prefs.h | 1 | ||||
-rw-r--r-- | libmateweather/org.mate.weather.gschema.xml.in.in | 5 |
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> |