KTabBar -- double clicking on empty space
Andreas Hartmetz
ahartmetz at gmail.com
Sun Sep 9 17:52:21 BST 2007
On Sunday 09 September 2007 18:40:14 Constantin Berzan wrote:
> On Sunday 09 September 2007 15:59, Richard Moore wrote:
> > On 9/9/07, Thomas Zander <zander at 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.
++ for two signals and renaming the existing one to tabDoubleClick[ed]().
The current name is, strictly speaking, wrong anyway.
What about the freeze though?
And what about right clicks? A too large number of signals is also something
to avoid...
Oh, wait. Actually tab widgets should behave the same way in every application
as far as that makes sense (very far IMO), so why would anyone need all these
signals? Without an answer to this the rest is premature optimization.
More information about the kde-core-devel
mailing list