don't customize dialog buttons if GTK version is too old
gtk_dialog_get_widget_for_response was introduced in GTK 2.20 Task-number: QTBUG-30610 Change-Id: I30510f132c1d81c5d44863b3efddbc5e50771362 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This commit is contained in:
parent
124da0f5e6
commit
542e3be40d
@ -430,6 +430,7 @@ void QGtk2FileDialogHelper::applyOptions()
|
||||
if (!initialNameFilter.isEmpty())
|
||||
selectNameFilter(initialNameFilter);
|
||||
|
||||
#if GTK_CHECK_VERSION(2, 20, 0)
|
||||
GtkWidget *acceptButton = gtk_dialog_get_widget_for_response(gtkDialog, GTK_RESPONSE_OK);
|
||||
if (acceptButton) {
|
||||
if (opts->isLabelExplicitlySet(QFileDialogOptions::Accept))
|
||||
@ -447,6 +448,7 @@ void QGtk2FileDialogHelper::applyOptions()
|
||||
else
|
||||
gtk_button_set_label(GTK_BUTTON(rejectButton), GTK_STOCK_CANCEL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void QGtk2FileDialogHelper::setNameFilters(const QStringList &filters)
|
||||
|
Loading…
Reference in New Issue
Block a user