Changeset 111 for pykoticon/trunk/bin/pykoticon
- Timestamp:
- 03/23/06 18:51:53 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykoticon/trunk/bin/pykoticon
r110 r111 56 56 raise ImportError, "wxPython is missing. Please install it." 57 57 58 aboutbox = """PyKotIcon v1.00 (c) 2003, 2004, 2005, 2006 Jerome Alet - alet@librelogiciel.com 59 60 PyKotIcon is a client side print quota notifier for PyKota, but it 61 can be used from other applications if you want. 62 63 This program is free software; you can redistribute it and/or modify 64 it under the terms of the GNU General Public License as published by 65 the Free Software Foundation; either version 2 of the License, or 66 (at your option) any later version. 67 68 This program is distributed in the hope that it will be useful, 69 but WITHOUT ANY WARRANTY; without even the implied warranty of 70 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 71 GNU General Public License for more details. 72 73 You should have received a copy of the GNU General Public License 74 along with this program; if not, write to the Free Software 75 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.""" 76 58 77 def getCurrentUserName() : 59 78 """Retrieves the current user's name.""" … … 190 209 wx.Frame.__init__(self, parent, id, \ 191 210 _("PyKotIcon info for %s") % getCurrentUserName(), \ 192 size = (-1, -1), \ 193 style = wx.DEFAULT_FRAME_STYLE \ 194 | wx.SIZE_AUTO_HEIGHT \ 195 | wx.SIZE_AUTO_WIDTH \ 196 | wx.NO_FULL_REPAINT_ON_RESIZE) 211 size = (1, 1), \ 212 style = wx.FRAME_NO_TASKBAR | wx.NO_FULL_REPAINT_ON_RESIZE) 197 213 try : 198 214 self.tbicon = wx.TaskBarIcon() … … 211 227 wx.EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarMenu) 212 228 229 self.TBMENU_ABOUT = wx.NewId() 213 230 self.TBMENU_RESTORE = wx.NewId() 214 231 self.TBMENU_CLOSE = wx.NewId() 232 wx.EVT_MENU(self.tbicon, self.TBMENU_ABOUT, \ 233 self.OnAbout) 215 234 wx.EVT_MENU(self.tbicon, self.TBMENU_RESTORE, \ 216 235 self.OnTaskBarActivate) … … 222 241 pass 223 242 else : 224 self.menu.Append(self.TBMENU_ RESTORE, _("About"))243 self.menu.Append(self.TBMENU_ABOUT, _("About")) 225 244 self.menu.Append(self.TBMENU_CLOSE, _("Quit")) 226 245 … … 232 251 if not self.IsIconized() : 233 252 self.Iconize(True) 234 #self.Hide()253 self.Hide() 235 254 236 255 def OnTaskBarActivate(self, event) : … … 262 281 def OnTaskBarClose(self, event) : 263 282 self.Close() 283 284 def OnAbout(self, event) : 285 """Displays the about box.""" 286 dialog = wx.MessageDialog(self, aboutbox, _("About"), wx.OK | wx.ICON_INFORMATION) 287 dialog.ShowModal() 288 dialog.Destroy() 264 289 265 290 def showDialog(self, message, yesno) : … … 315 340 316 341 317 class PyKotIconApp(wx. PySimpleApp):342 class PyKotIconApp(wx.App): 318 343 def OnInit(self) : 319 344 self.frame = PyKotIcon(None, wx.ID_ANY) 345 self.frame.Center(wx.BOTH) 346 self.frame.Show(False) 320 347 return True 321 348 … … 323 350 """Continues processing.""" 324 351 self.frame.postInit(printserver, localport) 325 #self.frame.Show(True)326 352 327 353 def main(printserver, localport):