Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 42093cf..dbe694e 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp @@ -1,5 +1,5 @@ /* This file is part of the OPIE Project - + =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> .=l. Dan Williams <drw@handhelds.org> @@ -67,7 +67,13 @@ extern int compareVersions( const char *v1, const char *v2 ); -MainWindow :: MainWindow() - : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) +MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) + : QMainWindow( parent, name, fl || WStyle_ContextHelp ) { + // Disable suspend mode + QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; + + LOCAL_SERVER = QObject::tr( "Installed packages" ); + LOCAL_IPKGS = QObject::tr( "Local packages" ); + setCaption( tr( "AQPkg - Package Manager" ) ); @@ -235,4 +241,7 @@ MainWindow :: ~MainWindow() { delete mgr; + + // Reenable suspend mode + QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; } @@ -1013,5 +1022,4 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) InstallData *newitem = new InstallData(); newitem->option = "D"; - // If local file, remove using package name, not filename if ( p->isPackageStoredLocally() ) @@ -1047,5 +1055,4 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) // Version available is older - remove only newitem->option = "D"; - // If local file, remove using package name, not filename if ( p->isPackageStoredLocally() ) @@ -1190,19 +1197,19 @@ QuestionDlg::QuestionDlg( const QString &caption, const QString &text, const QSt setCaption( caption ); resize( 175, 100 ); - + QGridLayout *layout = new QGridLayout( this ); - + QLabel *l = new QLabel( text, this ); l->setAlignment( AlignCenter | WordBreak ); layout->addMultiCellWidget( l, 0, 0, 0, 1 ); - + btn1 = new QPushButton( tr( "Remove" ), this ); connect( btn1, SIGNAL(clicked()), this, SLOT(slotButtonPressed()) ); layout->addWidget( btn1, 1, 0 ); - + btn2 = new QPushButton( secondbtn, this ); connect( btn2, SIGNAL(clicked()), this, SLOT(slotButtonPressed()) ); layout->addWidget( btn2, 1, 1 ); - + executing = FALSE; } @@ -1217,5 +1224,5 @@ int QuestionDlg::exec() qApp->enter_loop(); } - + return buttonpressed; } @@ -1229,5 +1236,5 @@ void QuestionDlg::slotButtonPressed() else buttonpressed = 0; - + qApp->exit_loop(); } |