Commit Graph

1223 Commits

Author SHA1 Message Date
Jack Palevich
a3915dd422 Version 1.0.39 2011-11-22 20:09:59 -08:00
Jack Palevich
ad75b4dbde Merge pull request #58 from eauland/patch-4
Update res/values-fr/strings.xml
2011-11-22 20:01:58 -08:00
Jack Palevich
c301a2c671 Merge pull request #54 from eauland/patch-3
Update res/menu/main.xml
2011-11-22 20:00:58 -08:00
Jack Palevich
9ac9b62869 Merge pull request #53 from eauland/patch-2
Update res/values-fr/arrays.xml
2011-11-22 19:58:14 -08:00
Steven Luo
ae3341f497 Notify the EmulatorView of an update after resetting the terminal
Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-22 19:54:49 -08:00
Steven Luo
516903aa29 Make terminal window titles in window list activity localizable
Thanks to Github user eauland for reporting.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-22 19:54:44 -08:00
eauland
21fd016df6 Update res/values-fr/strings.xml 2011-11-22 19:18:54 +01:00
eauland
e80e71754d Update res/menu/main.xml 2011-11-22 16:08:57 +01:00
eauland
5b5e0c2616 Update res/values-fr/arrays.xml 2011-11-22 16:06:33 +01:00
Jack Palevich
ed4fcbf724 Version 1.0.38 2011-11-22 02:50:22 -08:00
Jack Palevich
e054773bf9 On further thought, switch to BACK_KEY_CLOSES_ACTIVITY by default. 2011-11-22 02:49:21 -08:00
Jack Palevich
9bc0c58a83 Version 1.0.37 2011-11-22 02:42:29 -08:00
Jack Palevich
17b8ebe5d3 Revert default behavior of "Back Key" to exiting application.
Users were confused by having the default be "ESC". Better to keep
the default "exit the app", and let people manually change it.
2011-11-22 02:41:40 -08:00
Jack Palevich
2597ae8b1c Update version number to 1.0.36
And version code to 37
2011-11-21 23:24:43 -08:00
Jack Palevich
e59ba73ea6 Poll for window size changes when SDK <= 7
(Tested API levels 3 to 10 in emulator.)
2011-11-21 23:14:47 -08:00
Jack Palevich
a1088ab68d Fix text renderer to draw text in correct position on screen
Was drawing slightly too low, which resulted in empty space on top,
cut-off characters at the bottom.
2011-11-21 23:13:09 -08:00
Jack Palevich
b724257fe3 Fix calculation of visible window size.
There's a bug in pre-Android-SDK 10 when the view is full screen.

See the discussion here:

http://stackoverflow.com/questions/7659652
2011-11-21 22:18:03 -08:00
Jack Palevich
0bc64f8aa7 Remove drop shadow at top of text window.
It makes no sense in full screen mode, and it obscures the top
few pixels of terminal text in both full screen and non-full-screen mode.
2011-11-21 22:12:49 -08:00
Jack Palevich
8a57df0c98 Make the soft keyboard always visible when ATE starts.
Not really "always". It won't be made visibile if there is a hardware
keyboard on the device or if there is a bluetooth keyboard currently
connected to the device.
2011-11-21 20:18:25 -08:00
Jack Palevich
5384887f3f Avoid polling for window size change on Android API level > 5 2011-11-21 20:06:46 -08:00
Steven Luo
31326da6eb Refuse to draw on a finished TranscriptScreen
It's not clear why we try to draw on a finished TranscriptScreen when
exiting on Honeycomb (and not on other platforms), but this works around
the resulting crash.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-21 19:28:32 -08:00
Steven Luo
a39027d799 Finish changing default preferences
Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-21 19:28:28 -08:00
Jack Palevich
826f76507c Allow the Back button to be configured to send "TAB" 2011-11-21 12:03:39 -08:00
Jack Palevich
24ae987a8a Tweak default preferences
Default back key preference is to send ESC

Default TERM setting is screen

Close Window on process exit defaults to true. Linux term users expect
this, even though it can lead to accidental data loss.
2011-11-21 11:57:09 -08:00
Jack Palevich
a9e5bf80a0 Merge pull request #52 from eauland/patch-1
Update res/values-fr/strings.xml
2011-11-21 10:44:38 -08:00
Steven Luo
099b500e28 Make sure onResume() is called for active EmulatorView in populateViewFlipper()
Otherwise, the screen size check handler isn't installed in the
EmulatorView, and the screen won't resize properly until something else
causes its onResume() to be called.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-21 10:32:12 -08:00
Steven Luo
f3cb8698a1 Preserve bold when setting default foreground color (SGR code 39)
This matches the Linux console terminal emulator's behavior and
(apparently) the expectations of full-screen programs.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-21 10:30:05 -08:00
eauland
6125299522 Update res/values-fr/strings.xml 2011-11-21 17:59:07 +01:00
Steven Luo
4d81c669a7 Set TERM in process environment and provide preference to choose value
In ordinary Unix (non-Android) environments, the behavior of programs
that use advanced terminal capabilities depends on the value of TERM in
the environment.  Currently, we don't set TERM at all, which leads most
of those programs to assume a dumb terminal and behave accordingly.

Instead, set TERM in the started process's environment, and provide the
user a preference to choose the value of TERM.  The current default of
"vt100" is the safest, as it's understood on every system since near the
beginning of time, but does not expose capabilities such as colors or
Home/End keys.  The other options provided are "screen", which is the
best match for our currently implemented capabilities and reasonably
widespread, and "linux".

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 21:05:59 -08:00
Steven Luo
cf088c494f Make Exec.createSubprocess() handle environment variables and unlimited args
Add the ability to modify the subprocess's environment by passing in an
array of environment variable strings suitable for passing to putenv()
("VAR=value").  While we're at it, lift the restriction on the number of
arguments passed to the subprocess by using an array instead of a fixed
number of String arguments to hold command line arguments.

This change breaks the ABI for the JNI library, so bump the library ABI
version (to 3) to avoid any potential problems with external copies of
the library.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 21:05:55 -08:00
Steven Luo
e48fb0802d Support the VT100 special graphics character set
The VT100 special graphics character set is used as the alternate (G1)
character set by many full-screen applications which want to draw lines
and boxes on screen; these applications currently show lots of "q"s and
"x"s where boxes should be.

To implement this character set, we provide a mapping between the ASCII
characters sent by the application in this character set and Unicode
codepoints for the expected display characters, and use it when the G1
character set is selected (via the existing support for the SI and SO
control characters).

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 21:05:51 -08:00
Steven Luo
8f755cfdb4 Correct color rendition for color schemes other than white on black
Applications expect to get black when they ask for a black background,
independent of what the default background color actually is; similarly,
they expect white when they ask for a white foreground, independent of
the default foreground color.  We, however, currently substitute the
default background color for black and the default foreground color for
white in our palette, which leads to incorrect color when the color
scheme is anything other than white on black.

A full solution to this problem probably requires us to distinguish
"default color" from the colors in the palette, which would require
additional storage for color information.  As a band-aid fix, though,
keep track of which colors in the palette are the closest match to the
default colors, and substitute those instead of always substituting for
black and white.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 21:05:48 -08:00
Steven Luo
49021f0608 Add a few more escapes to the terminal emulator
Implement support for the following escape codes (not supported by a
real VT100, but not conflicting with any VT100 escapes either):

* Esc [ Z: backwards tab
* Esc [ Pn X: erase Pn characters
* SGR codes 10/11: exit/enter alternate charset (used when TERM=linux)
  [ECMA-48 uses this pair of codes for font selection]
* SGR codes 3/23: "standout" (reverse video for TERM=screen) [ECMA-48
  uses this pair of codes for italics, but this seems to be rarely
  implemented]

With these escapes implemented, we should have the complete set of
escapes required to keep termcap/terminfo-using applications happy when
TERM=linux or TERM=screen.  (We may be missing a few graphic
modes/attributes, but nothing that should cause major breakage.)

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 21:05:44 -08:00
Steven Luo
d6d90575bf Fix tab behavior when cursor is on tab stop
Sending a tab to the emulator when the cursor sits on a tab stop should
move the cursor to the next tab stop, not leave the cursor in its
current position.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 21:05:40 -08:00
Steven Luo
8e6145ca11 Display a message in the EmulatorView when the shell exits
Currently, if the shell exits and the option to close windows on shell
exit isn't activated, the user gets no visual cue that the shell has
exited -- only an unresponsive session.  Instead, take a page from the
Mac OS X Terminal's book and display a message that the terminal session
has finished.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 20:00:42 -08:00
Steven Luo
78c3d0b5d2 Add option to close terminal windows on shell exit
Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 20:00:36 -08:00
Steven Luo
828cbcfc0e Deal with cases where a session ends without our intervention
At the moment, the terminal activity, the window list activity, and the
service all assume that terminal sessions only end when they're
explicitly closed by an action from our UI (the close buttons in the
activities) -- which is currently true, but breaks if sessions end when
the shell running in the session exits.

To account for the possibility of sessions ending on their own, add
callback interfaces to notify when sessions have finished and when the
list of sessions changes.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 20:00:31 -08:00
Steven Luo
645d31a35e Clean up setting UpdateCallback for a TermSession
Remove the unused UpdateCallback argument to the TermSession
constructor, and move the setUpdateCallback() into the EmulatorView
constructor, eliminating the need for a getUpdateCallback() in
EmulatorView.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 20:00:26 -08:00
Steven Luo
d702d2c7fe Add configurable back button behavior
Allow the back button to (1) close all windows (the current behavior);
(2) close the current window only; (3) close the activity, but leave the
terminal sessions running; or (4) send ESC to the terminal.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 20:00:23 -08:00
Steven Luo
73590196f5 Make "Reset terminal" do what it says instead of closing the activity
Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 20:00:17 -08:00
Steven Luo
b9a4e3d332 Slow down scrolling by vertical fling
As of now, a vertical fling scrolls the screen far too quickly to be
useful -- even a small flick of the finger scrolls the screen by
hundreds of lines.  Reduce the coefficient converting fling velocity to
scroll distance from 2 to 0.1, which results in much more reasonable
scroll distances.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 19:59:15 -08:00
Steven Luo
47e5ef95b2 Make window title string localizable
Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 19:59:11 -08:00
Steven Luo
91bdf635a4 Simplify Android compatibility class
* Make names less cumbersome
* Use lazy loading instead of reflection to simplify code

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-20 19:58:55 -08:00
Eug89
17bd2c33a4 androidterm: Updated Italian translations
Change-Id: I1f9ab706fce9b79b792406b298b811cecd5b626b
2011-11-14 19:20:22 +01:00
Steven Luo
6ea8f28286 Color tweaks
Other terminals which offer color support generally have two sets of
colors, a "dim" set for regular text and backgrounds and a "bright" set
for use with bold text.  At the moment, Android Terminal Emulator uses
the same set of eight colors for backgrounds, normal text, and bold
text, which causes one notable problem: applications generally expect
bold text colored black to be displayed as "bright black" (a dark gray),
but this text is invisible in Android Terminal Emulator in the
white-on-black configuration.

Fix this by extending the array of foreground colors to include "bright"
colors (actually, the same colors we were using before, except for the
addition of a "bright black"), taking advantage of the fact that we're
using the high bit of the foreground color to store bold information.
We dim the regular set of colors slightly, to distinguish them from the
bright colors.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-06 13:06:12 -08:00
Steven Luo
3ae0bdc734 Make changes to UTF-8 preference take effect immediately in running sessions
Add a updatePrefs() method in TermSession and TerminalEmulator and call
it from Term's updatePrefs(), so that changes to the UTF-8 preference
will be picked up immediately by running terminal sessions.

Note that a terminal emulator will ignore the UTF-8 preference once any
application running in it uses one of the ESC % codes to request a
specific character set.

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-06 13:06:08 -08:00
Steven Luo
f1be3cf02b Fix fast resize when screen shrinks
When the line containing the cursor is blank, and the cursor is not at
the bottom edge of the screen, fast resize will move the line containing
the cursor off the screen.  Fix this by ensuring that fast resize never
considers lines at or above the cursor for shrinking.

This patch prevents a crash which occurs when a full resize operation is
conducted immediately after this bug is triggered (the full resize
attempts to fetch the character at the cursor, which is off the screen,
causing an IllegalArgumentException).

Signed-off-by: Jack Palevich <jackpal@google.com>
2011-11-06 13:05:14 -08:00
Andreas Böhm
12a655c62d AndroidTerm: Updated German Translation
Change-Id: I29bc56087bbad169f9fcd0b1ff836d9a6e05bd0a
2011-11-04 09:40:44 +01:00
Jack Palevich
c60fa67b2e Declare version 1.0.35 2011-10-24 10:05:48 -07:00
Jack Palevich
ee721c5a17 Create Android 1.5 version of notification icon.
Use MDPI version, as Android 1.5 devices are defined to be MDPI.
2011-10-24 09:50:26 -07:00