projects
/
fapman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.7.1
[fapman]
/
packageselector.cpp
diff --git
a/packageselector.cpp
b/packageselector.cpp
index
54d0827
..
fbc5bcc
100644
(file)
--- a/
packageselector.cpp
+++ b/
packageselector.cpp
@@
-17,7
+17,7
@@
(C) Heikki Holstila 2010
*/
(C) Heikki Holstila 2010
*/
-#include <QtNetwork>
+#include <Qt>
#include <QDBusConnection>
#include <QDBusInterface>
#include <QDBusConnection>
#include <QDBusInterface>
@@
-29,18
+29,17
@@
#include "blacklistselect.h"
#include "aaptinterface.h"
#include "settings.h"
#include "blacklistselect.h"
#include "aaptinterface.h"
#include "settings.h"
+#include "mainwindow.h"
-PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set, QWidget *parent) :
+PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set, MainWindow* mw, QWidget *parent) :
QDialog(parent),
QDialog(parent),
- ui(new Ui::PackageSelector)
+ ui(new Ui::PackageSelector), iNetworkAccessManager(0), iChangelogFetched(false), iFetchInProgress(false)
{
{
- ui->setupUi(this);
+ ui->setupUi(this);
iPkg = pkg;
iAptInterface = apt;
iSettings = set;
iPkg = pkg;
iAptInterface = apt;
iSettings = set;
- iNetworkAccessManager = 0;
- iChangelogFetched = false;
- iFetchInProgress = false;
+ iMainWindow = mw;
iChangelog = "";
ui->pushButton_website->setIcon(QPixmap("/usr/share/icons/hicolor/48x48/hildon/general_web.png"));
iChangelog = "";
ui->pushButton_website->setIcon(QPixmap("/usr/share/icons/hicolor/48x48/hildon/general_web.png"));
@@
-51,7
+50,8
@@
PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set
ui->pushButton_blacklist->setEnabled(false);
if( pkg->icon() && !pkg->icon()->isNull() ) {
ui->pushButton_blacklist->setEnabled(false);
if( pkg->icon() && !pkg->icon()->isNull() ) {
- ui->label_appicon->setPixmap( *pkg->icon() );
+ QPixmap aicon( *pkg->icon() );
+ ui->label_appicon->setPixmap( aicon.scaled(48,48) );
} else {
ui->label_appicon->setPixmap( QPixmap(":/icons/icons/appdefault.png") );
}
} else {
ui->label_appicon->setPixmap( QPixmap(":/icons/icons/appdefault.png") );
}
@@
-71,6
+71,7
@@
PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set
ui->radioTabBasic->setText("Info");
ui->radioTabChanges->setText("Chgs");
ui->radioTabDepends->setText("Deps");
ui->radioTabBasic->setText("Info");
ui->radioTabChanges->setText("Chgs");
ui->radioTabDepends->setText("Deps");
+ ui->scrollAreaWidgetContents->setMaximumWidth( QApplication::desktop()->width() - 15 );
}
Package* upg_pkg = iPkg->availablePackage();
}
Package* upg_pkg = iPkg->availablePackage();
@@
-223,7
+224,7
@@
void PackageSelector::updateInfo()
if( iPkg->isInstalled() && !iPkg->isUpgradeable() )
{
ui->radioInstall->setEnabled(false);
if( iPkg->isInstalled() && !iPkg->isUpgradeable() )
{
ui->radioInstall->setEnabled(false);
- ui->radioInstall->hide();
+ ui->radioInstall->hide();
} else if( !iPkg->isInstalled() ) {
ui->radioRemove->setEnabled(false);
ui->radioRemove->hide();
} else if( !iPkg->isInstalled() ) {
ui->radioRemove->setEnabled(false);
ui->radioRemove->hide();
@@
-385,6
+386,10
@@
void PackageSelector::on_radioTabBasic_clicked()
}
}
}
}
+ if( !iPkg->maintainerRichText().isEmpty() ) {
+ longtext +="Maintainer: " + iPkg->maintainerRichText() + "<br>";
+ }
+
longtext += "<br>" + iPkg->descShort();
QString descLong = iPkg->descLong();
if( descLong.length()>0 ) {
longtext += "<br>" + iPkg->descShort();
QString descLong = iPkg->descLong();
if( descLong.length()>0 ) {
@@
-521,6
+526,9
@@
void PackageSelector::queryChangelog()
if( iChangelogFetched || iFetchInProgress )
return;
if( iChangelogFetched || iFetchInProgress )
return;
+ if( iMainWindow )
+ iMainWindow->openNetworkConnection();
+
iChangelogFetched = false;
iFetchInProgress = true;
iChangelog = "";
iChangelogFetched = false;
iFetchInProgress = true;
iChangelog = "";
@@
-536,7
+544,7
@@
void PackageSelector::queryChangelog()
if( !iNetworkAccessManager ) {
iNetworkAccessManager = new QNetworkAccessManager(this);
if( !iNetworkAccessManager ) {
iNetworkAccessManager = new QNetworkAccessManager(this);
- connect(iNetworkAccessManager,SIGNAL(finished(QNetworkReply*)),this,SLOT(changelogFetchNetworkReply(QNetworkReply*)));
+ connect(iNetworkAccessManager,SIGNAL(finished(QNetworkReply*)),this,SLOT(changelogFetchNetworkReply(QNetworkReply*)));
if( iSettings->qsettings()->value("use_proxies").toBool() && !iSettings->qsettings()->value("http_proxy").toString().isEmpty() )
{
if( iSettings->qsettings()->value("use_proxies").toBool() && !iSettings->qsettings()->value("http_proxy").toString().isEmpty() )
{
@@
-569,7
+577,7
@@
void PackageSelector::changelogFetchNetworkReply(QNetworkReply* reply)
qDebug() << "changelog fetched";
} else {
qDebug() << "changelog fetched";
} else {
- iChangelog = "Not available (Network error)";
+ iChangelog = "Not available ( error)";
qDebug() << "changelog fetch error:" << reply->error() << reply->errorString();
}
qDebug() << "changelog fetch error:" << reply->error() << reply->errorString();
}