Diffstat (limited to 'noncore/settings/networksettings/ppp/accounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/accounts.cpp | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp index 19db9ef..11d4739 100644 --- a/noncore/settings/networksettings/ppp/accounts.cpp +++ b/noncore/settings/networksettings/ppp/accounts.cpp | |||
@@ -55,11 +55,5 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name ) | |||
55 | { | 55 | { |
56 | // int min = 0; | ||
57 | QVBoxLayout *l1 = new QVBoxLayout(this, 10, 10); | 56 | QVBoxLayout *l1 = new QVBoxLayout(this, 10, 10); |
58 | |||
59 | // add a hbox | ||
60 | // QHBoxLayout *l11 = new QHBoxLayout; | ||
61 | // l1->addLayout(l11); | ||
62 | |||
63 | accountlist_l = new QListBox(this); | 57 | accountlist_l = new QListBox(this); |
64 | // accountlist_l->setMinimumSize(160, 128); | 58 | |
65 | connect(accountlist_l, SIGNAL(highlighted(int)), | 59 | connect(accountlist_l, SIGNAL(highlighted(int)), |
@@ -70,4 +64,2 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name ) | |||
70 | 64 | ||
71 | // QVBoxLayout *l111 = new QVBoxLayout(this); | ||
72 | // l11->addLayout(l111, 1); | ||
73 | edit_b = new QPushButton(i18n("&Edit..."), this); | 65 | edit_b = new QPushButton(i18n("&Edit..."), this); |
@@ -75,7 +67,2 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name ) | |||
75 | QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); | 67 | QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); |
76 | |||
77 | // min = edit_b->sizeHint().width(); | ||
78 | // min = QMAX(70,min); | ||
79 | // edit_b->setMinimumWidth(min); | ||
80 | |||
81 | l1->addWidget(edit_b); | 68 | l1->addWidget(edit_b); |
@@ -174,3 +161,6 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name ) | |||
174 | 161 | ||
175 | slotListBoxSelect(accountlist_l->currentItem()); | 162 | // slotListBoxSelect(accountlist_l->currentItem()); |
163 | qDebug("setting listview index to %i",PPPData::data()->currentAccountID() ); | ||
164 | accountlist_l->setCurrentItem( PPPData::data()->currentAccountID() ); | ||
165 | // slotListBoxSelect( PPPData::data()->currentAccountID()); | ||
176 | 166 | ||
@@ -186,23 +176,7 @@ void AccountWidget::slotListBoxSelect(int idx) { | |||
186 | if(idx!=-1) { | 176 | if(idx!=-1) { |
177 | qDebug("setting account to %i", idx); | ||
187 | QString account = PPPData::data()->accname(); | 178 | QString account = PPPData::data()->accname(); |
188 | PPPData::data()->setAccountbyIndex(accountlist_l->currentItem()); | 179 | PPPData::data()->setAccountbyIndex(accountlist_l->currentItem()); |
189 | // reset->setEnabled(TRUE); | 180 | // PPPData::data()->setAccount(account); |
190 | // costlabel->setEnabled(TRUE); | 181 | } |
191 | // costedit->setEnabled(TRUE); | ||
192 | // costedit->setText(AccountingBase::getCosts(accountlist_l->text(accountlist_l->currentItem()))); | ||
193 | |||
194 | // vollabel->setEnabled(TRUE); | ||
195 | // voledit->setEnabled(TRUE); | ||
196 | // int bytes = PPPData::data()->totalBytes(); | ||
197 | // voledit->setText(prettyPrintVolume(bytes)); | ||
198 | PPPData::data()->setAccount(account); | ||
199 | } else{ | ||
200 | // reset->setEnabled(FALSE); | ||
201 | // costlabel->setEnabled(FALSE); | ||
202 | // costedit->setText(""); | ||
203 | // costedit->setEnabled(FALSE); | ||
204 | // vollabel->setEnabled(FALSE); | ||
205 | // voledit->setText(""); | ||
206 | // voledit->setEnabled(FALSE); | ||
207 | } | ||
208 | } | 182 | } |