summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp24
-rw-r--r--noncore/unsupported/oipkg/mainwindow.h3
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp26
-rw-r--r--noncore/unsupported/oipkg/pksettings.h3
-rw-r--r--noncore/unsupported/oipkg/pksettingsbase.ui4
5 files changed, 36 insertions, 24 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index d1be8d0..11fc91b 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -116,25 +116,25 @@ void MainWindow::makeMenu()
116 Resource::loadIconSet( "oipkg/update" ), 116 Resource::loadIconSet( "oipkg/update" ),
117 QString::null, 0, this, 0 ); 117 QString::null, 0, this, 0 );
118 connect( updateAction, SIGNAL( activated() ), 118 connect( updateAction, SIGNAL( activated() ),
119 this , SLOT( updateList() ) ); 119 this , SLOT( updateList() ) );
120 updateAction->addTo( toolBar ); 120 updateAction->addTo( toolBar );
121 updateAction->addTo( srvMenu ); 121 updateAction->addTo( srvMenu );
122 122
123 QAction *cfgact; 123 QAction *cfgact;
124 124
125 cfgact = new QAction( tr( "Setups" ), 125 cfgact = new QAction( tr( "Setups" ),
126 QString::null, 0, this, 0 ); 126 QString::null, 0, this, 0 );
127 connect( cfgact, SIGNAL( activated() ), 127 connect( cfgact, SIGNAL( activated() ),
128 SLOT( showSettings() ) ); 128 SLOT( showSettingsSetup() ) );
129 cfgact->addTo( cfgMenu ); 129 cfgact->addTo( cfgMenu );
130 130
131 cfgact = new QAction( tr( "Servers" ), 131 cfgact = new QAction( tr( "Servers" ),
132 QString::null, 0, this, 0 ); 132 QString::null, 0, this, 0 );
133 connect( cfgact, SIGNAL( activated() ), 133 connect( cfgact, SIGNAL( activated() ),
134 SLOT( showSettingsSrv() ) ); 134 SLOT( showSettingsSrv() ) );
135 cfgact->addTo( cfgMenu ); 135 cfgact->addTo( cfgMenu );
136 cfgact = new QAction( tr( "Destinations" ), 136 cfgact = new QAction( tr( "Destinations" ),
137 QString::null, 0, this, 0 ); 137 QString::null, 0, this, 0 );
138 connect( cfgact, SIGNAL( activated() ), 138 connect( cfgact, SIGNAL( activated() ),
139 SLOT( showSettingsDst() ) ); 139 SLOT( showSettingsDst() ) );
140 cfgact->addTo( cfgMenu ); 140 cfgact->addTo( cfgMenu );
@@ -215,39 +215,39 @@ void MainWindow::makeMenu()
215 215
216 //DEST 216 //DEST
217 destBar = new QPEToolBar(this); 217 destBar = new QPEToolBar(this);
218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); 218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE );
219 label = new QLabel( tr("Destination: "), destBar ); 219 label = new QLabel( tr("Destination: "), destBar );
220// label->setBackgroundMode( PaletteForeground ); 220// label->setBackgroundMode( PaletteForeground );
221 destBar->setHorizontalStretchable( TRUE ); 221 destBar->setHorizontalStretchable( TRUE );
222 destination = new QComboBox( false, destBar ); 222 destination = new QComboBox( false, destBar );
223 destination->insertStringList( settings->getDestinationNames() ); 223 destination->insertStringList( settings->getDestinationNames() );
224 setComboName(destination,settings->getDestinationName()); 224 setComboName(destination,settings->getDestinationName());
225 connect( destination, SIGNAL(activated(int)), 225 connect( destination, SIGNAL(activated(int)),
226 settings, SLOT(activeDestinationChange(int)) ); 226 settings, SLOT(activeDestinationChange(int)) );
227 spacer = new QLabel( " ", destBar ); 227// spacer = new QLabel( " ", destBar );
228// spacer->setBackgroundMode( PaletteForeground ); 228// spacer->setBackgroundMode( PaletteForeground );
229 CheckBoxLink = new QCheckBox( tr("Link"), destBar); 229 CheckBoxLink = new QCheckBox( tr("Link"), destBar);
230// CheckBoxLink->setBackgroundMode( PaletteForeground ); 230// CheckBoxLink->setBackgroundMode( PaletteForeground );
231 CheckBoxLink->setChecked( settings->createLinks() ); 231 CheckBoxLink->setChecked( settings->createLinks() );
232 connect( CheckBoxLink, SIGNAL(toggled(bool)), 232 connect( CheckBoxLink, SIGNAL(toggled(bool)),
233 settings, SLOT(linkEnabled(bool)) ); 233 settings, SLOT(linkEnabled(bool)) );
234 destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 ); 234 destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 );
235 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) ); 235 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) );
236 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 236 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
237 connect( a, SIGNAL( activated() ), SLOT( destClose() ) ); 237 connect( a, SIGNAL( activated() ), SLOT( destClose() ) );
238 a->addTo( destBar ); 238 a->addTo( destBar );
239 destBar->setStretchableWidget( CheckBoxLink ); 239 destBar->setStretchableWidget( CheckBoxLink );
240 destAction->setToggleAction( true ); 240 destAction->setToggleAction( true );
241 // destAction->addTo( viewMenu ); 241 destAction->addTo( viewMenu );
242 242
243// helpMenu 243// helpMenu
244 helpMenu->insertSeparator(); 244 helpMenu->insertSeparator();
245 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 ); 245 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
246 a->addTo( helpMenu ); 246 a->addTo( helpMenu );
247 helpMenu->insertSeparator(); 247 helpMenu->insertSeparator();
248 a = new QAction( tr( "Install" ), 248 a = new QAction( tr( "Install" ),
249 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 ); 249 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 );
250 a->addTo( helpMenu ); 250 a->addTo( helpMenu );
251 a = new QAction( tr( "Remove" ), 251 a = new QAction( tr( "Remove" ),
252 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 ); 252 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 );
253 a->addTo( helpMenu ); 253 a->addTo( helpMenu );
@@ -376,38 +376,44 @@ void MainWindow::setSections()
376{ 376{
377 section->clear(); 377 section->clear();
378 section->insertStringList( packageListServers.getSections() ); 378 section->insertStringList( packageListServers.getSections() );
379} 379}
380 380
381void MainWindow::setSubSections() 381void MainWindow::setSubSections()
382{ 382{
383 subsection->clear(); 383 subsection->clear();
384 subsection->insertStringList( packageListServers.getSubSections() ); 384 subsection->insertStringList( packageListServers.getSubSections() );
385} 385}
386 386
387 387
388void MainWindow::showSettings() 388void MainWindow::showSettings(int i)
389{ 389{
390 if ( settings->showDialog( 0 ) ) 390 if ( settings->showDialog( i ) )
391 {
391 updateList(); 392 updateList();
393 }
394 setComboName(destination,settings->getDestinationName());
395 CheckBoxLink->setChecked( settings->createLinks() );
396}
397void MainWindow::showSettingsSetup()
398{
399 showSettings(0);
392} 400}
393void MainWindow::showSettingsSrv() 401void MainWindow::showSettingsSrv()
394{ 402{
395 if ( settings->showDialog( 1 ) ) 403 showSettings(1);
396 updateList();
397} 404}
398void MainWindow::showSettingsDst() 405void MainWindow::showSettingsDst()
399{ 406{
400 if ( settings->showDialog( 2 ) ) 407 showSettings(2);
401 updateList();
402} 408}
403 409
404void MainWindow::sectionShow(bool b) 410void MainWindow::sectionShow(bool b)
405{ 411{
406 if (b) sectionBar->show(); 412 if (b) sectionBar->show();
407 else sectionBar->hide(); 413 else sectionBar->hide();
408 sectionAction->setOn( b ); 414 sectionAction->setOn( b );
409} 415}
410 416
411void MainWindow::sectionClose() 417void MainWindow::sectionClose()
412{ 418{
413 sectionAction->setOn( false ); 419 sectionAction->setOn( false );
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h
index 090ddd3..354c585 100644
--- a/noncore/unsupported/oipkg/mainwindow.h
+++ b/noncore/unsupported/oipkg/mainwindow.h
@@ -43,25 +43,26 @@ public:
43 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 43 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
44 ~MainWindow(); 44 ~MainWindow();
45 void makeChannel(); 45 void makeChannel();
46 46
47 QCopChannel *channel; 47 QCopChannel *channel;
48 48
49protected slots: 49protected slots:
50 void runIpkg(); 50 void runIpkg();
51 void updateList(); 51 void updateList();
52 void displayList(); 52 void displayList();
53 void subSectionChanged(); 53 void subSectionChanged();
54 void sectionChanged(); 54 void sectionChanged();
55 void showSettings(); 55 void showSettings(int);
56 void showSettingsSetup();
56 void showSettingsSrv(); 57 void showSettingsSrv();
57 void showSettingsDst(); 58 void showSettingsDst();
58 59
59public slots: 60public slots:
60 void sectionClose(); 61 void sectionClose();
61 void sectionShow(bool); 62 void sectionShow(bool);
62 void findClose(); 63 void findClose();
63 void findShow(bool); 64 void findShow(bool);
64 void searchClose(); 65 void searchClose();
65 void searchShow(bool); 66 void searchShow(bool);
66 void destClose(); 67 void destClose();
67 void destShow(bool); 68 void destShow(bool);
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp
index 59d5a3e..14c1944 100644
--- a/noncore/unsupported/oipkg/pksettings.cpp
+++ b/noncore/unsupported/oipkg/pksettings.cpp
@@ -50,24 +50,31 @@ PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* na
50 connect( newsetting, SIGNAL(clicked()), this, SLOT(newInstallationSetting()) ); 50 connect( newsetting, SIGNAL(clicked()), this, SLOT(newInstallationSetting()) );
51 connect( renamesetting, SIGNAL(clicked()), this, SLOT(renameInstallationSetting()) ); 51 connect( renamesetting, SIGNAL(clicked()), this, SLOT(renameInstallationSetting()) );
52 connect( removesetting, SIGNAL(clicked()), this, SLOT(removeInstallationSetting()) ); 52 connect( removesetting, SIGNAL(clicked()), this, SLOT(removeInstallationSetting()) );
53 servername->setEnabled(FALSE); 53 servername->setEnabled(FALSE);
54 serverurl->setEnabled(FALSE); 54 serverurl->setEnabled(FALSE);
55 serverurlDic.setAutoDelete(TRUE); 55 serverurlDic.setAutoDelete(TRUE);
56 destinationname->setEnabled(FALSE); 56 destinationname->setEnabled(FALSE);
57 destinationurl->setEnabled(FALSE); 57 destinationurl->setEnabled(FALSE);
58 destinationurlDic.setAutoDelete(TRUE); 58 destinationurlDic.setAutoDelete(TRUE);
59 readSettings(); 59 readSettings();
60 activeLinkDestination->hide(); 60 activeLinkDestination->hide();
61 serverChanged = false; 61 serverChanged = false;
62
63 // get rid of setups
64// Settings->hide();
65 settingName->hide();
66 newsetting->hide();
67 renamesetting->hide();
68 removesetting->hide();
62} 69}
63 70
64PackageManagerSettings::~PackageManagerSettings() 71PackageManagerSettings::~PackageManagerSettings()
65{ 72{
66} 73}
67 74
68 75
69void PackageManagerSettings::newServer() 76void PackageManagerSettings::newServer()
70{ 77{
71 int i = servers->count(); 78 int i = servers->count();
72 if ( servername->isEnabled() || serverurl->text().isEmpty() ) { 79 if ( servername->isEnabled() || serverurl->text().isEmpty() ) {
73 serverurlDic.insert(i,new QString("http://")); 80 serverurlDic.insert(i,new QString("http://"));
@@ -523,48 +530,47 @@ QString PackageManagerSettings::getDestinationUrlByName(QString n)
523} 530}
524 531
525/** returns the destination listed in ipkg.conf */ 532/** returns the destination listed in ipkg.conf */
526QStringList PackageManagerSettings::getDestinationNames() 533QStringList PackageManagerSettings::getDestinationNames()
527{ 534{
528 QStringList sl; 535 QStringList sl;
529 for (int i=0; i<(int)destinations->count(); i++) 536 for (int i=0; i<(int)destinations->count(); i++)
530 { 537 {
531 sl += destinations->text(i); 538 sl += destinations->text(i);
532 } 539 }
533 return sl; 540 return sl;
534} 541}
535 542
536 543
537void PackageManagerSettings::linkEnabled( bool b ) 544void PackageManagerSettings::linkEnabled( bool b )
538{ 545{
539 pvDebug(2,"PackageManagerSettings::linkEnabled "+QString(b?"yes":"no")); 546 pvDebug(2,"PackageManagerSettings::linkEnabled "+QString(b?"yes":"no"));
540 activeLinkDestination->setEnabled( b ); 547 activeLinkDestination->setEnabled( b );
548 CheckBoxLink->setChecked( b );
541} 549}
542 550
543void PackageManagerSettings::activeServerChanged() 551void PackageManagerSettings::activeServerChanged()
544{ 552{
545 changed = true; 553 changed = true;
546} 554}
547 555
548QComboBox* PackageManagerSettings::getDestCombo()
549{
550 return new QComboBox(activeDestination);
551}
552
553void PackageManagerSettings::createLinksToDest() 556void PackageManagerSettings::createLinksToDest()
554{ 557{
555 pvDebug(2,"creating links..."); 558 pvDebug(2,"creating links...");
556 // emit doCreateLinks( destinationurl->text() ); 559 // emit doCreateLinks( destinationurl->text() );
557 //ipkg->createLinks( destinationurl ); 560 //ipkg->createLinks( destinationurl );
558} 561}
559 562
560void PackageManagerSettings::removeLinksToDest() 563void PackageManagerSettings::removeLinksToDest()
561{ 564{
562 pvDebug(2,"removing links..."); 565 pvDebug(2,"removing links...");
563 // emit doRemoveLinks( destinationurl->text() ); 566 // emit doRemoveLinks( destinationurl->text() );
564 //ipkg->removeLinks( destinationurl ); 567 //ipkg->removeLinks( destinationurl );
565} 568}
566 569
567//void PackageManagerSettings::setIpkg( PmIpkg* i ) 570void PackageManagerSettings::activeDestinationChange(int i)
568//{ 571{
569 //ipkg = i; 572 pvDebug(5,"activeDestinationChange "+QString::number(i));
570//} 573 if (i > activeDestination->count()) return;
574 activeDestination->setCurrentItem(i);
575 pvDebug(5,"dest name "+ activeDestination->currentText());
576}
diff --git a/noncore/unsupported/oipkg/pksettings.h b/noncore/unsupported/oipkg/pksettings.h
index 8f9fe62..d66c4e8 100644
--- a/noncore/unsupported/oipkg/pksettings.h
+++ b/noncore/unsupported/oipkg/pksettings.h
@@ -15,26 +15,24 @@ public:
15 ~PackageManagerSettings(); 15 ~PackageManagerSettings();
16 16
17 bool showDialog( int ) ; 17 bool showDialog( int ) ;
18 QString getDestinationUrl(); 18 QString getDestinationUrl();
19 QString getDestinationName(); 19 QString getDestinationName();
20 QString getLinkDestinationName(); 20 QString getLinkDestinationName();
21 bool createLinks(); 21 bool createLinks();
22 QStringList getServers(); 22 QStringList getServers();
23 QStringList getActiveServers(); 23 QStringList getActiveServers();
24 QStringList getDestinationUrls(); 24 QStringList getDestinationUrls();
25 QStringList getDestinationNames(); 25 QStringList getDestinationNames();
26 QString getDestinationUrlByName(QString); 26 QString getDestinationUrlByName(QString);
27 QComboBox* getDestCombo();
28// void setIpkg( PmIpkg* );
29 27
30public slots: 28public slots:
31 void writeInstallationSettings(); 29 void writeInstallationSettings();
32 void readInstallationSettings(); 30 void readInstallationSettings();
33 void writeCurrentInstallationSetting(); 31 void writeCurrentInstallationSetting();
34 void readInstallationSetting(int); 32 void readInstallationSetting(int);
35 void installationSettingSetName(const QString &); 33 void installationSettingSetName(const QString &);
36 void removeLinksToDest(); 34 void removeLinksToDest();
37 void createLinksToDest(); 35 void createLinksToDest();
38 void newServer(); 36 void newServer();
39 void editServer(int); 37 void editServer(int);
40 void removeDestination(); 38 void removeDestination();
@@ -42,24 +40,25 @@ public slots:
42 void editDestination(int); 40 void editDestination(int);
43 void linkEnabled(bool); 41 void linkEnabled(bool);
44 void removeServer(); 42 void removeServer();
45 void serverNameChanged(const QString&); 43 void serverNameChanged(const QString&);
46 void serverUrlChanged(const QString&); 44 void serverUrlChanged(const QString&);
47 void destNameChanged(const QString&); 45 void destNameChanged(const QString&);
48 void destUrlChanged(const QString&); 46 void destUrlChanged(const QString&);
49 void installationSettingChange(int); 47 void installationSettingChange(int);
50 void newInstallationSetting(); 48 void newInstallationSetting();
51 void removeInstallationSetting(); 49 void removeInstallationSetting();
52 void renameInstallationSetting(); 50 void renameInstallationSetting();
53 void activeServerChanged(); 51 void activeServerChanged();
52 void activeDestinationChange(int);
54signals: 53signals:
55// void doCreateLinks( QString dest ); 54// void doCreateLinks( QString dest );
56// void doRemoveLinks( QString dest ); 55// void doRemoveLinks( QString dest );
57 56
58private: 57private:
59 QIntDict<QString> serverurlDic; 58 QIntDict<QString> serverurlDic;
60 QIntDict<QString> destinationurlDic; 59 QIntDict<QString> destinationurlDic;
61 int ipkg_old; 60 int ipkg_old;
62 int editedserver; 61 int editedserver;
63 int editeddestination; 62 int editeddestination;
64 int currentSetting; 63 int currentSetting;
65 int installationSettingsCount; 64 int installationSettingsCount;
diff --git a/noncore/unsupported/oipkg/pksettingsbase.ui b/noncore/unsupported/oipkg/pksettingsbase.ui
index 5b83248..e95ed83 100644
--- a/noncore/unsupported/oipkg/pksettingsbase.ui
+++ b/noncore/unsupported/oipkg/pksettingsbase.ui
@@ -2,25 +2,25 @@
2<class>PackageManagerSettingsBase</class> 2<class>PackageManagerSettingsBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>Form4</cstring> 7 <cstring>Form4</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>337</width> 14 <width>333</width>
15 <height>454</height> 15 <height>454</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Package Servers</string> 20 <string>Package Servers</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
@@ -206,25 +206,25 @@
206 <property stdset="1"> 206 <property stdset="1">
207 <name>spacing</name> 207 <name>spacing</name>
208 <number>6</number> 208 <number>6</number>
209 </property> 209 </property>
210 <widget> 210 <widget>
211 <class>QLabel</class> 211 <class>QLabel</class>
212 <property stdset="1"> 212 <property stdset="1">
213 <name>name</name> 213 <name>name</name>
214 <cstring>TextLabel1_2</cstring> 214 <cstring>TextLabel1_2</cstring>
215 </property> 215 </property>
216 <property stdset="1"> 216 <property stdset="1">
217 <name>text</name> 217 <name>text</name>
218 <string>Used servers:</string> 218 <string>Used servers: (Highlighted feeds are active)</string>
219 </property> 219 </property>
220 </widget> 220 </widget>
221 <spacer> 221 <spacer>
222 <property> 222 <property>
223 <name>name</name> 223 <name>name</name>
224 <cstring>Spacer4</cstring> 224 <cstring>Spacer4</cstring>
225 </property> 225 </property>
226 <property stdset="1"> 226 <property stdset="1">
227 <name>orientation</name> 227 <name>orientation</name>
228 <enum>Horizontal</enum> 228 <enum>Horizontal</enum>
229 </property> 229 </property>
230 <property stdset="1"> 230 <property stdset="1">