[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_1_BRANCH: kdebase/kdesktop
From: Waldo Bastian <bastian () kde ! org>
Date: 2003-04-29 16:24:49
[Download RAW message or body]
CVS commit by waba:
Fix dropping of images on desktop.
M +21 -8 kdiconview.cc 1.66.2.3
--- kdebase/kdesktop/kdiconview.cc #1.66.2.2:1.66.2.3
@@ -975,16 +975,29 @@ void KDIconView::contentsDropEvent( QDro
bool isColorDrag = KColorDrag::canDecode(e);
bool isImageDrag = QImageDrag::canDecode(e);
+ bool isUrlDrag = QUriDrag::canDecode(e);
bool isImmutable = KGlobal::config()->isImmutable();
- if ( isColorDrag ) {
- if ( isImmutable ) // just ignore event in kiosk-mode
+ if ( (isColorDrag || isImageDrag) && !isUrlDrag ) {
+ // Hack to clear the drag shape
+ bool bMovable = itemsMovable();
+ bool bSignals = signalsBlocked();
+ setItemsMovable(false);
+ blockSignals(true);
+ KIconView::contentsDropEvent( e );
+ blockSignals(bSignals);
+ setItemsMovable(bMovable);
+ // End hack
+
+ if ( !isImmutable ) // just ignore event in kiosk-mode
+ {
+ if ( isColorDrag)
emit colorDropEvent( e );
- }
- else if ( isImageDrag ) {
- if ( isImmutable ) // just ignore event in kiosk-mode
+ else if (isImageDrag)
emit imageDropEvent( e );
- } else
+ }
+ } else {
KonqIconViewWidget::contentsDropEvent( e );
+ }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic