diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-05 14:45:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-05 21:27:11 +0100 |
commit | a266d1c7a95d7133e95915d29786f79d240d5406 (patch) | |
tree | 3745ead6b10ae010f476506c47e6435cd56e5159 | |
parent | 3e8d1e80d81999d2c5e160b756491a847226d423 (diff) |
fix mnemonic in add_button
Change-Id: Icdf4866aab70e065e92c56931289ea7b8db1ff09
Reviewed-on: https://gerrit.libreoffice.org/50777
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index c5eca37b025b..5ce282bd5362 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1479,6 +1479,11 @@ namespace } } +static OString MapToGtkAccelerator(const OUString &rStr) +{ + return OUStringToOString(rStr.replaceFirst("~", "_"), RTL_TEXTENCODING_UTF8); +} + class GtkInstanceDialog : public GtkInstanceWindow, public virtual weld::Dialog { private: @@ -1550,7 +1555,7 @@ public: virtual void add_button(const OUString& rText, int nResponse) override { - gtk_dialog_add_button(m_pDialog, OUStringToOString(rText, RTL_TEXTENCODING_UTF8).getStr(), VclToGtk(nResponse)); + gtk_dialog_add_button(m_pDialog, MapToGtkAccelerator(rText).getStr(), VclToGtk(nResponse)); } virtual void set_default_response(int nResponse) override @@ -1609,11 +1614,6 @@ public: } }; -static OString MapToGtkAccelerator(const OUString &rStr) -{ - return OUStringToOString(rStr.replaceFirst("~", "_"), RTL_TEXTENCODING_UTF8); -} - class GtkInstanceFrame : public GtkInstanceContainer, public virtual weld::Frame { private: |