summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-21 14:33:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-21 21:43:34 +0100
commit678980ceaebd47916a4aafb448a3bfcfd5d3ca25 (patch)
tree2d0e382322407b414ba63a25d92866201317765d /vcl/unx
parent625f341d4c1e7e1043702687a55a972f55cb8ebb (diff)
add get_widget_for_response support
Change-Id: I49abb5e6621dbfe2fc92ef9c2a47568c62c372c2 Reviewed-on: https://gerrit.libreoffice.org/51709 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx10
1 files changed, 10 insertions, 0 deletions
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: