summaryrefslogtreecommitdiff
path: root/netspeed
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-01-04 02:42:46 +0100
committerRobert Antoni Buj Gelonch <[email protected]>2021-01-06 19:23:35 +0100
commit9cd9c97faf065067c0c2a32695fa7123b9330a1a (patch)
treea0a00d2a5c8f035e34e829bd3698982d7ac088b3 /netspeed
parentf15e91bf0f71f3bef81a1b4095efd75984dba629 (diff)
downloadmate-applets-9cd9c97faf065067c0c2a32695fa7123b9330a1a.tar.bz2
mate-applets-9cd9c97faf065067c0c2a32695fa7123b9330a1a.tar.xz
netspeed-preferences: disconnect a signal handler on finalize
Diffstat (limited to 'netspeed')
-rw-r--r--netspeed/src/netspeed-preferences.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/netspeed/src/netspeed-preferences.c b/netspeed/src/netspeed-preferences.c
index 7ed05a3b..ac2d78b9 100644
--- a/netspeed/src/netspeed-preferences.c
+++ b/netspeed/src/netspeed-preferences.c
@@ -55,12 +55,6 @@ netspeed_preferences_init (NetspeedPreferences *preferences)
}
static void
-netspeed_preferences_finalize (GObject *object)
-{
- G_OBJECT_CLASS (netspeed_preferences_parent_class)->finalize (object);
-}
-
-static void
netspeed_preferences_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -151,6 +145,16 @@ on_network_device_combo_changed (GtkComboBox *combo,
}
static void
+netspeed_preferences_finalize (GObject *object)
+{
+ NetspeedPreferences *self = NETSPEED_PREFERENCES (object);
+ g_signal_handlers_disconnect_by_func (self->network_device_combo,
+ on_network_device_combo_changed,
+ self);
+ G_OBJECT_CLASS (netspeed_preferences_parent_class)->finalize (object);
+}
+
+static void
netspeed_preferences_class_init (NetspeedPreferencesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);