diff options
author | Jonas Heinrich | 2017-11-28 22:19:37 +0100 |
---|---|---|
committer | Jonas Heinrich | 2017-11-28 22:19:37 +0100 |
commit | be249aa85007b8d48a4eab7dfe38e2404f70034c (patch) | |
tree | 56dc099158b510b348ec5f734434eea8a2f74f90 /gtk3-warnings.patch | |
download | aur-electron-wayland.tar.gz |
first commit
Diffstat (limited to 'gtk3-warnings.patch')
-rw-r--r-- | gtk3-warnings.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gtk3-warnings.patch b/gtk3-warnings.patch new file mode 100644 index 000000000000..073688d4eaca --- /dev/null +++ b/gtk3-warnings.patch @@ -0,0 +1,65 @@ +--- a/atom/browser/ui/file_dialog_gtk.cc ++++ b/atom/browser/ui/file_dialog_gtk.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by the MIT license that can be + // found in the LICENSE file. + ++#include <glib/gi18n.h> ++ + #include "atom/browser/ui/file_dialog.h" + + #include "atom/browser/native_window_views.h" +@@ -39,20 +41,20 @@ class FileChooserDialog { + const DialogSettings& settings) + : parent_(static_cast<atom::NativeWindowViews*>(settings.parent_window)), + filters_(settings.filters) { +- const char* confirm_text = GTK_STOCK_OK; ++ const char* confirm_text = _("_OK"); + + if (!settings.button_label.empty()) + confirm_text = settings.button_label.c_str(); + else if (action == GTK_FILE_CHOOSER_ACTION_SAVE) +- confirm_text = GTK_STOCK_SAVE; ++ confirm_text = _("_Save"); + else if (action == GTK_FILE_CHOOSER_ACTION_OPEN) +- confirm_text = GTK_STOCK_OPEN; ++ confirm_text = _("_Open"); + + dialog_ = gtk_file_chooser_dialog_new( + settings.title.c_str(), + NULL, + action, +- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, ++ _("_Cancel"), GTK_RESPONSE_CANCEL, + confirm_text, GTK_RESPONSE_ACCEPT, + NULL); + if (parent_) { +--- a/atom/browser/ui/message_box_gtk.cc ++++ b/atom/browser/ui/message_box_gtk.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by the MIT license that can be + // found in the LICENSE file. + ++#include <glib/gi18n.h> ++ + #include "atom/browser/ui/message_box.h" + + #include "atom/browser/browser.h" +@@ -126,13 +128,13 @@ class GtkMessageBox { + const char* TranslateToStock(int id, const std::string& text) { + std::string lower = base::ToLowerASCII(text); + if (lower == "cancel") +- return GTK_STOCK_CANCEL; ++ return _("_Cancel"); + else if (lower == "no") +- return GTK_STOCK_NO; ++ return _("_No"); + else if (lower == "ok") +- return GTK_STOCK_OK; ++ return _("_OK"); + else if (lower == "yes") +- return GTK_STOCK_YES; ++ return _("_Yes"); + else + return text.c_str(); + } |