shell: avoid activating panel from an empty search

Avoid activating a panel when doing an empty search
i.e. clicking ENTER without having entered
any text in the search entry.

We should do nothing in this case, we fixed it by
detecting for this case when an activation happens
when there's still no search results view in place.

Closes #2119
This commit is contained in:
Nelson Benítez León 2023-05-16 13:11:00 +01:00
parent 2cf57ffb10
commit e95669d94d

View file

@ -526,6 +526,9 @@ search_entry_activate_cb (CcWindow *self)
{
gboolean changed;
if (cc_panel_list_get_view (self->panel_list) != CC_PANEL_LIST_SEARCH)
return;
changed = cc_panel_list_activate (self->panel_list);
gtk_search_bar_set_search_mode (self->search_bar, !changed);