author | zecke <zecke> | 2002-10-31 16:14:20 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-31 16:14:20 (UTC) |
commit | d2a79869efe8b18849e45b8e1beedb5108eba6ac (patch) (side-by-side diff) | |
tree | 98b5d50f696d2d411cd287f4fe1bc7e1c0f7b7a2 /noncore/apps/opie-console/consoleconfigwidget.cpp | |
parent | c3a6f53669140cf9e3c953772c610cd91d69ab78 (diff) | |
download | opie-d2a79869efe8b18849e45b8e1beedb5108eba6ac.zip opie-d2a79869efe8b18849e45b8e1beedb5108eba6ac.tar.gz opie-d2a79869efe8b18849e45b8e1beedb5108eba6ac.tar.bz2 |
Auto connect on Locale Console again!
MyPty test if cmd is available(exists) and then
either use /bin/bash or /bin/sh
ConsoleConfigWidget added a comment about the expected behaviour
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 @@ -23,9 +23,9 @@ ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent, m_env = new QListView(this); m_env->addColumn(tr("Name")); m_env->addColumn(tr("Value")); m_lay->addWidget(m_env); - + QHBox *hbox = new QHBox(this); label = new QLabel(tr("Name :"), hbox); m_name = new QLineEdit(hbox); m_lay->addWidget(hbox); @@ -33,9 +33,9 @@ ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent, hbox = new QHBox(this); label = new QLabel(tr("Value :"), hbox); m_value = new QLineEdit(hbox); m_lay->addWidget(hbox); - + hbox = new QHBox(this); hbox->setSpacing(10); m_remove = new QPushButton(tr("Remove"), hbox); connect(m_remove, SIGNAL(clicked()), this, SLOT(slotRemove())); @@ -63,10 +63,15 @@ void ConsoleConfigWidget::slotRemove() { ConsoleConfigWidget::~ConsoleConfigWidget() { } void ConsoleConfigWidget::load( const Profile& prof ) { + /* + * we will use /bin/bash as default + * but will fallback in MyPty to /bin/sh + * if necessary + */ m_cmd->setText(prof.readEntry("Command", "/bin/bash")); - int envcount = prof.readNumEntry("EnvVars", 0); + int envcount = prof.readNumEntry("EnvVars", 0); for (int i=0; i<envcount; i++) { QString name = prof.readEntry("Env_Name_" + QString::number(i), ""); QString value = prof.readEntry("Env_Value_" + QString::number(i), ""); if (!(name.isEmpty() || value.isEmpty())) { |