summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-02 12:25:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-02 15:32:48 +0200
commit0993bb4af8cdd7b032cc924e1f36e592e185291f (patch)
tree51616f8b07543f24c611d65fae770ae9c2b73a3a
parent4b22d3ad90fbade4467337d8157abe19899618b3 (diff)
gtk4: remove unneeded ifdefs
get "Reset" in properties dialog working as expected again Change-Id: If21edc04f71aa805c6019b35cae65e240c1bca96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116587 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx10
1 files changed, 0 insertions, 10 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index ebf9aa1aff14..3b46332e54ed 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -8769,11 +8769,7 @@ weld::Button* GtkInstanceDialog::weld_widget_for_response(int nVclResponse)
GtkButton* pButton = get_widget_for_response(VclToGtk(nVclResponse));
if (!pButton)
return nullptr;
-#if !GTK_CHECK_VERSION(4, 0, 0)
return new GtkInstanceButton(pButton, m_pBuilder, false);
-#else
- return nullptr;
-#endif
}
void GtkInstanceDialog::response(int nResponse)
@@ -8782,12 +8778,10 @@ void GtkInstanceDialog::response(int nResponse)
//unblock this response now when activated through code
if (GtkButton* pWidget = get_widget_for_response(nGtkResponse))
{
-#if !GTK_CHECK_VERSION(4, 0, 0)
void* pData = g_object_get_data(G_OBJECT(pWidget), "g-lo-GtkInstanceButton");
GtkInstanceButton* pButton = static_cast<GtkInstanceButton*>(pData);
if (pButton)
pButton->clear_click_handler();
-#endif
}
if (GTK_IS_DIALOG(m_pDialog))
gtk_dialog_response(GTK_DIALOG(m_pDialog), nGtkResponse);
@@ -8812,9 +8806,7 @@ void GtkInstanceDialog::close(bool bCloseSignal)
g_signal_stop_emission_by_name(m_pDialog, "close");
// make esc (bCloseSignal == true) or window-delete (bCloseSignal == false)
// act as if cancel button was pressed
-#if !GTK_CHECK_VERSION(4, 0, 0)
pClickHandler->clicked();
-#endif
return;
}
response(RET_CANCEL);
@@ -8827,12 +8819,10 @@ GtkInstanceButton* GtkInstanceDialog::has_click_handler(int nResponse)
nResponse = VclToGtk(GtkToVcl(nResponse));
if (GtkButton* pWidget = get_widget_for_response(nResponse))
{
-#if !GTK_CHECK_VERSION(4, 0, 0)
void* pData = g_object_get_data(G_OBJECT(pWidget), "g-lo-GtkInstanceButton");
pButton = static_cast<GtkInstanceButton*>(pData);
if (pButton && !pButton->has_click_handler())
pButton = nullptr;
-#endif
}
return pButton;
}