summaryrefslogtreecommitdiff
path: root/src/nautilus-floating-bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nautilus-floating-bar.c')
-rw-r--r--src/nautilus-floating-bar.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nautilus-floating-bar.c b/src/nautilus-floating-bar.c
index 29b58c029..48995fc12 100644
--- a/src/nautilus-floating-bar.c
+++ b/src/nautilus-floating-bar.c
@@ -318,3 +318,29 @@ nautilus_floating_bar_add_action (NautilusFloatingBar *self,
g_signal_connect (button, "clicked",
G_CALLBACK (action_button_clicked_cb), self);
}
+
+void
+nautilus_floating_bar_cleanup_actions (NautilusFloatingBar *self)
+{
+ GtkWidget *box, *widget;
+ GList *children, *l;
+ gpointer data;
+
+ g_object_get (self,
+ "widget", &box,
+ NULL);
+
+ children = gtk_container_get_children (GTK_CONTAINER (box));
+ l = children;
+
+ while (l != NULL) {
+ widget = l->data;
+ data = g_object_get_data (G_OBJECT (widget), "action-id");
+ l = l->next;
+
+ if (data != NULL) {
+ /* destroy this */
+ gtk_widget_destroy (widget);
+ }
+ }
+}