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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 2 18:22:40 UTC 2019


 vcl/unx/gtk3/gtk3gloactiongroup.cxx |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 21c00be1677638fc18e30425658ac7c1a6fe541c
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Oct 2 13:28:27 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Oct 2 20:21:31 2019 +0200

    Reinstate "Use G_ADD_PRIVATE and *_get_instance_private"
    
    (efc1d001821747dc72140aeb3e0f0b48b1eed005), which had erroneously been dropped
    by 1ae450504cf57457f9702684b1517fda1dd3c481 "drop gtk2 support"
    
    Change-Id: I73b9ecdb1ee4fe45ee3ba25a3f93d9b26908d58b
    Reviewed-on: https://gerrit.libreoffice.org/80027
    Reviewed-by: Arkadiy Illarionov <qarkai at gmail.com>
    Tested-by: Jenkins

diff --git a/vcl/unx/gtk3/gtk3gloactiongroup.cxx b/vcl/unx/gtk3/gtk3gloactiongroup.cxx
index 19b412faec38..87f99fca9f11 100644
--- a/vcl/unx/gtk3/gtk3gloactiongroup.cxx
+++ b/vcl/unx/gtk3/gtk3gloactiongroup.cxx
@@ -110,6 +110,7 @@ static void g_lo_action_group_iface_init (GActionGroupInterface *);
 #endif
 G_DEFINE_TYPE_WITH_CODE (GLOActionGroup,
     g_lo_action_group, G_TYPE_OBJECT,
+    G_ADD_PRIVATE(GLOActionGroup)
     G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP,
                            g_lo_action_group_iface_init));
 #ifdef __GNUC__
@@ -312,9 +313,7 @@ static void
 g_lo_action_group_init (GLOActionGroup *group)
 {
     SAL_INFO("vcl.unity", "g_lo_action_group_init on " << group);
-    group->priv = G_TYPE_INSTANCE_GET_PRIVATE (group,
-                                                 G_TYPE_LO_ACTION_GROUP,
-                                                 GLOActionGroupPrivate);
+    group->priv = static_cast<GLOActionGroupPrivate *>(g_lo_action_group_get_instance_private (group));
     group->priv->table = g_hash_table_new_full (g_str_hash, g_str_equal,
                                                   g_free, g_object_unref);
 }
@@ -325,14 +324,6 @@ g_lo_action_group_class_init (GLOActionGroupClass *klass)
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
     object_class->finalize = g_lo_action_group_finalize;
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-    g_type_class_add_private (klass, sizeof (GLOActionGroupPrivate));
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
 }
 
 static void


More information about the Libreoffice-commits mailing list