[Libreoffice-commits] core.git: vcl/unx

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


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

New commits:
commit 78f2eaafbcf595c5789531f4cf0b91586255bd94
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 5 09:44:23 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 5 15:20:15 2020 +0200

    tdf#137250 fire changed on typeahead in combobox without menu active
    
    Change-Id: If296b303ad98d945840f39ebab27a019ac881932
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103950
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 4282f17d5415..c16099ad7432 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -14131,7 +14131,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)
@@ -14151,7 +14151,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;
@@ -14167,7 +14167,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;
@@ -14182,7 +14182,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;
@@ -14329,12 +14329,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
@@ -14364,7 +14364,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)
@@ -14525,7 +14525,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();
 
@@ -14541,6 +14541,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
@@ -14923,7 +14926,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