Mailing list archives: August 2004

Site index · List index
Message listThread · Author · Date
hat stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
us   hat stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Tue, 18 Feb, 17:56
us   hat stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Tue, 18 Feb, 17:56
  hat stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Tue, 18 Feb, 17:56
alog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
  alog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Thu, 03 Oct, 23:00
  alog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Thu, 03 Oct, 23:00
nCommand - self.jabberClient.Login() + from OSAF.framework.blocks.Block import Block, BlockEvent + from OSAF.framework.notifications.Notification import Notification - # start the agent manager - from OSAF.framework.agents.AgentManager import AgentManager - Globals.agentManager = AgentManager() - Globals.agentManager.Startup() + wxID = event.GetId() + if wxID >= Block.MINIMUM_WX_ID and wxID <= Block.MAXIMUM_WX_ID: + blockEvent = Block.wxIDToObject (wxID) + + if isinstance (blockEvent, BlockEvent): + assert isinstance (blockEvent, BlockEvent) + if event.GetEventType() == wxEVT_UPDATE_UI: + data = {'type':'UpdateUI'} + else: + data = {'type':'Normal'} - #self.OpenStartingURL() + notification = Notification(blockEvent, None, None) + notification.SetData(data) + Globals.notificationManager.PostNotification (notification) + if event.GetEventType() == wxEVT_UPDATE_UI: + try: + event.Check (data ['Check']) + except KeyError: + pass + try: + event.Enable (data ['Enable']) + except KeyError: + pass + try: + text = data ['Text'] + eventObject = event.GetEventObject() + event.SetText (data ['Text']) + except KeyError: + pass + return + event.Skip() - return true #indicates we succeeded with initialization + def OnIdle(self, event): + """ + Adding a handler for catching a set focus event doesn't catch + every change to the focus. It's difficult to preprocess every event + so we check for focus changes in OnIdle + """ + focus = wxWindow_FindFocus() + if self.focus != focus: + self.focus = focus + Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) > 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
m   nCommand - self.jabberClient.Login() + from OSAF.framework.blocks.Block import Block, BlockEvent + from OSAF.framework.notifications.Notification import Notification - # start the agent manager - from OSAF.framework.agents.AgentManager import AgentManager - Globals.agentManager = AgentManager() - Globals.agentManager.Startup() + wxID = event.GetId() + if wxID >= Block.MINIMUM_WX_ID and wxID <= Block.MAXIMUM_WX_ID: + blockEvent = Block.wxIDToObject (wxID) + + if isinstance (blockEvent, BlockEvent): + assert isinstance (blockEvent, BlockEvent) + if event.GetEventType() == wxEVT_UPDATE_UI: + data = {'type':'UpdateUI'} + else: + data = {'type':'Normal'} - #self.OpenStartingURL() + notification = Notification(blockEvent, None, None) + notification.SetData(data) + Globals.notificationManager.PostNotification (notification) + if event.GetEventType() == wxEVT_UPDATE_UI: + try: + event.Check (data ['Check']) + except KeyError: + pass + try: + event.Enable (data ['Enable']) + except KeyError: + pass + try: + text = data ['Text'] + eventObject = event.GetEventObject() + event.SetText (data ['Text']) + except KeyError: + pass + return + event.Skip() - return true #indicates we succeeded with initialization + def OnIdle(self, event): + """ + Adding a handler for catching a set focus event doesn't catch + every change to the focus. It's difficult to preprocess every event + so we check for focus changes in OnIdle + """ + focus = wxWindow_FindFocus() + if self.focus != focus: + self.focus = focus + Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) > 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Fri, 17 Sep, 18:43
method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
lt   method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Tue, 19 Apr, 06:07
dow. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
  dow. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Mon, 08 Nov, 16:33
ror: + pass + try: + text = data ['Text'] + eventObject = event.GetEventObject() + event.SetText (data ['Text']) + except KeyError: + pass + return + event.Skip() - return true #indicates we succeeded with initialization + def OnIdle(self, event): + """ + Adding a handler for catching a set focus event doesn't catch + every change to the focus. It's difficult to preprocess every event + so we check for focus changes in OnIdle + """ + focus = wxWindow_FindFocus() + if self.focus != focus: + self.focus = focus + Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) > 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
  ror: + pass + try: + text = data ['Text'] + eventObject = event.GetEventObject() + event.SetText (data ['Text']) + except KeyError: + pass + return + event.Skip() - return true #indicates we succeeded with initialization + def OnIdle(self, event): + """ + Adding a handler for catching a set focus event doesn't catch + every change to the focus. It's difficult to preprocess every event + so we check for focus changes in OnIdle + """ + focus = wxWindow_FindFocus() + if self.focus != focus: + self.focus = focus + Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) > 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Thu, 29 Jul, 13:31
Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) > 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
<Catherine.No...@awl.com>    Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) &gt; 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Fri, 19 Jun, 18:20
tup() + wxID = event.GetId() + if wxID &gt;= Block.MINIMUM_WX_ID and wxID &lt;= Block.MAXIMUM_WX_ID: + blockEvent = Block.wxIDToObject (wxID) + + if isinstance (blockEvent, BlockEvent): + assert isinstance (blockEvent, BlockEvent) + if event.GetEventType() == wxEVT_UPDATE_UI: + data = {'type':'UpdateUI'} + else: + data = {'type':'Normal'} - #self.OpenStartingURL() + notification = Notification(blockEvent, None, None) + notification.SetData(data) + Globals.notificationManager.PostNotification (notification) + if event.GetEventType() == wxEVT_UPDATE_UI: + try: + event.Check (data ['Check']) + except KeyError: + pass + try: + event.Enable (data ['Enable']) + except KeyError: + pass + try: + text = data ['Text'] + eventObject = event.GetEventObject() + event.SetText (data ['Text']) + except KeyError: + pass + return + event.Skip() - return true #indicates we succeeded with initialization + def OnIdle(self, event): + """ + Adding a handler for catching a set focus event doesn't catch + every change to the focus. It's difficult to preprocess every event + so we check for focus changes in OnIdle + """ + focus = wxWindow_FindFocus() + if self.focus != focus: + self.focus = focus + Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) &gt; 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org>
<bruno_lo...@terra.com.br>   tup() + wxID = event.GetId() + if wxID &gt;= Block.MINIMUM_WX_ID and wxID &lt;= Block.MAXIMUM_WX_ID: + blockEvent = Block.wxIDToObject (wxID) + + if isinstance (blockEvent, BlockEvent): + assert isinstance (blockEvent, BlockEvent) + if event.GetEventType() == wxEVT_UPDATE_UI: + data = {'type':'UpdateUI'} + else: + data = {'type':'Normal'} - #self.OpenStartingURL() + notification = Notification(blockEvent, None, None) + notification.SetData(data) + Globals.notificationManager.PostNotification (notification) + if event.GetEventType() == wxEVT_UPDATE_UI: + try: + event.Check (data ['Check']) + except KeyError: + pass + try: + event.Enable (data ['Enable']) + except KeyError: + pass + try: + text = data ['Text'] + eventObject = event.GetEventObject() + event.SetText (data ['Text']) + except KeyError: + pass + return + event.Skip() - return true #indicates we succeeded with initialization + def OnIdle(self, event): + """ + Adding a handler for catching a set focus event doesn't catch + every change to the focus. It's difficult to preprocess every event + so we check for focus changes in OnIdle + """ + focus = wxWindow_FindFocus() + if self.focus != focus: + self.focus = focus + Globals.mainView.onSetFocus() + event.Skip() - def OnTerminate(self): + def OnExit(self): """ Main application termination. """ @@ -364,36 +283,8 @@ need to add a final commit when the application quits to save data the state of the user's world, e.g. window location and size. """ - self.repository.commit(purge=True) - self.repository.close() - del self.applicationResources - - def OpenStartingURL(self): - """ - Opens the proper url when the application first starts. If - this is the first time running, then we just take the first item - in the URLTree. If we have persisted, then we use the last - remembered url. - """ - if not hasattr(self, 'wxMainFrame'): - self.wxMainFrame = app.association[id(self.model.mainFrame)] - url = self.wxMainFrame.navigationBar.model.GetCurrentURL() - if url != None: - url = app.jabberClient.StripRemoteIfNecessary(url) - self.wxMainFrame.GoToURL(url, false) - else: - children = self.model.URLTree.GetURLChildren('') - if len(children) &gt; 0: - self.wxMainFrame.GoToURL(children[0], true) - - def OnQuit(self, event): - """ - Exit the application - """ - # FIXME: This will not fully quit the app if a stdout window has been - # opened by a print statement. We should also close that stdout window. - self.wxMainFrame.Close() - Globals.agentManager.Shutdown() + Globals.repository.commit(purge=True) + Globals.repository.close() def OnMainThreadCallbackEvent(self, event): """ @@ -403,291 +294,6 @@ event.lock.release() event.Skip() - def OnAbout(self, event): - """ - Show the splash screen in response to the about command - """ - - pageLocation = os.path.join ('application', 'welcome.html') - splash = SplashScreen(app.wxMainFrame, _("About Chandler"), - pageLocation, True, False) - splash.ShowModal() - splash.Destroy() - - def OnPreferences(self, event): - """ - Show the preferences dialog - """ - title = _("Chandler Preferences") - dialog = PreferencesDialog.PreferencesDialog(app.wxMainFrame, title, self.model.preferences) - - result = dialog.ShowModal() - if result == wxID_OK: - dialog.SavePreferences() - self.HandleSystemPreferences() - dialog.Destroy() - - def LoadParcelsV2InDirectory (self, baseDir, relDir=""): - """ - Load the parcels and call the class method to install them. Parcels - are Python Packages and are defined by directories that contain - __init__.py (or __init__.pyc). __init__.py must assign the parcel's - class name to parcelClass. For example: - - parcelClass = 'CalendarFile.CalendarClass' - - CalendarFile is the python file (without the .py extension) that - contains the class CalendarClass contained in the file which is - the parcel class. - - For examples, look in the parcel directory. - - The method now takes two directory arguments, baseDir and relDir. - baseDir should be a directory containing parcel subdirectories, - while relDir is only used when recursing through directories below - baseDir. - """ - path = os.path.join(baseDir, relDir) - assert (os.path.exists (path) and os.path.isdir(path)) - - if (relDir and \ - (os.path.exists(os.path.join (path, "__init__.py")) or \ - os.path.exists(os.path.join (path, "__init__.pyc")) or \ - os.path.exists(os.path.join (path, "__init__.pyo"))) \ - ): - importArgument = relDir.replace (os.sep, '.') - """ - Import the parcel, which should define parcelClass. - - If you get an error like: Import can't find module, - or can't find name in module: No module named XYZ.XYZ - on the following statement, you probablyf startTLS(self, ctx): + assert not self.TLS + self.stopReading() + self.stopWriting() +- self._startTLS() +- self.socket = SSL.Connection(ctx.getContext(), self.soc-25foundation.org> Sat, 25 Apr, 01:55
Message listThread · Author · Date
Box list
Jan 200827
Dec 2007224
Nov 2007217
Oct 2007105
Sep 200793
Aug 200727
Jul 2007105
Jun 2007108
May 2007292
Apr 2007276
Mar 2007275
Feb 2007303
Jan 2007183
Dec 2006232
Nov 2006183
Oct 200697
Sep 2006163
Aug 2006162
Jul 2006265
Jun 2006136
May 2006105
Apr 2006208
Mar 2006229
Feb 2006230
Jan 2006260
Dec 2005128
Nov 2005246
Oct 2005123
Sep 200572
Aug 200524
Jul 200517
Jun 20054
May 200520
Apr 20059
Mar 200519
Feb 200514
Jan 200548
Dec 200448
Nov 200410
Oct 20043
Aug 200411
Jul 20045
Jun 200412
May 20041
Apr 200421
Mar 200419
Feb 20047
Jan 200463
Dec 200344
Nov 200335
Oct 200343
Sep 200338
Aug 200354
Jul 200314
Jun 200360
May 2003125
Apr 2003117
Mar 2003166
Feb 2003220
Jan 2003408
Dec 2002297
Nov 2002728
Oct 2002479