[gimp/gimp-2-10] app: use gimp_gtk_container_clear() in GimpDashboard



commit a2f1efc201aa90037b848041fe8b66de859c22f1
Author: Ell <ell_se yahoo com>
Date:   Thu Aug 30 23:40:15 2018 -0400

    app: use gimp_gtk_container_clear() in GimpDashboard
    
    ... instead of doing the same thing ourselves.

 app/widgets/gimpdashboard.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/app/widgets/gimpdashboard.c b/app/widgets/gimpdashboard.c
index bc9f4e3436..6627ef6ff9 100644
--- a/app/widgets/gimpdashboard.c
+++ b/app/widgets/gimpdashboard.c
@@ -352,9 +352,6 @@ static void       gimp_dashboard_sample_object                  (GimpDashboard
                                                                  GObject             *object,
                                                                  Variable             variable);
 
-static void       gimp_dashboard_container_remove               (GtkWidget           *widget,
-                                                                 GtkContainer        *container);
-
 static void       gimp_dashboard_group_menu_position            (GtkMenu             *menu,
                                                                  gint                *x,
                                                                  gint                *y,
@@ -2527,13 +2524,6 @@ gimp_dashboard_sample_object (GimpDashboard *dashboard,
     }
 }
 
-static void
-gimp_dashboard_container_remove (GtkWidget    *widget,
-                                 GtkContainer *container)
-{
-  gtk_container_remove (container, widget);
-}
-
 static void
 gimp_dashboard_group_menu_position (GtkMenu  *menu,
                                     gint     *x,
@@ -2605,9 +2595,7 @@ gimp_dashboard_update_group (GimpDashboard *dashboard,
         }
     }
 
-  gtk_container_foreach (GTK_CONTAINER (group_data->table),
-                         (GtkCallback) gimp_dashboard_container_remove,
-                         group_data->table);
+  gimp_gtk_container_clear (GTK_CONTAINER (group_data->table));
   gtk_table_resize (group_data->table, MAX (n_rows, 1), 3);
 
   n_rows        = 0;


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