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.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index b485a03..cb2b4cd 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -48,13 +48,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
this, SLOT( setCurrent( QListViewItem* ) ) );
settings = new PackageManagerSettings(this,0,TRUE);
ipkg = new PmIpkg( settings, this );
packageList.setSettings( settings );
- newList();
+ getList();
setSections();
setSubSections();
displayList();
}
void MainWindow::makeMenu()
@@ -63,12 +63,19 @@ void MainWindow::makeMenu()
QPEToolBar *toolBar = new QPEToolBar( this );
QPEMenuBar *menuBar = new QPEMenuBar( toolBar );
QPopupMenu *srvMenu = new QPopupMenu( menuBar );
QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
// QPopupMenu *sectMenu = new QPopupMenu( menuBar );
+//#define TOOLBAR
+#ifdef TOOLBAR
+ QPEToolBar *secBar = new QPEToolBar( this );
+ QComboBox *sections = new QComboBox( false, this );
+ secBar->addTo( sections );
+#endif
+
contextMenu = new QPopupMenu( this );
setToolBarsMovable( false );
toolBar->setHorizontalStretchable( true );
menuBar->insertItem( tr( "Package" ), srvMenu );
menuBar->insertItem( tr( "Settings" ), cfgMenu );
@@ -131,25 +138,26 @@ MainWindow::~MainWindow()
{
}
void MainWindow::runIpkg()
{
ipkg->commit( packageList );
- ipkg->runIpkg("update");
- packageList.update();
+ updateList();
}
void MainWindow::updateList()
{
- ipkg->runIpkg("update");
- packageList.update();
+ // todo: packageList.clear();
+ ipkg->update();
+ getList();
}
-void MainWindow::newList()
+void MainWindow::getList()
{
packageList.update();
+ displayList();
}
void MainWindow::filterList()
{
packageList.filterPackages();
}
@@ -214,23 +222,23 @@ void MainWindow::setSubSections()
}
void MainWindow::showSettings()
{
if ( settings->showDialog( 0 ) )
- newList();
+ getList();
}
void MainWindow::showSettingsSrv()
{
if ( settings->showDialog( 1 ) )
- newList();
+ getList();
}
void MainWindow::showSettingsDst()
{
if ( settings->showDialog( 2 ) )
- newList();
+ getList();
}
void MainWindow::showDetails()
{
if ( activePackage ) return;