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

List:       kde-commits
Subject:    KDE/kdebase/libkonq
From:       David Faure <faure () kde ! org>
Date:       2005-09-02 16:46:15
Message-ID: 1125679575.958738.28829.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 456341 by dfaure:

Allow to move icons in system:/ - the code which disallowed dropping new files
also disallowed moving icons.


 M  +4 -6      konq_iconviewwidget.cc  


--- trunk/KDE/kdebase/libkonq/konq_iconviewwidget.cc #456340:456341
@@ -1015,15 +1015,14 @@
         return;
     }
 
-#ifdef KFILEITEM_HAS_ISWRITABLE
     Q3IconViewItem *item = findItem( e->pos() );
-    if ( !item && m_rootItem && !m_rootItem->isWritable() ) {
+    if ( e->source() != viewport() &&
+         !item && m_rootItem && !m_rootItem->isWritable() ) {
         emit dragMove( false );
         e->ignore();
         cancelPendingHeldSignal();
         return;
     }
-#endif
     emit dragMove( true );
     KIconView::contentsDragMoveEvent( e );
 }
@@ -1220,12 +1219,11 @@
 {
   Q3IconViewItem *i = findItem( ev->pos() );
 
-#ifdef KFILEITEM_HAS_ISWRITABLE
-    if ( !i && m_rootItem && !m_rootItem->isWritable() ) {
+    if ( ev->source() != viewport() &&
+         !i && m_rootItem && !m_rootItem->isWritable() ) {
         ev->accept( false );
         return;
     }
-#endif
 
   // Short-circuit QIconView if Ctrl is pressed, so that it's possible
   // to drop a file into its own parent widget to copy it.
[prev in list] [next in list] [prev in thread] [next in thread] 

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