From 1c58d1407f9584fedcdae390a04e2b37e5853361 Mon Sep 17 00:00:00 2001 From: kergoth Date: Sat, 09 Aug 2003 16:12:19 +0000 Subject: Merge from BRANCH_1_0 --- (limited to 'noncore/apps/opie-console') diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index 0bc6588..53b3853 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp @@ -75,7 +75,7 @@ void ConfigDialog::slotEdit() { ProfileEditorDialog dlg(m_fact, p); - dlg.setCaption("Edit Connection Profile"); + dlg.setCaption(tr("Edit Connection Profile")); dlg.showMaximized(); int ret = dlg.exec(); @@ -94,7 +94,7 @@ void ConfigDialog::slotEdit() { void ConfigDialog::slotAdd() { ProfileEditorDialog dlg(m_fact); - dlg.setCaption("New Connection"); + dlg.setCaption(tr("New Connection")); dlg.showMaximized(); int ret = dlg.exec(); diff --git a/noncore/apps/opie-console/consoleconfigwidget.cpp b/noncore/apps/opie-console/consoleconfigwidget.cpp index 3f2d154..faedc58 100644 --- a/noncore/apps/opie-console/consoleconfigwidget.cpp +++ b/noncore/apps/opie-console/consoleconfigwidget.cpp @@ -8,6 +8,10 @@ #include #include +#include +#include + + #include "consoleconfigwidget.h" ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent, @@ -65,11 +69,18 @@ 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 + * default to the users default shell */ - m_cmd->setText(prof.readEntry("Command", "/bin/bash")); + struct passwd *ent = 0; + char *shell = "/bin/sh"; + + while ( (ent = getpwent()) != 0 ) { + if (ent->pw_shell != "") { + shell = ent->pw_shell; + } + } + + m_cmd->setText(prof.readEntry("Command", shell )); int envcount = prof.readNumEntry("EnvVars", 0); for (int i=0; i /dev/null 2>&1" +"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1" +"" +"# Specify program to run on ttyS0" +"s0:24:respawn:/sbin/getty 9600 ttyS0" +"#pd:5:respawn:/etc/sync/serialctl" +"" +"# Specify program to run on tty1" +"1:2:respawn:/sbin/getty 9600 tty1" +"ln:345:respawn:survive -l 6 /sbin/launch" +"#qt:5:respawn:/sbin/qt" +"" +"# collie sp." +"sy::respawn:/sbin/shsync\n"; } FixIt::~FixIt() { } @@ -89,7 +87,6 @@ void FixIt::fixIt() { } #endif - int main(int argc, char **argv) { // too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; QPEApplication app( argc, argv ); diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index c48116d..3c9603c 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -84,7 +84,7 @@ void MainWindow::initUI() { /* * new Action for new sessions */ - QAction* newCon = new QAction(tr("New Connection"), + QAction* newCon = new QAction(tr("New Profile"), Resource::loadPixmap( "new" ), QString::null, 0, this, 0); newCon->addTo( m_console ); @@ -93,7 +93,7 @@ void MainWindow::initUI() { m_console->insertSeparator(); - QAction *saveCon = new QAction(tr("Save Connection"), + QAction *saveCon = new QAction( tr("Save Profile" ), Resource::loadPixmap( "save" ), QString::null, 0, this, 0 ); saveCon->addTo( m_console ); @@ -428,6 +428,7 @@ void MainWindow::slotQuickLaunch() { Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 ); newProf.setAutoConnect( true ); create( newProf ); + slotSaveSession(); } } diff --git a/noncore/apps/opie-console/opie-console.control b/noncore/apps/opie-console/opie-console.control index 693c72c..852451d 100644 --- a/noncore/apps/opie-console/opie-console.control +++ b/noncore/apps/opie-console/opie-console.control @@ -5,7 +5,7 @@ Section: opie/applications Maintainer: Opie team Architecture: arm Version: 0.6-$SUB_VERSION -Depends: qpe-base, libopie1, lrzsz, opie-keytabs +Depends: qpe-base, libopie1, opie-console-help-en, lrzsz, opie-keytabs License: GPL Description: Opie terminal app diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro index 58b29ca..ccf2e08 100644 --- a/noncore/apps/opie-console/opie-console.pro +++ b/noncore/apps/opie-console/opie-console.pro @@ -11,7 +11,6 @@ HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \ profile.h \ profileconfig.h \ profilemanager.h \ - configwidget.h \ tabwidget.h \ configdialog.h \ keytrans.h \ diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index 6b607df..e2501a6 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp @@ -34,13 +34,13 @@ ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) : QDialog(0, 0, TRUE), m_fact( fact ) { - // Default profile - m_prof = Profile("New Profile", "serial", "default", Profile::Black, Profile::White, Profile::VT102); + // Default profile + m_prof = Profile(tr("New Profile"), "serial", "default", Profile::Black, Profile::White, Profile::VT102); - initUI(); + initUI(); - // Apply current profile - // plugin_plugin->load(profile); + // Apply current profile + // plugin_plugin->load(profile); } Profile ProfileEditorDialog::profile() const @@ -123,11 +123,11 @@ void ProfileEditorDialog::initUI() // load profile values m_name->setText(m_prof.name()); - slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); - slotTermActivated( m_fact->external(m_prof.terminalName() ) ); slotKeyActivated( "Default Keyboard" ); setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); + slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); + slotTermActivated( m_fact->external(m_prof.terminalName() ) ); m_autoConnect->setChecked(m_prof.autoConnect()); @@ -199,10 +199,13 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { // FIXME ugly hack right. Right solution would be to look into the layer and see if it // supports auto connect and then set it as prefered - //if ( ( )->layer()->supports()[0] == 1 ) { if ( m_conCmb ->currentText() == tr("Local Console") ) { m_autoConnect->setChecked( true ); + m_prof.writeEntry("Terminal", Profile::Linux ); + slotTermActivated( m_fact->external (m_prof.terminalName() ) ); } else { + m_prof.writeEntry("Terminal", Profile::VT102 ); + slotTermActivated( m_fact->external (m_prof.terminalName() ) ); m_autoConnect->setChecked( false ); } @@ -220,7 +223,7 @@ void ProfileEditorDialog::slotTermActivated( const QString& str ) { m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() ); - if (m_term) { + if ( m_term ) { m_term->load( m_prof ); m_svTerm->addChild( m_term ); } -- cgit v0.9.0.2