Buffers    Files    Tools    Mule
----- Forwarded message from Johannes Steingraeber -----

Date: Tue, 14 Jan 2003 21:53:15 +0100
From: Johannes Steingraeber
To: wanderer
Subject: Re: Simple enhancement requests for TextViewer
X-Mailer: Mutt 1.0pre3i
In-Reply-To: <372978760.20030113180122@xxxxx>


On Mon, Jan 13, 2003 at 06:01:22PM +0100, wanderer wrote:
> [...] I suggest to remove the exit to Action menu when turning the
> PV on with the action lever.

that's solved in a more general way by the leverpush patch. Please try
it, it will bring you the requested feature not only for TV but for
all your programs.

> [...] The menu should be reorganized in a more ergonomic way

Hmm, the most clean way to make this working would be to have
customisable menus. The current menu structure is the result of a lot
of beta tester input, so I think the idea about the best organisation
is just a question of taste.

> [...] please provide me with the information about how I can patch
> the TextViewer binary to achieve these results.

Oh man, that's not as easy as you might think. All menu entries which
change their text dynamically cannot be moved to another position
because there is code somewhere that checks a certain condition
(e.g. is the light currently turned on) and then changes the text at
that menu position to reflect the current state. So when you move,
say, Light ON/OFF from the third to the first menu the program will not
know it and happily insert the option "Light OFF" in the third menu not
knowing you moved it to another position.

You may try your best anyway, but I have not tested this procedure and
it might or might not work at all.

Start your favourite hex editor and search in the binary of TV for the
bytes (hex) 118016803E80. In the example below it is at offset 0x0D4E.

00000d30: 7874 7669 6577 6572 2c43 7572 7265 6e74  xtviewer,Current
00000d40: 426f 6f6b 496e 666f 3031 3034 0000 1180  BookInfo0104....
00000d50: 1680 3e80 1080 1480 1580 ffff 2080 2180  ..>......... .!.
00000d60: 2280 2380 ffff 3180 3280 3680 3980 3880  ".#...
00000d70: 1380 3b80 3480 3580 3f80 ffff 5348 4152  ..;.4.5.?...SHAR
00000d80: 4544 0000 d400 7465 7874 7669 6577 6572  ED....textviewer

These numbers are the default menu structure, read them as words, that
is 0x8011, 0x8016, 0x803E etc. until 0x8015. The 0xFFFF ends the
menu. Theoretically you can move the 0xFFFF, but only to make a menu
shorter. That is because the next menu must start at it's fixed address
as it stands. You cannot change the starting position (offset in the
binary) of each menu. In the example above the offsets are: 0x0D4E for
first menu, 0x0D5C for second menu, 0x0D66 for third menu.

Here is the list of numbers for the menu entries.

0x8010 "Select Font"
0x8011 "Load Text File"
0x8012 "Select Archive"
0x8013 "Configure Fonts"
0x8014 "Exit"
0x8015 "Power OFF"
0x8016 "Jump to..."

0x8020 "Set date/time"
0x8021 "Sound"
0x8022 "Contrast"
0x8023 "Touch Panel Alignment"

0x8030 "Preferences"
0x8031 "Tools"
0x8032 "Light ON"
0x8033 "Light OFF"
0x8034 "Clean Up SHARED"
0x8035 "About"
0x8036 "Info Progress ON"
0x8037 "Info Progress OFF"
0x8038 "Line spacing"
0x8039 "Info Date ON"
0x803A "Info Date OFF"
0x803B "Configure Regions"

0x803E "Bookmarks"
0x803F "[ESC]"
0x8040 "Line spacing -1"
0x8041 "Line spacing  0"
0x8042 "Line spacing +1"
0x8043 "Line spacing +2"
0x8044 "Line spacing +3"

Hope this helps,
Not using mail encoding is like always writing on postcards.
Key ID = 1024D/8014B0E9
Key fingerprint = 71FB 4193 DFC5 9827 7D06  B9F4 A6C2 D414 8014 B0E9

----- End forwarded message -----

--:%%  pvdevelop        (Text Fill)----ALL----------------
M-x view-file ../index.html