[arch-commits] Commit in kdebase-workspace/repos (3 files)

Pierre Schmitz pierre at archlinux.org
Tue Feb 9 07:29:00 UTC 2010


    Date: Tuesday, February 9, 2010 @ 02:28:59
  Author: pierre
Revision: 67640

Merged revisions 67173,67319,67619-67620 via svnmerge from 
svn+ssh://gerolde.archlinux.org/srv/svn-packages/kdebase-workspace/trunk

........
  r67173 | pierre | 2010-02-04 13:29:00 +0100 (Do, 04 Feb 2010) | 1 line
  
  KDE 4.4.0; first try
........
  r67319 | pierre | 2010-02-06 10:43:02 +0100 (Sa, 06 Feb 2010) | 1 line
  
  update
........
  r67619 | pierre | 2010-02-09 00:54:12 +0100 (Di, 09 Feb 2010) | 1 line
  
  add last minute fix
........
  r67620 | pierre | 2010-02-09 00:59:22 +0100 (Di, 09 Feb 2010) | 1 line
  
  add comment about patch
........

Added:
  kdebase-workspace/repos/testing-i686/kickoff.patch
    (from rev 67620, kdebase-workspace/trunk/kickoff.patch)
Modified:
  kdebase-workspace/repos/testing-i686/	(properties)
  kdebase-workspace/repos/testing-i686/PKGBUILD

---------------+
 PKGBUILD      |   17 ++-
 kickoff.patch |  268 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 279 insertions(+), 6 deletions(-)


Property changes on: kdebase-workspace/repos/testing-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /kdebase-workspace/trunk:1-66936
   + /kdebase-workspace/trunk:1-67639

Modified: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD	2010-02-09 07:28:18 UTC (rev 67639)
+++ testing-i686/PKGBUILD	2010-02-09 07:28:59 UTC (rev 67640)
@@ -2,8 +2,8 @@
 # Maintainer: Pierre Schmitz <pierre at archlinux.de>
 
 pkgname=kdebase-workspace
-pkgver=4.3.98
-pkgrel=1
+pkgver=4.4.0
+pkgrel=3
 pkgdesc="KDE Base Workspace"
 arch=('i686' 'x86_64')
 url='http://www.kde.org'
@@ -24,23 +24,28 @@
         'etc/pam.d/kde'
         'etc/pam.d/kde-np'
         'etc/pam.d/kscreensaver')
-source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2"
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2"
         'kdm-zsh-profile.patch' 'kdm' 'kde.pam' 'kde-np.pam' 'kscreensaver.pam'
-        'fixpath.patch' 'terminate-server.patch')
-md5sums=('34baa70da178a8599746407e88b1c184'
+        'fixpath.patch' 'terminate-server.patch'
+        'kickoff.patch')
+md5sums=('08179cba422038d4bb6537d63186bb23'
          '721e97031b62aee8914e8617e86f9235'
          '5d80164932e0d44d8b802d3929a004ab'
          '10a490653b002e6f9e7476ff9d37c011'
          '552337fd9a3982d809ea16c7f0033d42'
          '367a3538f54db71f108b34cfa31088ac'
          '47a1f12673f66e62e2463efd7037a26a'
-         '814350c52c135d6f7bdada1e29223d38')
+         '814350c52c135d6f7bdada1e29223d38'
+         '5744a1c543d392c65a6fded1fee03cef')
 
 build() {
 	cd ${srcdir}/${pkgname}-${pkgver}
 	patch -p0 -i ${srcdir}/kdm-zsh-profile.patch || return 1
 	patch -p0 -i ${srcdir}/fixpath.patch || return 1
 	patch -p0 -i ${srcdir}/terminate-server.patch || return 1
+	# this patch will be in KDE 4.4.1
+	# see http://websvn.kde.org/?view=revision&sortby=date&revision=1087230
+	patch -p0 -i ${srcdir}/kickoff.patch || return 1
 
 	cd ${srcdir}
 	mkdir build

Copied: kdebase-workspace/repos/testing-i686/kickoff.patch (from rev 67620, kdebase-workspace/trunk/kickoff.patch)
===================================================================
--- testing-i686/kickoff.patch	                        (rev 0)
+++ testing-i686/kickoff.patch	2010-02-09 07:28:59 UTC (rev 67640)
@@ -0,0 +1,268 @@
+Index: plasma/desktop/applets/kickoff/core/systemmodel.cpp
+===================================================================
+--- plasma/desktop/applets/kickoff/core/systemmodel.cpp	(Revision 1087229)
++++ plasma/desktop/applets/kickoff/core/systemmodel.cpp	(Revision 1087230)
+@@ -52,21 +52,22 @@
+ 
+ struct UsageInfo {
+     UsageInfo()
+-            : used(0),
+-            available(0),
+-            dirty(true) {}
++        : used(0),
++          available(0)
++     {}
+ 
+     quint64 used;
+     quint64 available;
+-    bool dirty;
+ };
+ 
+ class SystemModel::Private
+ {
+ public:
+     Private(SystemModel *parent)
+-            : q(parent)
+-            , placesModel(new KFilePlacesModel(parent)) {
++            : q(parent),
++              placesModel(new KFilePlacesModel(parent)),
++              currentPlacesModelUsageIndex(0)
++    {
+         q->setSourceModel(placesModel);
+ 
+         connect(placesModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
+@@ -84,44 +85,15 @@
+         << i18n("Places")
+         << i18n("Removable Storage")
+         << i18n("Storage");
+-        loadApplications();
+-        connect(&refreshTimer, SIGNAL(timeout()),
+-                q, SLOT(startRefreshingUsageInfo()));
+-        refreshTimer.start(10000);
+-        QTimer::singleShot(0, q, SLOT(startRefreshingUsageInfo()));
+         connect(KSycoca::self(), SIGNAL(databaseChanged(const QStringList&)), q, SLOT(reloadApplications()));
+     }
+ 
+-    void queryFreeSpace(const QString& mountPoint) {
+-        KDiskFreeSpaceInfo freeSpace = KDiskFreeSpaceInfo::freeSpaceInfo(mountPoint);
+-        if (freeSpace.isValid())
+-            q->freeSpaceInfoAvailable(freeSpace.mountPoint(), freeSpace.size() / 1024,
+-                                      freeSpace.used() / 1024, freeSpace.available() / 1024);
+-    }
+-
+-    void loadApplications() {
+-        const QStringList apps = Kickoff::systemApplicationList();
+-        appsList.clear();
+-
+-        foreach(const QString &app, apps) {
+-            KService::Ptr service = KService::serviceByStorageId(app);
+-
+-            if (!service) {
+-                continue;
+-            }
+-
+-            appsList << service;
+-        }
+-        //kDebug() << "*************" << appsList;
+-    }
+-
+     SystemModel * const q;
+     KFilePlacesModel *placesModel;
+     QStringList topLevelSections;
+     KService::List appsList;
+-    QList<QString> mountPointsQueue;
+     QMap<QString, UsageInfo> usageByMountpoint;
+-    QTimer refreshTimer;
++    int currentPlacesModelUsageIndex;
+ };
+ 
+ SystemModel::SystemModel(QObject *parent)
+@@ -137,7 +109,9 @@
+ 
+ QModelIndex SystemModel::mapFromSource(const QModelIndex &sourceIndex) const
+ {
+-    if (!sourceIndex.isValid()) return QModelIndex();
++    if (!sourceIndex.isValid()) {
++        return QModelIndex();
++    }
+ 
+     QModelIndex parent;
+ 
+@@ -356,75 +330,60 @@
+     }
+ }
+ 
+-void SystemModel::startRefreshingUsageInfo()
++void SystemModel::refreshUsageInfo()
+ {
+-    if (!d->mountPointsQueue.isEmpty()) {
+-        return;
+-    }
+-
+-    int rowCount = d->placesModel->rowCount();
+-    for (int i = 0; i < rowCount; ++i) {
+-        QModelIndex index = d->placesModel->index(i, 0);
+-        if (d->placesModel->isDevice(index)) {
+-            Solid::Device dev = d->placesModel->deviceForIndex(index);
+-            Solid::StorageAccess *access = dev.as<Solid::StorageAccess>();
+-
+-            if (access && !access->filePath().isEmpty()) {
+-                d->mountPointsQueue << access->filePath();
+-            }
+-        }
+-    }
+-
+-    if (!d->mountPointsQueue.isEmpty()) {
+-        d->queryFreeSpace(d->mountPointsQueue.takeFirst());
+-    }
++    d->currentPlacesModelUsageIndex = 0;
++    QTimer::singleShot(100, this, SLOT(refreshNextUsageInfo()));
+ }
+ 
+-void SystemModel::reloadApplications()
++void SystemModel::stopRefreshingUsageInfo()
+ {
+-    d->loadApplications();
++    d->currentPlacesModelUsageIndex = d->placesModel->rowCount();
+ }
+ 
+-void SystemModel::freeSpaceInfoAvailable(const QString& mountPoint, quint64,
+-        quint64 kbUsed, quint64 kbAvailable)
++void SystemModel::refreshNextUsageInfo()
+ {
+-    UsageInfo info;
+-    info.used = kbUsed;
+-    info.available = kbAvailable;
+-
+-    d->usageByMountpoint[mountPoint] = info;
+-
+-    // More to process
+-    if (!d->mountPointsQueue.isEmpty()) {
+-        d->queryFreeSpace(d->mountPointsQueue.takeFirst());
++    if (d->currentPlacesModelUsageIndex >= d->placesModel->rowCount()) {
+         return;
+     }
+ 
+-    // We're done, let's emit the changes
+-    int rowCount = d->placesModel->rowCount();
+-    for (int i = 0; i < rowCount; ++i) {
+-        QModelIndex sourceIndex = d->placesModel->index(i, 0);
+-        if (d->placesModel->isDevice(sourceIndex)) {
+-            Solid::Device dev = d->placesModel->deviceForIndex(sourceIndex);
+-            Solid::StorageAccess *access = dev.as<Solid::StorageAccess>();
++    QModelIndex sourceIndex = d->placesModel->index(d->currentPlacesModelUsageIndex, 0);
++    if (d->placesModel->isDevice(sourceIndex)) {
++        Solid::Device dev = d->placesModel->deviceForIndex(sourceIndex);
++        Solid::StorageAccess *access = dev.as<Solid::StorageAccess>();
+ 
+-            if (access && d->usageByMountpoint.contains(access->filePath())) {
+-                info = d->usageByMountpoint[access->filePath()];
++        if (access && !access->filePath().isEmpty()) {
++            KDiskFreeSpaceInfo freeSpace = KDiskFreeSpaceInfo::freeSpaceInfo(access->filePath());
++            if (freeSpace.isValid()) {
++                UsageInfo info;
++                info.used = freeSpace.used() / 1024;
++                info.available = freeSpace.available() / 1024;
+ 
+-                if (info.dirty) {
+-                    info.dirty = false;
+-                    d->usageByMountpoint[access->filePath()] = info;
+-                } else {
+-                    d->usageByMountpoint.remove(access->filePath());
+-                }
+-
++                d->usageByMountpoint[freeSpace.mountPoint()] = info;
+                 QModelIndex index = mapFromSource(sourceIndex);
+                 emit dataChanged(index, index);
+             }
+         }
+     }
++
++    ++d->currentPlacesModelUsageIndex;
++    QTimer::singleShot(0, this, SLOT(refreshNextUsageInfo()));
+ }
+ 
++void SystemModel::reloadApplications()
++{
++    const QStringList apps = Kickoff::systemApplicationList();
++    d->appsList.clear();
++
++    foreach (const QString &app, apps) {
++        KService::Ptr service = KService::serviceByStorageId(app);
++
++        if (service) {
++            d->appsList << service;
++        }
++    }
++}
++
+ void Kickoff::SystemModel::sourceDataChanged(const QModelIndex &start, const QModelIndex &end)
+ {
+     if (start.parent().isValid()) return;
+Index: plasma/desktop/applets/kickoff/core/systemmodel.h
+===================================================================
+--- plasma/desktop/applets/kickoff/core/systemmodel.h	(Revision 1087229)
++++ plasma/desktop/applets/kickoff/core/systemmodel.h	(Revision 1087230)
+@@ -48,13 +48,12 @@
+     virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
+     virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+     virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
++    void refreshUsageInfo();
++    void stopRefreshingUsageInfo();
+ 
+ private Q_SLOTS:
+-    void startRefreshingUsageInfo();
++    void refreshNextUsageInfo();
+     void reloadApplications();
+-    void freeSpaceInfoAvailable(const QString& mountPoint, quint64 kbSize,
+-                                quint64 kbUsed, quint64 kbAvailable);
+-
+     void sourceDataChanged(const QModelIndex &start, const QModelIndex &end);
+     void sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
+     void sourceRowsInserted(const QModelIndex &parent, int start, int end);
+Index: plasma/desktop/applets/kickoff/ui/launcher.cpp
+===================================================================
+--- plasma/desktop/applets/kickoff/ui/launcher.cpp	(Revision 1087229)
++++ plasma/desktop/applets/kickoff/ui/launcher.cpp	(Revision 1087230)
+@@ -228,7 +228,7 @@
+ 
+     void setupSystemView()
+     {
+-        SystemModel *model = new SystemModel(q);
++        systemModel = new SystemModel(q);
+         UrlItemView *view = new UrlItemView();
+         ItemDelegate *delegate = new ItemDelegate(q);
+         delegate->setRoleMapping(Plasma::Delegate::SubTitleRole, SubTitleRole);
+@@ -236,7 +236,7 @@
+         view->setItemDelegate(delegate);
+         view->setItemStateProvider(delegate);
+ 
+-        addView(i18n("Computer"), systemIcon(), model, view);
++        addView(i18n("Computer"), systemIcon(), systemModel, view);
+     }
+ 
+     void setupSearchView()
+@@ -448,6 +448,7 @@
+     ApplicationModel  *applicationModel;
+     RecentlyUsedModel *recentlyUsedModel;
+     KRunnerModel *searchModel;
++    SystemModel *systemModel;
+     LeaveModel *leaveModel;
+     SearchBar *searchBar;
+     QWidget *footer;
+@@ -807,6 +808,7 @@
+ {
+     Q_UNUSED(event)
+     reset();
++    d->systemModel->stopRefreshingUsageInfo();
+ }
+ 
+ void Launcher::keyPressEvent(QKeyEvent *event)
+@@ -828,6 +830,7 @@
+ void Launcher::showEvent(QShowEvent *e)
+ {
+     d->searchBar->setFocus();
++    d->systemModel->refreshUsageInfo();
+ 
+     QWidget::showEvent(e);
+ }




More information about the arch-commits mailing list