- Stop crashing when GTK3 GUI is enabled.

- Always use gtk_dialog_get_action_area().  It was available since GTK 2.14.

PR:		203563
This commit is contained in:
Jung-uk Kim 2017-02-08 18:44:55 +00:00
parent 05b122ad1e
commit 35f99ea1a0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=433663
2 changed files with 29 additions and 1 deletions

View file

@ -2,7 +2,7 @@
.include "${.CURDIR}/Makefile.common"
PORTREVISION= 2
PORTREVISION= 3
MASTER_SITES= http://download.documentfoundation.org/libreoffice/src/${PORTVERSION}/ \
http://dev-www.libreoffice.org/src/:src \
http://dev-www.libreoffice.org/extern/:ext

View file

@ -0,0 +1,28 @@
--- vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx.orig 2017-01-12 00:54:33 UTC
+++ vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -418,8 +418,11 @@ shrinkFilterName( const OUString &rFilte
static void
dialog_remove_buttons(GtkWidget *pActionArea)
{
- GList *pChildren =
- gtk_container_get_children( GTK_CONTAINER( pActionArea ) );
+ GtkContainer *pContainer = GTK_CONTAINER( pActionArea );
+
+ g_return_if_fail( pContainer != nullptr );
+
+ GList *pChildren = gtk_container_get_children( pContainer );
for( GList *p = pChildren; p; p = p->next )
{
@@ -436,10 +439,10 @@ dialog_remove_buttons( GtkDialog *pDialo
{
g_return_if_fail( GTK_IS_DIALOG( pDialog ) );
-#if GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(3,12,0)
dialog_remove_buttons(gtk_dialog_get_header_bar(pDialog));
#endif
+#if GTK_CHECK_VERSION(2,14,0)
dialog_remove_buttons(gtk_dialog_get_action_area(pDialog));
#else
dialog_remove_buttons(pDialog->action_area);