-rw-r--r-- | noncore/apps/opie-console/configdialog.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/consoleconfigwidget.cpp | 19 | ||||
-rw-r--r-- | noncore/apps/opie-console/main.cpp | 81 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.control | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.pro | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 21 |
7 files changed, 72 insertions, 61 deletions
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 | |||
@@ -76,5 +76,5 @@ void ConfigDialog::slotEdit() { | |||
76 | ProfileEditorDialog dlg(m_fact, p); | 76 | ProfileEditorDialog dlg(m_fact, p); |
77 | 77 | ||
78 | dlg.setCaption("Edit Connection Profile"); | 78 | dlg.setCaption(tr("Edit Connection Profile")); |
79 | dlg.showMaximized(); | 79 | dlg.showMaximized(); |
80 | int ret = dlg.exec(); | 80 | int ret = dlg.exec(); |
@@ -95,5 +95,5 @@ void ConfigDialog::slotAdd() { | |||
95 | ProfileEditorDialog dlg(m_fact); | 95 | ProfileEditorDialog dlg(m_fact); |
96 | 96 | ||
97 | dlg.setCaption("New Connection"); | 97 | dlg.setCaption(tr("New Connection")); |
98 | dlg.showMaximized(); | 98 | dlg.showMaximized(); |
99 | int ret = dlg.exec(); | 99 | 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 | |||
@@ -9,4 +9,8 @@ | |||
9 | #include <stdio.h> | 9 | #include <stdio.h> |
10 | 10 | ||
11 | #include <pwd.h> | ||
12 | #include <sys/types.h> | ||
13 | |||
14 | |||
11 | #include "consoleconfigwidget.h" | 15 | #include "consoleconfigwidget.h" |
12 | 16 | ||
@@ -66,9 +70,16 @@ ConsoleConfigWidget::~ConsoleConfigWidget() { | |||
66 | void ConsoleConfigWidget::load( const Profile& prof ) { | 70 | void ConsoleConfigWidget::load( const Profile& prof ) { |
67 | /* | 71 | /* |
68 | * we will use /bin/bash as default | 72 | * default to the users default shell |
69 | * but will fallback in MyPty to /bin/sh | ||
70 | * if necessary | ||
71 | */ | 73 | */ |
72 | m_cmd->setText(prof.readEntry("Command", "/bin/bash")); | 74 | struct passwd *ent = 0; |
75 | char *shell = "/bin/sh"; | ||
76 | |||
77 | while ( (ent = getpwent()) != 0 ) { | ||
78 | if (ent->pw_shell != "") { | ||
79 | shell = ent->pw_shell; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | m_cmd->setText(prof.readEntry("Command", shell )); | ||
73 | int envcount = prof.readNumEntry("EnvVars", 0); | 84 | int envcount = prof.readNumEntry("EnvVars", 0); |
74 | for (int i=0; i<envcount; i++) { | 85 | for (int i=0; i<envcount; i++) { |
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp index b17f8e8..228db57 100644 --- a/noncore/apps/opie-console/main.cpp +++ b/noncore/apps/opie-console/main.cpp | |||
@@ -30,45 +30,43 @@ public: | |||
30 | FixIt::FixIt() { | 30 | FixIt::FixIt() { |
31 | /* the new inittab */ | 31 | /* the new inittab */ |
32 | m_file = "#\n# /etc/inittab | 32 | m_file = "#\n# /etc/inittab" |
33 | # | 33 | "#" |
34 | 34 | "" | |
35 | # 0 - halt (Do NOT set initdefault to this) | 35 | "# 0 - halt (Do NOT set initdefault to this)" |
36 | # 1 - Single user mode | 36 | "# 1 - Single user mode" |
37 | # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) | 37 | "# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)" |
38 | # 3 - Full multiuser mode | 38 | "# 3 - Full multiuser mode" |
39 | # 4 - JavaVM(Intent) developer mode | 39 | "# 4 - JavaVM(Intent) developer mode" |
40 | # 5 - JavaVM(Intent) | 40 | "# 5 - JavaVM(Intent)" |
41 | # 6 - reboot (Do NOT set initdefault to this) | 41 | "# 6 - reboot (Do NOT set initdefault to this)" |
42 | # | 42 | "#" |
43 | id:5:initdefault: | 43 | "id:5:initdefault:" |
44 | 44 | "" | |
45 | # Specify things to do when starting | 45 | "# Specify things to do when starting" |
46 | si::sysinit:/etc/rc.d/rc.sysinit | 46 | "si::sysinit:/etc/rc.d/rc.sysinit" |
47 | 47 | "" | |
48 | l0:0:wait:/root/etc/rc.d/rc 0 | 48 | "l0:0:wait:/root/etc/rc.d/rc 0" |
49 | l1:1:wait:/etc/rc.d/rc 1 | 49 | "l1:1:wait:/etc/rc.d/rc 1" |
50 | l2:2:wait:/etc/rc.d/rc 2 | 50 | "l2:2:wait:/etc/rc.d/rc 2" |
51 | l3:3:wait:/etc/rc.d/rc 3 | 51 | "l3:3:wait:/etc/rc.d/rc 3" |
52 | l4:4:wait:/etc/rc.d/rc 4 | 52 | "l4:4:wait:/etc/rc.d/rc 4" |
53 | l5:5:wait:/etc/rc.d/rc 5 | 53 | "l5:5:wait:/etc/rc.d/rc 5" |
54 | l6:6:wait:/root/etc/rc.d/rc 6 | 54 | "l6:6:wait:/root/etc/rc.d/rc 6" |
55 | 55 | "" | |
56 | # Specify things to do before rebooting | 56 | "# Specify things to do before rebooting" |
57 | um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1 | 57 | "um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1" |
58 | sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1 | 58 | "sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1" |
59 | 59 | "" | |
60 | # Specify program to run on ttyS0 | 60 | "# Specify program to run on ttyS0" |
61 | s0:24:respawn:/sbin/getty 9600 ttyS0 | 61 | "s0:24:respawn:/sbin/getty 9600 ttyS0" |
62 | #pd:5:respawn:/etc/sync/serialctl | 62 | "#pd:5:respawn:/etc/sync/serialctl" |
63 | 63 | "" | |
64 | # Specify program to run on tty1 | 64 | "# Specify program to run on tty1" |
65 | 1:2:respawn:/sbin/getty 9600 tty1 | 65 | "1:2:respawn:/sbin/getty 9600 tty1" |
66 | ln:345:respawn:survive -l 6 /sbin/launch | 66 | "ln:345:respawn:survive -l 6 /sbin/launch" |
67 | #qt:5:respawn:/sbin/qt | 67 | "#qt:5:respawn:/sbin/qt" |
68 | 68 | "" | |
69 | # collie sp. | 69 | "# collie sp." |
70 | sy::respawn:/sbin/shsync\n"; | 70 | "sy::respawn:/sbin/shsync\n"; |
71 | |||
72 | |||
73 | } | 71 | } |
74 | FixIt::~FixIt() { | 72 | FixIt::~FixIt() { |
@@ -90,5 +88,4 @@ void FixIt::fixIt() { | |||
90 | #endif | 88 | #endif |
91 | 89 | ||
92 | |||
93 | int main(int argc, char **argv) { | 90 | int main(int argc, char **argv) { |
94 | // too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; | 91 | // too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; |
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 | |||
@@ -85,5 +85,5 @@ void MainWindow::initUI() { | |||
85 | * new Action for new sessions | 85 | * new Action for new sessions |
86 | */ | 86 | */ |
87 | QAction* newCon = new QAction(tr("New Connection"), | 87 | QAction* newCon = new QAction(tr("New Profile"), |
88 | Resource::loadPixmap( "new" ), | 88 | Resource::loadPixmap( "new" ), |
89 | QString::null, 0, this, 0); | 89 | QString::null, 0, this, 0); |
@@ -94,5 +94,5 @@ void MainWindow::initUI() { | |||
94 | m_console->insertSeparator(); | 94 | m_console->insertSeparator(); |
95 | 95 | ||
96 | QAction *saveCon = new QAction(tr("Save Connection"), | 96 | QAction *saveCon = new QAction( tr("Save Profile" ), |
97 | Resource::loadPixmap( "save" ), QString::null, | 97 | Resource::loadPixmap( "save" ), QString::null, |
98 | 0, this, 0 ); | 98 | 0, this, 0 ); |
@@ -429,4 +429,5 @@ void MainWindow::slotQuickLaunch() { | |||
429 | newProf.setAutoConnect( true ); | 429 | newProf.setAutoConnect( true ); |
430 | create( newProf ); | 430 | create( newProf ); |
431 | slotSaveSession(); | ||
431 | } | 432 | } |
432 | 433 | ||
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 | |||
@@ -6,5 +6,5 @@ Maintainer: Opie team <opie@handhelds.org> | |||
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: 0.6-$SUB_VERSION | 7 | Version: 0.6-$SUB_VERSION |
8 | Depends: qpe-base, libopie1, lrzsz, opie-keytabs | 8 | Depends: qpe-base, libopie1, opie-console-help-en, lrzsz, opie-keytabs |
9 | License: GPL | 9 | License: GPL |
10 | Description: Opie terminal app | 10 | 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 | |||
@@ -12,5 +12,4 @@ HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \ | |||
12 | profileconfig.h \ | 12 | profileconfig.h \ |
13 | profilemanager.h \ | 13 | profilemanager.h \ |
14 | configwidget.h \ | ||
15 | tabwidget.h \ | 14 | tabwidget.h \ |
16 | configdialog.h \ | 15 | configdialog.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 | |||
@@ -35,11 +35,11 @@ ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) | |||
35 | : QDialog(0, 0, TRUE), m_fact( fact ) | 35 | : QDialog(0, 0, TRUE), m_fact( fact ) |
36 | { | 36 | { |
37 | // Default profile | 37 | // Default profile |
38 | m_prof = Profile("New Profile", "serial", "default", Profile::Black, Profile::White, Profile::VT102); | 38 | m_prof = Profile(tr("New Profile"), "serial", "default", Profile::Black, Profile::White, Profile::VT102); |
39 | 39 | ||
40 | initUI(); | 40 | initUI(); |
41 | 41 | ||
42 | // Apply current profile | 42 | // Apply current profile |
43 | // plugin_plugin->load(profile); | 43 | // plugin_plugin->load(profile); |
44 | } | 44 | } |
45 | 45 | ||
@@ -124,9 +124,9 @@ void ProfileEditorDialog::initUI() | |||
124 | // load profile values | 124 | // load profile values |
125 | m_name->setText(m_prof.name()); | 125 | m_name->setText(m_prof.name()); |
126 | slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); | ||
127 | slotTermActivated( m_fact->external(m_prof.terminalName() ) ); | ||
128 | slotKeyActivated( "Default Keyboard" ); | 126 | slotKeyActivated( "Default Keyboard" ); |
129 | setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); | 127 | setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); |
130 | setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); | 128 | setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); |
129 | slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); | ||
130 | slotTermActivated( m_fact->external(m_prof.terminalName() ) ); | ||
131 | m_autoConnect->setChecked(m_prof.autoConnect()); | 131 | m_autoConnect->setChecked(m_prof.autoConnect()); |
132 | 132 | ||
@@ -200,8 +200,11 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { | |||
200 | // FIXME ugly hack right. Right solution would be to look into the layer and see if it | 200 | // FIXME ugly hack right. Right solution would be to look into the layer and see if it |
201 | // supports auto connect and then set it as prefered | 201 | // supports auto connect and then set it as prefered |
202 | //if ( ( )->layer()->supports()[0] == 1 ) { | ||
203 | if ( m_conCmb ->currentText() == tr("Local Console") ) { | 202 | if ( m_conCmb ->currentText() == tr("Local Console") ) { |
204 | m_autoConnect->setChecked( true ); | 203 | m_autoConnect->setChecked( true ); |
204 | m_prof.writeEntry("Terminal", Profile::Linux ); | ||
205 | slotTermActivated( m_fact->external (m_prof.terminalName() ) ); | ||
205 | } else { | 206 | } else { |
207 | m_prof.writeEntry("Terminal", Profile::VT102 ); | ||
208 | slotTermActivated( m_fact->external (m_prof.terminalName() ) ); | ||
206 | m_autoConnect->setChecked( false ); | 209 | m_autoConnect->setChecked( false ); |
207 | } | 210 | } |
@@ -221,5 +224,5 @@ void ProfileEditorDialog::slotTermActivated( const QString& str ) { | |||
221 | m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() ); | 224 | m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() ); |
222 | 225 | ||
223 | if (m_term) { | 226 | if ( m_term ) { |
224 | m_term->load( m_prof ); | 227 | m_term->load( m_prof ); |
225 | m_svTerm->addChild( m_term ); | 228 | m_svTerm->addChild( m_term ); |