/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 branchwin.py

  • Committer: Scott James Remnant
  • Date: 2005-10-17 07:54:28 UTC
  • Revision ID: scott@netsplit.com-20051017075428-75861ea962b06172
Fix the busted font size stuff, and then increase the sizes a bit to
compensate

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    for a particular branch.
30
30
    """
31
31
 
32
 
    def __init__(self, app=None):
 
32
    def __init__(self):
33
33
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
34
34
        self.set_border_width(0)
35
35
        self.set_title("bzrk")
36
36
 
37
 
        self.app = app
38
 
 
39
37
        # Use three-quarters of the screen by default
40
38
        screen = self.get_screen()
41
39
        monitor = screen.get_monitor_geometry(0)
229
227
        the new branch before updating the window title and model of the
230
228
        treeview itself.
231
229
        """
232
 
        self.branch = branch
233
 
 
234
230
        # [ revision, node, last_lines, lines, message, committer, timestamp ]
235
231
        self.model = gtk.ListStore(gobject.TYPE_PYOBJECT,
236
232
                                   gobject.TYPE_PYOBJECT,
323
319
            button = gtk.Button()
324
320
            button.add(image)
325
321
            button.set_relief(gtk.RELIEF_NONE)
326
 
            button.set_sensitive(self.app is not None)
327
 
            button.connect("clicked", self._show_clicked_cb,
328
 
                           revision.revision_id, parent_id)
 
322
            button.set_sensitive(False)
 
323
            button.connect("clicked", self._show_clicked_cb, parent_id)
329
324
            hbox.pack_start(button, expand=False, fill=True)
330
325
            button.show()
331
326
 
364
359
        """Callback for when the go button for a parent is clicked."""
365
360
        self.treeview.set_cursor(self.index[self.revisions[revid]])
366
361
 
367
 
    def _show_clicked_cb(self, widget, revid, parentid):
 
362
    def _show_clicked_cb(self, widget, revid):
368
363
        """Callback for when the show button for a parent is clicked."""
369
 
        if self.app is not None:
370
 
            self.app.show_diff(self.branch, revid, parentid)
 
364
        print "SHOW %s" % revid