[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara
caolanm at redhat.com
Fri Jun 26 07:27:56 PDT 2015
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
New commits:
commit ce07affe888db8d32315b18c851f860a270631ba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 26 15:27:02 2015 +0100
gtk3: fpicker, try removing both locations
Change-Id: I0f10d03c1e4481e8efa765e52b5264071c86a3cf
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 6512434..9936f8c 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 {
More information about the Libreoffice-commits
mailing list