107
109
gtk.VBox.__init__(self, spacing=0)
111
self.pack_start(self.construct_loading_msg(), expand=False, fill=True)
112
self.connect('revisions-loaded',
113
lambda x: self.loading_msg_box.hide())
109
115
self.scrolled_window = gtk.ScrolledWindow()
110
116
self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,
111
117
gtk.POLICY_AUTOMATIC)
216
223
self.emit('tag-added', tag, revid)
218
225
def refresh(self):
226
self.loading_msg_box.show()
219
227
gobject.idle_add(self.populate, self.get_revision())
221
229
def update(self):
269
277
should be broken.
272
loading_progress = ui.ui_factory.nested_progress_bar()
273
loading_progress.update(msg="Loading ancestry graph", total=5)
277
broken_line_length = 32
279
broken_line_length = None
281
show_graph = self.graph_column.get_visible()
283
self.branch.lock_read()
284
(linegraphdata, index, columns_len) = linegraph(self.branch.repository.get_graph(),
292
self.model = TreeModel(self.branch, linegraphdata)
293
self.graph_cell.columns_len = columns_len
294
width = self.graph_cell.get_size(self.treeview)[2]
297
self.graph_column.set_fixed_width(width)
298
self.graph_column.set_max_width(width)
300
self.treeview.set_model(self.model)
302
if not revision or revision == NULL_REVISION:
303
self.treeview.set_cursor(0)
305
self.set_revision(revision)
307
self.emit('revisions-loaded')
311
loading_progress.finished()
281
broken_line_length = 32
283
broken_line_length = None
285
show_graph = self.graph_column.get_visible()
287
self.branch.lock_read()
288
(linegraphdata, index, columns_len) = linegraph(self.branch.repository.get_graph(),
289
(self.start,) , # Sequence of start revisions
295
self.model = TreeModel(self.branch, linegraphdata)
296
self.graph_cell.columns_len = columns_len
297
width = self.graph_cell.get_size(self.treeview)[2]
300
self.graph_column.set_fixed_width(width)
301
self.graph_column.set_max_width(width)
303
self.treeview.set_model(self.model)
305
if not revision or revision == NULL_REVISION:
306
self.treeview.set_cursor(0)
308
self.set_revision(revision)
310
self.emit('revisions-loaded')
313
314
def construct_treeview(self):
314
315
self.treeview = gtk.TreeView()
392
393
self.treeview.append_column(self.date_column)
394
395
return self.treeview
397
def construct_loading_msg(self):
398
image_loading = gtk.image_new_from_stock(gtk.STOCK_REFRESH,
399
gtk.ICON_SIZE_BUTTON)
402
label_loading = gtk.Label(
403
_i18n("Please wait, loading ancestral graph..."))
404
label_loading.set_alignment(0.0, 0.5)
407
self.loading_msg_box = gtk.HBox()
408
self.loading_msg_box.set_spacing(5)
409
self.loading_msg_box.set_border_width(5)
410
self.loading_msg_box.pack_start(image_loading, False, False)
411
self.loading_msg_box.pack_start(label_loading, True, True)
412
self.loading_msg_box.show()
414
return self.loading_msg_box
396
416
def _on_selection_changed(self, treeview):
397
417
"""callback for when the treeview changes."""