Kaydet (Commit) fbd90698 authored tarafından Caolán McNamara's avatar Caolán McNamara

gtk3: fpicker, try removing both locations

Change-Id: I0f10d03c1e4481e8efa765e52b5264071c86a3cf
(cherry picked from commit ce07affe)
üst dbba5f02
...@@ -418,30 +418,31 @@ shrinkFilterName( const OUString &rFilterName, bool bAllowNoStar = false ) ...@@ -418,30 +418,31 @@ shrinkFilterName( const OUString &rFilterName, bool bAllowNoStar = false )
return aRealName; return aRealName;
} }
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 static void
dialog_remove_buttons( GtkDialog *pDialog ) dialog_remove_buttons( GtkDialog *pDialog )
{ {
g_return_if_fail( GTK_IS_DIALOG( pDialog ) ); g_return_if_fail( GTK_IS_DIALOG( pDialog ) );
GtkWidget *pActionArea;
#if GTK_CHECK_VERSION(3,0,0) #if GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(3,12,0) #if GTK_CHECK_VERSION(3,12,0)
pActionArea = gtk_dialog_get_header_bar(pDialog); dialog_remove_buttons(gtk_dialog_get_header_bar(pDialog));
#else
pActionArea = gtk_dialog_get_action_area(pDialog);
#endif #endif
dialog_remove_buttons(gtk_dialog_get_action_area(pDialog));
#else #else
pActionArea = pDialog->action_area; dialog_remove_buttons(pDialog->action_area);
#endif #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 { namespace {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment