[gitg/vala] Updates to calculating lanes
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/vala] Updates to calculating lanes
- Date: Sun, 22 Apr 2012 13:14:40 +0000 (UTC)
commit 92e5f537afe0e01350b4fe4da44fcf76cb957043
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Sun Apr 22 15:11:07 2012 +0200
Updates to calculating lanes
libgitg/gitg-lane.vala | 25 ++++++++++++-------------
libgitg/gitg-lanes.vala | 12 ++++++------
2 files changed, 18 insertions(+), 19 deletions(-)
---
diff --git a/libgitg/gitg-lane.vala b/libgitg/gitg-lane.vala
index e62dbdb..a09e3a4 100644
--- a/libgitg/gitg-lane.vala
+++ b/libgitg/gitg-lane.vala
@@ -1,23 +1,22 @@
namespace Gitg
{
-[Compact]
-public class Lane
+[Flags]
+public enum LaneTag
{
- [Flags]
- public enum Tag
- {
- NONE = 0,
- START = 1 << 0,
- END = 1 << 1,
- SIGN_STASH = 1 << 2,
- SIGN_STAGED = 1 << 3,
- SIGN_UNSTAGED = 1 << 4
- }
+ NONE = 0,
+ START = 1 << 0,
+ END = 1 << 1,
+ SIGN_STASH = 1 << 2,
+ SIGN_STAGED = 1 << 3,
+ SIGN_UNSTAGED = 1 << 4
+}
+public class Lane : Object
+{
public Color color;
public SList<int> from;
- public Tag tag;
+ public LaneTag tag;
public Ggit.OId? boundary_id;
public Lane()
diff --git a/libgitg/gitg-lanes.vala b/libgitg/gitg-lanes.vala
index 24e6fbc..78a9672 100644
--- a/libgitg/gitg-lanes.vala
+++ b/libgitg/gitg-lanes.vala
@@ -20,9 +20,9 @@ public class Lanes : Object
public Ggit.OId? from;
public Ggit.OId? to;
- public LaneContainer.with_color(Ggit.OId from,
- Ggit.OId to,
- Color? color)
+ public LaneContainer.with_color(Ggit.OId? from,
+ Ggit.OId? to,
+ Color? color)
{
this.from = from;
this.to = to;
@@ -40,7 +40,7 @@ public class Lanes : Object
{
lane = lane.copy();
- lane.tag = Lane.Tag.NONE;
+ lane.tag = LaneTag.NONE;
lane.from = new SList<int>();
lane.from.prepend(index);
@@ -234,7 +234,7 @@ public class Lanes : Object
}
else
{
- lane.tag |= Lane.Tag.END;
+ lane.tag |= LaneTag.END;
lane.boundary_id = container.to;
}
@@ -362,7 +362,7 @@ public class Lanes : Object
if (ptr.next == null || cnt + 1 == inactive_collapse)
{
copy.boundary_id = lane.from;
- copy.tag |= Lane.Tag.START;
+ copy.tag |= LaneTag.START;
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]