Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 0422d65..b668660 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -39,6 +39,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
39 | listViewPackages = new PackageListView( this,"listViewPackages",settings ); | 39 | listViewPackages = new PackageListView( this,"listViewPackages",settings ); |
40 | setCentralWidget( listViewPackages ); | 40 | setCentralWidget( listViewPackages ); |
41 | listViewPackages->addList( tr("local"), &packageList ); | 41 | listViewPackages->addList( tr("feeds"), &packageListServers ); |
42 | listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); | 42 | listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); |
43 | listViewPackages->addList( tr("documents"), &packageListDocLnk ); | ||
43 | //wait = new QMessageBox(tr("oipkg"),tr("Please wait")//,QMessageBox::Information,QMessageBox::NoButton,QMessageBox::NoButton,QMessageBox::NoButton); | 44 | //wait = new QMessageBox(tr("oipkg"),tr("Please wait")//,QMessageBox::Information,QMessageBox::NoButton,QMessageBox::NoButton,QMessageBox::NoButton); |
44 | //wait = new QMessageBox(this); | 45 | //wait = new QMessageBox(this); |
@@ -46,7 +47,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
46 | ipkg = new PmIpkg( settings, this ); | 47 | ipkg = new PmIpkg( settings, this ); |
47 | // settings->setIpkg( ipkg ); | 48 | // settings->setIpkg( ipkg ); |
48 | packageList.setSettings( settings ); | 49 | packageListServers.setSettings( settings ); |
49 | packageListSearch.setSettings( settings ); | 50 | packageListSearch.setSettings( settings ); |
50 | packageList.update(); | 51 | packageListDocLnk.setSettings( settings ); |
52 | packageListServers.update(); | ||
53 | packageListDocLnk.update(); | ||
51 | makeMenu(); | 54 | makeMenu(); |
52 | makeChannel(); | 55 | makeChannel(); |
@@ -245,7 +248,8 @@ MainWindow::~MainWindow() | |||
245 | void MainWindow::runIpkg() | 248 | void MainWindow::runIpkg() |
246 | { | 249 | { |
247 | packageList.allPackages(); | 250 | packageListServers.allPackages(); |
248 | ipkg->loadList( packageListSearch ); | 251 | ipkg->loadList( packageListSearch ); |
249 | ipkg->commit( packageList ); | 252 | ipkg->loadList( packageListDocLnk ); |
253 | ipkg->commit( packageListServers ); | ||
250 | // ##### If we looked in the list of files, we could send out accurate | 254 | // ##### If we looked in the list of files, we could send out accurate |
251 | // ##### messages. But we don't bother yet, and just do an "all". | 255 | // ##### messages. But we don't bother yet, and just do an "all". |
@@ -262,7 +266,11 @@ void MainWindow::updateList() | |||
262 | connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); | 266 | connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); |
263 | t->start( 0, false ); | 267 | t->start( 0, false ); |
264 | packageList.clear(); | 268 | packageListServers.clear(); |
269 | packageListSearch.clear(); | ||
270 | packageListDocLnk.clear(); | ||
265 | ipkg->update(); | 271 | ipkg->update(); |
266 | packageList.update(); | 272 | packageListServers.update(); |
273 | packageListSearch.update(); | ||
274 | packageListDocLnk.update(); | ||
267 | t->stop(); | 275 | t->stop(); |
268 | // wait->hide(); | 276 | // wait->hide(); |
@@ -274,5 +282,5 @@ void MainWindow::filterList() | |||
274 | QString f = ""; | 282 | QString f = ""; |
275 | if ( findAction->isOn() ) f = findEdit->text(); | 283 | if ( findAction->isOn() ) f = findEdit->text(); |
276 | packageList.filterPackages( f ); | 284 | packageListServers.filterPackages( f ); |
277 | //wait->hide(); | 285 | //wait->hide(); |
278 | } | 286 | } |
@@ -283,23 +291,4 @@ void MainWindow::displayList() | |||
283 | filterList(); | 291 | filterList(); |
284 | listViewPackages->display(); | 292 | listViewPackages->display(); |
285 | //// if (!rootLocal) | ||
286 | //// { | ||
287 | //QCheckListItem *rootLocal = new QCheckListItem(listViewPackages,tr("local")); | ||
288 | //QCheckListItem *rootSearch = new QCheckListItem(listViewPackages,tr("ipkgfind")); | ||
289 | //// } | ||
290 | // listViewPackages->clear(); | ||
291 | // Package *pack = packageList.first(); | ||
292 | // PackageListItem *item; | ||
293 | // while( pack ) | ||
294 | // { | ||
295 | // item = new PackageListItem( rootLocal, pack, settings ); | ||
296 | // pack = packageList.next(); | ||
297 | // } | ||
298 | // pack = packageListSearch.first(); | ||
299 | // while( pack ) | ||
300 | // { | ||
301 | // item = new PackageListItem( rootSearch, pack, settings ); | ||
302 | // pack = packageListSearch.next(); | ||
303 | // } | ||
304 | } | 293 | } |
305 | 294 | ||
@@ -311,5 +300,5 @@ void MainWindow::sectionChanged() | |||
311 | this, SLOT( subSectionChanged() ) ); | 300 | this, SLOT( subSectionChanged() ) ); |
312 | subsection->clear(); | 301 | subsection->clear(); |
313 | packageList.setSection( section->currentText() ); | 302 | packageListServers.setSection( section->currentText() ); |
314 | setSubSections(); | 303 | setSubSections(); |
315 | connect( section, SIGNAL( activated(int) ), | 304 | connect( section, SIGNAL( activated(int) ), |
@@ -326,5 +315,5 @@ void MainWindow::subSectionChanged() | |||
326 | disconnect( subsection, SIGNAL(activated(int) ), | 315 | disconnect( subsection, SIGNAL(activated(int) ), |
327 | this, SLOT( subSectionChanged() ) ); | 316 | this, SLOT( subSectionChanged() ) ); |
328 | packageList.setSubSection( subsection->currentText() ); | 317 | packageListServers.setSubSection( subsection->currentText() ); |
329 | connect( section, SIGNAL( activated(int) ), | 318 | connect( section, SIGNAL( activated(int) ), |
330 | this, SLOT( sectionChanged() ) ); | 319 | this, SLOT( sectionChanged() ) ); |
@@ -337,5 +326,5 @@ void MainWindow::setSections() | |||
337 | { | 326 | { |
338 | section->clear(); | 327 | section->clear(); |
339 | section->insertStringList( packageList.getSections() ); | 328 | section->insertStringList( packageListServers.getSections() ); |
340 | } | 329 | } |
341 | 330 | ||
@@ -343,5 +332,5 @@ void MainWindow::setSubSections() | |||
343 | { | 332 | { |
344 | subsection->clear(); | 333 | subsection->clear(); |
345 | subsection->insertStringList( packageList.getSubSections() ); | 334 | subsection->insertStringList( packageListServers.getSubSections() ); |
346 | } | 335 | } |
347 | 336 | ||