[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KTabBar -- double clicking on empty space
From:       Constantin Berzan <exit3219 () gmail ! com>
Date:       2007-09-09 16:40:14
Message-ID: 200709091940.15473.exit3219 () gmail ! com
[Download RAW message or body]

On Sunday 09 September 2007 15:59, Richard Moore wrote:
> On 9/9/07, Thomas Zander <zander@kde.org> wrote:
> > The disadvantage of this is that all code listening to that signal need
> > to special-case the magic number "-1".
> > Which is sub-optimal because it adds complexity to the 'API' where you
> > don't expect it.
>
> Yes, and any existing code that is using that index could be broken in
> hard to find ways. I'd say having a new signal is a much cleaner
> design.

Having mouseDoubleClick(-1) makes sense.  If we create a separate signal for 
the empty tab area, then mouseDoubleClick() should be renamed to something 
like tabDoubleClick() to keep the semantics accurate and obvious (unless the 
new signal will be called mouseDoubleClick(void) as in KTabWidget).
Same thing for MiddleClick if we decide that middle-clicking the empty space 
is worth signalling.



-- 
Read my book!
http://ascending.wordpress.com/2007/08/05/diaries-of-the-last-dreamer/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic