[Commits] (morgen) (Possible) fix for bug 1929 (Accounts dialog
crashes when switching between account formss)
commits at osafoundation.org
commits at osafoundation.org
Thu Sep 30 16:54:38 PDT 2004
Commit by: morgen
Modified files:
chandler/application/dialogs/AccountPreferences.py 1.14 1.15
Log message:
(Possible) fix for bug 1929 (Accounts dialog crashes when switching between account formss)
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/application/dialogs/AccountPreferences.py.diff?r1=text&tr1=1.14&r2=text&tr2=1.15
Index: chandler/application/dialogs/AccountPreferences.py
diff -u chandler/application/dialogs/AccountPreferences.py:1.14 chandler/application/dialogs/AccountPreferences.py:1.15
--- chandler/application/dialogs/AccountPreferences.py:1.14 Mon Sep 27 11:12:16 2004
+++ chandler/application/dialogs/AccountPreferences.py Thu Sep 30 16:54:37 2004
@@ -180,6 +180,10 @@
id=wx.xrc.XRCID("ACCOUNTS_LIST"))
self.SetDefaultItem(wx.xrc.XRCCTRL(self, "wxID_OK"))
+ # Setting focus to the accounts list let's us "tab" to the first
+ # text field (without this, on the mac, tabbing doesn't work)
+ self.accountsList.SetFocus()
+
def __PopulateAccountsList(self, account):
""" Find all AccountBase items and put them in the list; also build
up a data structure with the applicable attribute values we'll
@@ -246,7 +250,9 @@
# Get current form data and tuck it away
self.__StoreFormData(self.currentPanelType, self.currentPanel,
self.data[self.currentIndex]['values'])
- self.currentPanel.Destroy()
+ self.innerSizer.Detach(self.currentPanel)
+ self.currentPanel.Hide()
+ wx.CallAfter(self.currentPanel.Destroy)
self.currentIndex = index
self.currentPanelType = self.data[index]['item'].accountType
@@ -257,7 +263,6 @@
self.innerSizer.Add(self.currentPanel, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
self.outerSizer.Fit(self)
- self.accountsList.SetFocus()
# When a text field receives focus, call the handler.
for field in PANELS[self.currentPanelType]['fields'].keys():
More information about the Commits
mailing list