summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp3
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.h6
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp29
-rw-r--r--noncore/settings/aqpkg/mainwin.h3
4 files changed, 33 insertions, 8 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index 1f0bb5f..2bb8b4d 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -182,9 +182,9 @@ void InstallDlgImpl :: init( bool displayextrainfo )
btnInstall = new QPushButton( Resource::loadPixmap( "aqpkg/apply" ), tr( "Start" ), this );
layout->addWidget( btnInstall, 3, 0 );
connect( btnInstall, SIGNAL( clicked() ), this, SLOT( installSelected() ) );
- btnOptions = new QPushButton( Resource::loadPixmap( "aqpkg/config" ), tr( "Options" ), this );
+ btnOptions = new QPushButton( Resource::loadPixmap( "SettingsIcon" ), tr( "Options" ), this );
layout->addWidget( btnOptions, 3, 1 );
connect( btnOptions, SIGNAL( clicked() ), this, SLOT( optionsSelected() ) );
}
@@ -229,8 +229,9 @@ void InstallDlgImpl :: installSelected()
// btnInstall->setEnabled( false );
btnInstall->setText( tr( "Abort" ) );
btnInstall->setIconSet( Resource::loadPixmap( "close" ) );
+
if ( pIpkg )
{
output->setText( "" );
connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
diff --git a/noncore/settings/aqpkg/installdlgimpl.h b/noncore/settings/aqpkg/installdlgimpl.h
index d7509bb..c30963e 100644
--- a/noncore/settings/aqpkg/installdlgimpl.h
+++ b/noncore/settings/aqpkg/installdlgimpl.h
@@ -54,11 +54,11 @@ public:
protected:
private:
DataManager *dataMgr;
- QList<InstallData> installList;
- QList<InstallData> removeList;
- QList<InstallData> updateList;
+ QList<InstallData> installList;
+ QList<InstallData> removeList;
+ QList<InstallData> updateList;
int flags;
Ipkg *pIpkg;
bool upgradePackages;
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index dfe6d9c..7fa311d 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -339,8 +339,25 @@ void MainWindow :: displaySettings()
stack->raiseWidget( networkPkgWindow );
}
delete dlg;
}
+
+void MainWindow :: closeEvent( QCloseEvent *e )
+{
+ // If install dialog is visible, return to main view, otherwise close app
+ QWidget *widget = stack->visibleWidget();
+
+ if ( widget != networkPkgWindow && widget != progressWindow )
+ {
+ if ( widget ) delete widget;
+ stack->raiseWidget( networkPkgWindow );
+ e->ignore();
+ }
+ else
+ {
+ e->accept();
+ }
+}
void MainWindow :: displayFindBar()
{
findBar->show();
@@ -778,9 +795,10 @@ void MainWindow :: updateServer()
InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Refreshing server package lists" ),
tr( "Update lists" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
- dlg->showMaximized();
+ stack->addWidget( dlg, 3 );
+ stack->raiseWidget( dlg );
// delete progDlg;
}
@@ -807,9 +825,10 @@ void MainWindow :: upgradePackages()
InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Upgrading installed packages" ),
tr ( "Upgrade" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
- dlg->showMaximized();
+ stack->addWidget( dlg, 3 );
+ stack->raiseWidget( dlg );
}
}
void MainWindow :: downloadPackage()
@@ -948,9 +967,10 @@ void MainWindow :: downloadRemotePackage()
workingPackages.append( item );
InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Download" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
- dlg->showMaximized();
+ stack->addWidget( dlg, 3 );
+ stack->raiseWidget( dlg );
}
void MainWindow :: applyChanges()
@@ -986,9 +1006,10 @@ void MainWindow :: applyChanges()
// do the stuff
InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Apply changes" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
- dlg->showMaximized();
+ stack->addWidget( dlg, 3 );
+ stack->raiseWidget( dlg );
}
// decide what to do - either remove, upgrade or install
// Current rules:
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h
index d75e5d2..b2de871 100644
--- a/noncore/settings/aqpkg/mainwin.h
+++ b/noncore/settings/aqpkg/mainwin.h
@@ -42,8 +42,11 @@ public:
MainWindow();
~MainWindow();
+protected:
+ void closeEvent( QCloseEvent* e );
+
private:
DataManager *mgr;
QWidgetStack *stack;