icon scaling, minor UI tweaks
authorheikki <heikki@jopo.(none)>
Fri, 1 Oct 2010 11:13:47 +0000 (14:13 +0300)
committerheikki <heikki@jopo.(none)>
Fri, 1 Oct 2010 11:13:47 +0000 (14:13 +0300)
Makefile
TODO.txt
aaptinterface.cpp
debian/fapman.substvars [deleted file]
fapman
mainwindow.cpp
mainwindow.ui
packageselector.cpp

index 4494954..d570259 100644 (file)
--- 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
index b12bd93..1b18d7a 100644 (file)
--- 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
index 3f4546d..8011035 100644 (file)
@@ -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 (file)
index c0dd1fa..0000000
+++ /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 (executable)
Binary files a/fapman and b/fapman differ
index 6ad7f06..44215ce 100644 (file)
@@ -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 {
index 68131e9..bd31c5e 100644 (file)
      <number>0</number>
     </property>
     <property name="leftMargin">
-     <number>6</number>
+     <number>20</number>
     </property>
     <property name="topMargin">
-     <number>6</number>
+     <number>30</number>
     </property>
     <property name="rightMargin">
-     <number>6</number>
+     <number>20</number>
     </property>
     <property name="bottomMargin">
      <number>0</number>
        <enum>QListView::LeftToRight</enum>
       </property>
       <property name="resizeMode">
-       <enum>QListView::Adjust</enum>
-      </property>
-      <property name="spacing">
-       <number>20</number>
+       <enum>QListView::Fixed</enum>
       </property>
       <property name="viewMode">
        <enum>QListView::IconMode</enum>
@@ -75,6 +72,9 @@
        <property name="text">
         <string>Install applications</string>
        </property>
+       <property name="statusTip">
+        <string notr="true">install_apps</string>
+       </property>
        <property name="textAlignment">
         <set>AlignHCenter|AlignVCenter|AlignCenter</set>
        </property>
@@ -87,6 +87,9 @@
        <property name="text">
         <string>Remove applications</string>
        </property>
+       <property name="statusTip">
+        <string notr="true">remove_apps</string>
+       </property>
        <property name="textAlignment">
         <set>AlignHCenter|AlignVCenter|AlignCenter</set>
        </property>
        <property name="text">
         <string>Upgrade applications</string>
        </property>
+       <property name="statusTip">
+        <string notr="true">upgrade_apps</string>
+       </property>
        <property name="textAlignment">
         <set>AlignHCenter|AlignVCenter|AlignCenter</set>
        </property>
        <property name="text">
         <string>Update catalogs</string>
        </property>
+       <property name="statusTip">
+        <string notr="true">update_catalogs</string>
+       </property>
        <property name="textAlignment">
         <set>AlignHCenter|AlignVCenter|AlignCenter</set>
        </property>
        <property name="text">
         <string>Manage repositories</string>
        </property>
+       <property name="statusTip">
+        <string notr="true">manage_repos</string>
+       </property>
        <property name="textAlignment">
         <set>AlignHCenter|AlignVCenter|AlignCenter</set>
        </property>
index 51c4ef0..fcade78 100644 (file)
@@ -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") );
        }