From: heikki Date: Fri, 1 Oct 2010 11:13:47 +0000 (+0300) Subject: icon scaling, minor UI tweaks X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=ab39ad0cf5e313e7dc4a0db113e2d0664194281c;p=fapman icon scaling, minor UI tweaks --- diff --git a/Makefile b/Makefile index 4494954..d570259 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: fapman -# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon Sep 27 17:14:34 2010 +# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri Oct 1 12:03:15 2010 # Project: fapman.pro # Template: app # Command: /opt/NokiaQtSDK/Maemo/4.6.2/targets/fremantle-1030/bin/qmake -spec /opt/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/share/qt4/mkspecs/linux-g++-maemo5 -unix -o Makefile fapman.pro diff --git a/TODO.txt b/TODO.txt index b12bd93..1b18d7a 100644 --- a/TODO.txt +++ b/TODO.txt @@ -6,6 +6,9 @@ 0.7: +* ensure that package icons are scaled to proper size in the package details dialog +* minor UI tweaks +- fetch dates for other repositories than maemo.org? - support loading .install files - support installing local .debs - dbus interface for installing packages by name diff --git a/aaptinterface.cpp b/aaptinterface.cpp index 3f4546d..8011035 100644 --- a/aaptinterface.cpp +++ b/aaptinterface.cpp @@ -526,7 +526,7 @@ QString AAptInterface::finishProcessCommonErrorMessages(QByteArray& output) } else if( output.contains("E: Broken packages") ) { msg = "Your system has broken packages or you are trying to install conflicting packages. See the log for details."; } else if( output.contains("E: Handler silently failed") ) { - msg = "Handler silently failed - This can happen if you try to install from the forbidden user/hidden category"; + msg = "Handler silently failed - This can happen if you try to install from the forbidden user/hidden category. Disabling OVI store repositories might help."; } else if( iTerminated ) { msg = "The operation was cancelled by user"; } else if( output.contains("Temporary failure resolving") || output.contains("Could not resolve host") ) { @@ -804,7 +804,7 @@ void AAptInterface::uiUpdaterAptGetInstall() if( pkg!=0 ) { iAptGetCurrentDownloadFileName = pkg->fileName(); iAptGetCurrentFileTotalSize = pkg->size()/1024; - pkgname += QString(" (%1 kB)").arg(iAptGetCurrentFileTotalSize); + pkgname += QString(" (%L1 kB)").arg(iAptGetCurrentFileTotalSize); } iAptGetDownloadCount++; oper += QString(" %1/%2").arg(iAptGetDownloadCount).arg(iAptGetInstallTotal); diff --git a/debian/fapman.substvars b/debian/fapman.substvars deleted file mode 100644 index c0dd1fa..0000000 --- a/debian/fapman.substvars +++ /dev/null @@ -1 +0,0 @@ -shlibs:Depends=libc6 (>= 2.5.0-1), libgcc1 (>= 1:4.2.1), libqt4-core (>= 4.6.2~git20100401), libqt4-dbus (>= 4.6.2~git20100401), libqt4-gui (>= 4.6.2~git20100401), libqt4-maemo5 (>= 4.6.2~git20100401), libqt4-network (>= 4.6.2~git20100401), libqt4-phonon (>= 4.6.2~git20100401), libqt4-xml (>= 4.6.2~git20100401), libstdc++6 (>= 4.2.1) diff --git a/fapman b/fapman index 36b7314..d04cfd6 100755 Binary files a/fapman and b/fapman differ diff --git a/mainwindow.cpp b/mainwindow.cpp index 6ad7f06..44215ce 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -150,6 +150,9 @@ MainWindow::MainWindow(QWidget *parent) : Phonon::createPath(iMediaObject, aout); showFreeSpace(); + + show(); + orientationChanged(); } MainWindow::~MainWindow() @@ -650,8 +653,10 @@ void MainWindow::on_actionLoad_file_triggered() void MainWindow::orientationChanged() { - //ui->centralWidget->adjustSize(); - //ui->listWidget->adjustSize(); + if( QApplication::desktop()->width() > QApplication::desktop()->height() ) + ui->listWidget->setGridSize( QSize((ui->listWidget->width()-12)/5, (ui->listWidget->height()-12)/2) ); + else + ui->listWidget->setGridSize( QSize((ui->listWidget->width()-12)/3, (ui->listWidget->height()-12)/3) ); } @@ -700,19 +705,21 @@ void MainWindow::showFreeSpace() void MainWindow::on_listWidget_itemClicked(QListWidgetItem* item) { - if( item->text() == "Manage repositories" ) { + qDebug() << "main menu:" << item->statusTip(); + + if( item->statusTip() == "manage_repos" ) { on_btnRepos_clicked(); } - else if( item->text() == "Update catalogs" ) { + else if( item->statusTip() == "update_catalogs" ) { on_btnUpdate_clicked(); } - else if( item->text() == "Install applications" ) { + else if( item->statusTip() == "install_apps" ) { on_btnListInstallable_clicked(); } - else if( item->text() == "Remove applications" ) { + else if( item->statusTip() == "remove_apps" ) { on_btnListInstalled_clicked(); } - else if( item->text() == "Upgrade applications" ) { + else if( item->statusTip() == "upgrade_apps" ) { on_btnUpgrade_clicked(); } else { diff --git a/mainwindow.ui b/mainwindow.ui index 68131e9..bd31c5e 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -25,13 +25,13 @@ 0 - 6 + 20 - 6 + 30 - 6 + 20 0 @@ -57,10 +57,7 @@ QListView::LeftToRight - QListView::Adjust - - - 20 + QListView::Fixed QListView::IconMode @@ -75,6 +72,9 @@ Install applications + + install_apps + AlignHCenter|AlignVCenter|AlignCenter @@ -87,6 +87,9 @@ Remove applications + + remove_apps + AlignHCenter|AlignVCenter|AlignCenter @@ -99,6 +102,9 @@ Upgrade applications + + upgrade_apps + AlignHCenter|AlignVCenter|AlignCenter @@ -111,6 +117,9 @@ Update catalogs + + update_catalogs + AlignHCenter|AlignVCenter|AlignCenter @@ -123,6 +132,9 @@ Manage repositories + + manage_repos + AlignHCenter|AlignVCenter|AlignCenter diff --git a/packageselector.cpp b/packageselector.cpp index 51c4ef0..fcade78 100644 --- a/packageselector.cpp +++ b/packageselector.cpp @@ -51,7 +51,8 @@ PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set 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") ); }