mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 18:57:20 +08:00
cinstall update, 'find new' properly working again
This commit is contained in:
parent
4d43df5498
commit
85785b2cd2
@ -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
|
||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user