[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx

Caolán McNamara caolanm at redhat.com
Tue May 29 19:49:06 UTC 2018


 vcl/unx/gtk3/gtk3gtkinst.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 9773f6140e9c990f6f7e4ea366580cb94bd1539c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 29 11:26:07 2018 +0100

    only get notified for user events, not api ones
    
    Change-Id: I4cbede587ed4de7950fd7ca435902baa26c8faf5
    Reviewed-on: https://gerrit.libreoffice.org/55014
    Tested-by: Jenkins <ci at libreoffice.org>
    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 28ef5090b1fd..e956f4a3c93b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2514,9 +2514,23 @@ public:
         return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
     }
 
+    virtual void disable_notify_events() override
+    {
+        g_signal_handler_block(m_pNotebook, m_nSignalId);
+        GtkInstanceContainer::disable_notify_events();
+    }
+
+    virtual void enable_notify_events() override
+    {
+        GtkInstanceContainer::enable_notify_events();
+        g_signal_handler_unblock(m_pNotebook, m_nSignalId);
+    }
+
     virtual void remove_page(const OString& rIdent) override
     {
+        disable_notify_events();
         gtk_notebook_remove_page(m_pNotebook, get_page_number(rIdent));
+        enable_notify_events();
     }
 
     virtual ~GtkInstanceNotebook() override


More information about the Libreoffice-commits mailing list