Rev 535: Load tags lazily. in file:///data/jelmer/bzr-gtk/lazy-tags/

Jelmer Vernooij jelmer at samba.org
Sun Jul 6 14:07:25 BST 2008


At file:///data/jelmer/bzr-gtk/lazy-tags/

------------------------------------------------------------
revno: 535
revision-id: jelmer at samba.org-20080706130724-klck13su3glo5wcx
parent: jelmer at samba.org-20080704214056-gd5qgurbhiqr76hs
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: lazy-tags
timestamp: Sun 2008-07-06 15:07:24 +0200
message:
  Load tags lazily.
modified:
  revisionview.py                logview.py-20051024072750-4d5c28cb73611027
  viz/branchwin.py               branchwin.py-20051016222514-15fd120652fcf25c
=== modified file 'revisionview.py'
--- a/revisionview.py	2008-07-04 18:54:42 +0000
+++ b/revisionview.py	2008-07-06 13:07:24 +0000
@@ -346,9 +346,13 @@
         self._revision = None
         self._branch = branch
 
+        gobject.idle_add(self.populate)
+
+        self.set_file_id(None)
+
+    def populate(self):
         self.update_tags()
-
-        self.set_file_id(None)
+        return False
 
     def do_get_property(self, property):
         if property.name == 'branch':

=== modified file 'viz/branchwin.py'
--- a/viz/branchwin.py	2008-07-01 21:54:21 +0000
+++ b/viz/branchwin.py	2008-07-06 13:07:24 +0000
@@ -197,7 +197,6 @@
         tag_image.set_from_file(icon_path("tag-16.png"))
         self.go_menu_tags = gtk.ImageMenuItem("_Tags")
         self.go_menu_tags.set_image(tag_image)
-        self._update_tags()
 
         go_menu.add(go_menu_next)
         go_menu.add(go_menu_prev)
@@ -248,8 +247,13 @@
         menubar.add(help_menuitem)
         menubar.show_all()
 
+        gobject.idle_add(self.populate)
+
         return menubar
 
+    def populate(self):
+        self._update_tags()
+
     def construct_top(self):
         """Construct the top-half of the window."""
         # FIXME: Make broken_line_length configurable




More information about the bazaar-commits mailing list