summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 997f449..54ee115 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -80,98 +80,98 @@ void MainWindow::makeMenu()
setToolBarsMovable( false );
toolBar->setHorizontalStretchable( true );
menuBar->insertItem( tr( "Package" ), srvMenu );
menuBar->insertItem( tr( "View" ), viewMenu );
menuBar->insertItem( tr( "Settings" ), cfgMenu );
// menuBar->insertItem( tr( "Sections" ), sectMenu );
QLabel *spacer = new QLabel( "", toolBar );
spacer->setBackgroundColor( toolBar->backgroundColor() );
toolBar->setStretchableWidget( spacer );
runAction = new QAction( tr( "Commit" ),
Resource::loadPixmap( "oipkg/install" ),
QString::null, 0, this, 0 );
connect( runAction, SIGNAL( activated() ),
this, SLOT( runIpkg() ) );
runAction->addTo( toolBar );
runAction->addTo( srvMenu );
srvMenu->insertSeparator ();
updateAction = new QAction( tr( "Update" ),
- Resource::loadIconSet( "oipkg/repeat" ),
+ Resource::loadIconSet( "oipkg/update" ),
QString::null, 0, this, 0 );
connect( updateAction, SIGNAL( activated() ),
this , SLOT( updateList() ) );
updateAction->addTo( toolBar );
updateAction->addTo( srvMenu );
detailsAction = new QAction( tr( "Details" ),
Resource::loadIconSet( "find" ),
QString::null, 0, this, 0 );
connect( detailsAction, SIGNAL( activated() ),
this , SLOT( showDetails() ) );
detailsAction->addTo( toolBar );
detailsAction->addTo( srvMenu );
QAction *cfgact;
cfgact = new QAction( tr( "Setups" ),
// Resource::loadIconSet( "" ),
QString::null, 0, this, 0 );
connect( cfgact, SIGNAL( activated() ),
SLOT( showSettings() ) );
cfgact->addTo( cfgMenu );
cfgact = new QAction( tr( "Servers" ),
// Resource::loadIconSet( "" ),
QString::null, 0, this, 0 );
connect( cfgact, SIGNAL( activated() ),
SLOT( showSettingsSrv() ) );
cfgact->addTo( cfgMenu );
cfgact = new QAction( tr( "Destinations" ),
// Resource::loadIconSet( "" ),
QString::null, 0, this, 0 );
connect( cfgact, SIGNAL( activated() ),
SLOT( showSettingsDst() ) );
cfgact->addTo( cfgMenu );
QAction *a;
sectionBar = new QPEToolBar( this );
addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE );
sectionBar->setHorizontalStretchable( true );
QLabel *label = new QLabel( tr("Section: "), sectionBar );
label->setBackgroundColor( sectionBar->backgroundColor() );
+ sectionBar->setStretchableWidget( label );
section = new QComboBox( false, sectionBar );
// section->setBackgroundMode( PaletteBackground );
label = new QLabel( " / ", sectionBar );
label->setBackgroundColor( sectionBar->backgroundColor() );
subsection = new QComboBox( false, sectionBar );
- sectionBar->setStretchableWidget( label );
a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) );
a->addTo( sectionBar );
sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 );
connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) );
sectionAction->setToggleAction( true );
sectionAction->setOn( true );
sectionAction->addTo( viewMenu );
findBar = new QPEToolBar(this);
addToolBar( findBar, "Search", QMainWindow::Top, TRUE );
label = new QLabel( tr("Filter: "), findBar );
label->setBackgroundColor( findBar->backgroundColor() );
findBar->setHorizontalStretchable( TRUE );
findEdit = new QLineEdit( findBar, "findEdit" );
findBar->setStretchableWidget( findEdit );
connect( findEdit, SIGNAL( textChanged( const QString & ) ),
this, SLOT( displayList() ) );
// a = new QAction( tr( "Filter" ), Resource::loadPixmap( "next" ), QString::null, 0, this, 0 );
// connect( a, SIGNAL( activated() ), this, SLOT( filterList() ) );
// a->addTo( findBar );
// a->addTo( edit );
@@ -254,59 +254,59 @@ void MainWindow::subSectionChanged()
packageList.setSubSection( subsection->currentText() );
connect( section, SIGNAL( activated(int) ),
this, SLOT( sectionChanged() ) );
connect( subsection, SIGNAL(activated(int) ),
this, SLOT( subSectionChanged() ) );
displayList();
}
void MainWindow::setSections()
{
section->clear();
section->insertStringList( packageList.getSections() );
}
void MainWindow::setSubSections()
{
subsection->clear();
subsection->insertStringList( packageList.getSubSections() );
}
void MainWindow::showSettings()
{
if ( settings->showDialog( 0 ) )
- getList();
+ updateList();
}
void MainWindow::showSettingsSrv()
{
if ( settings->showDialog( 1 ) )
- getList();
+ updateList();
}
void MainWindow::showSettingsDst()
{
if ( settings->showDialog( 2 ) )
- getList();
+ updateList();
}
void MainWindow::showDetails()
{
if ( activePackage ) return;
if ( details )
{
details = new PackageDetails( this );
connect( details->install, SIGNAL(clicked()), SLOT( toggleActivePackage() ) );
connect( details->remove, SIGNAL(clicked()), SLOT( toggleActivePackage() ) );
connect( details->ignore, SIGNAL(clicked()), details, SLOT(close()));
details->description->setTextFormat(RichText);
}
details->setCaption("Package: " + activePackage->name());
details->description->setText(activePackage->details() );
details->install->setEnabled(!activePackage->installed());
details->remove->setEnabled(activePackage->installed());
details->showMaximized();
}
void MainWindow::toggleActivePackage()
{