108
106
gtk.VBox.__init__(self, spacing=0)
110
self.pack_start(self.construct_loading_msg(), expand=False, fill=True)
111
self.connect('revisions-loaded',
112
lambda x: self.loading_msg_box.hide())
114
108
self.scrolled_window = gtk.ScrolledWindow()
115
109
self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,
116
110
gtk.POLICY_AUTOMATIC)
222
215
self.emit('tag-added', tag, revid)
224
217
def refresh(self):
225
self.loading_msg_box.show()
226
218
gobject.idle_add(self.populate, self.get_revision())
228
220
def update(self):
276
268
should be broken.
280
broken_line_length = 32
282
broken_line_length = None
284
show_graph = self.graph_column.get_visible()
286
self.branch.lock_read()
287
(linegraphdata, index, columns_len) = linegraph(self.branch.repository,
294
self.model = TreeModel(self.branch, linegraphdata)
295
self.graph_cell.columns_len = columns_len
296
width = self.graph_cell.get_size(self.treeview)[2]
299
self.graph_column.set_fixed_width(width)
300
self.graph_column.set_max_width(width)
302
self.treeview.set_model(self.model)
304
if not revision or revision == NULL_REVISION:
305
self.treeview.set_cursor(0)
307
self.set_revision(revision)
309
self.emit('revisions-loaded')
271
loading_progress = ui.ui_factory.nested_progress_bar()
272
loading_progress.update(msg="Loading ancestry graph", total=5)
276
broken_line_length = 32
278
broken_line_length = None
280
show_graph = self.graph_column.get_visible()
282
self.branch.lock_read()
283
(linegraphdata, index, columns_len) = linegraph(self.branch.repository,
291
self.model = TreeModel(self.branch, linegraphdata)
292
self.graph_cell.columns_len = columns_len
293
width = self.graph_cell.get_size(self.treeview)[2]
296
self.graph_column.set_fixed_width(width)
297
self.graph_column.set_max_width(width)
299
self.treeview.set_model(self.model)
301
if not revision or revision == NULL_REVISION:
302
self.treeview.set_cursor(0)
304
self.set_revision(revision)
309
loading_progress.finished()
313
311
def construct_treeview(self):
314
312
self.treeview = gtk.TreeView()
391
389
self.treeview.append_column(self.date_column)
393
391
return self.treeview
395
def construct_loading_msg(self):
396
image_loading = gtk.image_new_from_stock(gtk.STOCK_REFRESH,
397
gtk.ICON_SIZE_BUTTON)
400
label_loading = gtk.Label(_("Please wait, loading ancestral graph..."))
401
label_loading.set_alignment(0.0, 0.5)
404
self.loading_msg_box = gtk.HBox()
405
self.loading_msg_box.set_spacing(5)
406
self.loading_msg_box.set_border_width(5)
407
self.loading_msg_box.pack_start(image_loading, False, False)
408
self.loading_msg_box.pack_start(label_loading, True, True)
409
self.loading_msg_box.show()
411
return self.loading_msg_box
413
393
def _on_selection_changed(self, treeview):
414
394
"""callback for when the treeview changes."""