From eba33c837f686f79db8b5bdf6e7bd779a9cedd01 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 17 Dec 2017 00:31:40 +0100 Subject: [PATCH] Allow using labels with mnemonics for buttons in GtkAssertDialog --- src/gtk/assertdlg_gtk.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gtk/assertdlg_gtk.cpp b/src/gtk/assertdlg_gtk.cpp index a5bc010d78..ffe6a1353c 100644 --- a/src/gtk/assertdlg_gtk.cpp +++ b/src/gtk/assertdlg_gtk.cpp @@ -13,6 +13,8 @@ #include #include "wx/gtk/assertdlg_gtk.h" #include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private.h" +#include "wx/gtk/private/mnemonics.h" #include "wx/translation.h" #include "wx/stockitem.h" @@ -175,8 +177,8 @@ static void gtk_assert_dialog_save_backtrace_callback(GtkWidget*, GtkAssertDialo dialog = gtk_file_chooser_dialog_new ("Save assert info to file", GTK_WINDOW(dlg), GTK_FILE_CHOOSER_ACTION_SAVE, - static_cast(wxGetStockLabel(wxID_CANCEL, wxSTOCK_NOFLAGS).utf8_str()), GTK_RESPONSE_CANCEL, - static_cast(wxGetStockLabel(wxID_SAVE, wxSTOCK_NOFLAGS).utf8_str()), GTK_RESPONSE_ACCEPT, + static_cast(wxGTK_CONV(wxConvertMnemonicsToGTK(wxGetStockLabel(wxID_CANCEL)))), GTK_RESPONSE_CANCEL, + static_cast(wxGTK_CONV(wxConvertMnemonicsToGTK(wxGetStockLabel(wxID_SAVE)))), GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)