[gitg/wip/submodules] Manually sort status items
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/submodules] Manually sort status items
- Date: Sun, 14 Dec 2014 11:09:09 +0000 (UTC)
commit 4f488dc4b86fac5cce892cc496619803a4853c65
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sun Dec 14 12:07:51 2014 +0100
Manually sort status items
This is needed due to the separation of submodules and files.
gitg/commit/gitg-commit.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index f612e6d..07ffd82 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -609,7 +609,13 @@ namespace GitgCommit
{
var ret = new Sidebar.Item[0];
- foreach (var item in items)
+ var sorted = new Gee.ArrayList<Gitg.StageStatusItem>.wrap(items);
+
+ sorted.sort((a, b) => {
+ return a.path.casefold().collate(b.path.casefold());
+ });
+
+ foreach (var item in sorted)
{
var sitem = new Sidebar.Item(item, type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]