summaryrefslogtreecommitdiff
authordrw <drw>2003-03-19 02:48:27 (UTC)
committer drw <drw>2003-03-19 02:48:27 (UTC)
commitf35989ef21fb5a27ebe6f6924ee2cc601318c1b8 (patch) (side-by-side diff)
treef169286f925c01758d1456027eb43743bb0cd162
parent06ddd131a6f33d341290617e71a14006fc9957a1 (diff)
downloadopie-f35989ef21fb5a27ebe6f6924ee2cc601318c1b8.zip
opie-f35989ef21fb5a27ebe6f6924ee2cc601318c1b8.tar.gz
opie-f35989ef21fb5a27ebe6f6924ee2cc601318c1b8.tar.bz2
Fix for bug #741
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp3
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.h0
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp29
-rw-r--r--noncore/settings/aqpkg/mainwin.h3
4 files changed, 30 insertions, 5 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
@@ -184,5 +184,5 @@ void InstallDlgImpl :: init( bool displayextrainfo )
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() ) );
@@ -231,4 +231,5 @@ void InstallDlgImpl :: installSelected()
btnInstall->setText( tr( "Abort" ) );
btnInstall->setIconSet( Resource::loadPixmap( "close" ) );
+
if ( pIpkg )
{
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
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
@@ -342,4 +342,21 @@ void MainWindow :: displaySettings()
}
+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()
{
@@ -780,5 +797,6 @@ void MainWindow :: updateServer()
tr( "Update lists" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
- dlg->showMaximized();
+ stack->addWidget( dlg, 3 );
+ stack->raiseWidget( dlg );
// delete progDlg;
@@ -809,5 +827,6 @@ void MainWindow :: upgradePackages()
tr ( "Upgrade" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
- dlg->showMaximized();
+ stack->addWidget( dlg, 3 );
+ stack->raiseWidget( dlg );
}
}
@@ -950,5 +969,6 @@ void MainWindow :: downloadRemotePackage()
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 );
}
@@ -988,5 +1008,6 @@ void MainWindow :: applyChanges()
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 );
}
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
@@ -44,4 +44,7 @@ public:
~MainWindow();
+protected:
+ void closeEvent( QCloseEvent* e );
+
private:
DataManager *mgr;