[Libreoffice-commits] core.git: 2 commits - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 9 18:58:54 UTC 2021
vcl/unx/gtk3/gtkinst.cxx | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
New commits:
commit e875df09fc230639455a7084919bacd81c18c61e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 9 16:35:02 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 9 20:58:35 2021 +0200
gtk4: use m_bPopupActive rather than repeatedly call toggle_button_get_active
Change-Id: Ia6b2df875da5af6bfb2198df503d59f34a762262
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118697
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 47be0fd7ed25..1ee5072aed7f 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17482,7 +17482,7 @@ private:
void fire_signal_changed()
{
m_bUserSelectEntry = true;
- m_bChangedByMenu = toggle_button_get_active();
+ m_bChangedByMenu = m_bPopupActive;
signal_changed();
m_bChangedByMenu = false;
}
@@ -17545,7 +17545,7 @@ private:
void menu_toggled()
{
- if (!toggle_button_get_active())
+ if (!m_bPopupActive)
{
#if 0
if (m_bHoverSelection)
@@ -17584,12 +17584,13 @@ private:
{
m_aQuickSelectionEngine.Reset();
+ bool bOldPopupActive = m_bPopupActive;
+ m_bPopupActive = toggle_button_get_active();
+
menu_toggled();
- bool bIsShown = toggle_button_get_active();
- if (m_bPopupActive != bIsShown)
+ if (bOldPopupActive != m_bPopupActive)
{
- m_bPopupActive = bIsShown;
ComboBox::signal_popup_toggled();
// restore focus to the GtkEntry when the popup is gone, which
// is what the vcl case does, to ease the transition a little,
commit 8c9588cceaad5a9155c8d22a44a2e7dc54a56aa0
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 9 16:26:12 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 9 20:58:20 2021 +0200
gtk[3|4] rename toggle_menu -> menu_toggled
Change-Id: Ieee73ae5ccfe625e2aedb9c44521e1c9222be6d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118696
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index cd61f4e683d2..47be0fd7ed25 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -9496,12 +9496,12 @@ private:
{
GtkInstanceMenuButton* pThis = static_cast<GtkInstanceMenuButton*>(widget);
SolarMutexGuard aGuard;
- pThis->toggle_menu();
+ pThis->menu_toggled();
}
#endif
#if !GTK_CHECK_VERSION(4, 0, 0)
- void toggle_menu()
+ void menu_toggled()
{
if (!m_pMenuHack)
return;
@@ -17543,7 +17543,7 @@ private:
return g_value_get_boolean(&value);
}
- void toggle_menu()
+ void menu_toggled()
{
if (!toggle_button_get_active())
{
@@ -17584,7 +17584,7 @@ private:
{
m_aQuickSelectionEngine.Reset();
- toggle_menu();
+ menu_toggled();
bool bIsShown = toggle_button_get_active();
if (m_bPopupActive != bIsShown)
@@ -19268,7 +19268,7 @@ private:
return nHeight;
}
- void toggle_menu()
+ void menu_toggled()
{
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_pToggleButton)))
{
@@ -19328,7 +19328,7 @@ private:
{
m_aQuickSelectionEngine.Reset();
- toggle_menu();
+ menu_toggled();
bool bIsShown = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_pToggleButton));
if (m_bPopupActive != bIsShown)
More information about the Libreoffice-commits
mailing list