Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 4f6e4cc..55f915d 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -40,42 +40,47 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
40 | setCentralWidget( listViewPackages ); | 40 | setCentralWidget( listViewPackages ); |
41 | listViewPackages->addList( tr("feeds"), &packageListServers ); | 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 | listViewPackages->addList( tr("documents"), &packageListDocLnk ); |
44 | //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); |
45 | //wait = new QMessageBox(this); | 45 | //wait = new QMessageBox(this); |
46 | // wait->setText(tr("Please wait")); | 46 | // wait->setText(tr("Please wait")); |
47 | ipkg = new PmIpkg( settings, this ); | 47 | ipkg = new PmIpkg( settings, this ); |
48 | // settings->setIpkg( ipkg ); | 48 | // settings->setIpkg( ipkg ); |
49 | packageListServers.setSettings( settings ); | 49 | packageListServers.setSettings( settings ); |
50 | packageListSearch.setSettings( settings ); | 50 | packageListSearch.setSettings( settings ); |
51 | packageListDocLnk.setSettings( settings ); | 51 | packageListDocLnk.setSettings( settings ); |
52 | pvDebug(9,"packageListServers.update"); | ||
52 | packageListServers.update(); | 53 | packageListServers.update(); |
54 | pvDebug(9,"packageListDocLnk.update"); | ||
53 | packageListDocLnk.update(); | 55 | packageListDocLnk.update(); |
56 | pvDebug(9,"makeMenu"); | ||
54 | makeMenu(); | 57 | makeMenu(); |
55 | makeChannel(); | 58 | makeChannel(); |
56 | //opie is hardcoded default ;) | 59 | //opie is hardcoded default ;) |
60 | pvDebug(9,"section->setCurrentItem"); | ||
57 | for (int i=0;i<section->count();i++) | 61 | for (int i=0;i<section->count();i++) |
58 | if (section->text(i)=="opie") | 62 | if (section->text(i)=="opie") |
59 | section->setCurrentItem(i); | 63 | section->setCurrentItem(i); |
60 | sectionChanged(); | 64 | sectionChanged(); |
61 | 65 | ||
62 | connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); | 66 | connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); |
63 | connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); | 67 | connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); |
64 | 68 | ||
65 | connect( settings->removeLinksButton, SIGNAL( clicked()), | 69 | connect( settings->removeLinksButton, SIGNAL( clicked()), |
66 | SLOT(removeLinks()) ); | 70 | SLOT(removeLinks()) ); |
67 | connect( settings->createLinksButton, SIGNAL( clicked()), | 71 | connect( settings->createLinksButton, SIGNAL( clicked()), |
68 | SLOT(createLinks()) ); | 72 | SLOT(createLinks()) ); |
69 | 73 | ||
74 | pvDebug(9,"displayList"); | ||
70 | displayList(); | 75 | displayList(); |
71 | } | 76 | } |
72 | 77 | ||
73 | void MainWindow::makeMenu() | 78 | void MainWindow::makeMenu() |
74 | { | 79 | { |
75 | 80 | ||
76 | QPEToolBar *toolBar = new QPEToolBar( this ); | 81 | QPEToolBar *toolBar = new QPEToolBar( this ); |
77 | QPEMenuBar *menuBar = new QPEMenuBar( toolBar ); | 82 | QPEMenuBar *menuBar = new QPEMenuBar( toolBar ); |
78 | QPopupMenu *srvMenu = new QPopupMenu( menuBar ); | 83 | QPopupMenu *srvMenu = new QPopupMenu( menuBar ); |
79 | QPopupMenu *viewMenu = new QPopupMenu( menuBar ); | 84 | QPopupMenu *viewMenu = new QPopupMenu( menuBar ); |
80 | QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); | 85 | QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); |
81 | // QPopupMenu *sectMenu = new QPopupMenu( menuBar ); | 86 | // QPopupMenu *sectMenu = new QPopupMenu( menuBar ); |
@@ -227,32 +232,30 @@ void MainWindow::makeMenu() | |||
227 | // configure the menus | 232 | // configure the menus |
228 | Config cfg( "oipkg", Config::User ); | 233 | Config cfg( "oipkg", Config::User ); |
229 | cfg.setGroup( "gui" ); | 234 | cfg.setGroup( "gui" ); |
230 | 235 | ||
231 | findShow( cfg.readBoolEntry( "findBar", true ) ); | 236 | findShow( cfg.readBoolEntry( "findBar", true ) ); |
232 | searchShow( cfg.readBoolEntry( "searchBar", true ) ); | 237 | searchShow( cfg.readBoolEntry( "searchBar", true ) ); |
233 | sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); | 238 | sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); |
234 | destShow( cfg.readBoolEntry( "destBar", false ) ); | 239 | destShow( cfg.readBoolEntry( "destBar", false ) ); |
235 | } | 240 | } |
236 | 241 | ||
237 | MainWindow::~MainWindow() | 242 | MainWindow::~MainWindow() |
238 | { | 243 | { |
239 | pvDebug(7,"MainWindow::~MainWindow "); | ||
240 | Config cfg( "oipkg", Config::User ); | 244 | Config cfg( "oipkg", Config::User ); |
241 | cfg.setGroup( "gui" ); | 245 | cfg.setGroup( "gui" ); |
242 | cfg.writeEntry( "findBar", !findBar->isHidden() ); | 246 | cfg.writeEntry( "findBar", !findBar->isHidden() ); |
243 | cfg.writeEntry( "searchBar", !searchBar->isHidden() ); | 247 | cfg.writeEntry( "searchBar", !searchBar->isHidden() ); |
244 | cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); | 248 | cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); |
245 | cfg.writeEntry( "destBar", !destBar->isHidden() ); | 249 | cfg.writeEntry( "destBar", !destBar->isHidden() ); |
246 | pvDebug(7,"MainWindow::~MainWindow "); | ||
247 | 250 | ||
248 | } | 251 | } |
249 | 252 | ||
250 | void MainWindow::runIpkg() | 253 | void MainWindow::runIpkg() |
251 | { | 254 | { |
252 | packageListServers.allPackages(); | 255 | packageListServers.allPackages(); |
253 | ipkg->loadList( &packageListSearch ); | 256 | ipkg->loadList( &packageListSearch ); |
254 | ipkg->loadList( &packageListDocLnk ); | 257 | ipkg->loadList( &packageListDocLnk ); |
255 | ipkg->loadList( &packageListServers ); | 258 | ipkg->loadList( &packageListServers ); |
256 | ipkg->commit(); | 259 | ipkg->commit(); |
257 | // ##### If we looked in the list of files, we could send out accurate | 260 | // ##### If we looked in the list of files, we could send out accurate |
258 | // ##### messages. But we don't bother yet, and just do an "all". | 261 | // ##### messages. But we don't bother yet, and just do an "all". |