Mailing List ecs-isp@2rosenthals.com Archived Message #1081

Fra: "Alfredo Fernández Díaz" <ecs-isp@2rosenthals.com> Full Headers
Undecoded message
Emne: Re: [eCS-ISP] VIO Font Size (Was: Re: Getting started with Let's Encrypt)
Dato: Wed, 11 Dec 2024 01:46:36 +0100
Til: eCS ISP Mailing List <ecs-isp@2rosenthals.com>

On 2024/12/10 11:42, Peter Moylan wrote:
On 09/12/24 23:10, Alfredo Fern�ndez D�az wrote:
On 2024/12/09 01:36, Peter Moylan wrote:
On 09/12/24 00:20, Alfredo Fern�ndez D�az wrote:
On 2024/12/08 09:56, Peter Moylan wrote:
On 08/12/24 15:57, Steven Levine wrote:
In <list-11330729@2rosenthals.com>, on 12/08/24 at 02:11 PM,
"Peter Moylan" <ecs-isp@2rosenthals.com> said:

That made me rediscover a flaw in the design: changing the
font size changes it for all instances of the shell (and
also all instances of 4OS2) rather than for just one
application.

[...]

I should look into where the font size is saved to. It might
be saved in the extended attributes of the shell. If so, there
could be a way to add the relevant information to the extended
attributes of one program object, without affecting the global
command shell font.

It is saved in the USER INI file, as a two-byte character value
(first byte is VIO cell size cols, second is rows) of the
'Shield' application. The name of the key under which this value
is stored is language-dependent, and it starts with or at least
has a tilde (~) character in it. I just set it on a VM and it
seems to be '~Font Size...' in English ArcaOS.

That's the first time I've seen a key that ends with a sequence of dots.
Very strange.


Not really, there is a reason for everything. Apparently all code dealing with VIO windows lives in PMVIOP.DLL, and the function that handles the VIO default font size reads string #153 from that DLL to use it as the key name. The string in question corresponds to the menu item that invokes (surprise!) the dialog that lets you adjust VIO font size. Naturally, the string is NLS-dependent, and complying with CUA, it ends in '...' to signal that it will invoke a dialog, rather than execute some action right away.

About using whatever text is on the menu that invokes a dialog as the key name to store what the dialog may return, I wouldn't say it's the best idea, but that's another story...

Thanks. That means I can't change it for one program without
changing it for all command-line applications.

Well, OK, I guess I could write a wrapper script that temporarily
changed the setting. I'll give that some thought.

I wrote a crude REXX applet long ago that did that, more or less: it
 took a VIO size and an Object ID as parameters. It read the current
VIO size setting, adjusted it as per parameters, launched the object
as a new window so it used the size used as parameter, and then set
the VIO size back to the previous system default.

I have a less ambitious goal. I want the big window for just one
application, a VIO program called accounts.exe, and a smaller window for
everything else;

I see. After some digging at the new Hobbes archive, a little GPL utility called 'Console' turned up, that does just that: it will adjust the font size for DOS or OS/2 VIO sessions (and much more!) programmatically, and leave the default setting entirely alone. I knew this must be possible --after all you can do that precisely via the VIO window system menu, pushing the 'Change' button instead of 'Save'-- although I doubt that it can be done directly from REXX or something similar. I seem to recall some old WPS enhancer also included another command-line utility that could do it, more or less, but I forget which one -- X-it, Nice, NPS...?

so there's no need to pass parameters. I fiddled with
the idea today, and as usual I had to re-learn how to deal with 8-bit
bytes in Rexx. (Rexx is not the best language for that job.) I didn't
realise that updating the size worked for the next VIO window to be
opened, not the current one, so you have to have two windows open. Not a
fatal flaw, but a minor aesthetic one.


That's why my REXX applet wrote the non-default VIO size to the INI file and launched the object in a separate session, so it was read and used before my code reinstated the default and exited.

I seem to recall I had problems opening several VIO sessions with
different sizes concurrently or something similar -- I forget because
I stopped using it when I switched to bigger VIO sizes almost
universally. Then I lost it, and I never got round to rewriting it in
presentable fashion, but I am sure you can use the idea and improve
on that as necessary.

I can see that there are potential timing problems. I guess I'll have to
set the new size, launch my application, and then sleep for a while
before changing it back and exiting. I'll give that another try tomorrow.


I can probably rewrite my REXX applet as a simple wrapper for Console now, but you can probably use it directly too to launch your program and call it a day. Please keep up posted.

Best,
AFD.



Abboner: Feed, Digest, Index.
Stopp abbonement
E-post til ListMaster