summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index d1be8d0..11fc91b 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -122,13 +122,13 @@ void MainWindow::makeMenu()
122 122
123 QAction *cfgact; 123 QAction *cfgact;
124 124
125 cfgact = new QAction( tr( "Setups" ), 125 cfgact = new QAction( tr( "Setups" ),
126 QString::null, 0, this, 0 ); 126 QString::null, 0, this, 0 );
127 connect( cfgact, SIGNAL( activated() ), 127 connect( cfgact, SIGNAL( activated() ),
128 SLOT( showSettings() ) ); 128 SLOT( showSettingsSetup() ) );
129 cfgact->addTo( cfgMenu ); 129 cfgact->addTo( cfgMenu );
130 130
131 cfgact = new QAction( tr( "Servers" ), 131 cfgact = new QAction( tr( "Servers" ),
132 QString::null, 0, this, 0 ); 132 QString::null, 0, this, 0 );
133 connect( cfgact, SIGNAL( activated() ), 133 connect( cfgact, SIGNAL( activated() ),
134 SLOT( showSettingsSrv() ) ); 134 SLOT( showSettingsSrv() ) );
@@ -221,13 +221,13 @@ void MainWindow::makeMenu()
221 destBar->setHorizontalStretchable( TRUE ); 221 destBar->setHorizontalStretchable( TRUE );
222 destination = new QComboBox( false, destBar ); 222 destination = new QComboBox( false, destBar );
223 destination->insertStringList( settings->getDestinationNames() ); 223 destination->insertStringList( settings->getDestinationNames() );
224 setComboName(destination,settings->getDestinationName()); 224 setComboName(destination,settings->getDestinationName());
225 connect( destination, SIGNAL(activated(int)), 225 connect( destination, SIGNAL(activated(int)),
226 settings, SLOT(activeDestinationChange(int)) ); 226 settings, SLOT(activeDestinationChange(int)) );
227 spacer = new QLabel( " ", destBar ); 227// spacer = new QLabel( " ", destBar );
228// spacer->setBackgroundMode( PaletteForeground ); 228// spacer->setBackgroundMode( PaletteForeground );
229 CheckBoxLink = new QCheckBox( tr("Link"), destBar); 229 CheckBoxLink = new QCheckBox( tr("Link"), destBar);
230// CheckBoxLink->setBackgroundMode( PaletteForeground ); 230// CheckBoxLink->setBackgroundMode( PaletteForeground );
231 CheckBoxLink->setChecked( settings->createLinks() ); 231 CheckBoxLink->setChecked( settings->createLinks() );
232 connect( CheckBoxLink, SIGNAL(toggled(bool)), 232 connect( CheckBoxLink, SIGNAL(toggled(bool)),
233 settings, SLOT(linkEnabled(bool)) ); 233 settings, SLOT(linkEnabled(bool)) );
@@ -235,13 +235,13 @@ void MainWindow::makeMenu()
235 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) ); 235 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) );
236 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 236 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
237 connect( a, SIGNAL( activated() ), SLOT( destClose() ) ); 237 connect( a, SIGNAL( activated() ), SLOT( destClose() ) );
238 a->addTo( destBar ); 238 a->addTo( destBar );
239 destBar->setStretchableWidget( CheckBoxLink ); 239 destBar->setStretchableWidget( CheckBoxLink );
240 destAction->setToggleAction( true ); 240 destAction->setToggleAction( true );
241 // destAction->addTo( viewMenu ); 241 destAction->addTo( viewMenu );
242 242
243// helpMenu 243// helpMenu
244 helpMenu->insertSeparator(); 244 helpMenu->insertSeparator();
245 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 ); 245 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
246 a->addTo( helpMenu ); 246 a->addTo( helpMenu );
247 helpMenu->insertSeparator(); 247 helpMenu->insertSeparator();
@@ -382,26 +382,32 @@ void MainWindow::setSubSections()
382{ 382{
383 subsection->clear(); 383 subsection->clear();
384 subsection->insertStringList( packageListServers.getSubSections() ); 384 subsection->insertStringList( packageListServers.getSubSections() );
385} 385}
386 386
387 387
388void MainWindow::showSettings() 388void MainWindow::showSettings(int i)
389{ 389{
390 if ( settings->showDialog( 0 ) ) 390 if ( settings->showDialog( i ) )
391 {
391 updateList(); 392 updateList();
393 }
394 setComboName(destination,settings->getDestinationName());
395 CheckBoxLink->setChecked( settings->createLinks() );
396}
397void MainWindow::showSettingsSetup()
398{
399 showSettings(0);
392} 400}
393void MainWindow::showSettingsSrv() 401void MainWindow::showSettingsSrv()
394{ 402{
395 if ( settings->showDialog( 1 ) ) 403 showSettings(1);
396 updateList();
397} 404}
398void MainWindow::showSettingsDst() 405void MainWindow::showSettingsDst()
399{ 406{
400 if ( settings->showDialog( 2 ) ) 407 showSettings(2);
401 updateList();
402} 408}
403 409
404void MainWindow::sectionShow(bool b) 410void MainWindow::sectionShow(bool b)
405{ 411{
406 if (b) sectionBar->show(); 412 if (b) sectionBar->show();
407 else sectionBar->hide(); 413 else sectionBar->hide();