Commit bf85b5b4 authored by guinux's avatar guinux

improve lists sorting

parent a7c1cc0d
......@@ -627,7 +627,6 @@ namespace Pamac {
var pkgs = new List<AlpmPackage> ();
new Thread<int> ("get_installed_pkgs", () => {
pkgs = initialise_pkgs (alpm_handle.localdb.pkgcache);
pkgs.sort (pkg_compare_name);
loop.quit ();
return 0;
});
......@@ -672,7 +671,6 @@ namespace Pamac {
pkgcache.next ();
}
pkgs = initialise_pkgs (alpm_pkgs);
pkgs.sort (pkg_compare_name);
loop.quit ();
return 0;
});
......@@ -704,7 +702,6 @@ namespace Pamac {
pkgcache.next ();
}
pkgs = initialise_pkgs (alpm_pkgs);
pkgs.sort (pkg_compare_name);
loop.quit ();
return 0;
});
......@@ -735,7 +732,6 @@ namespace Pamac {
pkgcache.next ();
}
pkgs = initialise_pkgs (alpm_pkgs);
pkgs.sort (pkg_compare_name);
loop.quit ();
return 0;
});
......@@ -1159,7 +1155,6 @@ namespace Pamac {
syncdbs.next ();
}
pkgs = initialise_pkgs (alpm_pkgs);
pkgs.sort (pkg_compare_name);
loop.quit ();
return 0;
});
......@@ -1190,6 +1185,7 @@ namespace Pamac {
}
syncdbs.next ();
}
groups_names.sort (strcmp);
return groups_names;
}
......
......@@ -807,12 +807,6 @@ namespace Pamac {
return row;
}
int sort_list_row (Gtk.ListBoxRow row1, Gtk.ListBoxRow row2) {
unowned Gtk.Label label1 = row1.get_child () as Gtk.Label;
unowned Gtk.Label label2 = row2.get_child () as Gtk.Label;
return strcmp (label1.label, label2.label);
}
void active_pending_stack (bool active) {
pending_listbox.visible = active;
}
......@@ -827,7 +821,6 @@ namespace Pamac {
foreach (unowned string group in database.get_groups_names ()) {
groups_listbox.add (create_list_row (group));
}
groups_listbox.set_sort_func (sort_list_row);
groups_listbox.select_row (groups_listbox.get_row_at_index (0));
installed_listbox.add (create_list_row (dgettext (null, "All")));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment