summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-19 10:50:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-20 09:56:10 +0100
commit2a5d4ed38df988077bcec62da331a7958ce0aaf3 (patch)
tree0a2d5e21a157843ec203f18b5e934714286a1f9e /vcl/unx/gtk3
parente59bbb72b1145e4865742c5f03d9372a177b9df9 (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx16
1 files changed, 15 insertions, 1 deletions
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