[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 28 14:25:24 UTC 2019
vcl/unx/gtk3/gtk3gtkinst.cxx | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit e019441cb0507fd533fe7114c6a1ea17e2c10aa6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 25 14:45:45 2019 +0000
Commit: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Thu Mar 28 15:24:58 2019 +0100
Resolves: tdf#124234 page leave signal missing on move to overflow deck
we were emitting page-entered but not emitting the page-leave signal
Change-Id: I64131631016331cf102d08244982148ac8c3c69c
Reviewed-on: https://gerrit.libreoffice.org/69686
Tested-by: Jenkins
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 95f6ccfa4c48..622ce023a8bd 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3131,6 +3131,11 @@ private:
return;
}
+ // check if we are allowed leave before attempting to resplit the notebooks
+ bool bAllow = !m_aLeavePageHdl.IsSet() || m_aLeavePageHdl.Call(get_current_page_ident());
+ if (!bAllow)
+ return;
+
disable_notify_events();
// take the overflow pages, and put them back at the end of the normal one
@@ -3140,11 +3145,13 @@ private:
std::swap(m_nStartTabCount, m_nEndTabCount);
split_notebooks();
+ gtk_notebook_set_current_page(m_pNotebook, nNewPage);
+
enable_notify_events();
- // we want to call this outside enable_notify_events so that the main
- // notebook switch-page callback is triggered
- gtk_notebook_set_current_page(m_pNotebook, nNewPage);
+ // trigger main notebook switch-page callback
+ OString sNewIdent(get_page_ident(m_pNotebook, nNewPage));
+ m_aEnterPageHdl.Call(sNewIdent);
}
static OString get_page_ident(GtkNotebook *pNotebook, guint nPage)
More information about the Libreoffice-commits
mailing list