-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 24 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.h | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pksettings.cpp | 26 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pksettings.h | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pksettingsbase.ui | 4 |
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 @@ -124,9 +124,9 @@ void MainWindow::makeMenu() cfgact = new QAction( tr( "Setups" ), QString::null, 0, this, 0 ); connect( cfgact, SIGNAL( activated() ), - SLOT( showSettings() ) ); + SLOT( showSettingsSetup() ) ); cfgact->addTo( cfgMenu ); cfgact = new QAction( tr( "Servers" ), QString::null, 0, this, 0 ); @@ -223,9 +223,9 @@ void MainWindow::makeMenu() destination->insertStringList( settings->getDestinationNames() ); setComboName(destination,settings->getDestinationName()); connect( destination, SIGNAL(activated(int)), settings, SLOT(activeDestinationChange(int)) ); - spacer = new QLabel( " ", destBar ); +// spacer = new QLabel( " ", destBar ); // spacer->setBackgroundMode( PaletteForeground ); CheckBoxLink = new QCheckBox( tr("Link"), destBar); // CheckBoxLink->setBackgroundMode( PaletteForeground ); CheckBoxLink->setChecked( settings->createLinks() ); @@ -237,9 +237,9 @@ void MainWindow::makeMenu() connect( a, SIGNAL( activated() ), SLOT( destClose() ) ); a->addTo( destBar ); destBar->setStretchableWidget( CheckBoxLink ); destAction->setToggleAction( true ); - // destAction->addTo( viewMenu ); + destAction->addTo( viewMenu ); // helpMenu helpMenu->insertSeparator(); a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 ); @@ -384,22 +384,28 @@ void MainWindow::setSubSections() subsection->insertStringList( packageListServers.getSubSections() ); } -void MainWindow::showSettings() +void MainWindow::showSettings(int i) { - if ( settings->showDialog( 0 ) ) + if ( settings->showDialog( i ) ) + { updateList(); + } + setComboName(destination,settings->getDestinationName()); + CheckBoxLink->setChecked( settings->createLinks() ); +} +void MainWindow::showSettingsSetup() +{ + showSettings(0); } void MainWindow::showSettingsSrv() { - if ( settings->showDialog( 1 ) ) - updateList(); + showSettings(1); } void MainWindow::showSettingsDst() { - if ( settings->showDialog( 2 ) ) - updateList(); + showSettings(2); } void MainWindow::sectionShow(bool b) { 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 @@ -51,9 +51,10 @@ protected slots: void updateList(); void displayList(); void subSectionChanged(); void sectionChanged(); - void showSettings(); + void showSettings(int); + void showSettingsSetup(); void showSettingsSrv(); void showSettingsDst(); public slots: 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 @@ -58,8 +58,15 @@ PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* na destinationurlDic.setAutoDelete(TRUE); readSettings(); activeLinkDestination->hide(); serverChanged = false; + + // get rid of setups +// Settings->hide(); + settingName->hide(); + newsetting->hide(); + renamesetting->hide(); + removesetting->hide(); } PackageManagerSettings::~PackageManagerSettings() { @@ -531,26 +538,22 @@ QStringList PackageManagerSettings::getDestinationNames() sl += destinations->text(i); } return sl; } - + void PackageManagerSettings::linkEnabled( bool b ) { pvDebug(2,"PackageManagerSettings::linkEnabled "+QString(b?"yes":"no")); activeLinkDestination->setEnabled( b ); + CheckBoxLink->setChecked( b ); } void PackageManagerSettings::activeServerChanged() { changed = true; } -QComboBox* PackageManagerSettings::getDestCombo() -{ - return new QComboBox(activeDestination); -} - void PackageManagerSettings::createLinksToDest() { pvDebug(2,"creating links..."); // emit doCreateLinks( destinationurl->text() ); @@ -563,8 +566,11 @@ void PackageManagerSettings::removeLinksToDest() // emit doRemoveLinks( destinationurl->text() ); // ipkg->removeLinks( destinationurl ); } -//void PackageManagerSettings::setIpkg( PmIpkg* i ) -//{ -// ipkg = i; -//} +void PackageManagerSettings::activeDestinationChange(int i) +{ + pvDebug(5,"activeDestinationChange "+QString::number(i)); + if (i > activeDestination->count()) return; + activeDestination->setCurrentItem(i); + pvDebug(5,"dest name "+ activeDestination->currentText()); +} 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 @@ -23,10 +23,8 @@ public: QStringList getActiveServers(); QStringList getDestinationUrls(); QStringList getDestinationNames(); QString getDestinationUrlByName(QString); - QComboBox* getDestCombo(); -// void setIpkg( PmIpkg* ); public slots: void writeInstallationSettings(); void readInstallationSettings(); @@ -50,8 +48,9 @@ public slots: void newInstallationSetting(); void removeInstallationSetting(); void renameInstallationSetting(); void activeServerChanged(); + void activeDestinationChange(int); signals: // void doCreateLinks( QString dest ); // void doRemoveLinks( QString dest ); 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 @@ -10,9 +10,9 @@ <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>337</width> + <width>333</width> <height>454</height> </rect> </property> <property stdset="1"> @@ -214,9 +214,9 @@ <cstring>TextLabel1_2</cstring> </property> <property stdset="1"> <name>text</name> - <string>Used servers:</string> + <string>Used servers: (Highlighted feeds are active)</string> </property> </widget> <spacer> <property> |