dialog parent fix, etc
authorHeikki Holstila <heikki.holstila@gmail.com>
Thu, 2 Sep 2010 22:59:01 +0000 (01:59 +0300)
committerHeikki Holstila <heikki.holstila@gmail.com>
Thu, 2 Sep 2010 22:59:01 +0000 (01:59 +0300)
Makefile
TODO.txt
aaptinterface.cpp
debian/changelog
fapman
mainwindow.cpp
version.h

index 3b36b70..60cd8cd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: fapman
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri Aug 20 14:06:45 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed Aug 25 14:38:37 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
@@ -428,6 +428,7 @@ mainwindow.o: mainwindow.cpp mainwindow.h \
                blacklistselect.h \
                version.h \
                ui_mainwindow.h \
+               rotatingbackground.h \
                packageview.h \
                package.h \
                confirmdialog.h \
@@ -436,7 +437,6 @@ mainwindow.o: mainwindow.cpp mainwindow.h \
                help.h \
                settings.h \
                logview.h \
-               rotatingbackground.h \
                dpkginterface.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
 
index 3d88521..506429e 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -4,18 +4,23 @@
  Note that many of these are just random ideas, not all of them will get implemented
 -------------------------------------------------------------------------------------
 
+0.6.6:
+* show a warning if all packages are pinned in apt settings
+* fix: confirmation dialog has wrong parent set
+
 
 0.7:
 - update install/remove changes directly to internal package db & don't require re-reading package lists afterwards
 - support loading .install files
 - support installing local .debs
+- dbus interface for installing packages by name
 - mime type handling for .install and .deb (can it be done without conflicting HAM?)
-- possible to select cache location?
-- repository color coding?
+- warn about unauthenticated packages / option to disable installing unauthenticated packages
 
 
 0.8 (possibly):
 - "problem solver" window/feature (find broken packages, handle recovery from broken packages better)
+- possible to save package selection or a list of installed (user category) packages anywhere
 
 
 later/any/uncertain:
@@ -25,13 +30,14 @@ later/any/uncertain:
 - keep a list of recently removed apps for easy reinstallation
 - add an option to start fetching changelogs automatically for all upgradeable packages?
 - how to handle package names that end in '-'? (theoretically they are valid but nonexistent?)
-- filtering by repository?
+- filtering by repository / repository color coding?
 - make sure network is online on startup?
 - fetch dates for other than user categories?
 - "online search" (a new button to main menu): use maemo.org search to find packages without loading local package lists (?)
 - ability to easily add extras-devel and extras-testing to repos if they don't exist
 - load package lists in the background when the main menu is visible?
 - read all hildon app manager repository settings (requires too much work...)
+- possible to select cache location?
 
 
 known bugs:
index 1a0f046..74c6dfa 100644 (file)
@@ -1868,6 +1868,7 @@ void AAptInterface::readPinnedPackages()
        if( !f.exists() )
                return;
 
+       bool warnAllPinned = false;
        if( f.open(QIODevice::ReadOnly | QIODevice::Text ) )
        {
                qDebug() << "apt preferences exist: reading pinned packages";
@@ -1875,6 +1876,10 @@ void AAptInterface::readPinnedPackages()
                while( !f.atEnd() )
                {
                        QString line = f.readLine().trimmed();
+
+                       if( line=="Package: *" || line=="Package:*")
+                               warnAllPinned = true;
+
                        if( line.startsWith("Package:") ) {
                                pinned_packages++;
                                QString pkg = line.mid(8).trimmed();
@@ -1891,6 +1896,11 @@ void AAptInterface::readPinnedPackages()
                f.close();
                qDebug() << "read" << pinned_packages << "pinned packages";
        }
+
+       if( warnAllPinned ) {
+               iMainWindow->notifyDialog("Warning","You have pinned packages with '*' in apt preferences. It is strongly recommended to "
+                                                                 "remove such settings as they can result in unexpected behavior of Faster Application Manager.");
+       }
 }
 
 bool AAptInterface::loadInstallFiles(QStringList files_)
index fcf8c96..99ce988 100644 (file)
@@ -1,3 +1,9 @@
+fapman (0.6.6-1) unstable; urgency=low
+
+  *
+
+ -- Heikki Holstila <heikki.holstila@gmail.com>  Fri,  3 Sep 2010 01:56:47 +0300
+
 fapman (0.6.5-1) unstable; urgency=low
 
   * ignore upgrades to pinned packages and warn about install/remove
diff --git a/fapman b/fapman
index 9f0c13b..4701a85 100755 (executable)
Binary files a/fapman and b/fapman differ
index 28009c1..02b325b 100644 (file)
@@ -313,6 +313,10 @@ void MainWindow::operationQueueFinished(QList<AAptInterface::interfaceMode> last
                GdkEventIconThemeReload();
        }
 
+       QWidget* dialogParent = this;
+       if( iWinPackageView->isVisible() )
+               dialogParent = iWinPackageView;
+
        if( iNextOperation == OpOpenPkgView && success )
        {
                iWinPackageView->openWin();
@@ -422,30 +426,30 @@ void MainWindow::operationQueueFinished(QList<AAptInterface::interfaceMode> last
                pkglist += "</font>";
 
                if( mismatch ) {
-                       ConfirmDialog m(false, this);
+                       ConfirmDialog m(false, dialogParent);
                        m.setText("Warning", "There is a version mismatch between your original package selections and some of the packages being installed " \
                                          "from the repositories. This could be due to your application catalogs being out of date.");
                        m.exec();
                }
                if( installing_blacklisted ) {
-                       ConfirmDialog b(false, this);
+                       ConfirmDialog b(false, dialogParent);
                        b.setText("Warning","Blacklisted package(s) will be installed");
                        b.exec();
                }
                if( warn_system_package_remove ) {
-                       ConfirmDialog s(false, this);
+                       ConfirmDialog s(false, dialogParent);
                        s.setText("Warning","You are about to remove a critical system package.");
                        s.exec();
                }
                if( warn_system_package_install ) {
-                       ConfirmDialog s(false, this);
+                       ConfirmDialog s(false, dialogParent);
                        s.setText("Warning","You are trying to perform an install/upgrade operation on a critical system package. Doing a system upgrade with " \
                                          "Faster Application Manager has not been tested and it could result in a horrible failure. You have been warned.");
                        s.exec();
                }
 
                busyDialog(false);
-               ConfirmDialog d(true, this);
+               ConfirmDialog d(true, dialogParent);
                if( inst.count()==0 && remv.count()==0 )
                {
                        pkglist = "None of the packages can be installed";
@@ -491,14 +495,14 @@ void MainWindow::operationQueueFinished(QList<AAptInterface::interfaceMode> last
 
                QRect r = QApplication::desktop()->rect();
                if(r.width() < r.height()) {
-                       ConfirmDialog d(false, this);
+                       ConfirmDialog d(false, dialogParent);
                        d.setText(title,msgs.join("<br>"));
                        d.exec();
                } else {
 #ifdef Q_WS_MAEMO_5
                        QMaemo5InformationBox::information(0, text, QMaemo5InformationBox::NoTimeout);
 #else
-                       ConfirmDialog d(false, this);
+                       ConfirmDialog d(false, dialogParent);
                        d.setText(title,msgs.join("<br>"));
                        d.exec();
 #endif
@@ -571,14 +575,22 @@ void MainWindow::on_actionOptions_triggered()
 
 void MainWindow::notifyDialog(QString title, QString msg)
 {
-       ConfirmDialog d(false, this);
+       QWidget* dialogParent = this;
+       if( iWinPackageView->isVisible() )
+               dialogParent = iWinPackageView;
+
+       ConfirmDialog d(false, dialogParent);
        d.setText(title, msg);
        d.exec();
 }
 
 bool MainWindow::confirmDialog(QString title, QString msg)
 {
-       ConfirmDialog d(true, this);
+       QWidget* dialogParent = this;
+       if( iWinPackageView->isVisible() )
+               dialogParent = iWinPackageView;
+
+       ConfirmDialog d(true, dialogParent);
        d.setText(title, msg);
        return d.exec();
 }
index c3d2295..c3ae0fe 100644 (file)
--- a/version.h
+++ b/version.h
@@ -1 +1 @@
-const QString PROGRAM_VERSION="0.6.5";
+const QString PROGRAM_VERSION="0.6.6";