[libhandy] preferences-window: Use GtkWidget type for box field



commit 1e6e2c94cdecfb8ea9d8c3209acb445c2a455128
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Dec 17 13:10:14 2020 +0500

    preferences-window: Use GtkWidget type for box field
    
    Avoid a cast.

 src/hdy-preferences-group.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-preferences-group.c b/src/hdy-preferences-group.c
index 15162d34..1e4edfb6 100644
--- a/src/hdy-preferences-group.c
+++ b/src/hdy-preferences-group.c
@@ -32,7 +32,7 @@
 
 typedef struct
 {
-  GtkBox *box;
+  GtkWidget *box;
   GtkLabel *description;
   GtkListBox *listbox;
   GtkBox *listbox_box;
@@ -217,7 +217,7 @@ hdy_preferences_group_remove (GtkContainer *container,
   HdyPreferencesGroup *self = HDY_PREFERENCES_GROUP (container);
   HdyPreferencesGroupPrivate *priv = hdy_preferences_group_get_instance_private (self);
 
-  if (child == GTK_WIDGET (priv->box))
+  if (child == priv->box)
     GTK_CONTAINER_CLASS (hdy_preferences_group_parent_class)->remove (container, child);
   else if (HDY_IS_PREFERENCES_ROW (child))
     gtk_container_remove (GTK_CONTAINER (priv->listbox), child);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]