From 678980ceaebd47916a4aafb448a3bfcfd5d3ca25 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 21 Mar 2018 14:33:59 +0000 Subject: add get_widget_for_response support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I49abb5e6621dbfe2fc92ef9c2a47568c62c372c2 Reviewed-on: https://gerrit.libreoffice.org/51709 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/unx/gtk3/gtk3gtkinst.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vcl/unx') diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 49581bb180e8..1c635bfec584 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1647,6 +1647,8 @@ public: gtk_dialog_set_default_response(m_pDialog, VclToGtk(nResponse)); } + virtual weld::Button* get_widget_for_response(int nResponse) override; + virtual ~GtkInstanceDialog() override { g_signal_handler_disconnect(m_pDialog, m_nCloseSignalId); @@ -1857,6 +1859,14 @@ public: } }; +weld::Button* GtkInstanceDialog::get_widget_for_response(int nResponse) +{ + GtkButton* pButton = GTK_BUTTON(gtk_dialog_get_widget_for_response(m_pDialog, nResponse)); + if (!pButton) + return nullptr; + return new GtkInstanceButton(pButton, false); +} + class GtkInstanceToggleButton : public GtkInstanceButton, public virtual weld::ToggleButton { private: -- cgit