trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Re: [trinity-devel] bug #908 fix

From: Leandro Nini <drfiemost@...>
Date: Sat, 31 Mar 2012 15:25:50 +0200
> 
> 
> Like I said, I've been working on some patches quietly. Here is one.
> 
> This fixes bug 908, by implementing an option to enable cycling
> through desktops with the mouse wheel.
> 
> Please test this out.
> 
> http://bugs.trinitydesktop.org/show_bug.cgi?id=908
> 

Works here!

I would suggest making a bit more efficient and clean by putting the check
at the beginning of the wheelEvent method like this:

void KMiniPager::wheelEvent( TQWheelEvent* e )
{
    if(!cycleWindow())
        return;

    int newDesk;
    int desktops = KWin::numberOfDesktops();
    if (m_twin->numberOfViewports(0).width() *
m_twin->numberOfViewports(0).height() > 1 )
...

This way by looking at the code it is immediately clear that if cycleWindow
is false the method is a no-op and you avoid an extra level of indentation.


--
Leandro
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con Email.it: http://www.email.it/f
 
 Sponsor:
 Apri subito Conto Corrente Arancio. Carta Visa Gratis e nessun Canone!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12246&d=20120331


 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Centinaia di Idee Regalo a partire da 1 euro! Su MisterCupido.com alta qualita' a prezzi imbattibili... e spedizioni in 2/3 giorni!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11452&d=31-3