Re: [STV-Devel] Close Tab
Brought to you by:
jco8
From: Jeffrey O'N. <jc...@co...> - 2009-06-20 13:10:10
|
Hi Jonathan, I like the accelerators. I assume you are not suggesting that we have two menu options for closing tabs, but rather that we (1) move it from the results menu to the file menu (2) change the language from "Delete Tab" to "Close Tab" (3) don't ask for confirmation I'm fine with (2) and (3) but I prefer the Close Tab to be in the Results menu. I see that Firefox has Close Tab in the File menu but I think it makes sense to have Close Tab in the same menu as the Save Results options. Jeff On Fri, Jun 19, 2009 at 8:19 PM, <jlu...@us...> wrote: > Revision: 550 > http://stv.svn.sourceforge.net/stv/?rev=550&view=rev > Author: jlundell > Date: 2009-06-20 00:19:14 +0000 (Sat, 20 Jun 2009) > > Log Message: > ----------- > Experimental: please review > Add keyboard accelerators to selected menu items > Add no-confirm close-tab to File menu > > Modified Paths: > -------------- > trunk/OpenSTV.py > > Modified: trunk/OpenSTV.py > =================================================================== > --- trunk/OpenSTV.py 2009-06-19 23:40:18 UTC (rev 549) > +++ trunk/OpenSTV.py 2009-06-20 00:19:14 UTC (rev 550) > @@ -148,11 +148,13 @@ > > # File menu > FileMenu = wx.Menu() > - self.AddMenuItem(FileMenu, 'Run Election...', > + self.AddMenuItem(FileMenu, 'Close Tab\tCtrl+W', 'Close Tab', > + self.OnCloseTab) > + self.AddMenuItem(FileMenu, 'Run Election...\tCtrl+E', > 'Run Election...', self.OnRunElection) > - self.AddMenuItem(FileMenu, 'New Ballot File...', > + self.AddMenuItem(FileMenu, 'New Ballot File...\tCtrl+N', > 'New Ballot File...', self.OnNewBF) > - self.AddMenuItem(FileMenu, 'Edit Ballot File...', > + self.AddMenuItem(FileMenu, 'Edit Ballot File...\tCtrl+O', > 'Edit Ballot File...', self.OnEditBF) > id = self.AddMenuItem(FileMenu, 'Exit', > 'Exit the application', self.OnExit, "Exit") > @@ -162,7 +164,7 @@ > > # Edit menu > EditMenu = wx.Menu() > - self.AddMenuItem(EditMenu, 'Copy', 'Copy', self.OnCopy) > + self.AddMenuItem(EditMenu, '&Copy\tCtrl+C', 'Copy', self.OnCopy) > self.AddMenuItem(EditMenu, 'Select All', 'Select All', > self.OnSelectAll) > self.menuBar.Append(EditMenu, '&Edit') > > @@ -260,6 +262,19 @@ > > ### File Menu > > + def OnCloseTab(self, event): > + > + n = self.notebook.GetSelection() > + if n == 0: > + wx.MessageBox("Can't delete the Console.", "Error", > wx.OK|wx.ICON_ERROR) > + return > + > + # The index into TallyList is off by one because of the console tab > + self.notebook.DeletePage(n) > + self.TallyList.pop(n-1) > + > + ### > + > def OnRunElection(self, event): > > # Get the ballot filename and election method > > > This was sent by the SourceForge.net collaborative development platform, > the world's largest Open Source development site. > > > ------------------------------------------------------------------------------ > Are you an open source citizen? Join us for the Open Source Bridge > conference! > Portland, OR, June 17-19. Two days of sessions, one day of unconference: > $250. > Need another reason to go? 24-hour hacker lounge. Register today! > > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > _______________________________________________ > STV-Devel mailing list > STV...@li... > https://lists.sourceforge.net/lists/listinfo/stv-devel > |