[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 5 15:12:56 UTC 2020


 vcl/unx/gtk3/gtk3gtkinst.cxx |   21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 0d7884362410104414e7d4e6c08ac9700b76c0d1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 5 09:44:23 2020 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Mon Oct 5 17:12:14 2020 +0200

    tdf#137250 fire changed on typeahead in combobox without menu active
    
    Change-Id: If296b303ad98d945840f39ebab27a019ac881932
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103968
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index caafbff7f538..70238157e74f 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -13232,7 +13232,7 @@ private:
                     while (nActive < nCount && separator_function(nActive))
                         ++nActive;
                     if (nActive < nCount)
-                        set_active_including_mru(nActive);
+                        set_active_including_mru(nActive, true);
                     bDone = true;
                 }
                 else if (nKeyMod == KEY_MOD2 && !m_bPopupActive)
@@ -13252,7 +13252,7 @@ private:
                     while (nActive >= nStartBound && separator_function(nActive))
                         --nActive;
                     if (nActive >= nStartBound)
-                        set_active_including_mru(nActive);
+                        set_active_including_mru(nActive, true);
                     bDone = true;
                 }
                 break;
@@ -13268,7 +13268,7 @@ private:
                     while (nActive < nCount && separator_function(nActive))
                         ++nActive;
                     if (nActive < nCount)
-                        set_active_including_mru(nActive);
+                        set_active_including_mru(nActive, true);
                     bDone = true;
                 }
                 break;
@@ -13283,7 +13283,7 @@ private:
                     while (nActive >= nStartBound && separator_function(nActive))
                         --nActive;
                     if (nActive >= nStartBound)
-                        set_active_including_mru(nActive);
+                        set_active_including_mru(nActive, true);
                     bDone = true;
                 }
                 break;
@@ -13430,12 +13430,12 @@ private:
             return get_active_including_mru();
     }
 
-    void set_selected_entry(int nSelect)
+    void set_typeahead_selected_entry(int nSelect)
     {
         if (m_bPopupActive)
             tree_view_set_cursor(nSelect);
         else
-            set_active_including_mru(nSelect);
+            set_active_including_mru(nSelect, true);
     }
 
     virtual vcl::StringEntryIdentifier CurrentEntry(OUString& out_entryText) const override
@@ -13465,7 +13465,7 @@ private:
         if (nSelect >= nCount)
             nSelect = nCount ? nCount-1 : -1;
 
-        set_selected_entry(nSelect);
+        set_typeahead_selected_entry(nSelect);
     }
 
     static void signalGrabBroken(GtkWidget*, GdkEventGrabBroken *pEvent, gpointer widget)
@@ -13626,7 +13626,7 @@ private:
         return tree_view_get_cursor();
     }
 
-    void set_active_including_mru(int pos)
+    void set_active_including_mru(int pos, bool bInteractive)
     {
         disable_notify_events();
 
@@ -13642,6 +13642,9 @@ private:
 
         m_bChangedByMenu = false;
         enable_notify_events();
+
+        if (bInteractive && !m_bPopupActive && !m_pEntry)
+            signal_changed();
     }
 
     int find_text_including_mru(const OUString& rStr, bool bSearchMRU) const
@@ -14024,7 +14027,7 @@ public:
     {
         if (m_nMRUCount && pos != -1)
             pos += (m_nMRUCount + 1);
-        set_active_including_mru(pos);
+        set_active_including_mru(pos, false);
     }
 
     virtual OUString get_active_text() const override


More information about the Libreoffice-commits mailing list