summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/edit.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/edit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/edit.cpp52
1 files changed, 4 insertions, 48 deletions
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp
index 45d6e4f..b880978 100644
--- a/noncore/settings/networksettings/ppp/edit.cpp
+++ b/noncore/settings/networksettings/ppp/edit.cpp
@@ -34,6 +34,7 @@
34#include <qvgroupbox.h> 34#include <qvgroupbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qdialog.h> 36#include <qdialog.h>
37#include <qpe/resource.h>
37 38
38#include "edit.h" 39#include "edit.h"
39#include "pppdata.h" 40#include "pppdata.h"
@@ -46,7 +47,7 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
46{ 47{
47 const int GRIDROWS = 6; 48 const int GRIDROWS = 6;
48 49
49 QGridLayout *tl = new QGridLayout(this, GRIDROWS, 2, 0 );//, KDialog::spacingHint()); 50 QGridLayout *tl = new QGridLayout(this, GRIDROWS, 2, 0 );
50 51
51 connect_label = new QLabel(tr("Connection name:"), this); 52 connect_label = new QLabel(tr("Connection name:"), this);
52 tl->addWidget(connect_label, 0, 0); 53 tl->addWidget(connect_label, 0, 0);
@@ -75,11 +76,9 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
75 del = new QPushButton(tr("&Remove"), this); 76 del = new QPushButton(tr("&Remove"), this);
76 77
77 up = new QPushButton(this); 78 up = new QPushButton(this);
78//FIXME: QPixmap pm = BarIcon("up"); 79 up->setPixmap( Resource::loadPixmap("inline/up") );
79// up->setPixmap(pm);
80 down = new QPushButton(this); 80 down = new QPushButton(this);
81//FIXME: pm = BarIcon("down"); 81 down->setPixmap( Resource::loadPixmap("inline/down") );
82// down->setPixmap(pm);
83 lpn1->addWidget(add); 82 lpn1->addWidget(add);
84 lpn1->addWidget(del); 83 lpn1->addWidget(del);
85 lpn1->addStretch(1); 84 lpn1->addStretch(1);
@@ -108,42 +107,6 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
108 QWhatsThis::add(number_label,tmp); 107 QWhatsThis::add(number_label,tmp);
109 QWhatsThis::add(numbers,tmp); 108 QWhatsThis::add(numbers,tmp);
110 109
111 auth_l = new QLabel(tr("Authentication:"), this);
112 tl->addWidget(auth_l, 3, 0);
113
114 auth = new QComboBox(this);
115 auth->insertItem(tr("Script-based"));
116 auth->insertItem(tr("PAP"));
117 auth->insertItem(tr("Terminal-based"));
118 auth->insertItem(tr("CHAP"));
119 auth->insertItem(tr("PAP/CHAP"));
120 tl->addWidget(auth, 3, 1);
121 tmp = tr("<p>Specifies the method used to identify yourself to\n"
122 "the PPP server. Most universities still use\n"
123 "<b>Terminal</b>- or <b>Script</b>-based authentication,\n"
124 "while most ISP use <b>PAP</b> and/or <b>CHAP</b>. If\n"
125 "unsure, contact your ISP.\n"
126 "\n"
127 "If you can choose between PAP and CHAP,\n"
128 "choose CHAP, because it's much safer. If you don't know\n"
129 "whether PAP or CHAP is right, choose PAP/CHAP.");
130
131 QWhatsThis::add(auth_l,tmp);
132 QWhatsThis::add(auth,tmp);
133
134 store_password = new QCheckBox(tr("Store password"), this);
135 store_password->setChecked(true);
136 tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight);
137 QWhatsThis::add(store_password,
138 tr("<p>When this is turned on, your ISP password\n"
139 "will be saved in <i>kppp</i>'s config file, so\n"
140 "you do not need to type it in every time.\n"
141 "\n"
142 "<b><font color=\"red\">Warning:</font> your password will be stored as\n"
143 "plain text in the config file, which is\n"
144 "readable only to you. Make sure nobody\n"
145 "gains access to this file!"));
146
147 pppdargs = new QPushButton(tr("Customize pppd Arguments..."), this); 110 pppdargs = new QPushButton(tr("Customize pppd Arguments..."), this);
148 connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton())); 111 connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton()));
149 tl->addMultiCellWidget(pppdargs, 5, 5, 0, 1, AlignCenter); 112 tl->addMultiCellWidget(pppdargs, 5, 5, 0, 1, AlignCenter);
@@ -168,11 +131,6 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
168 if(tmp.length() > 0) 131 if(tmp.length() > 0)
169 numbers->insertItem(tmp); 132 numbers->insertItem(tmp);
170 133
171 auth->setCurrentItem(_pppdata->authMethod());
172 store_password->setChecked(_pppdata->storePassword());
173 } else {
174 // select PAP/CHAP as default
175 auth->setCurrentItem(AUTH_PAPCHAP);
176 } 134 }
177 135
178 numbersChanged(); 136 numbersChanged();
@@ -195,8 +153,6 @@ bool DialWidget::save() {
195 } 153 }
196 154
197 _pppdata->setPhonenumber(number); 155 _pppdata->setPhonenumber(number);
198 _pppdata->setAuthMethod(auth->currentItem());
199 _pppdata->setStorePassword(store_password->isChecked());
200 return true; 156 return true;
201 } 157 }
202} 158}