From 12159f4dc144db34b6d785abd5f70cdbe9ec85d4 Mon Sep 17 00:00:00 2001 From: Sir Walrus Date: Mon, 6 Jan 2025 13:37:32 +0100 Subject: [PATCH] Don't pass button labels, the default is open/save/cancel anyways, allows the portals to translate the labels I guess --- flips-gtk.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/flips-gtk.cpp b/flips-gtk.cpp index 024b160..35855c8 100644 --- a/flips-gtk.cpp +++ b/flips-gtk.cpp @@ -209,14 +209,12 @@ static char * SelectRom(const char * defaultname, const char * title, bool isFor GtkFileChooserNative* dialog; if (!isForSaving) { - dialog = gtk_file_chooser_native_new(title, GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_OPEN, - "_Open", "_Cancel"); + dialog = gtk_file_chooser_native_new(title, GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_OPEN, NULL, NULL); setoutpath(GTK_FILE_CHOOSER(dialog), defaultname, false); } else { - dialog = gtk_file_chooser_native_new(title, GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_SAVE, - "_Save", "_Cancel"); + dialog = gtk_file_chooser_native_new(title, GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_SAVE, NULL, NULL); setoutpath(GTK_FILE_CHOOSER(dialog), defaultname, true); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), true); } @@ -263,8 +261,8 @@ static char * SelectRom(const char * defaultname, const char * title, bool isFor //returns path if demandLocal, else URI static GSList * SelectPatches(bool allowMulti, bool demandLocal) { - GtkFileChooserNative* dialog=gtk_file_chooser_native_new(allowMulti?"Select Patches to Use":"Select Patch to Use", GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_OPEN, - "_Open", "_Cancel"); + const char * title = allowMulti ? "Select Patches to Use" : "Select Patch to Use"; + GtkFileChooserNative* dialog=gtk_file_chooser_native_new(title, GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_OPEN, NULL, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), allowMulti); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(dialog), demandLocal);