Commit by: morgen Modified files: chandler/application/Application.py 1.312 1.313
Log message: Fix for 2728 (Send button broken) Bugzilla links: http://bugzilla.osafoundation.org/show_bug.cgi?id=2728 ViewCVS links: http://cvs.osafoundation.org/index.cgi/chandler/application/Application.py.diff?r1=text&tr1=1.312&r2=text&tr2=1.313 Index: chandler/application/Application.py diff -u chandler/application/Application.py:1.312 chandler/application/Application.py:1.313 --- chandler/application/Application.py:1.312 Fri Mar 18 14:16:15 2005 +++ chandler/application/Application.py Fri Mar 18 17:01:55 2005 @@ -1,5 +1,5 @@ -__version__ = "$Revision: 1.312 $" -__date__ = "$Date: 2005/03/18 22:16:15 $" +__version__ = "$Revision: 1.313 $" +__date__ = "$Date: 2005/03/19 01:01:55 $" __copyright__ = "Copyright (c) 2003-2005 Open Source Applications Foundation" __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm" @@ -463,11 +463,25 @@ if event.GetEventType() == wx.wxEVT_COMMAND_TOOL_CLICKED: appBar = Block.findBlockByName("ApplicationBar") + + # @@@MOR: + # Only change the focus if we're clicking one of the 'view selector' + # buttons (one of the first 4) since stealing focus from the DV + # breaks the Send button. This hack on a hack should get removed + # when wx 2.5.4 is integrated. + numToCheck = 4 + for child in appBar.childrenBlocks: + + if numToCheck == 0: + break + if hasattr(child, "widget") and child.widget.GetId() == wxID: Block.findBlockByName("Sidebar").widget.SetFocus() break + numToCheck -= 1 + if wxID >= Block.MINIMUM_WX_ID and wxID <= Block.MAXIMUM_WX_ID: block = Block.widgetIDToBlock (wxID) _______________________________________________ Commits mailing list Commits@osafoundation.org http://lists.osafoundation.org/mailman/listinfo/commits