[gitg] Reload the history view when repository changes



commit 869479c31f21332fbf314f4ad0b5c24f43d9be31
Author: Techlive Zheng <techlivezheng gmail com>
Date:   Mon Jun 3 14:59:16 2013 +0800

    Reload the history view when repository changes

 plugins/history/gitg-history.vala |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/plugins/history/gitg-history.vala b/plugins/history/gitg-history.vala
index 3fc08ca..5754eec 100644
--- a/plugins/history/gitg-history.vala
+++ b/plugins/history/gitg-history.vala
@@ -51,6 +51,18 @@ namespace GitgHistory
                        get { return d_stack_panel; }
                }
 
+               [Notify]
+               public Gitg.Repository repository
+               {
+                       set
+                       {
+                               if (value != null)
+                               {
+                                       reload();
+                               }
+                       }
+               }
+
                public void foreach_selected(GitgExt.ForeachObjectSelectionFunc func)
                {
                        bool breakit = false;
@@ -85,6 +97,7 @@ namespace GitgHistory
 
                        application.bind_property("repository", d_navigation_model, "repository", 
BindingFlags.DEFAULT);
                        application.bind_property("repository", d_commit_list_model, "repository", 
BindingFlags.DEFAULT);
+                       application.bind_property("repository", this, "repository", BindingFlags.DEFAULT);
 
                        application.notify["repository"].connect((a, r) => {
                                notify_property("available");


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