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

List:       kde-commits
Subject:    KDE/kdepim/kontact/plugins/summary
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2007-10-28 20:58:47
Message-ID: 1193605127.350013.17649.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 730459 by tokoe:

Fix drag 'n drop of summary widgets


 M  +1 -1      dropwidget.cpp  
 M  +6 -4      summaryview_part.cpp  


--- trunk/KDE/kdepim/kontact/plugins/summary/dropwidget.cpp #730458:730459
@@ -32,7 +32,7 @@
 
 void DropWidget::dragEnterEvent( QDragEnterEvent *event )
 {
-  if (event->source()->inherits("SummaryWidget"))
+  if (event->mimeData()->hasFormat("application/x-kontact-summary"))
     event->acceptProposedAction();
 }
 
--- trunk/KDE/kdepim/kontact/plugins/summary/summaryview_part.cpp #730458:730459
@@ -213,11 +213,11 @@
   QHBoxLayout *layout = new QHBoxLayout( mFrame );
 
   mLeftColumn = new QVBoxLayout();
-  layout->addItem( mLeftColumn );
+  layout->addLayout( mLeftColumn );
   mLeftColumn->setSpacing( KDialog::spacingHint() );
   layout->addWidget( vline );
   mRightColumn = new QVBoxLayout();
-  layout->addItem( mRightColumn );
+  layout->addLayout( mRightColumn );
   mRightColumn->setSpacing( KDialog::spacingHint() );
 
 
@@ -256,10 +256,10 @@
   }
 
   if ( mLeftColumn->indexOf( widget ) != -1 ) {
-    mLeftColumn->remove( widget );
+    mLeftColumn->removeWidget( widget );
     mLeftColumnSummaries.removeAll( widgetName( widget ) );
   } else if ( mRightColumn->indexOf( widget ) != -1 ) {
-    mRightColumn->remove( widget );
+    mRightColumn->removeWidget( widget );
     mRightColumnSummaries.removeAll( widgetName( widget ) );
   }
 
@@ -283,6 +283,7 @@
       mRightColumnSummaries.insert( pos, widgetName( widget ) );
     }
 
+    mFrame->updateGeometry();
     return;
   }
 
@@ -302,6 +303,7 @@
     mRightColumn->insertWidget( targetPos, widget );
     mRightColumnSummaries.insert( targetPos, widgetName( widget ) );
   }
+  mFrame->updateGeometry();
 }
 
 void SummaryViewPart::slotTextChanged()
[prev in list] [next in list] [prev in thread] [next in thread] 

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