summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-26 15:27:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-26 15:27:28 +0100
commitce07affe888db8d32315b18c851f860a270631ba (patch)
tree2200ff4a5baf92ff75e22b9054dc524fc19d27f0 /vcl
parent976add10b35e482251ed4c75957baeb6811e6e2c (diff)
gtk3: fpicker, try removing both locations
Change-Id: I0f10d03c1e4481e8efa765e52b5264071c86a3cf
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx29
1 files changed, 15 insertions, 14 deletions
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 6512434b5bb6..9936f8cecc71 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -419,29 +419,30 @@ shrinkFilterName( const OUString &rFilterName, bool bAllowNoStar = false )
}
static void
+dialog_remove_buttons(GtkWidget *pActionArea)
+{
+ GList *pChildren =
+ gtk_container_get_children( GTK_CONTAINER( pActionArea ) );
+
+ for( GList *p = pChildren; p; p = p->next )
+ gtk_widget_destroy( GTK_WIDGET( p->data ) );
+
+ g_list_free( pChildren );
+}
+
+static void
dialog_remove_buttons( GtkDialog *pDialog )
{
g_return_if_fail( GTK_IS_DIALOG( pDialog ) );
- GtkWidget *pActionArea;
-
#if GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(3,12,0)
- pActionArea = gtk_dialog_get_header_bar(pDialog);
-#else
- pActionArea = gtk_dialog_get_action_area(pDialog);
+ dialog_remove_buttons(gtk_dialog_get_header_bar(pDialog));
#endif
+ dialog_remove_buttons(gtk_dialog_get_action_area(pDialog));
#else
- pActionArea = pDialog->action_area;
+ dialog_remove_buttons(pDialog->action_area);
#endif
-
- GList *pChildren =
- gtk_container_get_children( GTK_CONTAINER( pActionArea ) );
-
- for( GList *p = pChildren; p; p = p->next )
- gtk_widget_destroy( GTK_WIDGET( p->data ) );
-
- g_list_free( pChildren );
}
namespace {