The forum

[patch] Hotkeys + missing menu entry

Author Replies
UnknowN-TerroR Wednesday 6 May 2009 at 16:49
UnknowN-TerroRAnonymous

I've written a very small patch that:

- binds Run, Install, Remove and Configure with some hotkeys without breaking translation.
- Adds the missing entry "Configure this application" to the File menu.

patch:
*** pythonorig/mainwindow.py	2009-03-06 17:51:10.000000000 +0100
--- python/mainwindow.py	2009-05-06 16:39:04.000000000 +0200
***************
*** 63,71 ****
      self.oldimg = ""
  
      self.filemenu = wx.Menu()
!     self.filemenu.Append(wx.ID_OPEN, _("Run"))
!     self.filemenu.Append(wx.ID_ADD, _("Install"))
!     self.filemenu.Append(wx.ID_DELETE, _("Remove"))
      self.filemenu.Append(wx.ID_REFRESH, _("Refresh the repository"))
      self.filemenu.AppendSeparator()
      self.filemenu.Append(wx.ID_EXIT, _("Exit"))
--- 63,72 ----
      self.oldimg = ""
  
      self.filemenu = wx.Menu()
!     self.filemenu.Append(wx.ID_OPEN, _("Run") + "\\tCtrl+O")
!     self.filemenu.Append(wx.ID_ADD, _("Install") + "\\tCtrl+I")
!     self.filemenu.Append(wx.ID_DELETE, _("Remove") + "\\tCtrl+R")
!     self.filemenu.Append(102, _("Configure this application") + "\\tCtrl+C")
      self.filemenu.Append(wx.ID_REFRESH, _("Refresh the repository"))
      self.filemenu.AppendSeparator()
      self.filemenu.Append(wx.ID_EXIT, _("Exit"))


command:

patch -p1 -i filename.patch

You are free to add this to the original code in the next version, i don't want any credit.

Edited by UnknowN-TerroR

Quentin PÂRIS Thursday 7 May 2009 at 19:53
Quentin PÂRIS
Admin

Thank's, I will add it