summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/accounts.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/accounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/accounts.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp
index 11d4739..3fa2f84 100644
--- a/noncore/settings/networksettings/ppp/accounts.cpp
+++ b/noncore/settings/networksettings/ppp/accounts.cpp
@@ -52,4 +52,4 @@ void parseargs(char* buf, char** args);
52 52
53AccountWidget::AccountWidget( QWidget *parent, const char *name ) 53AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name )
54 : QWidget( parent, name ) 54 : QWidget( parent, name ), _pppdata(pd)
55{ 55{
@@ -154,6 +154,6 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name )
154 //load up account list from gppdata to the list box 154 //load up account list from gppdata to the list box
155 if(PPPData::data()->count() > 0) { 155 if(_pppdata->count() > 0) {
156 for(int i=0; i <= PPPData::data()->count()-1; i++) { 156 for(int i=0; i <= _pppdata->count()-1; i++) {
157 PPPData::data()->setAccountbyIndex(i); 157 _pppdata->setAccountbyIndex(i);
158 accountlist_l->insertItem(PPPData::data()->accname()); 158 accountlist_l->insertItem(_pppdata->accname());
159 } 159 }
@@ -162,5 +162,5 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name )
162// slotListBoxSelect(accountlist_l->currentItem()); 162// slotListBoxSelect(accountlist_l->currentItem());
163 qDebug("setting listview index to %i",PPPData::data()->currentAccountID() ); 163 qDebug("setting listview index to %i",_pppdata->currentAccountID() );
164 accountlist_l->setCurrentItem( PPPData::data()->currentAccountID() ); 164 accountlist_l->setCurrentItem( _pppdata->currentAccountID() );
165// slotListBoxSelect( PPPData::data()->currentAccountID()); 165// slotListBoxSelect( _pppdata->currentAccountID());
166 166
@@ -177,5 +177,5 @@ void AccountWidget::slotListBoxSelect(int idx) {
177 qDebug("setting account to %i", idx); 177 qDebug("setting account to %i", idx);
178 QString account = PPPData::data()->accname(); 178 QString account = _pppdata->accname();
179 PPPData::data()->setAccountbyIndex(accountlist_l->currentItem()); 179 _pppdata->setAccountbyIndex(accountlist_l->currentItem());
180 // PPPData::data()->setAccount(account); 180 // _pppdata->setAccount(account);
181 } 181 }
@@ -216,3 +216,3 @@ void AccountWidget::slotListBoxSelect(int idx) {
216void AccountWidget::editaccount() { 216void AccountWidget::editaccount() {
217 PPPData::data()->setAccount(accountlist_l->text(accountlist_l->currentItem())); 217 _pppdata->setAccount(accountlist_l->text(accountlist_l->currentItem()));
218 218
@@ -221,5 +221,5 @@ void AccountWidget::editaccount() {
221 if(result == QDialog::Accepted) { 221 if(result == QDialog::Accepted) {
222 accountlist_l->changeItem(PPPData::data()->accname(),accountlist_l->currentItem()); 222 accountlist_l->changeItem(_pppdata->accname(),accountlist_l->currentItem());
223// emit resetaccounts(); 223// emit resetaccounts();
224 PPPData::data()->save(); 224 _pppdata->save();
225 } 225 }
@@ -247,3 +247,3 @@ void AccountWidget::newaccount() {
247// { 247// {
248// if (PPPData::data()->newaccount() == -1) 248// if (_pppdata->newaccount() == -1)
249 // return; 249 // return;
@@ -254,4 +254,4 @@ void AccountWidget::newaccount() {
254// case QMessageBox::No: 254// case QMessageBox::No:
255 if (PPPData::data()->newaccount() == -1){ 255 if (_pppdata->newaccount() == -1){
256 qDebug("PPPData::data()->newaccount() == -1"); 256 qDebug("_pppdata->newaccount() == -1");
257 return; 257 return;
@@ -265,9 +265,9 @@ void AccountWidget::newaccount() {
265 if(result == QDialog::Accepted) { 265 if(result == QDialog::Accepted) {
266 accountlist_l->insertItem(PPPData::data()->accname()); 266 accountlist_l->insertItem(_pppdata->accname());
267 accountlist_l->setSelected(accountlist_l->findItem(PPPData::data()->accname()), 267 accountlist_l->setSelected(accountlist_l->findItem(_pppdata->accname()),
268 true); 268 true);
269// emit resetaccounts(); 269// emit resetaccounts();
270 PPPData::data()->save(); 270 _pppdata->save();
271 } else 271 } else
272 PPPData::data()->deleteAccount(); 272 _pppdata->deleteAccount();
273} 273}
@@ -286,7 +286,7 @@ void AccountWidget::copyaccount() {
286 286
287 PPPData::data()->copyaccount(accountlist_l->currentItem()); 287 _pppdata->copyaccount(accountlist_l->currentItem());
288 288
289 accountlist_l->insertItem(PPPData::data()->accname()); 289 accountlist_l->insertItem(_pppdata->accname());
290// emit resetaccounts(); 290// emit resetaccounts();
291 PPPData::data()->save(); 291 _pppdata->save();
292} 292}
@@ -302,3 +302,3 @@ void AccountWidget::deleteaccount() {
302 302
303 if(PPPData::data()->deleteAccount(accountlist_l->text(accountlist_l->currentItem()))) 303 if(_pppdata->deleteAccount(accountlist_l->text(accountlist_l->currentItem())))
304 accountlist_l->removeItem(accountlist_l->currentItem()); 304 accountlist_l->removeItem(accountlist_l->currentItem());
@@ -306,3 +306,3 @@ void AccountWidget::deleteaccount() {
306 emit resetaccounts(); 306 emit resetaccounts();
307 PPPData::data()->save(); 307 _pppdata->save();
308 308
@@ -324,3 +324,3 @@ int AccountWidget::doTab(){
324 324
325 if(PPPData::data()->accname().isEmpty()) { 325 if(_pppdata->accname().isEmpty()) {
326 dlg->setCaption(i18n("New Account")); 326 dlg->setCaption(i18n("New Account"));
@@ -329,3 +329,3 @@ int AccountWidget::doTab(){
329 QString tit = i18n("Edit Account: "); 329 QString tit = i18n("Edit Account: ");
330 tit += PPPData::data()->accname(); 330 tit += _pppdata->accname();
331 dlg->setCaption(tit); 331 dlg->setCaption(tit);
@@ -334,13 +334,13 @@ int AccountWidget::doTab(){
334 334
335 dial_w = new DialWidget( tabWindow, isnewaccount, "Dial Setup"); 335 dial_w = new DialWidget( _pppdata, tabWindow, isnewaccount, "Dial Setup");
336 tabWindow->addTab( dial_w, i18n("Dial") ); 336 tabWindow->addTab( dial_w, i18n("Dial") );
337 ip_w = new IPWidget( tabWindow, isnewaccount, i18n("IP Setup")); 337 ip_w = new IPWidget( _pppdata, tabWindow, isnewaccount, i18n("IP Setup"));
338 tabWindow->addTab( ip_w, i18n("IP") ); 338 tabWindow->addTab( ip_w, i18n("IP") );
339 gateway_w = new GatewayWidget( tabWindow, isnewaccount, i18n("Gateway Setup")); 339 gateway_w = new GatewayWidget( _pppdata, tabWindow, isnewaccount, i18n("Gateway Setup"));
340 tabWindow->addTab( gateway_w, i18n("Gateway") ); 340 tabWindow->addTab( gateway_w, i18n("Gateway") );
341 dns_w = new DNSWidget( tabWindow, isnewaccount, i18n("DNS Servers") ); 341 dns_w = new DNSWidget( _pppdata, tabWindow, isnewaccount, i18n("DNS Servers") );
342 tabWindow->addTab( dns_w, i18n("DNS") ); 342 tabWindow->addTab( dns_w, i18n("DNS") );
343 script_w = new ScriptWidget( tabWindow, isnewaccount, i18n("Edit Login Script")); 343 script_w = new ScriptWidget( _pppdata, tabWindow, isnewaccount, i18n("Edit Login Script"));
344 tabWindow->addTab( script_w, i18n("Login Script") ); 344 tabWindow->addTab( script_w, i18n("Login Script") );
345 ExecWidget *exec_w = new ExecWidget( tabWindow, isnewaccount, i18n("Execute Programs")); 345 ExecWidget *exec_w = new ExecWidget( _pppdata, tabWindow, isnewaccount, i18n("Execute Programs"));
346 tabWindow->addTab( exec_w, i18n("Execute") ); 346 tabWindow->addTab( exec_w, i18n("Execute") );