[gitg] Do not do reloading on repository notify



commit 8c7236ad485bf17b2108e14e9ed466098b1992fb
Author: Techlive Zheng <techlivezheng gmail com>
Date:   Sat Jun 1 03:01:41 2013 +0800

    Do not do reloading on repository notify
    
    Currently, the navigation gets reloading twice everytime when the
    history view is reloaded, it should only be reloaded on explicitly
    invoked.

 plugins/history/gitg-history-navigation.vala |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/plugins/history/gitg-history-navigation.vala b/plugins/history/gitg-history-navigation.vala
index 059ad89..8ffdcde 100644
--- a/plugins/history/gitg-history-navigation.vala
+++ b/plugins/history/gitg-history-navigation.vala
@@ -100,10 +100,6 @@ namespace GitgHistory
                        set
                        {
                                d_repository = value;
-                               if (d_repository != null)
-                               {
-                                       reload();
-                               }
                        }
                }
 
@@ -415,8 +411,11 @@ namespace GitgHistory
 
                public void reload()
                {
-                       clear();
-                       populate(d_repository);
+                       if (d_repository != null)
+                       {
+                               clear();
+                               populate(d_repository);
+                       }
                }
 
                public void activate(Gtk.TreeIter iter, int numclick)


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