@techee commented on this pull request.


> -     gtk_dialog_set_default_response(GTK_DIALOG(dialog), 
> GTK_RESPONSE_ACCEPT);
-
-       gtk_widget_set_size_request(dialog, -1, 460);
-       gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
-       gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE);
-       gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE);
-       gtk_window_set_type_hint(GTK_WINDOW(dialog), 
GDK_WINDOW_TYPE_HINT_DIALOG);
-       gtk_window_set_transient_for(GTK_WINDOW(dialog), 
GTK_WINDOW(main_widgets.window));
-       gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE);
-       gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(dialog), FALSE);
-
-       /* add checkboxes and filename entry */
-       gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dialog), 
add_file_open_extra_widget(dialog));
+       if (interface_prefs.use_native_windows_dialogs)
+               dialog = GTK_FILE_CHOOSER(gtk_file_chooser_native_new(_("Open 
File"),
+                       GTK_WINDOW(main_widgets.window), 
GTK_FILE_CHOOSER_ACTION_OPEN, _("_Open"), _("_Cancel")));

Just tested and it works both on macOS and Windows and also picks the correct 
localization.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#discussion_r1632104691
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3861/review/[email protected]>

Reply via email to