Rev 580: Merge progress bar fixes. in file:///data/jelmer/bzr-gtk/trunk/
Jelmer Vernooij
jelmer at samba.org
Sun Jul 27 14:25:55 BST 2008
At file:///data/jelmer/bzr-gtk/trunk/
------------------------------------------------------------
revno: 580
revision-id: jelmer at samba.org-20080727132554-l5lg7qoskksnr3lq
parent: jelmer at samba.org-20080727120506-jeeik6ywvz8ny0im
parent: jelmer at samba.org-20080725222632-4dmyg5mf003i5f7n
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sun 2008-07-27 15:25:54 +0200
message:
Merge progress bar fixes.
modified:
branchview/linegraph.py graph.py-20051016214152-ebf565808c860cf7
branchview/treeview.py treeview.py-20071020204704-vk1erblrjhbcgw94-1
------------------------------------------------------------
revno: 576.4.2
revision-id: jelmer at samba.org-20080725222632-4dmyg5mf003i5f7n
parent: jelmer at samba.org-20080725222354-6d8ws46ttf51ydz6
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-07-26 00:26:32 +0200
message:
Fix typo.
modified:
branchview/linegraph.py graph.py-20051016214152-ebf565808c860cf7
------------------------------------------------------------
revno: 576.4.1
revision-id: jelmer at samba.org-20080725222354-6d8ws46ttf51ydz6
parent: jelmer at samba.org-20080725213623-44iq5k34vc0v6z7y
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-07-26 00:23:54 +0200
message:
Avoid using explicit names for progress bar function arguments since they differ.
modified:
branchview/linegraph.py graph.py-20051016214152-ebf565808c860cf7
branchview/treeview.py treeview.py-20071020204704-vk1erblrjhbcgw94-1
=== modified file 'branchview/linegraph.py'
--- a/branchview/linegraph.py 2008-06-30 12:39:07 +0000
+++ b/branchview/linegraph.py 2008-07-25 22:26:32 +0000
@@ -47,7 +47,7 @@
def update_root_progress(step_number):
"""IFF our container received a root progress bar, then update it."""
if root_progress is not None:
- root_progress.update(None, current_cnt=step_number)
+ root_progress.update(None, step_number)
graph_parents = {}
ghosts = set()
@@ -55,7 +55,7 @@
update_root_progress(1)
progress_bar = ui.ui_factory.nested_progress_bar()
try:
- progress_bar.update(msg="Arranging tree fragments")
+ progress_bar.update("Arranging tree fragments")
for i, (revid, parent_revids) in enumerate(graph.iter_ancestry(start_revs)):
if i % 25 == 0:
progress_bar.tick()
@@ -75,10 +75,10 @@
update_root_progress(2)
progress_bar = ui.ui_factory.nested_progress_bar()
try:
- progress_bar.update(msg="Removing ghosts", total_cnt=len(ghosts))
+ progress_bar.update("Removing ghosts", 0, len(ghosts))
for i, ghost in enumerate(ghosts):
if i % 25 == 0:
- progress_bar.update(None, current_cnt=i)
+ progress_bar.update(None, i)
for ghost_child in graph_children[ghost]:
graph_parents[ghost_child] = [p for p in graph_parents[ghost_child]
if p not in ghosts]
@@ -118,7 +118,7 @@
update_root_progress(3)
progress_bar = ui.ui_factory.nested_progress_bar()
try:
- progress_bar.update(msg="Finding nodes", total_cnt=len(merge_sorted_revisions))
+ progress_bar.update("Finding nodes", 0, len(merge_sorted_revisions))
for (rev_index, (sequence_number,
revid,
merge_depth,
@@ -126,7 +126,7 @@
end_of_merge)) in enumerate(merge_sorted_revisions):
if rev_index % 25 == 0:
- progress_bar.update(None, current_cnt=rev_index)
+ progress_bar.update(None, rev_index)
if maxnum and rev_index >= maxnum:
break
revid_index[revid] = rev_index
@@ -184,10 +184,10 @@
update_root_progress(4)
progress_bar = ui.ui_factory.nested_progress_bar()
try:
- progress_bar.update(msg="Organizing edges", total_cnt=len(branch_ids))
+ progress_bar.update("Organizing edges", 0, len(branch_ids))
for i, branch_id in enumerate(branch_ids):
if i % 25 == 0:
- progress_bar.update(None, current_cnt=i)
+ progress_bar.update(None, i)
branch_line = branch_lines[branch_id]
# Find the col_index for the direct parent branch. This will be the
@@ -314,10 +314,10 @@
update_root_progress(5)
progress_bar = ui.ui_factory.nested_progress_bar()
try:
- progress_bar.update(msg="Pretifying graph", total_cnt=len(lines))
+ progress_bar.update("Pretifying graph", 0, len(lines))
for i, (child_index, parent_index, line_col_indexes) in enumerate(lines):
if i % 25 == 0:
- progress_bar.update(None, current_cnt=i)
+ progress_bar.update(None, i)
(child_col_index, child_color) = linegraph[child_index][1]
(parent_col_index, parent_color) = linegraph[parent_index][1]
=== modified file 'branchview/treeview.py'
--- a/branchview/treeview.py 2008-07-10 06:23:54 +0000
+++ b/branchview/treeview.py 2008-07-25 22:23:54 +0000
@@ -109,7 +109,8 @@
gtk.VBox.__init__(self, spacing=0)
loading_msg_widget = ProgressPanel()
- ui.ui_factory.set_nested_progress_bar_widget(loading_msg_widget.get_progress_bar)
+ if getattr(ui.ui_factory, "set_nested_progress_bar_widget", None) is not None:
+ ui.ui_factory.set_nested_progress_bar_widget(loading_msg_widget.get_progress_bar)
self.pack_start(loading_msg_widget, expand=False, fill=True)
self.scrolled_window = gtk.ScrolledWindow()
@@ -276,7 +277,7 @@
"""
self.progress_bar = ui.ui_factory.nested_progress_bar()
- self.progress_bar.update(msg="Loading ancestry graph", total_cnt=5)
+ self.progress_bar.update("Loading ancestry graph", 0, 5)
try:
if self.compact:
More information about the bazaar-commits
mailing list