Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

browse: popup menu fixes

Still needs quite a bit of work. We don't want the TortoiseHg submenu, in
effect we want every option promoted. And we need to add a boatload of missing
menu entries.

Changeset 6cd92f95a0af

Parent 59638a981e9f

by Steve Borho

Changes to one file · Browse files at 6cd92f95a0af Showing diff from parent 59638a981e9f Diff from another changeset...

 
159
160
161
 
162
163
164
 
201
202
203
204
 
205
206
207
 
210
211
212
213
 
214
215
216
 
252
253
254
255
 
 
256
257
258
 
 
259
260
 
261
262
263
 
264
265
266
 
159
160
161
162
163
164
165
 
202
203
204
 
205
206
207
208
 
211
212
213
 
214
215
216
217
 
253
254
255
 
256
257
258
259
 
260
261
262
 
263
264
265
 
266
267
268
269
@@ -159,6 +159,7 @@
  def chdir(self, cwd):   'change to a new directory'   # disable updates while we refill the model + self.cwd = cwd   model = self.get_model()   self.set_model(None)   model.clear() @@ -201,7 +202,7 @@
  if basename:   node = node.subdirs[basename]   adddir(node) - self.currepo = None + self.currepo = self.cachedrepo   else:   try:   for name in os.listdir(cwd): @@ -210,7 +211,7 @@
  except OSError:   # report to status bar   pass - self.currepo = self.cachedrepo + self.currepo = None       def cacherepo(self, root, pats=[], filetypes='CI?'): @@ -252,15 +253,17 @@
  model, tpaths = browse.get_selection().get_selected_rows()   if not tpaths:   return - files = [model[p][0] for p in tpaths if model[p][10]] + cpaths = [model[p][0] for p in tpaths] + files = []   if self.currepo:   repo = self.currepo - menus = self.menu.get_commands(repo, repo.root, files) + files = [os.path.join(self.cwd, p) for p in cpaths] + menus = self.menu.get_commands(repo, self.cwd, files)   else: - menus = self.menu.get_norepo_commands(None, files) + menus = self.menu.get_norepo_commands(None, cpaths)     def rundialog(item, hgcmd): - print 'rundialog', hgcmd, files + print 'rundialog', hgcmd, cpaths     def create_menu(label, hgcmd=None):   menuitem = gtk.MenuItem(label, True)