/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to branchview/linegraph.py

  • Committer: rodney.dawes at canonical
  • Date: 2008-10-25 06:02:09 UTC
  • Revision ID: rodney.dawes@canonical.com-20081025060209-irlizouino63cs1m
        * preferences/__init__.py:
        Remove the dialog separator
        Remove useless extra call to self._create_pages()
        Make the default window size smaller
        Set the default border width on various widgets
        Set the current notebook page to the first one

        * preferences/identity.py:
        Set various border widths appropriately
        Align the labels to the left
        Remove the unneeded bold markup from the labels
        Change the "User Id" label to "E-Mail"
        Align the radio group labels to the top of the groups

        * preferences/plugins.py:
        Set various border widths appropriately
        Set the default paned position to something more sensible
        Set the shadow type on the treeview's scrolled window to in
        Align the Author and Version labels to the left

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    def update_root_progress(step_number):
48
48
        """IFF our container received a root progress bar, then update it."""
49
49
        if root_progress is not None:
50
 
            root_progress.update(current_cnt=step_number)
 
50
            root_progress.update(None, step_number)
51
51
 
52
52
    graph_parents = {}
53
53
    ghosts = set()
55
55
    update_root_progress(1)
56
56
    progress_bar = ui.ui_factory.nested_progress_bar()
57
57
    try:
58
 
        progress_bar.update(msg="Arranging tree fragments")
 
58
        progress_bar.update("Arranging tree fragments")
59
59
        for i, (revid, parent_revids) in enumerate(graph.iter_ancestry(start_revs)):
60
60
            if i % 25 == 0:
61
61
                progress_bar.tick()
75
75
    update_root_progress(2)
76
76
    progress_bar = ui.ui_factory.nested_progress_bar()
77
77
    try:
78
 
        progress_bar.update(msg="Removing ghosts", total_cnt=len(ghosts))
 
78
        progress_bar.update("Removing ghosts", 0, len(ghosts))
79
79
        for i, ghost in enumerate(ghosts):
80
80
            if i % 25 == 0:
81
 
                progress_bar.update(None, current_cnt=i)
 
81
                progress_bar.update(None, i)
82
82
            for ghost_child in graph_children[ghost]:
83
83
                graph_parents[ghost_child] = [p for p in graph_parents[ghost_child]
84
84
                                              if p not in ghosts]
118
118
    update_root_progress(3)
119
119
    progress_bar = ui.ui_factory.nested_progress_bar()
120
120
    try:
121
 
        progress_bar.update(msg="Finding nodes", total_cnt=len(merge_sorted_revisions))
 
121
        progress_bar.update("Finding nodes", 0, len(merge_sorted_revisions))
122
122
        for (rev_index, (sequence_number,
123
123
                         revid,
124
124
                         merge_depth,
126
126
                         end_of_merge)) in enumerate(merge_sorted_revisions):
127
127
 
128
128
            if rev_index % 25 == 0:
129
 
                progress_bar.update(None, current_cnt=rev_index)
 
129
                progress_bar.update(None, rev_index)
130
130
            if maxnum and rev_index >= maxnum:
131
131
                break
132
132
            revid_index[revid] = rev_index
184
184
        update_root_progress(4)
185
185
        progress_bar = ui.ui_factory.nested_progress_bar()
186
186
        try:
187
 
            progress_bar.update(msg="Organizing edges", total_cnt=len(branch_ids))
 
187
            progress_bar.update("Organizing edges", 0, len(branch_ids))
188
188
            for i, branch_id in enumerate(branch_ids):
189
189
                if i % 25 == 0:
190
 
                    progress_bar.update(None, current_cnt=i)
 
190
                    progress_bar.update(None, i)
191
191
                branch_line = branch_lines[branch_id]
192
192
                
193
193
                # Find the col_index for the direct parent branch. This will be the
314
314
        update_root_progress(5)
315
315
        progress_bar = ui.ui_factory.nested_progress_bar()
316
316
        try:
317
 
            progress_bar.update(msg="Pretifying graph", total_cnt=len(lines))
 
317
            progress_bar.update("Pretifying graph", 0, len(lines))
318
318
            for i, (child_index, parent_index, line_col_indexes) in enumerate(lines):
319
319
                if i % 25 == 0:
320
 
                    progress_bar.update(None, current_cnt=i)
 
320
                    progress_bar.update(None, i)
321
321
                (child_col_index, child_color) = linegraph[child_index][1]
322
322
                (parent_col_index, parent_color) = linegraph[parent_index][1]
323
323