Diffstat (limited to 'noncore/unsupported/oipkg/pksettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pksettings.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp index 7e2ef10..24c7beb 100644 --- a/noncore/unsupported/oipkg/pksettings.cpp +++ b/noncore/unsupported/oipkg/pksettings.cpp | |||
@@ -55,12 +55,13 @@ PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* na | |||
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 | } | 62 | } |
62 | 63 | ||
63 | PackageManagerSettings::~PackageManagerSettings() | 64 | PackageManagerSettings::~PackageManagerSettings() |
64 | { | 65 | { |
65 | } | 66 | } |
66 | 67 | ||
@@ -116,13 +117,13 @@ void PackageManagerSettings::editServer(int i) | |||
116 | } | 117 | } |
117 | 118 | ||
118 | servername->setText( servers->text(i) ); | 119 | servername->setText( servers->text(i) ); |
119 | serverurl->setText( *serverurlDic[i] ); | 120 | serverurl->setText( *serverurlDic[i] ); |
120 | 121 | ||
121 | editedserver = i; | 122 | editedserver = i; |
122 | 123 | serverChanged = true; | |
123 | connect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); | 124 | connect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); |
124 | connect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); | 125 | connect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); |
125 | changed = true; | 126 | changed = true; |
126 | } | 127 | } |
127 | 128 | ||
128 | 129 | ||
@@ -131,14 +132,15 @@ void PackageManagerSettings::editDestination(int i) | |||
131 | if ( destinationname->isEnabled() ) { | 132 | if ( destinationname->isEnabled() ) { |
132 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); | 133 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); |
133 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); | 134 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); |
134 | } else { | 135 | } else { |
135 | destinationname->setEnabled(TRUE); | 136 | destinationname->setEnabled(TRUE); |
136 | destinationurl->setEnabled(TRUE); | 137 | destinationurl->setEnabled(TRUE); |
137 | createLinksButton->setEnabled(TRUE); | 138 | //since it does not work anyway |
138 | removeLinksButton->setEnabled(TRUE); | 139 | // createLinksButton->setEnabled(TRUE); |
140 | // removeLinksButton->setEnabled(TRUE); | ||
139 | } | 141 | } |
140 | 142 | ||
141 | destinationname->setText( destinations->text(i) ); | 143 | destinationname->setText( destinations->text(i) ); |
142 | destinationurl->setText( *destinationurlDic[i] ); | 144 | destinationurl->setText( *destinationurlDic[i] ); |
143 | 145 | ||
144 | editeddestination = i; | 146 | editeddestination = i; |
@@ -181,15 +183,15 @@ void PackageManagerSettings::removeDestination() | |||
181 | 183 | ||
182 | void PackageManagerSettings::serverNameChanged(const QString& t) | 184 | void PackageManagerSettings::serverNameChanged(const QString& t) |
183 | { | 185 | { |
184 | disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | 186 | disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); |
185 | servers->changeItem( t, editedserver ); | 187 | servers->changeItem( t, editedserver ); |
186 | activeServers->changeItem( t, editedserver ); | 188 | activeServers->changeItem( t, editedserver ); |
187 | changed = true; | ||
188 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | 189 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); |
189 | changed = true; | 190 | changed = true; |
191 | serverChanged = true; | ||
190 | } | 192 | } |
191 | 193 | ||
192 | void PackageManagerSettings::destNameChanged(const QString& t) | 194 | void PackageManagerSettings::destNameChanged(const QString& t) |
193 | { | 195 | { |
194 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | 196 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); |
195 | destinations->changeItem( t, editeddestination ); | 197 | destinations->changeItem( t, editeddestination ); |
@@ -200,12 +202,13 @@ void PackageManagerSettings::destNameChanged(const QString& t) | |||
200 | } | 202 | } |
201 | 203 | ||
202 | void PackageManagerSettings::serverUrlChanged(const QString& t) | 204 | void PackageManagerSettings::serverUrlChanged(const QString& t) |
203 | { | 205 | { |
204 | serverurlDic.replace(editedserver, new QString(t)); | 206 | serverurlDic.replace(editedserver, new QString(t)); |
205 | changed = true; | 207 | changed = true; |
208 | serverChanged = true; | ||
206 | } | 209 | } |
207 | 210 | ||
208 | void PackageManagerSettings::destUrlChanged(const QString& t) | 211 | void PackageManagerSettings::destUrlChanged(const QString& t) |
209 | { | 212 | { |
210 | destinationurlDic.replace(editeddestination, new QString(t)); | 213 | destinationurlDic.replace(editeddestination, new QString(t)); |
211 | changed = true; | 214 | changed = true; |