/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, dialog):
 
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
154
 
        # Dialog object
155
 
        self.dialog = dialog
 
149
        self.glade = gtk.glade.XML(gladefile, 'window_info', 'olive-gtk')
156
150
        
157
151
        # Get the Informations window widget
158
152
        self.window = self.glade.get_widget('window_info')
160
154
        # Check if current location is a branch
161
155
        self.notbranch = False
162
156
        try:
163
 
            self.ret = info(self.comm.get_path())
 
157
            self.ret = info(wt.basedir)
164
158
        except errors.NotBranchError:
165
159
            self.notbranch = True
166
160
            return
559
553
    def display(self):
560
554
        """ Display the Informations window. """
561
555
        if self.notbranch:
562
 
            self.dialog.error_dialog(_('Directory is not a branch'),
 
556
            error_dialog(_('Directory is not a branch'),
563
557
                                     _('You can perform this action only in a branch.'))
564
558
            self.close()
565
559
        else: