From 32953ecd2e50799c34f7e5f2794f2b1f1a6a13ef Mon Sep 17 00:00:00 2001 From: muesli4 Date: Wed, 10 Apr 2013 10:50:30 +0200 Subject: Addded support for the show-notifications GSchema entry, which means that it only displays notifications when true and a toggle button in the preferences which resembles the current state. --- mateweather/mateweather-applet.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mateweather/mateweather-applet.c') diff --git a/mateweather/mateweather-applet.c b/mateweather/mateweather-applet.c index fdb9879e..7743ed05 100644 --- a/mateweather/mateweather-applet.c +++ b/mateweather/mateweather-applet.c @@ -312,6 +312,7 @@ void mateweather_applet_create (MateWeatherApplet *gw_applet) AtkObject *atk_obj; gw_applet->mateweather_pref.location = NULL; + gw_applet->mateweather_pref.show_notifications = FALSE; gw_applet->mateweather_pref.update_interval = 1800; gw_applet->mateweather_pref.update_enabled = TRUE; gw_applet->mateweather_pref.detailed = FALSE; @@ -442,6 +443,8 @@ update_finish (WeatherInfo *info, gpointer data) place_widgets(gw_applet); #ifdef HAVE_LIBNOTIFY + if (gw_applet->mateweather_pref.show_notifications) + { NotifyNotification *n; /* Show notifications if possible */ @@ -479,6 +482,7 @@ update_finish (WeatherInfo *info, gpointer data) g_free (message); g_free (detail); } + } #endif } else -- cgit v1.2.1