Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 54ee115..c803ca0 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp @@ -87,13 +87,13 @@ void MainWindow::makeMenu() QLabel *spacer = new QLabel( "", toolBar ); spacer->setBackgroundColor( toolBar->backgroundColor() ); toolBar->setStretchableWidget( spacer ); - runAction = new QAction( tr( "Commit" ), + runAction = new QAction( tr( "Apply" ), Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 ); connect( runAction, SIGNAL( activated() ), this, SLOT( runIpkg() ) ); runAction->addTo( toolBar ); runAction->addTo( srvMenu ); @@ -168,42 +168,42 @@ void MainWindow::makeMenu() 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 ); + a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); a->addTo( findBar ); findAction = new QAction( tr( "Find" ), QString::null, 0, this, 0 ); connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) ); findAction->setToggleAction( true ); findAction->setOn( true ); findAction->addTo( viewMenu ); - } MainWindow::~MainWindow() { } void MainWindow::runIpkg() { ipkg->commit( packageList ); - updateList(); //to remove +// updateList(); //to remove } void MainWindow::updateList() { + QTimer *t = new QTimer( this ); + connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); + t->start( 0, false ); packageList.clear(); ipkg->update(); getList(); + t->stop(); } void MainWindow::getList() { packageList.update(); displayList(); @@ -343,6 +343,15 @@ void MainWindow::findShow(bool b) void MainWindow::findClose() { findAction->setOn( false ); } +void MainWindow::rotateUpdateIcon() +{ + pvDebug(2, "MainWindow::rotateUpdateIcon"); + if ( updateIcon ) + updateAction->setIconSet( Resource::loadIconSet( "oipkg/update" ) ); + else + updateAction->setIconSet( Resource::loadIconSet( "oipkg/update2" ) ); + updateIcon = !updateIcon; +} |