diff --git a/shell/browser/ui/gtk_util.cc b/shell/browser/ui/gtk_util.cc index 2c9e3992d1df1..b6fdb2f1ce282 100644 --- a/shell/browser/ui/gtk_util.cc +++ b/shell/browser/ui/gtk_util.cc @@ -8,6 +8,8 @@ #include #include +#include + #include "base/no_destructor.h" #include "base/strings/string_number_conversions.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -37,6 +39,13 @@ const char* GetCancelLabel() { return cancel; } +const char* GetSaveLabel() { + if (!gtk::GtkCheckVersion(4)) + return "gtk-save"; // In GTK3, this is GTK_STOCK_SAVE. + static const char* save = GtkGettext("_Save"); + return save; +} + const char* GetOkLabel() { if (!gtk::GtkCheckVersion(4)) return "gtk-ok"; // In GTK3, this is GTK_STOCK_OK. diff --git a/shell/browser/ui/gtk_util.h b/shell/browser/ui/gtk_util.h index de2e2ed66e6f3..40467444edf09 100644 --- a/shell/browser/ui/gtk_util.h +++ b/shell/browser/ui/gtk_util.h @@ -15,6 +15,7 @@ const char* GettextPackage(); const char* GtkGettext(const char* str); const char* GetCancelLabel(); +const char* GetSaveLabel(); const char* GetOkLabel(); const char* GetNoLabel(); const char* GetYesLabel();