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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 20 08:57:41 UTC 2019


 include/codemaker/exceptiontree.hxx |    8 ++++----
 vcl/unx/gtk3/gtk3gtkinst.cxx        |   16 +++++++++++++++-
 2 files changed, 19 insertions(+), 5 deletions(-)

New commits:
commit dee81fb2e1df5091702b3c8b0e4a3f2b58e89291
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Dec 19 19:32:27 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Dec 20 09:56:24 2019 +0100

    Make it clear that the comment talks about class data members
    
    ...and revert 0fdb73c9e05374ddba50ae6ab823d7a979a40702 "Fix grammar"
    
    Change-Id: I212f874f0ae74c97f35f372092b85a9ed5587faa
    Reviewed-on: https://gerrit.libreoffice.org/85540
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/codemaker/exceptiontree.hxx b/include/codemaker/exceptiontree.hxx
index e0e86dd822f1..eec504a396e7 100644
--- a/include/codemaker/exceptiontree.hxx
+++ b/include/codemaker/exceptiontree.hxx
@@ -70,11 +70,11 @@ private:
    subtypes that are hidden by supertypes are pruned from the hierarchy).  The
    exception com.sun.star.uno.RuntimeException and its subtypes are pruned
    completely from the hierarchy.  Each node of the hierarchy is represented by
-   an instance of ExceptionTreeNode, where name gives the name of the UNO
-   exception type, present is true iff the given exception type is a member of
-   the set S, and children contains all the relevant direct subtypes of the
+   an instance of ExceptionTreeNode, where `name` gives the name of the UNO
+   exception type, `present` is true iff the given exception type is a member of
+   the set S, and `children` contains all the relevant direct subtypes of the
    given exception type, in no particular order (for nodes other than the root
-   node it holds that children are non-empty iff present is false).
+   node it holds that `children` is non-empty iff `present` is false).
  */
 class ExceptionTree {
 public:
commit 2a5d4ed38df988077bcec62da331a7958ce0aaf3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Dec 19 10:50:40 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Dec 20 09:56:10 2019 +0100

    Resolves: tdf#129484 install decimal key handler for all widgets again
    
    reparent notebook back to its original parent so its not destroyed
    when the overflow parent is destroyed
    
    and
    
    add g_object_ref/g_object_unref guard to GtkInstanceWidget
    
    Change-Id: I85d691c05e82531e398736258668e024c4aa1e64
    Reviewed-on: https://gerrit.libreoffice.org/85508
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 260bc605cf7e..d8d3e09c6640 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2182,6 +2182,10 @@ public:
         , m_nDragDropReceivedSignalId(0)
         , m_nDragLeaveSignalId(0)
     {
+        if (!bTakeOwnership)
+            g_object_ref(m_pWidget);
+
+        localizeDecimalSeparator();
     }
 
     virtual void connect_key_press(const Link<const KeyEvent&, bool>& rLink) override
@@ -2771,6 +2775,8 @@ public:
 
         if (m_bTakeOwnership)
             gtk_widget_destroy(m_pWidget);
+        else
+            g_object_unref(m_pWidget);
     }
 
     virtual void disable_notify_events()
@@ -6083,7 +6089,16 @@ public:
         g_signal_handler_disconnect(m_pOverFlowNotebook, m_nOverFlowSwitchPageSignalId);
         gtk_widget_destroy(GTK_WIDGET(m_pOverFlowNotebook));
         if (m_pOverFlowBox)
+        {
+            // put it back to how we found it initially
+            GtkWidget* pParent = gtk_widget_get_parent(GTK_WIDGET(m_pOverFlowBox));
+            g_object_ref(m_pNotebook);
+            gtk_container_remove(GTK_CONTAINER(m_pOverFlowBox), GTK_WIDGET(m_pNotebook));
+            gtk_container_add(GTK_CONTAINER(pParent), GTK_WIDGET(m_pNotebook));
+            g_object_unref(m_pNotebook);
+
             gtk_widget_destroy(GTK_WIDGET(m_pOverFlowBox));
+        }
     }
 };
 
@@ -10512,7 +10527,6 @@ public:
         , m_bBlockOutput(false)
         , m_bBlank(false)
     {
-        localizeDecimalSeparator();
     }
 
     virtual int get_value() const override


More information about the Libreoffice-commits mailing list