14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
19
pygtk.require("2.0")
38
35
flags=gtk.DIALOG_MODAL,
39
36
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
42
39
self.branch = branch
44
41
# Create the widgets
45
42
self._button_select = gtk.Button(_i18n("_Select"), use_underline=True)
46
43
start_revs = [branch.last_revision(),]
47
44
self.treeview = TreeView(branch, start_revs, None)
50
47
self._button_select.connect('clicked', self._on_select_clicked)
51
48
self.treeview.connect('revision-activated',
52
49
self._on_treeview_revision_activated)
55
52
self.set_default_size(600, 400)
56
53
self.vbox.set_spacing(3)
57
54
self.treeview.set_property('graph-column-visible', False)
58
55
self.treeview.set_property('date-column-visible', True)
59
56
self.treeview.set_property('mainline-only', True)
61
58
# Construct the dialog
62
59
self.action_area.pack_end(self._button_select)
64
61
self.vbox.pack_start(self.treeview, True, True)
70
67
def _on_treeview_revision_activated(self, treeview, path, column):
71
68
""" Double-click on a row should also select a revision. """
72
69
self._on_select_clicked(treeview)
74
71
def _on_select_clicked(self, widget):
75
72
""" Select button clicked handler. """
77
74
self.selected_revno = self.treeview.get_property('revision-number')
78
75
self.selected_revid = \
79
76
self.treeview.get_property('revision').revision_id