Title: [213772] trunk/Source/WebKit2
- Revision
- 213772
- Author
- [email protected]
- Date
- 2017-03-12 13:19:04 -0700 (Sun, 12 Mar 2017)
Log Message
[GTK] File choosers should run as modal by default if possible
https://bugs.webkit.org/show_bug.cgi?id=169526
Patch by Adrian Perez de Castro <[email protected]> on 2017-03-12
Reviewed by Michael Catanzaro.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunFileChooser): If a top-level window containing the web view is found, call
gtk_native_dialog_set_modal() to configure the dialog accordingly.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (213771 => 213772)
--- trunk/Source/WebKit2/ChangeLog 2017-03-12 18:47:35 UTC (rev 213771)
+++ trunk/Source/WebKit2/ChangeLog 2017-03-12 20:19:04 UTC (rev 213772)
@@ -1,3 +1,14 @@
+2017-03-12 Adrian Perez de Castro <[email protected]>
+
+ [GTK] File choosers should run as modal by default if possible
+ https://bugs.webkit.org/show_bug.cgi?id=169526
+
+ Reviewed by Michael Catanzaro.
+
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (webkitWebViewRunFileChooser): If a top-level window containing the web view is found, call
+ gtk_native_dialog_set_modal() to configure the dialog accordingly.
+
2017-03-12 Dan Bernstein <[email protected]>
[iOS] Some more -respondsToSelector: checks are unnecessary
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (213771 => 213772)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp 2017-03-12 18:47:35 UTC (rev 213771)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp 2017-03-12 20:19:04 UTC (rev 213772)
@@ -567,6 +567,8 @@
#if GTK_CHECK_VERSION(3, 20, 0)
GtkFileChooserNative* dialog = gtk_file_chooser_native_new(allowsMultipleSelection ? _("Select Files") : _("Select File"),
toplevel ? GTK_WINDOW(toplevel) : nullptr, GTK_FILE_CHOOSER_ACTION_OPEN, nullptr, nullptr);
+ if (toplevel)
+ gtk_native_dialog_set_modal(dialog, TRUE);
#else
GtkWidget* dialog = gtk_file_chooser_dialog_new(allowsMultipleSelection ? _("Select Files") : _("Select File"),
toplevel ? GTK_WINDOW(toplevel) : 0,
@@ -574,6 +576,8 @@
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
+ if (toplevel)
+ gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
#endif
if (GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes