Merge branch 'testing' of gitorious.org:chakra-packages/desktop into testing

This commit is contained in:
Manuel 2011-07-06 19:57:02 +00:00
commit 75b498e315
2 changed files with 8 additions and 88 deletions

View File

@ -6,8 +6,8 @@
# (c) 2010 Drake Justice
pkgname=cinstall
pkgver=0.4.6.5
pkgrel=3
pkgver=0.4.6.6
pkgrel=1
depends=('rsync' 'cbundle')
makedepends=('kdelibs' 'qt' 'automoc4' 'libcroco')
pkgdesc="Chakra's Bundle manager"
@ -16,23 +16,22 @@ license=('GPL')
install=$pkgname.install
url="http://chakra-project.org/"
source=("cinstall-$pkgver.tar.xz" 'refresh.patch')
md5sums=('1c5119fbb846ffb25aa1517e4a75e89f'
'c4e85f9e536fb62f466a535cd5a1dedc')
source=("cinstall-$pkgver.tar.xz")
md5sums=('05c19be50c26a1e6ab686621b6dc54c7')
# create tarball: source PKGBUILD && mksource
mksource() {
git clone git://gitorious.org/~fritzvantom/chakra/fritzvantoms-cinstall-differentui.git
git clone git://gitorious.org/~fritzvantom/chakra/fritzvantoms-cinstall.git
pushd fritzvantoms-cinstall
popd
tar -cvJf cinstall-${pkgver}.tar.xz fritzvantoms-cinstall-differentui/*
tar -cvJf cinstall-${pkgver}.tar.xz fritzvantoms-cinstall/*
md5sum cinstall-${pkgver}.tar.xz
}
build() {
cd "${srcdir}/fritzvantoms-cinstall-differentui"
patch -Np1 -i "${srcdir}/refresh.patch"
cd "${srcdir}/fritzvantoms-cinstall"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release

View File

@ -1,79 +0,0 @@
diff --git a/src/packageui/bundlemodel.cpp b/src/packageui/bundlemodel.cpp
index d43dd8f..65bc2b7 100644
--- a/src/packageui/bundlemodel.cpp
+++ b/src/packageui/bundlemodel.cpp
@@ -28,6 +28,8 @@
#include "utils.h"
//KDE Includes
+#include <KXmlGuiWindow>
+#include <KActionCollection>
#include <KDesktopFile>
#include <KIO/Job>
#include <KIO/FileCopyJob>
@@ -35,6 +37,7 @@
#include <KUrl>
//Qt Includes
+#include <QAction>
#include <QProcess>
#include <QtConcurrentRun>
#include <QFuture>
@@ -42,7 +45,7 @@
//BundleModel
BundleModel::BundleModel(QObject* parent)
: QSortFilterProxyModel(parent)
- , m_sourceModel(new BundleModelPrivate(this))
+ , m_sourceModel(new BundleModelPrivate(parent))
, m_showInstalledOnly(false)
{
setSourceModel(m_sourceModel);
@@ -90,6 +93,8 @@ BundleModelPrivate::BundleModelPrivate(QObject* parent)
, m_currentArch(Utils::getArchitecture())
, m_process(new QProcess(this))
{
+ m_xmlGui = qobject_cast<KXmlGuiWindow*>(parent);
+
//needed to use the model with qml
QHash<int, QByteArray> rNames;
rNames.insert(BundleRoles::Name, "name");
@@ -269,6 +274,7 @@ void BundleModelPrivate::runBundle(const QModelIndex index)
void BundleModelPrivate::downloadBundle(const int& index)
{
+ m_xmlGui->actionCollection()->action("reload")->setEnabled(false);
QString bundleName = m_info[index].completeName + "-" + m_currentArch;
KUrl url ("http://chakra-project.org/repo/bundles/" + m_currentArch + "/" + bundleName + ".cb");
@@ -320,6 +326,7 @@ void BundleModelPrivate::setFinishedPercentage(KJob* job, long unsigned int perc
void BundleModelPrivate::jobFinished(KJob* job)
{
+ m_xmlGui->actionCollection()->action("reload")->setEnabled(true);
const int index = job->property("index").toInt();
//aborted jobs
diff --git a/src/packageui/bundlemodel.h b/src/packageui/bundlemodel.h
index d9d9141..c8ae652 100644
--- a/src/packageui/bundlemodel.h
+++ b/src/packageui/bundlemodel.h
@@ -24,6 +24,9 @@
//Project Includes
#include "defines.h"
+//KDE Includes
+#include <KXmlGuiWindow>
+
//Qt Includes
#include <QAbstractItemModel>
#include <QSortFilterProxyModel>
@@ -129,7 +132,9 @@ private slots:
void setFinishedPercentage(KJob *job, unsigned long percent);
void jobFinished(KJob *job);
void setSpeed(KJob *job, ulong speed);
+
private:
+ KXmlGuiWindow *m_xmlGui;
QList<BundleInfo> m_info;
BundleInfo infoForInstalledBundle(const QString &BundlePath) const;
QHash<int, bool> m_runningJobs;