/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 olive/info.py

  • Committer: Jelmer Vernooij
  • Date: 2008-05-01 12:55:33 UTC
  • mto: This revision was merged to the branch mainline in revision 488.
  • Revision ID: jelmer@samba.org-20080501125533-hesg3b13cxgsyqa2
Import Chris Lamb's olive-gtk manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import bzrlib.errors as errors
27
27
 
28
 
from olive import gladefile
29
 
from dialog import error_dialog
 
28
from bzrlib.plugins.gtk.dialog import error_dialog
 
29
from guifiles import GLADEFILENAME
 
30
 
30
31
 
31
32
def info(location):
32
33
    """ Get info about branch, working tree, and repository
107
108
 
108
109
    try:
109
110
        branch = a_bzrdir.open_branch()
 
111
        repository = branch.repository
 
112
        control = a_bzrdir
110
113
        branch.lock_read()
111
114
        try:
112
115
            ret['location'] = info_helper.get_location_info(repository, branch)
141
144
 
142
145
class OliveInfo:
143
146
    """ Display Informations window and perform the needed actions. """
144
 
    def __init__(self, wt):
 
147
    def __init__(self, branch):
145
148
        """ Initialize the Informations window. """
146
 
        self.glade = gtk.glade.XML(gladefile, 'window_info', 'olive-gtk')
 
149
        self.glade = gtk.glade.XML(GLADEFILENAME, 'window_info', 'olive-gtk')
147
150
        
148
151
        # Get the Informations window widget
149
152
        self.window = self.glade.get_widget('window_info')
151
154
        # Check if current location is a branch
152
155
        self.notbranch = False
153
156
        try:
154
 
            self.ret = info(wt.basedir)
 
157
            self.ret = info(branch.base)
155
158
        except errors.NotBranchError:
156
159
            self.notbranch = True
157
160
            return