14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
19
pygtk.require("2.0")
33
import bzrlib.errors as errors
35
if bzrlib.version_info < (0, 9):
36
# function deprecated after 0.9
37
from bzrlib.delta import compare_trees
39
from bzrlib.status import show_tree_status
40
from bzrlib.workingtree import WorkingTree
42
from dialog import OliveDialog
26
from guifiles import GLADEFILENAME
45
30
""" Display Status window and perform the needed actions. """
46
def __init__(self, gladefile, wt, wtpath, dialog):
31
def __init__(self, wt, wtpath):
47
32
""" Initialize the Status window. """
48
self.gladefile = gladefile
49
self.glade = gtk.glade.XML(self.gladefile, 'window_status')
33
self.glade = gtk.glade.XML(GLADEFILENAME, 'window_status')
54
35
# Get the Status window widget
55
36
self.window = self.glade.get_widget('window_status')
57
39
self.wtpath = wtpath
59
41
# Check if current location is a branch
62
except errors.NotBranchError:
68
42
file_id = self.wt.path2id(wtpath)
70
self.notbranch = False
75
44
# Set the old working tree
76
45
self.old_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
142
111
def display(self):
143
112
""" Display the Diff window. """
145
self.dialog.error_dialog(_('Directory is not a branch'),
146
_('You can perform this action only in a branch.'))
149
self.window.show_all()
113
self.window.show_all()
151
115
def close(self, widget=None):
152
116
self.window.destroy()