[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 2 13:33:40 UTC 2021


 vcl/unx/gtk3/gtkinst.cxx |   10 ----------
 1 file changed, 10 deletions(-)

New commits:
commit 0993bb4af8cdd7b032cc924e1f36e592e185291f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jun 2 12:25:03 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jun 2 15:32:48 2021 +0200

    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 at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

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;
 }


More information about the Libreoffice-commits mailing list