Re: FvwmScript, UseGettext and LocalePath

2013-05-04 Thread Thomas Funk

Ouch! Copy paste typo :S

Thomas Funk wrote:
> It does, but the string in FvwmScript have to be quoted in FvwmScript
> quotes:
> UseGettext 
{$FVWM_USERDIR/locale;fvwm-crystal:$FVWM_SYSTEMDIR/locale;fvwm-crystal:+}

Corrected:
UseGettext 
{$[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+}


> If this doesn't work the problem could be that fvwm-crystal doesn't
> export FVWM_USERDIR in the shell, too. It is not enough to set
> FVWM_USERDIR in the config. I have had the same problems and fixed it in
> the start up script.
>
> For crystal the following should be added in fvwm-crystal startup script:
> # Default path
> # if a variable 'configfile' is defined in the environment, its value is
> # preserved; otherwise, the scripts look for configuration in common 
places.

> configfile="$HOME/fvwm-crystal/$configname"
> export FVWM_USERDIR=$HOME/fvwm-crystal
> export FNS_SYSTEMDIR=`dirname ${0}`/../share/fvwm-crystal
And here now that from above:
UseGettext 
{$FVWM_USERDIR/locale;fvwm-crystal:$FVWM_SYSTEMDIR/locale;fvwm-crystal:+}


Sorry,
Thomas




Re: FvwmScript, UseGettext and LocalePath

2013-05-04 Thread Thomas Funk

Dan Espen wrote:
> Dominique Michel  writes:
>
>> I try to get UseGettext to work with FvwmScript and Fvwm-Crystal.
>>
>> From FvwmScript man page:
>>
>> UseGettext [locale_path]
>> You can reset this catalog or add some catalogs exactly in the same
>> way than with the LocalePath fvwm command (see the fvwm manual
>> page).
>>
>> In Fvwm-Crystal config, one of the first instruction is:
>>
>> LocalePath
>> 
$[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+

>>
>> If I put exactly the same path in my FvwmScript
>> UseGettext
>> 
$[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+

>>
>> the script crash with a syntax error at that line:
>> UseGettext!
>> [/home/dom/.fvwm-crystal/scripts/FontSelector/FontSelector] Line 7:
>> syntax error
>>
>> The beginning of the script:
>>
>> # FvwmScript Font Selector
>> # A Font Selector for Fvwm-Crystal
>> # Copyright Dominique Michel 
>> 2013
>> # Released under the GNU GPL license v2 or later
>>
>> # Header ̣{{{1
>> UseGettext
>> 
$[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+

>> WindowLocaleTitle {FVWM-Crystal Font Selector}
>>
>> Is it something I can do, or is it a bug?
>
> See my other reply.  I don't think FvwmScript is going to expand
> $[FVWM_SYSTEMDIR].
>
It does, but the string in FvwmScript have to be quoted in FvwmScript
quotes:
UseGettext 
{$FVWM_USERDIR/locale;fvwm-crystal:$FVWM_SYSTEMDIR/locale;fvwm-crystal:+}


If this doesn't work the problem could be that fvwm-crystal doesn't
export FVWM_USERDIR in the shell, too. It is not enough to set
FVWM_USERDIR in the config. I have had the same problems and fixed it in
the start up script.

For crystal the following should be added in fvwm-crystal startup script:
# Default path
# if a variable 'configfile' is defined in the environment, its value is
# preserved; otherwise, the scripts look for configuration in common places.
configfile="$HOME/fvwm-crystal/$configname"
export FVWM_USERDIR=$HOME/fvwm-crystal
export FNS_SYSTEMDIR=`dirname ${0}`/../share/fvwm-crystal

Thomas



Re: FvwmScript, UseGettext and LocalePath

2013-05-04 Thread Dominique Michel
Le Sat, 04 May 2013 15:51:51 -0400,
Dan Espen  a écrit :

> Dominique Michel  writes:
> 
> > I try to get UseGettext to work with FvwmScript and Fvwm-Crystal.
> >
> > From FvwmScript man page:
> >
> > UseGettext [locale_path]
> > You can reset this catalog or add some catalogs exactly in the
> > same way than with the LocalePath fvwm command (see the fvwm manual
> > page).
> >
> > In Fvwm-Crystal config, one of the first instruction is:
> >
> > LocalePath
> > $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
> >
> > If I put exactly the same path in my FvwmScript
> > UseGettext
> > $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
> >
> > the script crash with a syntax error at that line:
> > UseGettext!
> > [/home/dom/.fvwm-crystal/scripts/FontSelector/FontSelector] Line 7:
> > syntax error
> >
> > The beginning of the script:
> >
> > # FvwmScript Font Selector
> > # A Font Selector for Fvwm-Crystal
> > # Copyright Dominique Michel 
> > 2013
> > # Released under the GNU GPL license v2 or later
> >
> > # Header ̣{{{1
> > UseGettext
> > $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
> > WindowLocaleTitle {FVWM-Crystal Font Selector}
> >
> > Is it something I can do, or is it a bug?
> 
> See my other reply.  I don't think FvwmScript is going to expand
> $[FVWM_SYSTEMDIR].

I was doing the wrong thing in the other subject, but here I am just
blindly following the man page.

I try other thing like to put the locale path in clear with the full
pat, but without any luck, I always get the same syntax error. 

Dominique

> 


-- 
"We have the heroes we deserve."



Re: FVWM: FvwmScript and environment variables

2013-05-04 Thread Dominique Michel
Le Sat, 4 May 2013 14:41:35 -0600,
Jaimos Skriletz  a écrit :

> On Sat, May 04, 2013 at 03:49:42PM -0400, Dan Espen wrote:
> > Dominique Michel  writes:
> > 
> > > Hi,
> > >
> > > I am writing a font selector for fvwm-crystal with FvwmScript.
> > > Most of it work, but I didn't succeeded to use environment
> > > variables.
> > >
> > > Also thing like
> > > Set $PanelFont = (GetOutput {echo $[panel_font]} 1 -1)
> > >
> 
> I belive you could do something hackish like this if you don't want
> to patch for actual support. But you need to be a little more
> creative.
> 
> First I belive GetOutput is excuting a shell command, so you may just
> need (GetOutput {echo $PANEL_FONT} 1 -1)

I was using it in the header of the script. It work fine if I put it in
another section.

Dominique


-- 
"We have the heroes we deserve."



Re: FvwmScript, UseGettext and LocalePath

2013-05-04 Thread Dan Espen
Dominique Michel  writes:

> I try to get UseGettext to work with FvwmScript and Fvwm-Crystal.
>
> From FvwmScript man page:
>
> UseGettext [locale_path]
> You can reset this catalog or add some catalogs exactly in the same
> way than with the LocalePath fvwm command (see the fvwm manual
> page).
>
> In Fvwm-Crystal config, one of the first instruction is:
>
> LocalePath
> $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
>
> If I put exactly the same path in my FvwmScript
> UseGettext
> $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
>
> the script crash with a syntax error at that line:
> UseGettext!
> [/home/dom/.fvwm-crystal/scripts/FontSelector/FontSelector] Line 7:
> syntax error
>
> The beginning of the script:
>
> # FvwmScript Font Selector
> # A Font Selector for Fvwm-Crystal
> # Copyright Dominique Michel 
> 2013
> # Released under the GNU GPL license v2 or later
>
> # Header ̣{{{1
> UseGettext
> $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
> WindowLocaleTitle {FVWM-Crystal Font Selector}
>
> Is it something I can do, or is it a bug?

See my other reply.  I don't think FvwmScript is going to expand
$[FVWM_SYSTEMDIR].

-- 
Dan Espen



FvwmScript, UseGettext and LocalePath

2013-05-04 Thread Dominique Michel
I try to get UseGettext to work with FvwmScript and Fvwm-Crystal.

From FvwmScript man page:

UseGettext [locale_path]
You can reset this catalog or add some catalogs exactly in the same
way than with the LocalePath fvwm command (see the fvwm manual
page).

In Fvwm-Crystal config, one of the first instruction is:

LocalePath
$[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+

If I put exactly the same path in my FvwmScript
UseGettext
$[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+

the script crash with a syntax error at that line:
UseGettext!
[/home/dom/.fvwm-crystal/scripts/FontSelector/FontSelector] Line 7:
syntax error

The beginning of the script:

# FvwmScript Font Selector
# A Font Selector for Fvwm-Crystal
# Copyright Dominique Michel 
2013
# Released under the GNU GPL license v2 or later

# Header ̣{{{1
UseGettext
$[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
WindowLocaleTitle {FVWM-Crystal Font Selector}

Is it something I can do, or is it a bug?

This append with both 2.6.5 and the cvs.

Best,
Dominique
-- 
"We have the heroes we deserve."