/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: 2006-09-30 10:21:43 UTC
  • Revision ID: jelmer@samba.org-20060930102143-c0ef64d6ca860c21
Merge some files from Olive and bzr-gtk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    pygtk.require("2.0")
22
22
except:
23
23
    pass
24
 
try:
25
 
    import gtk
26
 
    import gtk.glade
27
 
    import gobject
28
 
    import pango
29
 
except:
30
 
    sys.exit(1)
 
24
 
 
25
import gtk
 
26
import gtk.glade
 
27
import gobject
 
28
import pango
31
29
 
32
30
import bzrlib.errors as errors
33
31
 
 
32
from olive import gladefile
 
33
 
34
34
def info(location):
35
35
    """ Get info about branch, working tree, and repository
36
36
    
144
144
 
145
145
class OliveInfo:
146
146
    """ Display Informations window and perform the needed actions. """
147
 
    def __init__(self, gladefile, comm):
 
147
    def __init__(self, wt):
148
148
        """ Initialize the Informations window. """
149
 
        self.gladefile = gladefile
150
 
        self.glade = gtk.glade.XML(self.gladefile, 'window_info', 'olive-gtk')
151
 
        
152
 
        # Communication object
153
 
        self.comm = comm
 
149
        self.glade = gtk.glade.XML(gladefile, 'window_info', 'olive-gtk')
154
150
        
155
151
        # Get the Informations window widget
156
152
        self.window = self.glade.get_widget('window_info')
158
154
        # Check if current location is a branch
159
155
        self.notbranch = False
160
156
        try:
161
 
            self.ret = info(self.comm.get_path())
 
157
            self.ret = info(wt.basedir)
162
158
        except errors.NotBranchError:
163
159
            self.notbranch = True
164
160
            return