vcl/unx/gtk3/gtkinst.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit d60489cca78c91d24cf0ac7fd82e1bcccdc8d1da
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Sep 16 11:39:49 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Sep 16 13:41:46 2021 +0200

    find_menu_button only needed for gtk3
    
    Change-Id: I3eeb7dea4ff36b8c969aec210161c1729ab9b372
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122189
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index bdf14df96d98..c3bdb8a197f5 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10779,6 +10779,7 @@ private:
     std::map<OString, GtkWidget*> m_aMap;
     std::map<OString, std::unique_ptr<GtkInstanceMenuButton>> m_aMenuButtonMap;
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
     // at the time of writing there is no gtk_menu_tool_button_set_popover 
available
     // though there will be in the future
     // 
https://gitlab.gnome.org/GNOME/gtk/commit/03e30431a8af9a947a0c4ccab545f24da16bfe17?w=1
@@ -10789,10 +10790,8 @@ private:
             GtkWidget **ppToggleButton = static_cast<GtkWidget**>(user_data);
             *ppToggleButton = pWidget;
         }
-#if !GTK_CHECK_VERSION(4, 0, 0)
         else if (GTK_IS_CONTAINER(pWidget))
             gtk_container_forall(GTK_CONTAINER(pWidget), find_menu_button, 
user_data);
-#endif
     }
 
     static void find_menupeer_button(GtkWidget *pWidget, gpointer user_data)
@@ -10802,11 +10801,10 @@ private:
             GtkWidget **ppButton = static_cast<GtkWidget**>(user_data);
             *ppButton = pWidget;
         }
-#if !GTK_CHECK_VERSION(4, 0, 0)
         else if (GTK_IS_CONTAINER(pWidget))
             gtk_container_forall(GTK_CONTAINER(pWidget), find_menupeer_button, 
user_data);
-#endif
     }
+#endif
 
     static void collect(GtkWidget* pItem, gpointer widget)
     {

Reply via email to