39
37
class OliveHandler:
40
38
""" Signal handler class for Olive. """
41
def __init__(self, gladefile, comm):
42
self.gladefile = gladefile
39
def __init__(self, comm):
45
self.menu = OliveMenu(self.gladefile, self.comm)
42
self.menu = OliveMenu(self.comm)
47
44
def on_about_activate(self, widget):
51
48
""" Add file(s)... menu handler. """
52
49
from add import OliveAdd
53
50
wt, path = WorkingTree.open_containing(self.comm.get_path())
54
add = OliveAdd(self.gladefile, wt, path,
51
add = OliveAdd(wt, path,
55
52
self.comm.get_selected_right())
58
55
def on_menuitem_branch_get_activate(self, widget):
59
56
""" Branch/Get... menu handler. """
60
57
from branch import OliveBranch
61
branch = OliveBranch(self.gladefile, self.comm)
58
branch = OliveBranch(self.comm)
64
61
def on_menuitem_branch_checkout_activate(self, widget):
65
62
""" Branch/Checkout... menu handler. """
66
63
from checkout import OliveCheckout
67
checkout = OliveCheckout(self.gladefile, self.comm)
64
checkout = OliveCheckout(self.comm)
70
67
def on_menuitem_branch_commit_activate(self, widget):
71
68
""" Branch/Commit... menu handler. """
72
69
from commit import OliveCommit
73
70
wt, path = WorkingTree.open_containing(self.comm.get_path())
74
commit = OliveCommit(self.gladefile, wt, path)
71
commit = OliveCommit(wt, path)
77
74
def on_menuitem_branch_missing_revisions_activate(self, widget):
158
155
def on_menuitem_branch_push_activate(self, widget):
159
156
""" Branch/Push... menu handler. """
160
157
from push import OlivePush
161
push = OlivePush(self.gladefile, self.comm)
158
push = OlivePush(self.comm)
164
161
def on_menuitem_branch_status_activate(self, widget):
165
162
""" Branch/Status... menu handler. """
166
163
from status import OliveStatus
167
164
wt, wtpath = WorkingTree.open_containing(self.comm.get_path())
168
status = OliveStatus(self.gladefile, wt, wtpath)
165
status = OliveStatus(wt, wtpath)
171
168
def on_menuitem_branch_initialize_activate(self, widget):
206
203
def on_menuitem_file_make_directory_activate(self, widget):
207
204
""" File/Make directory... menu handler. """
208
205
from mkdir import OliveMkdir
209
mkdir = OliveMkdir(self.gladefile, self.comm)
206
mkdir = OliveMkdir(self.comm)
212
209
def on_menuitem_file_move_activate(self, widget):
213
210
""" File/Move... menu handler. """
214
211
from move import OliveMove
215
move = OliveMove(self.gladefile, self.comm)
212
move = OliveMove(self.comm)
218
215
def on_menuitem_file_rename_activate(self, widget):
219
216
""" File/Rename... menu handler. """
220
217
from rename import OliveRename
221
rename = OliveRename(self.gladefile, self.comm)
218
rename = OliveRename(self.comm)
224
221
def on_menuitem_remove_file_activate(self, widget):
225
222
""" Remove (unversion) selected file. """
226
223
from remove import OliveRemove
227
remove = OliveRemove(self.gladefile, self.comm)
224
remove = OliveRemove(self.comm)
230
227
def on_menuitem_stats_diff_activate(self, widget):
239
236
def on_menuitem_stats_infos_activate(self, widget):
240
237
""" Statistics/Informations... menu handler. """
241
238
from info import OliveInfo
242
info = OliveInfo(self.gladefile, self.comm)
239
info = OliveInfo(self.comm)
245
242
def on_menuitem_stats_log_activate(self, widget):
246
243
""" Statistics/Log... menu handler. """
247
244
from log import OliveLog
248
log = OliveLog(self.gladefile, self.comm)
245
log = OliveLog(self.comm)
251
248
def on_menuitem_view_refresh_activate(self, widget):