[gitg] history: the repository can be null.



commit 76101471649af5bf9e2fa0200008bf9a1cade68e
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Jul 3 22:06:02 2013 +0200

    history: the repository can be null.
    
    Also use a better gobject like construction

 gitg/history/gitg-history-navigation.vala |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gitg/history/gitg-history-navigation.vala b/gitg/history/gitg-history-navigation.vala
index c0c26e7..621c99c 100644
--- a/gitg/history/gitg-history-navigation.vala
+++ b/gitg/history/gitg-history-navigation.vala
@@ -75,7 +75,12 @@ namespace GitgHistory
 
                public signal void ref_activated(Gitg.Ref? r);
 
-               public Navigation(Gitg.Repository repo)
+               public Navigation(Gitg.Repository? repo)
+               {
+                       Object(repository: repo);
+               }
+
+               construct
                {
                        set_column_types({typeof(string),
                                          typeof(string),
@@ -88,8 +93,6 @@ namespace GitgHistory
 
                        d_callbacks = new Activated[100];
                        d_callbacks.length = 0;
-                       d_repository = repo;
-                       populate(d_repository);
                }
 
                public List<Gitg.Ref> all
@@ -104,6 +107,7 @@ namespace GitgHistory
                        set
                        {
                                d_repository = value;
+                               reload();
                        }
                }
 


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