Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdargs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppdargs.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdargs.cpp b/noncore/settings/networksettings/ppp/pppdargs.cpp index 04d0dd0..b7fca3f 100644 --- a/noncore/settings/networksettings/ppp/pppdargs.cpp +++ b/noncore/settings/networksettings/ppp/pppdargs.cpp | |||
@@ -100,67 +100,67 @@ PPPdArguments::PPPdArguments(QWidget *parent, const char *name) | |||
100 | 100 | ||
101 | add->setEnabled(false); | 101 | add->setEnabled(false); |
102 | remove->setEnabled(false); | 102 | remove->setEnabled(false); |
103 | argument->setFocus(); | 103 | argument->setFocus(); |
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||
107 | void PPPdArguments::addbutton() { | 107 | void PPPdArguments::addbutton() { |
108 | if(!argument->text().isEmpty() && arguments->count() < MAX_PPPD_ARGUMENTS) { | 108 | if(!argument->text().isEmpty() && arguments->count() < MAX_PPPD_ARGUMENTS) { |
109 | arguments->insertItem(argument->text()); | 109 | arguments->insertItem(argument->text()); |
110 | argument->setText(""); | 110 | argument->setText(""); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | ||
115 | void PPPdArguments::removebutton() { | 115 | void PPPdArguments::removebutton() { |
116 | if(arguments->currentItem() >= 0) | 116 | if(arguments->currentItem() >= 0) |
117 | arguments->removeItem(arguments->currentItem()); | 117 | arguments->removeItem(arguments->currentItem()); |
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
121 | void PPPdArguments::defaultsbutton() { | 121 | void PPPdArguments::defaultsbutton() { |
122 | // all of this is a hack | 122 | // all of this is a hack |
123 | // save current list | 123 | // save current list |
124 | QStringList arglist(gpppdata.pppdArgument()); | 124 | QStringList arglist(PPPData::data()->pppdArgument()); |
125 | 125 | ||
126 | // get defaults | 126 | // get defaults |
127 | gpppdata.setpppdArgumentDefaults(); | 127 | PPPData::data()->setpppdArgumentDefaults(); |
128 | init(); | 128 | init(); |
129 | 129 | ||
130 | // restore old list | 130 | // restore old list |
131 | gpppdata.setpppdArgument(arglist); | 131 | PPPData::data()->setpppdArgument(arglist); |
132 | } | 132 | } |
133 | 133 | ||
134 | 134 | ||
135 | void PPPdArguments::closebutton() { | 135 | void PPPdArguments::closebutton() { |
136 | QStringList arglist; | 136 | QStringList arglist; |
137 | for(uint i=0; i < arguments->count(); i++) | 137 | for(uint i=0; i < arguments->count(); i++) |
138 | arglist.append(arguments->text(i)); | 138 | arglist.append(arguments->text(i)); |
139 | gpppdata.setpppdArgument(arglist); | 139 | PPPData::data()->setpppdArgument(arglist); |
140 | 140 | ||
141 | done(0); | 141 | done(0); |
142 | } | 142 | } |
143 | 143 | ||
144 | 144 | ||
145 | void PPPdArguments::init() { | 145 | void PPPdArguments::init() { |
146 | while(arguments->count()) | 146 | while(arguments->count()) |
147 | arguments->removeItem(0); | 147 | arguments->removeItem(0); |
148 | 148 | ||
149 | QStringList &arglist = gpppdata.pppdArgument(); | 149 | QStringList &arglist = PPPData::data()->pppdArgument(); |
150 | for ( QStringList::Iterator it = arglist.begin(); | 150 | for ( QStringList::Iterator it = arglist.begin(); |
151 | it != arglist.end(); | 151 | it != arglist.end(); |
152 | ++it ) | 152 | ++it ) |
153 | arguments->insertItem(*it); | 153 | arguments->insertItem(*it); |
154 | } | 154 | } |
155 | 155 | ||
156 | 156 | ||
157 | void PPPdArguments::textChanged(const QString &s) { | 157 | void PPPdArguments::textChanged(const QString &s) { |
158 | add->setEnabled(s.length() > 0); | 158 | add->setEnabled(s.length() > 0); |
159 | } | 159 | } |
160 | 160 | ||
161 | 161 | ||
162 | void PPPdArguments::itemSelected(int idx) { | 162 | void PPPdArguments::itemSelected(int idx) { |
163 | remove->setEnabled(idx != -1); | 163 | remove->setEnabled(idx != -1); |
164 | } | 164 | } |
165 | 165 | ||
166 | 166 | ||