Allow using labels with mnemonics for buttons in GtkAssertDialog

This commit is contained in:
Artur Wieczorek
2017-12-17 00:31:40 +01:00
parent 5ffae1c936
commit eba33c837f

View File

@@ -13,6 +13,8 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "wx/gtk/assertdlg_gtk.h" #include "wx/gtk/assertdlg_gtk.h"
#include "wx/gtk/private/gtk2-compat.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/translation.h"
#include "wx/stockitem.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), dialog = gtk_file_chooser_dialog_new ("Save assert info to file", GTK_WINDOW(dlg),
GTK_FILE_CHOOSER_ACTION_SAVE, GTK_FILE_CHOOSER_ACTION_SAVE,
static_cast<const char*>(wxGetStockLabel(wxID_CANCEL, wxSTOCK_NOFLAGS).utf8_str()), GTK_RESPONSE_CANCEL, static_cast<const char*>(wxGTK_CONV(wxConvertMnemonicsToGTK(wxGetStockLabel(wxID_CANCEL)))), GTK_RESPONSE_CANCEL,
static_cast<const char*>(wxGetStockLabel(wxID_SAVE, wxSTOCK_NOFLAGS).utf8_str()), GTK_RESPONSE_ACCEPT, static_cast<const char*>(wxGTK_CONV(wxConvertMnemonicsToGTK(wxGetStockLabel(wxID_SAVE)))), GTK_RESPONSE_ACCEPT,
NULL); NULL);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)