summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
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 /noncore/settings/aqpkg/mainwin.cpp
parent06ddd131a6f33d341290617e71a14006fc9957a1 (diff)
downloadopie-f35989ef21fb5a27ebe6f6924ee2cc601318c1b8.zip
opie-f35989ef21fb5a27ebe6f6924ee2cc601318c1b8.tar.gz
opie-f35989ef21fb5a27ebe6f6924ee2cc601318c1b8.tar.bz2
Fix for bug #741
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp29
1 files changed, 25 insertions, 4 deletions
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
@@ -340,6 +340,23 @@ void MainWindow :: displaySettings()
}
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()
{
@@ -779,7 +796,8 @@ 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;
}
@@ -808,7 +826,8 @@ 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 );
}
}
@@ -949,7 +968,8 @@ 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 );
}
@@ -987,7 +1007,8 @@ 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