Diffstat (limited to 'noncore/apps/opie-console/consoleconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/consoleconfigwidget.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/consoleconfigwidget.cpp b/noncore/apps/opie-console/consoleconfigwidget.cpp index 70e2e78..3f2d154 100644 --- a/noncore/apps/opie-console/consoleconfigwidget.cpp +++ b/noncore/apps/opie-console/consoleconfigwidget.cpp | |||
@@ -21,23 +21,23 @@ ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent, | |||
21 | label = new QLabel(tr("Environment Variables"), this); | 21 | label = new QLabel(tr("Environment Variables"), this); |
22 | m_lay->addWidget(label); | 22 | m_lay->addWidget(label); |
23 | m_env = new QListView(this); | 23 | m_env = new QListView(this); |
24 | m_env->addColumn(tr("Name")); | 24 | m_env->addColumn(tr("Name")); |
25 | m_env->addColumn(tr("Value")); | 25 | m_env->addColumn(tr("Value")); |
26 | m_lay->addWidget(m_env); | 26 | m_lay->addWidget(m_env); |
27 | 27 | ||
28 | QHBox *hbox = new QHBox(this); | 28 | QHBox *hbox = new QHBox(this); |
29 | label = new QLabel(tr("Name :"), hbox); | 29 | label = new QLabel(tr("Name :"), hbox); |
30 | m_name = new QLineEdit(hbox); | 30 | m_name = new QLineEdit(hbox); |
31 | m_lay->addWidget(hbox); | 31 | m_lay->addWidget(hbox); |
32 | 32 | ||
33 | hbox = new QHBox(this); | 33 | hbox = new QHBox(this); |
34 | label = new QLabel(tr("Value :"), hbox); | 34 | label = new QLabel(tr("Value :"), hbox); |
35 | m_value = new QLineEdit(hbox); | 35 | m_value = new QLineEdit(hbox); |
36 | m_lay->addWidget(hbox); | 36 | m_lay->addWidget(hbox); |
37 | 37 | ||
38 | hbox = new QHBox(this); | 38 | hbox = new QHBox(this); |
39 | hbox->setSpacing(10); | 39 | hbox->setSpacing(10); |
40 | m_remove = new QPushButton(tr("Remove"), hbox); | 40 | m_remove = new QPushButton(tr("Remove"), hbox); |
41 | connect(m_remove, SIGNAL(clicked()), this, SLOT(slotRemove())); | 41 | connect(m_remove, SIGNAL(clicked()), this, SLOT(slotRemove())); |
42 | m_add = new QPushButton(tr("Add"), hbox); | 42 | m_add = new QPushButton(tr("Add"), hbox); |
43 | connect(m_add, SIGNAL(clicked()), this, SLOT(slotAdd())); | 43 | connect(m_add, SIGNAL(clicked()), this, SLOT(slotAdd())); |
@@ -61,14 +61,19 @@ void ConsoleConfigWidget::slotRemove() { | |||
61 | } | 61 | } |
62 | 62 | ||
63 | ConsoleConfigWidget::~ConsoleConfigWidget() { | 63 | ConsoleConfigWidget::~ConsoleConfigWidget() { |
64 | } | 64 | } |
65 | 65 | ||
66 | void ConsoleConfigWidget::load( const Profile& prof ) { | 66 | void ConsoleConfigWidget::load( const Profile& prof ) { |
67 | /* | ||
68 | * we will use /bin/bash as default | ||
69 | * but will fallback in MyPty to /bin/sh | ||
70 | * if necessary | ||
71 | */ | ||
67 | m_cmd->setText(prof.readEntry("Command", "/bin/bash")); | 72 | m_cmd->setText(prof.readEntry("Command", "/bin/bash")); |
68 | int envcount = prof.readNumEntry("EnvVars", 0); | 73 | int envcount = prof.readNumEntry("EnvVars", 0); |
69 | for (int i=0; i<envcount; i++) { | 74 | for (int i=0; i<envcount; i++) { |
70 | QString name = prof.readEntry("Env_Name_" + QString::number(i), ""); | 75 | QString name = prof.readEntry("Env_Name_" + QString::number(i), ""); |
71 | QString value = prof.readEntry("Env_Value_" + QString::number(i), ""); | 76 | QString value = prof.readEntry("Env_Value_" + QString::number(i), ""); |
72 | if (!(name.isEmpty() || value.isEmpty())) { | 77 | if (!(name.isEmpty() || value.isEmpty())) { |
73 | QListViewItem *item = new QListViewItem(m_env); | 78 | QListViewItem *item = new QListViewItem(m_env); |
74 | item->setText(0, name); | 79 | item->setText(0, name); |