Fwd: KDesktop patch - usefull?

Alexander Kellett kelletta at eidetica.com
Mon Apr 8 11:56:53 BST 2002


On Mon, Apr 08, 2002 at 12:27:26PM +0200, David Faure wrote:
> What do people think about this feature?
> Anyone willing to make a config option for it?

Well, I think the question is why not? :)
Just a kconfig entry rather than a gui option would
certainly be enoug for the moment.

One of the nicest things about KDE is that
it is very easy for a user of any other 
desktop to switch to it and expect most of
the important usability features to have
been implemented.

This change is pretty flawless code wise,
and far from a performance / bloat issue :)

Alex

> ----------  Forwarded Message  ----------
> 
> Subject: KDesktop patch - usefull?
> Date: 07 Apr 2002 14:49:46 -0300
> From: Jason Keirstead <t126r at unb.ca>
> To: faure at kde.org
> 
> Hi David. According to bugs.kde.org, you are the maintainer of the
> kdesktop source. If I am wrong, please let me know :)
> 
> I wrote this little patch and I think others would find it extremely
> usefull as well. It duplicates the functionality in E whereby if you
> scroll the mousewheel on your desktop, it switches virtual desktops
> either backward or forward depending on the direction.
> 
> I realize some would not want to have this function, and that it should
> probably by some kind of option under Desktop settings, but I know
> nothing about programming the KDE gui, so I'll just forward this along
> to you and you can do what you want with it! It only affects one file,
> and is extremely simple.
> 
> Happy Trails.
> 
> ---BEGIN PATCH---
> diff -urN kdebase/kdesktop/kdiconview.old kdebase/kdesktop/kdiconview.cc
> --- kdebase/kdesktop/kdiconview.old     Sun Apr  7 14:29:31 2002
> +++ kdebase/kdesktop/kdiconview.cc      Sun Apr  7 14:29:21 2002
> @@ -38,7 +38,7 @@
>  #include <kstdaction.h>
>  #include <kstandarddirs.h>
>  #include <kurldrag.h>
> -
> +#include <dcopclient.h>
>  #include <qdir.h>
>  #include <qclipboard.h>
>  #include <qregexp.h>
> @@ -842,7 +842,14 @@
>  // don't scroll when someone uses his nifty mouse wheel
>  void KDIconView::viewportWheelEvent( QWheelEvent * e )
>  {
> -    e->ignore();
> +    int _delta = e->delta();
> +    if( _delta < 0 ) {
> +        kapp->dcopClient()->send("kwin", "KWinInterface",
> "previousDesktop()", "");
> +    } else {
> +        kapp->dcopClient()->send("kwin", "KWinInterface",
> "nextDesktop()", "");
> +    }
> +
> +    //e->ignore();
>  }
> 
>  void KDIconView::updateWorkArea( const QRect &wr )
> 
> 
> 
> -------------------------------------------------------
> 
> -- 
> David FAURE, david at mandrakesoft.com, faure at kde.org
> http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
> KDE, Making The Future of Computing Available Today
> 
> 

mvg,
Alex




More information about the kde-core-devel mailing list