summaryrefslogtreecommitdiff
path: root/mateweather/mateweather-pref.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-08-07 15:43:55 +0200
committerraveit65 <[email protected]>2020-09-03 11:08:35 +0200
commit1fc3cf73ca2e390bdb0ede31390139bde33b26cf (patch)
tree5fe44b402c72f363854625daeebf107f6202d9de /mateweather/mateweather-pref.c
parenta65252d41f6af0b88101fb389fbe5439a99921ac (diff)
downloadmate-applets-1fc3cf73ca2e390bdb0ede31390139bde33b26cf.tar.bz2
mate-applets-1fc3cf73ca2e390bdb0ede31390139bde33b26cf.tar.xz
mateweather: Warn about accessing an undefined property of object
Diffstat (limited to 'mateweather/mateweather-pref.c')
-rw-r--r--mateweather/mateweather-pref.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/mateweather/mateweather-pref.c b/mateweather/mateweather-pref.c
index c7f54f81..ac41e149 100644
--- a/mateweather/mateweather-pref.c
+++ b/mateweather/mateweather-pref.c
@@ -1156,11 +1156,14 @@ static void mateweather_pref_set_property(GObject* object, guint prop_id, const
{
MateWeatherPref* pref = MATEWEATHER_PREF(object);
- switch (prop_id)
- {
- case PROP_MATEWEATHER_APPLET:
- pref->priv->applet = g_value_get_pointer(value);
- break;
+ switch (prop_id) {
+ case PROP_MATEWEATHER_APPLET:
+ pref->priv->applet = g_value_get_pointer(value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -1169,11 +1172,14 @@ static void mateweather_pref_get_property(GObject* object, guint prop_id, GValue
{
MateWeatherPref* pref = MATEWEATHER_PREF(object);
- switch (prop_id)
- {
- case PROP_MATEWEATHER_APPLET:
- g_value_set_pointer(value, pref->priv->applet);
- break;
+ switch (prop_id) {
+ case PROP_MATEWEATHER_APPLET:
+ g_value_set_pointer(value, pref->priv->applet);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}