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

List:       kde-commits
Subject:    kdelibs/kio/kfile
From:       Stephan Binner <binner () kde ! org>
Date:       2005-04-05 15:14:14
Message-ID: 20050405151414.D814B63E () office ! kde ! org
[Download RAW message or body]

CVS commit by binner: 

If Shift is pressed when menu opens show 'Delete' instead of 'Trash' (#100394)


  M +3 -2      kdiroperator.cpp   1.201


--- kdelibs/kio/kfile/kdiroperator.cpp  #1.200:1.201
@@ -1373,9 +1373,10 @@ void KDirOperator::setupMenu(int whichAc
     {
         actionMenu->insert( mkdirAction );
-        if (currUrl.isLocalFile())
+        if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & Qt::ShiftButton))
             actionMenu->insert( myActionCollection->action( "trash" ) );
         KConfig *globalconfig = KGlobal::config();
         KConfigGroupSaver cs( globalconfig, QString::fromLatin1("KDE") );
-        if (!currUrl.isLocalFile() || globalconfig->readBoolEntry("ShowDeleteCommand", false)) 
+        if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & Qt::ShiftButton) ||
+            globalconfig->readBoolEntry("ShowDeleteCommand", false))
             actionMenu->insert( myActionCollection->action( "delete" ) );
         actionMenu->insert( actionSeparator );


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

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