[gtk/wip/baedert/for-master: 49/62] scalebutton: Shorten finalize() implementation
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 49/62] scalebutton: Shorten finalize() implementation
- Date: Sat, 2 May 2020 05:45:20 +0000 (UTC)
commit 91ee73098712c01bc942770aa5fb3fb27da3fcb0
Author: Timm Bäder <mail baedert org>
Date: Mon Apr 27 11:56:55 2020 +0200
scalebutton: Shorten finalize() implementation
gtk/gtkscalebutton.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 4029279bf8b..930b026406f 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -512,20 +512,9 @@ gtk_scale_button_finalize (GObject *object)
GtkScaleButton *button = GTK_SCALE_BUTTON (object);
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
- if (priv->icon_list)
- {
- g_strfreev (priv->icon_list);
- priv->icon_list = NULL;
- }
-
- if (priv->adjustment)
- {
- g_object_unref (priv->adjustment);
- priv->adjustment = NULL;
- }
-
- if (priv->autoscroll_timeout)
- g_source_remove (priv->autoscroll_timeout);
+ g_clear_pointer (&priv->icon_list, g_strfreev);
+ g_clear_object (&priv->adjustment);
+ g_clear_handle_id (&priv->autoscroll_timeout, g_source_remove);
G_OBJECT_CLASS (gtk_scale_button_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]