summaryrefslogtreecommitdiff
path: root/mateweather
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
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')
-rw-r--r--mateweather/mateweather-dialog.c8
-rw-r--r--mateweather/mateweather-pref.c26
2 files changed, 24 insertions, 10 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index b677094d..02ca824c 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -265,6 +265,10 @@ mateweather_dialog_set_property (GObject *object,
case PROP_MATEWEATHER_APPLET:
dialog->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;
}
}
@@ -282,6 +286,10 @@ mateweather_dialog_get_property (GObject *object,
case PROP_MATEWEATHER_APPLET:
g_value_set_pointer (value, dialog->applet);
break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
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;
}
}