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

  • Committer: Andrew Starr-Bochicchio
  • Date: 2011-02-15 00:15:40 UTC
  • mfrom: (709 bzr-gtk)
  • mto: This revision was merged to the branch mainline in revision 711.
  • Revision ID: a.starr.b@gmail.com-20110215001540-ivb00xv8s8ma1vn1
Re-merge on trunk, resolving one conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: UTF-8 -*-
2
1
"""Branch window.
3
2
 
4
3
This module contains the code to manage the branch information window,
5
4
which contains both the revision graph and details panes.
6
5
"""
7
6
 
8
 
__copyright__ = "Copyright © 2005 Canonical Ltd."
 
7
__copyright__ = "Copyright (c) 2005 Canonical Ltd."
9
8
__author__    = "Scott James Remnant <scott@ubuntu.com>"
10
9
 
11
10
 
80
79
        self.accel_group = gtk.AccelGroup()
81
80
        self.add_accel_group(self.accel_group)
82
81
 
83
 
        gtk.Action.set_tool_item_type(gtk.MenuToolButton)
 
82
        if getattr(gtk.Action, 'set_tool_item_type', None) is not None:
 
83
            # Not available before PyGtk-2.10
 
84
            gtk.Action.set_tool_item_type(gtk.MenuToolButton)
84
85
 
85
86
        self.prev_rev_action = gtk.Action("prev-rev", "_Previous Revision", "Go to the previous revision", gtk.STOCK_GO_DOWN)
86
87
        self.prev_rev_action.set_accel_path("<viz>/Go/Previous Revision")
413
414
                self.prev_rev_action.set_sensitive(False)
414
415
                prev_menu.hide()
415
416
 
416
 
            self.prev_button.set_menu(prev_menu)
 
417
            if getattr(self.prev_button, 'set_menu', None) is not None:
 
418
                self.prev_button.set_menu(prev_menu)
417
419
 
418
420
            next_menu = gtk.Menu()
419
421
            if len(children) > 0:
433
435
                self.next_rev_action.set_sensitive(False)
434
436
                next_menu.hide()
435
437
 
436
 
            self.next_button.set_menu(next_menu)
 
438
            if getattr(self.next_button, 'set_menu', None) is not None:
 
439
                self.next_button.set_menu(next_menu)
437
440
 
438
441
            self.revisionview.set_revision(revision)
439
442
            self.revisionview.set_children(children)