[gitg/vala] Added setting/getting repository of model



commit 195bf030347efd49f0d9dd1e8d739fe1ca1f8611
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Sun Apr 15 14:55:33 2012 +0200

    Added setting/getting repository of model

 libgitg/gitg-commit-model.vala |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-commit-model.vala b/libgitg/gitg-commit-model.vala
index aefac70..96dc67d 100644
--- a/libgitg/gitg-commit-model.vala
+++ b/libgitg/gitg-commit-model.vala
@@ -20,6 +20,18 @@ public class CommitModel : Object
 	public signal void update(uint added);
 	public signal void finished();
 
+	public Repository repository
+	{
+		get { return d_repository; }
+		set
+		{
+			cancel();
+
+			d_walker = null;
+			d_repository = value;
+		}
+	}
+
 	public CommitModel(Repository repository)
 	{
 		d_repository = repository;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]