Changeset 92 for pykoticon/trunk
- Timestamp:
- 01/27/06 09:46:13 (19 years ago)
- Location:
- pykoticon/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykoticon/trunk/bin/pykoticon
r91 r92 87 87 self.logDebug("Remote host asked to close the application.") 88 88 self.frame.quitEvent.set() 89 wx.CallAfter(self.frame.OnClose, None) 89 90 return True 90 91 … … 95 96 """ 96 97 wx.CallAfter(self.frame.askConfirmation, printername, username, jobid, jobtitle, jobsize) 98 99 # ugly, isn't it ? 97 100 while self.frame.askConfirmationResult is None : 98 101 time.sleep(0.5) 99 102 retcode = self.frame.askConfirmationResult 100 self.frame.askConfirmationResult = None 103 self.frame.askConfirmationResult = None # prepare for next call, just in case 101 104 return retcode 102 105 … … 127 130 self.register_function(self.export_nop) 128 131 while not self.frame.quitEvent.isSet() : 129 self.logDebug("Loop!")130 132 self.handle_request() 131 133 self.server_close() 132 try :133 if not self.frame.closing :134 self.frame.Close()135 except :136 # Probably already closed137 pass138 134 sys.exit(0) 139 135 … … 142 138 def __init__(self, parent, id): 143 139 self.askConfirmationResult = None 144 self.closing = False145 140 wx.Frame.__init__(self, parent, wx.ID_ANY, \ 146 _("PyKota for user%s") % getCurrentUserName(), \141 _("PyKota info for %s") % getCurrentUserName(), \ 147 142 size = (-1, -1), \ 148 143 style = wxPython.wx.wxDEFAULT_FRAME_STYLE \ … … 186 181 server = xmlrpclib.ServerProxy("http://localhost:%s" % self.port) 187 182 try : 183 # wake the server with an empty request 184 # for it to see the event object 185 # which has just been set 188 186 server.nop() 189 187 except : … … 209 207 def OnClose(self, event) : 210 208 sys.stderr.write("Close event !\n") 211 self.closing = True212 209 self.closeServer() 213 210 if hasattr(self, "menu") : … … 231 228 message = _("""Hello %(username)s, 232 229 233 234 235 236 237 230 You sent job %(jobid)s (%(jobtitle)s) to printer %(printername)s. 231 232 This job seems to be %(jobsize)s pages long. 233 234 Please confirm or cancel.""") % locals() 238 235 239 236 dialog = wx.MessageDialog(self, message, _("Confirmation"), wx.OK | wx.CANCEL) -
pykoticon/trunk/setup.py
r89 r92 48 48 author_email = "alet@librelogiciel.com", 49 49 url = "http://www.librelogiciel.com/software/", 50 windows=[os.path.join("bin", "pykoticon")],50 # windows=[os.path.join("bin", "pykoticon")], 51 51 scripts=[os.path.join("bin", "pykoticon")], 52 52 data_files=[(directory, glob.glob(os.path.join("icons", "*.ico")))])