Blob Blame History Raw
From c1b97d2747004d1912744ab7ff11353a73713310 Mon Sep 17 00:00:00 2001
From: Maxim Monastirsky <momonasmon@gmail.com>
Date: Sat, 17 Oct 2015 23:42:15 +0300
Subject: [PATCH] tdf#94936 Update the button removal hack to 3.18

Gtk 3.18 has the filename entry in the header too.

Change-Id: Id1abf5baf0e82c03e27ede2bfc67ec1983a2c4fb
---
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index ac9f8d1..4f35390 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -425,7 +425,11 @@ dialog_remove_buttons(GtkWidget *pActionArea)
         gtk_container_get_children( GTK_CONTAINER( pActionArea ) );
 
     for( GList *p = pChildren; p; p = p->next )
-        gtk_widget_destroy( GTK_WIDGET( p->data ) );
+    {
+        GtkWidget *pWidget = GTK_WIDGET( p->data );
+        if ( GTK_IS_BUTTON( pWidget ) )
+            gtk_widget_destroy( pWidget );
+    }
 
     g_list_free( pChildren );
 }
-- 
2.5.0