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.cpp59
1 files changed, 15 insertions, 44 deletions
diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp
index f704c84..7760d5e 100644
--- a/noncore/settings/networksettings/ppp/accounts.cpp
+++ b/noncore/settings/networksettings/ppp/accounts.cpp
@@ -39,4 +39,5 @@
39 39
40#include "pppdata.h"
41#include "accounts.h" 40#include "accounts.h"
41#include "authwidget.h"
42#include "pppdata.h"
42#include "edit.h" 43#include "edit.h"
@@ -46,4 +47,5 @@ void parseargs(char* buf, char** args);
46AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name ) 47AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name )
47 : QWidget( parent, name ), _pppdata(pd) 48 : QWidget( parent, name )//, _pppdata(pd)
48{ 49{
50 _pppdata = pd;
49 QVBoxLayout *l1 = new QVBoxLayout(this, 10, 10); 51 QVBoxLayout *l1 = new QVBoxLayout(this, 10, 10);
@@ -88,2 +90,5 @@ AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name )
88 90
91 int currAccId = _pppdata->currentAccountID();
92 qDebug("currentAccountID %i", currAccId);
93
89 //load up account list from gppdata to the list box 94 //load up account list from gppdata to the list box
@@ -95,3 +100,3 @@ AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name )
95 } 100 }
96 101 _pppdata->setAccountbyIndex( currAccId );
97 102
@@ -99,3 +104,3 @@ AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name )
99 accountlist_l->setCurrentItem( _pppdata->currentAccountID() ); 104 accountlist_l->setCurrentItem( _pppdata->currentAccountID() );
100 slotListBoxSelect( _pppdata->currentAccountID()); 105 slotListBoxSelect( _pppdata->currentAccountID() );
101 106
@@ -114,3 +119,2 @@ void AccountWidget::slotListBoxSelect(int idx) {
114 _pppdata->setAccountbyIndex(accountlist_l->currentItem()); 119 _pppdata->setAccountbyIndex(accountlist_l->currentItem());
115 // _pppdata->setAccount(account);
116 } 120 }
@@ -118,34 +122,2 @@ void AccountWidget::slotListBoxSelect(int idx) {
118 122
119
120// void AccountWidget::viewLogClicked(){
121
122// QApplication::flushX();
123// if(fork() == 0) {
124// setgid(getgid());
125// setuid(getuid());
126// system("kppplogview -kppp");
127// _exit(0);
128// }
129// }
130
131
132// void AccountWidget::resetClicked(){
133// if(accountlist_l->currentItem() == -1)
134// return;
135
136// // QueryReset dlg(this);
137// // int what = dlg.exec();
138
139// // if(what && QueryReset::COSTS) {
140// // emit resetCosts(accountlist_l->text(accountlist_l->currentItem()));
141// // costedit->setText("0");
142// // }
143
144// // if(what && QueryReset::VOLUME) {
145// // emit resetVolume(accountlist_l->text(accountlist_l->currentItem()));
146// // voledit->setText(prettyPrintVolume(0));
147// // }
148// }
149
150
151void AccountWidget::editaccount() { 123void AccountWidget::editaccount() {
@@ -251,2 +223,6 @@ int AccountWidget::doTab(){
251 223
224// // AUTH WIDGET
225 auth_w = new AuthWidget( _pppdata, tabWindow, isnewaccount, tr("Edit Login Script"));
226 tabWindow->addTab( auth_w, tr("Authentication") );
227
252// // IP WIDGET 228// // IP WIDGET
@@ -263,6 +239,2 @@ int AccountWidget::doTab(){
263 239
264// // SCRIPT WIDGET
265 script_w = new ScriptWidget( _pppdata, tabWindow, isnewaccount, tr("Edit Login Script"));
266 tabWindow->addTab( script_w, tr("Login Script") );
267
268// // EXECUTE WIDGET 240// // EXECUTE WIDGET
@@ -280,4 +252,3 @@ int AccountWidget::doTab(){
280 if(result == QDialog::Accepted) { 252 if(result == QDialog::Accepted) {
281 if (!script_w->check()){ 253 if (!auth_w->check()){
282 QMessageBox::critical(this, "error", tr("<qt>Login script has unbalanced loop Start/End<qt>"));
283 ok = false; 254 ok = false;
@@ -290,3 +261,3 @@ int AccountWidget::doTab(){
290 gateway_w->save(); 261 gateway_w->save();
291 script_w->save(); 262 auth_w->save();
292 exec_w->save(); 263 exec_w->save();