GNOME Bugzilla – Bug 433874
Cleanup auto_pointer flags
Last modified: 2007-05-09 20:32:06 UTC
We have an auto_pointer flag in Tier.py and an tools_auto_pointer flag in Task/Tools/Base.py. The one in Tier appears to never be used, whereas the one in the TaskTools base class seems to do actual work. I think the one in the Tier can be safely removed.
SearchPerk.py is calling self.tier.setAutoPointer(True/False). So apparently we do need it. Here's what cleanup should involve: 1) Documenting what Tier's auto_pointer does in epydoc. 2) Fixing the code at the start of Tier's manageEvent() so that the pointer_por does not overwrite the focus_por. Just because the pointer isn't tracking the focus_por doesn't mean the focus_por should be lost. 3) Figuring out a more elegant way of unifying the tools_auto_pointer and the Tier auto_pointer. Why do we have separate concepts? 4) If we need to keep the Tier auto_pointer, define TaskTools to access the Tier get/setAutoPointer methods.
SearchPerk needs it so pointer is not 'lost' from application and switched to the chooser dialog. The search perk sets the autopointer to false when the chooser dialog is launched and back to true when it is closed. It also wraps each call to 'pointer to por' by setting autopointer to True before the call and back to False after the call, thus enabling 'pointer to por' to switch the pointer.
Stripped out auto pointer from Tier for now. This means the POR returns to the last focused location in the application when the user switches away from the search dialog. For now, the workaround for the user is either to give the last location focus or set a bookmark before switching away from the GUI. We have to evaluate how necessary pretending the pointer is the focus is when reactivating a window. It may make searching slightly more usable, but it introduces all sorts of complications like disabling the review keys and possibly overwriting the true focus. The fix for this bug also included numerous fixes for the SearchPerk including better disposal of chooser references, addition of a close button to the dialog, announcement of the search dialog closing when it is in the background, and a fix for searching next instead of previous.