[arch-commits] Commit in kdebase/trunk (PKGBUILD fix-folder-view-regression.patch)
Andrea Scarpino
andrea at archlinux.org
Thu Feb 10 07:06:18 UTC 2011
Date: Thursday, February 10, 2011 @ 02:06:18
Author: andrea
Revision: 109481
upgpkg: kdebase 4.6.0-2
Fix Folder View plasmoid regression in kdebase-plasma (FS#22740)
Added:
kdebase/trunk/fix-folder-view-regression.patch
Modified:
kdebase/trunk/PKGBUILD
----------------------------------+
PKGBUILD | 14 +++--
fix-folder-view-regression.patch | 95 +++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-02-10 07:04:58 UTC (rev 109480)
+++ PKGBUILD 2011-02-10 07:06:18 UTC (rev 109481)
@@ -14,17 +14,23 @@
'kdebase-lib'
'kdebase-plasma')
pkgver=4.6.0
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdebase')
makedepends=('kdebase-workspace' 'pkgconfig' 'cmake' 'automoc4' 'docbook-xsl')
-source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
-sha1sums=('887ddea760aaabb277082f9e8c0b2f8905e318b8')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+ 'fix-folder-view-regression.patch')
+sha1sums=('887ddea760aaabb277082f9e8c0b2f8905e318b8'
+ '63f3b16e9c05711465d9a059c53d94680d8709e7')
build() {
- cd $srcdir
+ # Already fixed upstream
+ cd ${srcdir}/${pkgbase}-${pkgver}
+ patch -Np1 -i ${srcdir}/fix-folder-view-regression.patch
+
+ cd ${srcdir}
mkdir build
cd build
cmake ../${pkgbase}-${pkgver} \
Added: fix-folder-view-regression.patch
===================================================================
--- fix-folder-view-regression.patch (rev 0)
+++ fix-folder-view-regression.patch 2011-02-10 07:06:18 UTC (rev 109481)
@@ -0,0 +1,95 @@
+--- a/apps/plasma/applets/folderview/iconview.cpp
++++ b/apps/plasma/applets/folderview/iconview.cpp
+@@ -1732,9 +1732,8 @@ void IconView::keyPressEvent(QKeyEvent *
+ }
+
+ nextIndex = currentIndex.sibling(newItem, currentIndex.column());
+- }
+-
+- else { //If the user has moved the icons, i.e. the view is no longer sorted
++ } else {
++ //If the user has moved the icons, i.e. the view is no longer sorted
+ QPoint currentPos = visualRect(currentIndex).center();
+
+ //Store distance between the first and the current index-
+@@ -1813,8 +1812,7 @@ void IconView::mousePressEvent(QGraphics
+ const QModelIndex index = indexAt(pos);
+
+ // If an icon was pressed
+- if (index.isValid())
+- {
++ if (index.isValid()) {
+ //if ctrl is held
+ if (event->modifiers() & Qt::ControlModifier) {
+ m_selectionModel->select(index, QItemSelectionModel::Toggle);
+@@ -1833,16 +1831,11 @@ void IconView::mousePressEvent(QGraphics
+ m_selectionModel->select(index, QItemSelectionModel::ClearAndSelect);
+ m_selectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate);
+ markAreaDirty(visibleArea());
+- }
+- else {
++ } else {
+ markAreaDirty(visualRect(index));
+ }
+
+- if (!(event->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier)) &&
+- KGlobalSettings::singleClick()) {
+- m_pressedIndex = index;
+- }
+-
++ m_pressedIndex = index;
+ m_buttonDownPos = pos;
+ return;
+ }
+@@ -1882,8 +1875,7 @@ void IconView::mousePressEvent(QGraphics
+
+ void IconView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+ {
+- if (event->button() == Qt::LeftButton)
+- {
++ if (event->button() == Qt::LeftButton) {
+ if (m_rubberBand.isValid()) {
+ markAreaDirty(m_rubberBand);
+ m_rubberBand = QRect();
+@@ -1894,22 +1886,27 @@ void IconView::mouseReleaseEvent(QGraphi
+ const QModelIndex index = indexAt(pos);
+
+ bool ctrlOrShiftPressed = (event->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier));
+- if (index.isValid() && index == m_pressedIndex && !ctrlOrShiftPressed) {
+- if (!m_doubleClick && KGlobalSettings::singleClick()) {
+- emit activated(index);
+- m_selectionModel->clearSelection();
+- markAreaDirty(visibleArea());
+- }
+- // We don't clear and update the selection and current index in
+- // mousePressEvent() if the item is already selected when it's pressed,
+- // so we need to do that here.
+- if (m_selectionModel->currentIndex() != index ||
+- m_selectionModel->selectedIndexes().count() > 1) {
+- m_selectionModel->select(index, QItemSelectionModel::ClearAndSelect);
+- m_selectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate);
++ if (index.isValid() && index == m_pressedIndex) {
++ if (ctrlOrShiftPressed) {
+ markAreaDirty(visibleArea());
++ } else {
++ if (!m_doubleClick) {
++ if (KGlobalSettings::singleClick()) {
++ emit activated(index);
++ m_selectionModel->clearSelection();
++ }
++ markAreaDirty(visibleArea());
++ }
++ // We don't clear and update the selection and current index in
++ // mousePressEvent() if the item is already selected when it's pressed,
++ // so we need to do that here.
++ if (m_selectionModel->currentIndex() != index ||
++ m_selectionModel->selectedIndexes().count() > 1) {
++ m_selectionModel->select(index, QItemSelectionModel::ClearAndSelect);
++ m_selectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate);
++ markAreaDirty(visibleArea());
++ }
+ }
+- m_doubleClick = false;
+ }
+ }
+
More information about the arch-commits
mailing list