GTK3/4: GTK_STOCK_CANCEL deprecated, use labels

GTK+3 deprecates GTK_STOCK_CANCEL and GTK_STOCK_SAVE etc. and GTK+4
removes them entirely. The API documentation recommends using the
strings "Cancel" and "Save" instead, use them (or the appropriate
translation.)
This commit is contained in:
Rafael Kitover
2017-12-12 04:46:29 -08:00
committed by paulcor
parent 1879293932
commit c09e27cfb4

View File

@@ -13,6 +13,7 @@
#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/translation.h"
#include <stdio.h> #include <stdio.h>
@@ -155,8 +156,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,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, static_cast<const char*>(wxGetTranslation("Cancel").utf8_str()), GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, static_cast<const char*>(wxGetTranslation("Save").utf8_str()), 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)