[Panel-devel] minimization to taskbar

Jason Stubbs jasonbstubbs at gmail.com
Sat Dec 1 08:35:25 CET 2007


On Saturday 01 December 2007 16:12:00 Chani wrote:
> On December 1, 2007 00:21:49 Jason Stubbs wrote:
> > I've had a go at getting the task bar to report it's position to kwin.
> > Rather than copying the code from systemtray, I've moved it into
> > Plasma::Widget so that it can be reused by anything else that might
> > need to know this sort of stuff.
> >
> > Attached are three patches:
> > * Add associatedViews(), mapToView() and mapFromView() to Widget
> > * Modify SystemTray to use the new methods
> > * Add reporting of position to kwin in tasks.cpp
> >
> > Comments?
>
> yay :)
> but, what happens to contentSizeHint() if m_currentView is null? that looks
> like it could crash.

If you're referring to the system tray patch, m_currentView is already checked 
above where edits have been made.

> also, a few comments got lost when you moved the code. :)

Yeah, but as far as the widget patch goes the only thing that really needs a 
comment (given that the function names serve as a comment) is the adding and 
subtracting of QSize(1, 1). While giving the right values, it seems more like 
it's covering an issue somewhere else. If it is, that code will go. :)

What I'm most interested in is whether the Widget changes are acceptable 
seeing that Qt4.4 will likely make them unnecessary. Perhaps __attribute__ 
((deprecated)) should be added in advance to ward off using the functions 
except where absolutely necessary?

-- 
Jason Stubbs


More information about the Panel-devel mailing list