[Ipe-discuss] Checking HOSTNAME in an ipelet

Dmitriy Morozov ipe at foxcub.org
Tue Nov 9 07:15:30 CET 2010


On Mon, Nov 8, 2010 at 9:26 PM, Otfried Cheong <otfried at ipe.airpost.net> wrote:
> On 11/09/2010 01:59 PM, Otfried Cheong wrote:
>>
>> I guess Ipe could provide the screen geometry to the lua environment,
>> then you wouldn't have to play such tricks.
>
> Here is a patch for src/ipe/main.cpp, which sets config.screen_geometry.
>
> So you can get the screen width in an ipelet using _G.config.screen_width.
>
> This will be in the next release.

Actually, I was more concerned with setting the autosave_filename
correctly -- my home directories have different names on the two
computers. Fortunately, the HOME is defined fine as part of the
environment, so the problem is solved.

Thanks for your help, Otfried.

Dmitriy



More information about the Ipe-discuss mailing list