Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

taskbar: introduce command constants

Patch from Adrian

Changeset d788d8d892b8

Parent dbeed603346d

by Steve Borho

Changes to one file · Browse files at d788d8d892b8 Showing diff from parent dbeed603346d Diff from another changeset...

Change 1 of 3 Show Entire File taskbar.py Stacked
 
26
27
28
 
 
 
29
30
31
 
90
91
92
93
 
94
95
 
96
97
98
 
102
103
104
105
 
106
107
108
109
110
 
111
112
113
 
26
27
28
29
30
31
32
33
34
 
93
94
95
 
96
97
 
98
99
100
101
 
105
106
107
 
108
109
110
111
112
 
113
114
115
116
@@ -26,6 +26,9 @@
   APP_TITLE = "TortoiseHg RPC server"   +SHOWLOG_CMD = 1023 +EXIT_CMD = 1025 +  class MainWindow:   def __init__(self):   msg_TaskbarRestart = RegisterWindowMessage("TaskbarCreated"); @@ -90,9 +93,9 @@
  def OnTaskbarNotify(self, hwnd, msg, wparam, lparam):   if lparam==win32con.WM_RBUTTONUP or lparam==win32con.WM_LBUTTONUP:   menu = CreatePopupMenu() - AppendMenu(menu, win32con.MF_STRING, 1023, 'Options...') + AppendMenu(menu, win32con.MF_STRING, SHOWLOG_CMD, 'Options...')   AppendMenu(menu, win32con.MF_SEPARATOR, 0, '') - AppendMenu(menu, win32con.MF_STRING, 1025, 'Exit' ) + AppendMenu(menu, win32con.MF_STRING, EXIT_CMD, 'Exit' )   pos = GetCursorPos()   # See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/menus_0hdi.asp   SetForegroundWindow(self.hwnd) @@ -102,12 +105,12 @@
    def OnCommand(self, hwnd, msg, wparam, lparam):   id = LOWORD(wparam) - if id == 1023: + if id == SHOWLOG_CMD:   if not self.guithread or not self.guithread.isAlive():   self.launchgui()   else:   print "TortoiseHG options dialog already running" - elif id == 1025: + elif id == EXIT_CMD:   self.exit_application()   else:   print "Unknown command -", id