Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

repowidget: all multiple selection menu

Changeset 8849283961c9

Parent 15f69c397f89

by Steve Borho

Changes to one file · Browse files at 8849283961c9 Showing diff from parent 15f69c397f89 Diff from another changeset...

 
846
847
848
849
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
850
851
852
 
846
847
848
 
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
@@ -846,7 +846,27 @@
  self.paircmenu.exec_(point)     def multipleSelectionMenu(self, point, selection): - pass + if None in selection: + # No multi menu if working directory is selected + return + def exportSel(): + epath = os.path.join(self.repo.root, + self.repo.shortname + '_%r.patch') + commands.export(self.repo.ui, self.repo, + *[str(a) for a in selection], output=epath) + def emailSel(): + run.email(self.repo.ui, rev=selection, repo=self.repo) + if not self.multicmenu: + menu = QMenu(self) + for name, cb in ( + ('Export Selected', exportSel), + ('Email Selected', emailSel), + ): + a = QAction(name, self) + a.triggered.connect(cb) + menu.addAction(a) + self.multicmenu = menu + self.multicmenu.exec_(point)     def updateToRevision(self):   dlg = update.UpdateDialog(self.repo, self.rev, self)