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@ubuntu.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index caafbff..7023815 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