Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Commit

Permalink
correctly refresh search result after transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
guinux committed Oct 14, 2017
1 parent 4816364 commit f6fa2c9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/manager_window.vala
Expand Up @@ -1251,6 +1251,22 @@ namespace Pamac {
set_pendings_operations ();
// pkgs are ordered by relevance so keep this
packages_list.set_sort_column_id (Gtk.TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, 0);
if (search_string != null) {
// select last search_string
bool found = false;
search_comboboxtext.get_model ().foreach ((model, path, iter) => {
string line;
model.get (iter, 0, out line);
if (line == search_string) {
found = true;
// we select the iter in search list
// it will populate the packages list with the comboboxtext changed signal
search_comboboxtext.set_active_iter (null);
search_comboboxtext.set_active_iter (iter);
}
return found;
});
}
break;
case "groups":
header_filter_label.set_markup ("<b>%s</b>".printf (dgettext (null, "Groups")));
Expand Down

0 comments on commit f6fa2c9

Please sign in to comment.