summaryrefslogtreecommitdiff
authortille <tille>2002-06-28 17:17:53 (UTC)
committer tille <tille>2002-06-28 17:17:53 (UTC)
commit54ab82774f52332dbbb97de057ee2b1c5d29347d (patch) (unidiff)
tree5506a01f59e4913993c3343cb7065c78df2793c5
parent8176526fc61f4b4012021a4324aee592463dbb3a (diff)
downloadopie-54ab82774f52332dbbb97de057ee2b1c5d29347d.zip
opie-54ab82774f52332dbbb97de057ee2b1c5d29347d.tar.gz
opie-54ab82774f52332dbbb97de057ee2b1c5d29347d.tar.bz2
doclnk is back, since it seems to work now!
Diffstat (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 05f2f06..8778b85 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -22,58 +22,58 @@
22#include <qlineedit.h> 22#include <qlineedit.h>
23#include <qtabwidget.h> 23#include <qtabwidget.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <qmessagebox.h> 25#include <qmessagebox.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qlayout.h> 27#include <qlayout.h>
28 28
29#include "pksettingsbase.h" 29#include "pksettingsbase.h"
30#include "utils.h" 30#include "utils.h"
31#include "packagelistitem.h" 31#include "packagelistitem.h"
32 32
33 33
34MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : 34MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
35 QMainWindow( parent, name, f ) 35 QMainWindow( parent, name, f )
36// packageListServers( QObject(parent), name ), 36// packageListServers( QObject(parent), name ),
37// packageListSearch( parent, name ), 37// packageListSearch( parent, name ),
38// packageListDocLnk( parent, name ) 38// packageListDocLnk( parent, name )
39 { 39 {
40 setCaption( tr("Package Manager") ); 40 setCaption( tr("Package Manager") );
41 settings = new PackageManagerSettings(this,0,TRUE); 41 settings = new PackageManagerSettings(this,0,TRUE);
42 listViewPackages = new PackageListView( this,"listViewPackages",settings ); 42 listViewPackages = new PackageListView( this,"listViewPackages",settings );
43 setCentralWidget( listViewPackages ); 43 setCentralWidget( listViewPackages );
44 listViewPackages->addList( tr("feeds"), &packageListServers ); 44 listViewPackages->addList( tr("feeds"), &packageListServers );
45 listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); 45 listViewPackages->addList( tr("ipkgfind"), &packageListSearch );
46//listViewPackages->addList( tr("documents"), &packageListDocLnk ); 46listViewPackages->addList( tr("documents"), &packageListDocLnk );
47 ipkg = new PmIpkg( settings, this ); 47 ipkg = new PmIpkg( settings, this );
48 packageListServers.setSettings( settings ); 48 packageListServers.setSettings( settings );
49 packageListSearch.setSettings( settings ); 49 packageListSearch.setSettings( settings );
50 packageListDocLnk.setSettings( settings ); 50 packageListDocLnk.setSettings( settings );
51 pvDebug(9,"packageListServers.update"); 51 pvDebug(9,"packageListServers.update");
52 packageListServers.update(); 52 packageListServers.update();
53 pvDebug(9,"packageListDocLnk.update"); 53 pvDebug(9,"packageListDocLnk.update");
54 pvDebug(0,"no UPDATE of DocLnk"); 54 pvDebug(0,"no UPDATE of DocLnk");
55// packageListDocLnk.update(); 55 packageListDocLnk.update();
56 pvDebug(9,"makeMenu"); 56 pvDebug(9,"makeMenu");
57 makeMenu(); 57 makeMenu();
58 makeChannel(); 58 makeChannel();
59 //opie is hardcoded default ;) 59 //opie is hardcoded default ;)
60 //pvDebug(9,"section->setCurrentItem"); 60 //pvDebug(9,"section->setCurrentItem");
61// for (int i=0;i<section->count();i++) 61// for (int i=0;i<section->count();i++)
62 // if (section->text(i)=="opie") 62 // if (section->text(i)=="opie")
63 // section->setCurrentItem(i); 63 // section->setCurrentItem(i);
64// sectionChanged(); 64// sectionChanged();
65 65
66 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); 66 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) );
67 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); 67 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) );
68 68
69 connect( settings->removeLinksButton, SIGNAL( clicked()), 69 connect( settings->removeLinksButton, SIGNAL( clicked()),
70 SLOT(removeLinks()) ); 70 SLOT(removeLinks()) );
71 connect( settings->createLinksButton, SIGNAL( clicked()), 71 connect( settings->createLinksButton, SIGNAL( clicked()),
72 SLOT(createLinks()) ); 72 SLOT(createLinks()) );
73 73
74 pvDebug(9,"displayList"); 74 pvDebug(9,"displayList");
75 displayList(); 75 displayList();
76} 76}
77 77
78void MainWindow::makeMenu() 78void MainWindow::makeMenu()
79{ 79{
@@ -271,70 +271,70 @@ void MainWindow::makeMenu()
271 Config cfg( "oipkg", Config::User ); 271 Config cfg( "oipkg", Config::User );
272 cfg.setGroup( "gui" ); 272 cfg.setGroup( "gui" );
273 273
274 findShow( cfg.readBoolEntry( "findBar", true ) ); 274 findShow( cfg.readBoolEntry( "findBar", true ) );
275 searchShow( cfg.readBoolEntry( "searchBar", true ) ); 275 searchShow( cfg.readBoolEntry( "searchBar", true ) );
276 sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); 276 sectionShow( cfg.readBoolEntry( "sectionBar", true ) );
277 destShow( cfg.readBoolEntry( "destBar", false ) ); 277 destShow( cfg.readBoolEntry( "destBar", false ) );
278} 278}
279 279
280MainWindow::~MainWindow() 280MainWindow::~MainWindow()
281{ 281{
282 Config cfg( "oipkg", Config::User ); 282 Config cfg( "oipkg", Config::User );
283 cfg.setGroup( "gui" ); 283 cfg.setGroup( "gui" );
284 cfg.writeEntry( "findBar", !findBar->isHidden() ); 284 cfg.writeEntry( "findBar", !findBar->isHidden() );
285 cfg.writeEntry( "searchBar", !searchBar->isHidden() ); 285 cfg.writeEntry( "searchBar", !searchBar->isHidden() );
286 cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); 286 cfg.writeEntry( "sectionBar", !sectionBar->isHidden() );
287 cfg.writeEntry( "destBar", !destBar->isHidden() ); 287 cfg.writeEntry( "destBar", !destBar->isHidden() );
288 288
289} 289}
290 290
291void MainWindow::runIpkg() 291void MainWindow::runIpkg()
292{ 292{
293 packageListServers.allPackages(); 293 packageListServers.allPackages();
294 ipkg->loadList( &packageListSearch ); 294 ipkg->loadList( &packageListSearch );
295//ipkg->loadList( &packageListDocLnk ); 295 ipkg->loadList( &packageListDocLnk );
296 ipkg->loadList( &packageListServers ); 296 ipkg->loadList( &packageListServers );
297 ipkg->commit(); 297 ipkg->commit();
298 ipkg->clearLists(); 298 ipkg->clearLists();
299 // ##### If we looked in the list of files, we could send out accurate 299 // ##### If we looked in the list of files, we could send out accurate
300 // ##### messages. But we don't bother yet, and just do an "all". 300 // ##### messages. But we don't bother yet, and just do an "all".
301 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 301 QCopEnvelope e("QPE/System", "linkChanged(QString)");
302 QString lf = QString::null; 302 QString lf = QString::null;
303 e << lf; 303 e << lf;
304 displayList(); 304 displayList();
305} 305}
306 306
307void MainWindow::updateList() 307void MainWindow::updateList()
308{ 308{
309 packageListServers.clear(); 309 packageListServers.clear();
310 packageListSearch.clear(); 310 packageListSearch.clear();
311 311
312// packageListDocLnk.clear(); 312 packageListDocLnk.clear();
313 ipkg->update(); 313 ipkg->update();
314 packageListServers.update(); 314 packageListServers.update();
315 packageListSearch.update(); 315 packageListSearch.update();
316// packageListDocLnk.update(); 316 packageListDocLnk.update();
317} 317}
318 318
319void MainWindow::filterList() 319void MainWindow::filterList()
320{ 320{
321 QString f = ""; 321 QString f = "";
322 if ( findAction->isOn() ) f = findEdit->text(); 322 if ( findAction->isOn() ) f = findEdit->text();
323 packageListServers.filterPackages( f ); 323 packageListServers.filterPackages( f );
324} 324}
325 325
326void MainWindow::displayList() 326void MainWindow::displayList()
327{ 327{
328 filterList(); 328 filterList();
329 listViewPackages->display(); 329 listViewPackages->display();
330} 330}
331 331
332void MainWindow::sectionChanged() 332void MainWindow::sectionChanged()
333{ 333{
334 disconnect( section, SIGNAL( activated(int) ), 334 disconnect( section, SIGNAL( activated(int) ),
335 this, SLOT( sectionChanged() ) ); 335 this, SLOT( sectionChanged() ) );
336 disconnect( subsection, SIGNAL(activated(int) ), 336 disconnect( subsection, SIGNAL(activated(int) ),
337 this, SLOT( subSectionChanged() ) ); 337 this, SLOT( subSectionChanged() ) );
338 subsection->clear(); 338 subsection->clear();
339 packageListServers.setSection( section->currentText() ); 339 packageListServers.setSection( section->currentText() );
340 setSubSections(); 340 setSubSections();