Re: [Deskbar] X Grab



On Sat, 2006-05-20 at 20:56 +0200, Mikkel Kamstrup Erlandsen wrote:
> 2006/5/20, Raphael Slinckx <raphael slinckx net>:

> 
> It should be easily adaptable.  In the refactored code each UI has the
> focus/layout logic completely isolated. 
> 
> Maybe they can be embedded as convience methods in the
> CuemiacLayoutProvider abstract class (see
> ui/cuemiac/CuemiacLayoutProvider.py).

Hi !

I have a working hack with my code hooked into your refactored code.
It's a huge hack but it works.

I think it will require quite a massive approach change to be merged
correctly..

My approach is to subclass CuemiacEntry in CuemiacPopupEntry. It is an
entry that also has a private popup window that does all the focus magic
et co.

So this doesn't fit quite well in the code, since the code assumes in
multiple places that the entry and the popup are two distinct entities
with focus behavior between the two.

Could you arrange that in your refactoring ?
Here is the API i used:
class CuemiacPopupEntry(CuemiacEntry):
  def __init__(self, default_icon, treeview, applet):
    CuemiacEntry.__init__(default_icon)

Treeview is the cuemiac treeview (the popup must have it to tweak the
selection cursor), the default_icon is the same as used in Cuemiac
Entry, and applet is needed bexause i re-use the CuemiacAlignedWindow
that requires the applet to be around..
This can be changed of course, if needed.

I don't know if i'm clear here ?
Quick summary: remova all places where separate entry/treeviewpopup are
assumed, and encapsulate the entry+popup in one single class (that i've
done) and adapt existing code accordingly. (that means no more
grab_focus and focus-out-event and such, all focus is inside that class)

Thanks !
Raf





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]