vcl/unx/gtk3/gtkinst.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit da5d11f0cb45d0f3655d84cd191508d0f93e57fc
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Jul 24 09:12:36 2023 +0200
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jul 24 11:22:05 2023 +0200

    Fix gtk4 build (set_item_help_id)
    
    After
    
        commit 65c91bd5aa6f9b68390739a0e027d23c8a32da08
        Date:   Fri Jul 21 14:47:47 2023 +0200
    
            tdf#147911 Implement set_item_help_id for context menu items
    
    , my `--enable-gtk4` build failed like this:
    
        In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                         from /usr/include/glib-2.0/gobject/gbinding.h:31,
                         from /usr/include/glib-2.0/glib-object.h:24,
                         from /usr/include/gtk-4.0/gtk/css/gtkcssenumtypes.h:11,
                         from /usr/include/gtk-4.0/gtk/css/gtkcss.h:34,
                         from /usr/include/gtk-4.0/gtk/gtk.h:30,
                         from .../libreoffice/vcl/unx/gtk4/convert3to4.hxx:11,
                         from .../libreoffice/vcl/unx/gtk4/gtkinst.cxx:13:
        .../libreoffice/vcl/unx/gtk4/../gtk3/gtkinst.cxx: In member function 
‘virtual void {anonymous}::GtkInstanceMenu::set_item_help_id(const 
rtl::OUString&, const rtl::OUString&)’:
        .../libreoffice/vcl/unx/gtk4/../gtk3/gtkinst.cxx:11670:34: error: 
‘m_aMap’ was not declared in this scope
        11670 |         ::set_help_id(GTK_WIDGET(m_aMap[rIdent]), rHelpId);
              |                                  ^~~~~~
        make[1]: *** [.../libreoffice/solenv/gbuild/LinkTarget.mk:337: 
/home/michi/development/git/libreoffice/workdir/CxxObject/vcl/unx/gtk4/gtkinst.o]
 Error 1
        make: *** [Makefile:289: build] Error 2
    
    This doesn't yet implement actually setting the help ID for gtk4,
    just fixes the build for now.
    
    Change-Id: I82dc997b998dbbc15e6fde3d6d80ec1944d2662c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154834
    Tested-by: Jenkins
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 1e56851000c0..19aebdcc18fe 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -11667,7 +11667,12 @@ public:
 
     virtual void set_item_help_id(const OUString& rIdent, const OUString& 
rHelpId) override
     {
+#if !GTK_CHECK_VERSION(4, 0, 0)
         ::set_help_id(GTK_WIDGET(m_aMap[rIdent]), rHelpId);
+#else
+        (void)rIdent;
+        (void)rHelpId;
+#endif
     }
 
     void remove(const OUString& rIdent) override

Reply via email to