summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/mainwindow.cpp
authortille <tille>2002-06-21 12:44:34 (UTC)
committer tille <tille>2002-06-21 12:44:34 (UTC)
commite6834009bf23492e009258e3881ce183cf9e27a0 (patch) (unidiff)
treeba5fb74b2ee5e70b5157cd5eb935f8760c5b208d /noncore/unsupported/oipkg/mainwindow.cpp
parent3be39e6c8af27a43d4b09bf08b4c739c342b5de3 (diff)
downloadopie-e6834009bf23492e009258e3881ce183cf9e27a0.zip
opie-e6834009bf23492e009258e3881ce183cf9e27a0.tar.gz
opie-e6834009bf23492e009258e3881ce183cf9e27a0.tar.bz2
fixes
Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp55
1 files changed, 47 insertions, 8 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 233eae6..7df1d6b 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -43,7 +43,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
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 ); 46//listViewPackages->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 );
@@ -51,7 +51,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
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 packageListDocLnk.update(); 54 pvDebug(0,"no UPDATE of DocLnk");
55// packageListDocLnk.update();
55 pvDebug(9,"makeMenu"); 56 pvDebug(9,"makeMenu");
56 makeMenu(); 57 makeMenu();
57 makeChannel(); 58 makeChannel();
@@ -82,14 +83,14 @@ void MainWindow::makeMenu()
82 QPopupMenu *srvMenu = new QPopupMenu( menuBar ); 83 QPopupMenu *srvMenu = new QPopupMenu( menuBar );
83 QPopupMenu *viewMenu = new QPopupMenu( menuBar ); 84 QPopupMenu *viewMenu = new QPopupMenu( menuBar );
84 QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); 85 QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
85 // QPopupMenu *sectMenu = new QPopupMenu( menuBar ); 86 QPopupMenu *helpMenu = new QPopupMenu( menuBar );
86 87
87 setToolBarsMovable( false ); 88 setToolBarsMovable( false );
88 toolBar->setHorizontalStretchable( true ); 89 toolBar->setHorizontalStretchable( true );
89 menuBar->insertItem( tr( "Package" ), srvMenu ); 90 menuBar->insertItem( tr( "Package" ), srvMenu );
90 menuBar->insertItem( tr( "View" ), viewMenu ); 91 menuBar->insertItem( tr( "View" ), viewMenu );
91 menuBar->insertItem( tr( "Settings" ), cfgMenu ); 92 menuBar->insertItem( tr( "Settings" ), cfgMenu );
92 // menuBar->insertItem( tr( "Sections" ), sectMenu ); 93 menuBar->insertItem( tr( "Help" ), helpMenu );
93 94
94 QLabel *spacer; 95 QLabel *spacer;
95// spacer = new QLabel( "", toolBar ); 96// spacer = new QLabel( "", toolBar );
@@ -105,7 +106,7 @@ void MainWindow::makeMenu()
105 runAction->addTo( toolBar ); 106 runAction->addTo( toolBar );
106 runAction->addTo( srvMenu ); 107 runAction->addTo( srvMenu );
107 108
108 srvMenu->insertSeparator (); 109 srvMenu->insertSeparator();
109 110
110 updateAction = new QAction( tr( "Update" ), 111 updateAction = new QAction( tr( "Update" ),
111 Resource::loadIconSet( "oipkg/update" ), 112 Resource::loadIconSet( "oipkg/update" ),
@@ -229,6 +230,43 @@ void MainWindow::makeMenu()
229 destAction->setToggleAction( true ); 230 destAction->setToggleAction( true );
230 // destAction->addTo( viewMenu ); 231 // destAction->addTo( viewMenu );
231 232
233// helpMenu
234 helpMenu->insertSeparator();
235 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
236 a->addTo( helpMenu );
237 helpMenu->insertSeparator();
238 a = new QAction( tr( "Install" ),
239 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 );
240 a->addTo( helpMenu );
241 a = new QAction( tr( "Remove" ),
242 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 );
243 a->addTo( helpMenu );
244 helpMenu->insertSeparator();
245 a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 );
246 a->addTo( helpMenu );
247 helpMenu->insertSeparator();
248 a = new QAction( tr( "New version, installed" ),
249 Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 );
250 a->addTo( helpMenu );
251 a = new QAction( tr( "New version, not installed" ),
252 Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 );
253 a->addTo( helpMenu );
254 a = new QAction( tr( "Old version, installed" ),
255 Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 );
256 a->addTo( helpMenu );
257 a = new QAction( tr( "Old version, not installed" ),
258 Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 );
259 a->addTo( helpMenu );
260 a = new QAction( tr( "Old version, new version installed" ),
261 Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 );
262 a->addTo( helpMenu );
263 a = new QAction( tr( "New version, old version installed" ),
264 Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 );
265 a->addTo( helpMenu );
266 //a = new QAction( tr( "" ),
267 // Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 );
268 // a->addTo( helpMenu );
269
232 // configure the menus 270 // configure the menus
233 Config cfg( "oipkg", Config::User ); 271 Config cfg( "oipkg", Config::User );
234 cfg.setGroup( "gui" ); 272 cfg.setGroup( "gui" );
@@ -254,7 +292,7 @@ void MainWindow::runIpkg()
254{ 292{
255 packageListServers.allPackages(); 293 packageListServers.allPackages();
256 ipkg->loadList( &packageListSearch ); 294 ipkg->loadList( &packageListSearch );
257 ipkg->loadList( &packageListDocLnk ); 295//ipkg->loadList( &packageListDocLnk );
258 ipkg->loadList( &packageListServers ); 296 ipkg->loadList( &packageListServers );
259 ipkg->commit(); 297 ipkg->commit();
260 ipkg->clearLists(); 298 ipkg->clearLists();
@@ -270,11 +308,12 @@ void MainWindow::updateList()
270{ 308{
271 packageListServers.clear(); 309 packageListServers.clear();
272 packageListSearch.clear(); 310 packageListSearch.clear();
273 packageListDocLnk.clear(); 311
312// packageListDocLnk.clear();
274 ipkg->update(); 313 ipkg->update();
275 packageListServers.update(); 314 packageListServers.update();
276 packageListSearch.update(); 315 packageListSearch.update();
277 packageListDocLnk.update(); 316// packageListDocLnk.update();
278} 317}
279 318
280void MainWindow::filterList() 319void MainWindow::filterList()