summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/commandeditdialog.cpp
Unidiff
Diffstat (limited to 'core/apps/embeddedkonsole/commandeditdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/commandeditdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp
index 6587b26..697bf72 100644
--- a/core/apps/embeddedkonsole/commandeditdialog.cpp
+++ b/core/apps/embeddedkonsole/commandeditdialog.cpp
@@ -130,55 +130,55 @@ m_PlayListSelection->addStringToSelection("ping ");
130m_PlayListSelection->addStringToSelection("ps aux"); 130m_PlayListSelection->addStringToSelection("ps aux");
131m_PlayListSelection->addStringToSelection("pwd "); 131m_PlayListSelection->addStringToSelection("pwd ");
132m_PlayListSelection->addStringToSelection("rm "); 132m_PlayListSelection->addStringToSelection("rm ");
133m_PlayListSelection->addStringToSelection("rmdir "); 133m_PlayListSelection->addStringToSelection("rmdir ");
134m_PlayListSelection->addStringToSelection("route "); 134m_PlayListSelection->addStringToSelection("route ");
135m_PlayListSelection->addStringToSelection("set "); 135m_PlayListSelection->addStringToSelection("set ");
136m_PlayListSelection->addStringToSelection("traceroute"); 136m_PlayListSelection->addStringToSelection("traceroute");
137 137
138} 138}
139} 139}
140CommandEditDialog::~CommandEditDialog() 140CommandEditDialog::~CommandEditDialog()
141{ 141{
142} 142}
143 143
144void CommandEditDialog::accept() 144void CommandEditDialog::accept()
145{ 145{
146int i = 0; 146int i = 0;
147 Config *cfg = new Config("Konsole"); 147 Config *cfg = new Config("Konsole");
148 cfg->setGroup("Commands"); 148 cfg->setGroup("Commands");
149 cfg->clearGroup(); 149 cfg->clearGroup();
150 150
151 QListViewItemIterator it( m_PlayListSelection ); 151 QListViewItemIterator it( m_PlayListSelection );
152 152
153 for ( ; it.current(); ++it ) { 153 for ( ; it.current(); ++it ) {
154// qDebug(it.current()->text(0)); 154// odebug << it.current()->text(0) << oendl;
155 cfg->writeEntry(QString::number(i),it.current()->text(0)); 155 cfg->writeEntry(QString::number(i),it.current()->text(0));
156 i++; 156 i++;
157 157
158 } 158 }
159 cfg->writeEntry("Commands Set","TRUE"); 159 cfg->writeEntry("Commands Set","TRUE");
160// qDebug("CommandEditDialog::accept() - written"); 160// odebug << "CommandEditDialog::accept() - written" << oendl;
161 delete cfg; 161 delete cfg;
162 emit commandsEdited(); 162 emit commandsEdited();
163 close(); 163 close();
164 164
165 165
166 166
167 167
168 168
169} 169}
170 170
171void CommandEditDialog::showEditDialog() 171void CommandEditDialog::showEditDialog()
172{ 172{
173editCommandBase *d = new editCommandBase(this,"smalleditdialog", TRUE); 173editCommandBase *d = new editCommandBase(this,"smalleditdialog", TRUE);
174d->setCaption("Edit command"); 174d->setCaption("Edit command");
175d->TextLabel->setText("Edit command:"); 175d->TextLabel->setText("Edit command:");
176d->commandEdit->setText(m_PlayListSelection->currentItem()->text(0)); 176d->commandEdit->setText(m_PlayListSelection->currentItem()->text(0));
177int i = d->exec(); 177int i = d->exec();
178if ((i==1) && (!(d->commandEdit->text()).isEmpty())) 178if ((i==1) && (!(d->commandEdit->text()).isEmpty()))
179 m_PlayListSelection->currentItem()->setText(0,(d->commandEdit->text())); 179 m_PlayListSelection->currentItem()->setText(0,(d->commandEdit->text()));
180} 180}
181 181
182void CommandEditDialog::showAddDialog() 182void CommandEditDialog::showAddDialog()
183{ 183{
184 184