YAD - Tips

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#496 Post by Mike Walsh »

Hi again, Fred.

Okay; here's 'Mk 2'.


Image



I've used the extra code you supplied to add the 'Full-screen' selector. Have added another 'cmd_function' to permit enabling/disabling of the status-bar in full-screen mode (it appears to be hard-coded in normal viewing mode, and isn't switchable.)

Also added an 'info' button, which brings up a second YAD 'text' window, explaining some of the functions.....and a 'Quit' button, to exit.

Code: Select all

#!/bin/sh
#
# Launcher for the 'Q.I.V Slideshow' © Mike Walsh, Sep 2018 - with thanks to the 'Puppy' crew (and Fredx181 in particular) for assistance
#
export load_cmd='@bash -c "button_cmd %1 %2 %3 %4 %5 %6"'

function button_cmd () {
[ $3 = TRUE ] && FS="-f" || FS=""
[ $4 = FALSE ] && SB="-i" || SB=""
qiv -s $FS $SB -m -t -d $2 $1
}
export -f button_cmd 

yad  --center --window-icon=/usr/local/lib/X11/pixmaps/qiv.png --title="Q.I.V Slideshow" --form --width=450 --text="     Please make your selections:-" \
--form --field="Choose image directory:-:MDIR" '/root' \
--field="Select timeout interval:-:NUM" '1' \
--field="Fullscreen:CHK" "TRUE" \
--field="Enable/disable status bar (full-screen only):CHK" "FALSE" \
--field="Run  Q.I.V  slideshow":fbtn "$load_cmd" \
--button="Information":qiv-gui-info.sh --button="Quit":1
I've left the '-m -t' flags in the exec stanza as they are. That way, resizing of images is entirely automatic; IMHO, that's better left as default behaviour.

I think it's fair to say I'm slowly getting the hang of this 'variables' stuff. I'll get there eventually!


Mike. :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#497 Post by fredx181 »

Hi Mike, congrats ! it's working well.
Just one thing (but I don't intend to put you on more stress than you possibly are already :) )
I didn't really notice earlier, but I see you are using the "MDIR" option (multiple directories) for the directory select field.
(EDIT: So I assumed that your intention is to make it work with multiple directories)
However multiple directories is supported by qiv, it doesn't work when trying to select more than one directory.
The following should work with "MDIR" (added DIRS variable), but the directory names cannot contain spaces.
(supporting that should probably be possible also, but needs more complex code)

Code: Select all

#!/bin/sh
#
# Launcher for the 'Q.I.V Slideshow' © Mike Walsh, Sep 2018 - with thanks to the 'Puppy' crew (and Fredx181 in particular) for assistance
#
export load_cmd='@bash -c "button_cmd %1 %2 %3 %4 %5 %6"'

function button_cmd () {
DIRS=$(echo $1 | sed 's|!| |g')
[ $3 = TRUE ] && FS="-f" || FS=""
[ $4 = FALSE ] && SB="-i" || SB=""
qiv -s $FS $SB -m -t -d $2 $DIRS
}
export -f button_cmd

yad --center --window-icon=/usr/local/lib/X11/pixmaps/qiv.png --title="Q.I.V Slideshow" --form --width=450 --text="     Please make your selections:-" \
--field="Choose image directory:-:MDIR" '/root' \
--field="Select timeout interval:-:NUM" '1' \
--field="Fullscreen:CHK" "TRUE" \
--field="Enable/disable status bar (full-screen only):CHK" "FALSE" \
--field="Run  Q.I.V  slideshow":fbtn "$load_cmd" \
--button="Information":qiv-gui-info.sh --button="Quit":1
Fred

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#498 Post by Mike Walsh »

Hi, Fred.

Mm! I've just discovered that about 'no spaces allowed in the directory name'.....literally this last few minutes.

Back in Xenial64 ATM. Couldn't work out why it was giving a problem with the 64-bit version, because this same directory viewed fine in the 32-bit version before I changed the space for an under-slash.....

Heigh-ho; never mind. It's behaving itself now.

(*shrug*)


Mike. :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#499 Post by fredx181 »

Hi Mike, I couldn't resist trying to improve :)
Selecting multiple directories works and directory names may contain spaces now.(oh, and added checkbox: "Recursively include all files")

Code: Select all

#!/bin/bash
#
# Launcher for the 'Q.I.V Slideshow' © Mike Walsh, Sep 2018 - with thanks to the 'Puppy' crew (and Fredx181 in particular) for assistance
# fredx181 20180907, supports now selecting multiple directories and directory names containing spaces
# and added checkbox "Recursively include all files"
# 
export load_cmd='@bash -c "button_cmd %1 %2 %3 %4 %5 %6"'

function button_cmd () {
[ $3 = TRUE ] && FS="-f" || FS=""
[ $4 = FALSE ] && SB="-i" || SB=""
[ $5 = TRUE ] && RC="-u" || RC=""
OLDIFS="$IFS"
IFS=$'\n'
qiv -s $FS $SB $RC -m -t -d $2 $(echo -e "$1" | tr '!' '\n')
IFS=$OLDIFS
}
export -f button_cmd

yad --center --window-icon=/usr/local/lib/X11/pixmaps/qiv.png --title="Q.I.V Slideshow" --form --width=450 --text="     Please make your selections:-" \
--field="Choose image directory:-:MDIR" '/root' \
--field="Select timeout interval:-:NUM" '1' \
--field="Fullscreen:CHK" "TRUE" \
--field="Enable/disable status bar (full-screen only):CHK" "FALSE" \
--field="Recursively include all files:CHK" "FALSE" \
--field="Run  Q.I.V  slideshow":fbtn "$load_cmd" \
--button="Information":qiv-gui-info.sh --button="Quit":1
Fred

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#500 Post by Mike Walsh »

Hi, Fred.

Hah! Y'know, this is in danger of turning into 'Fred's Q.I.V slideshow GUI...'... :lol: :lol:

Nah, you do what you like with it, mate. I know you like playing around with code; if, in the long run, this benefits the whole community by trying out new things (which can then be incorporated into other apps, etc.)......I'm all for that.

This was only a one-off 'experiment' on my part, trying things out for myself. You have fun with it.


Mike. :wink:

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#501 Post by step »

MochiMoppel wrote:
step wrote:I think my original intent was to output all "\n"s as newlines, including the "\n"s that are stored in $MULTILINE, so %b is correct (you were).
%s instead would only expand the "\n"s that separate the variables in printf %s "$MULTILINE\n$TYPELESS\n$FONT\n$COLOUR".
Well, yes, %b is correct but redundant, %s would be wrong, it would not even expand the "\n"s that separate the variables since the whole argument is one big string and it doesn't matter if the "\n"s are in the variables or between them. Just try it. The only difference to echo -e is that there is no final linefeed, making find "some_string" the same as echo -en "some_string". Only if you want to emulate echo -e you would need %b. The whole thing then would have to look like this: printf "%b\n" "some_string_with_escape_codes_in_it" . Confused? I hope not.
In embracing %b I was thinking of some not-so-common, but very possible cases, such as the example below. printf %b seems to be the most portable and error free of the four options.

Code: Select all

# echo -e '%s\n%'
%s
%
# printf '%s\n' '%s\n%'
%s\n%
# printf '%b\n' '%s\n%'
%s
%
# printf '%s\n%'

sh: printf: `%': missing format character
# 
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

close-on-unfocus Fails On Xtahr

#502 Post by johnywhy »

On xtahr, --close-on-unfocus option fails in the following command. The yad window stays open. The close-on-unfocus option works as expected in StretchDog and Linux Mint (hm, neither of which are puppies).

Code: Select all

#!/bin/sh
yad --scale --min-value 10 --max-value 1000 --value 600 --print-partial --undecorated --width 300 --fixed --sticky --mouse --on-top --escape-ok --no-buttons --close-on-unfocus --hide-value
i can't test in other puppies atm, as xtahr is my only installed puppy :shock:
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

Re: close-on-unfocus Fails On Xtahr

#503 Post by fredx181 »

johnywhy wrote:On xtahr, --close-on-unfocus option fails in the following command. The yad window stays open. The close-on-unfocus option works as expected in StretchDog and Linux Mint (hm, neither of which are puppies).

Code: Select all

#!/bin/sh
yad --scale --min-value 10 --max-value 1000 --value 600 --print-partial --undecorated --width 300 --fixed --sticky --mouse --on-top --escape-ok --no-buttons --close-on-unfocus --hide-value
i can't test in other puppies atm, as xtahr is my only installed puppy :shock:
Probably the included yad version in xtahr is too old, support for "--close-on-unfocus" is with newer version, e.g. 0.38 or higher.

Fred

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#504 Post by Mike Walsh »

@ johnywhy:-

I agree with Fred. A number of new 'options' have been made in the last 2 or 3 releases of YAD, so like as not you want a newer version.

It's extremely easy to compile YAD for yourself. Follow Smokey01's instructions, in the very first edition of the Puppy Newsletter - "Compiling YAD":-

http://smokey01.com/newsletters/2017/Ja ... 17.html#17

This is one item nobody should provide for you here. I honestly believe that every potential , and existing Puppian out there, even if they've never done so before, should at least compile YAD for themselves. It's incredibly easy, and only takes a couple of minutes.

If a complete nincompoop like me can do it, you must be able to..! ;D

EDIT:- Looks like there's something wrong with the version of YAD included in X-Tahr. I've had a copy of X-Tahr 2.0 for a while, so I opened 'er up and had a look at YAD. Instead of getting a version number from

Code: Select all

yad --version
...I got a whole raft of error messages, mostly relating to 'glib_critical' and 'g_type_init'. So it's definitely a new version needed, I think.....and for '--close-on-unfocus', it'll need to be at least v.0.38.0 or later.


Mike. :wink:
Last edited by Mike Walsh on Tue 11 Sep 2018, 20:40, edited 2 times in total.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#505 Post by johnywhy »

happy to compile :D
thx for links

(hopefully, future puppies will bundle the latest version)
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#506 Post by Mike Walsh »

johnywhy wrote:happy to compile :D
thx for links

(hopefully, future puppies will bundle the latest version)
@ johnywhy:-

Well, I know the two Xenialpups (32- & 64-bit) do both come with new versions. 32-bit Xenial comes with v0.38.0, 64-bit Xenial with v0.40.0. Upup Bionic comes with v0.40.0, too.

(Don't forget, you'll need the X-Tahr 2.0 devx SFS loaded for this.)


Mike. :wink:

User avatar
misko_2083
Posts: 114
Joined: Tue 08 Nov 2016, 13:42

Re: close-on-unfocus Fails On Xtahr

#507 Post by misko_2083 »

johnywhy wrote:On xtahr, --close-on-unfocus option fails in the following command. The yad window stays open. The close-on-unfocus option works as expected in StretchDog and Linux Mint (hm, neither of which are puppies).

i can't test in other puppies atm, as xtahr is my only installed puppy :shock:
The workaround is using xprop to monitor the changes in _NET_ACTIVE_WINDOW of the root window property and exit or kill the yad PID (with SIGUSR1 or SIGUSR2 signal) when that property changes.

From yad manual:

Code: Select all

USER DEFINED SIGNALS
       SIGUSR1
              Close dialog with 0 exit code.

       SIGUSR2
              Close dialog with 1 exit code.
That property contains the XID (X window ID) of the active window and changes when another window gets in focus.

Code: Select all

xprop -spy -root _NET_ACTIVE_WINDOW | read net_active_win ; exit

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#508 Post by Mike Walsh »

Hey, Fred.

Been having a shufti at johnywhy's 'Basic Brightness slider'. Now, I like the idea.....'cept it doesn't work for me.

I have an AMD CPU, not Intel.
I have absolutely nowt showing in '/sys/class/backlight'. The directory exists.....but it's empty.
I'm using an external monitor (it's a desktop).....not a lappie with built-in display.

--------------------------------------------
I've tried out several items that are supposed to do the job. 'Xbacklight'; nope. 'Xgamma'; mmmm....kind of ('cept it's really messing around with the gamma ramp, rather like RedShift does, instead of true brightness adjustment).

Perseverance pays off, it seems. I eventually found summat that would work for my setup.

From here:- https://askubuntu.com/questions/149054/ ... via-script

Apparently, most modern kernels detect your primary monitor as something like 'LVDS1' (???)

By using the code

Code: Select all

xrandr -q | grep " connected"
...the respondent probably gave a readout of his own monitor, which resulted in

Code: Select all

LVDS1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
And by substituting the first item into this command:-

Code: Select all

xrandr --output LVDS1 --brightness 0.5
.....it would set the respondent's screen to 50% of its brightness range. As it stood, though, it just kept throwing me errors.....and babbling on about CRT screens! :shock:

--------------------------------------------

Running that first command gives me

Code: Select all

# xrandr -q | grep " connected"
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
Substiting VGA-0 into that command, like so:-

Code: Select all

xrandr --output VGA-0 --brightness 0.5
.....works beautifully..!!

Min (0) is full 'dark'; max (1.0) is full 'bright'. You can use steps as small as .01, and the difference between them does show up. Now then; I've got a favour to ask.....of you, or anyone else who'd care to give some examples.

So far, I've got a tray icon set-up, and a script for my slider itself. Fairly straight-forward stuff. Tray icon:-

Code: Select all

#!/bin/sh
#
#YAD 'one-liner' from musher0 / fredx181, to place executable tray icon in notification area
#
yad --notification --text="Brightness control" --command='/usr/local/bin/EMBC.sh' --image='/usr/local/lib/X11/pixmaps/Bright.png' 2>/dev/null

....and this is what I have so far for the slider:-

Code: Select all

#!/bin/sh
#
# Slider for adjusting brightness on external monitor
#
yad --undecorated --on-top --geometry=450x70+550+650 --scale --value=75 --print-partial --button="Done":1
I was going to use '--close-on-unfocus', till I found that you've got to have something else 'open' to click on for that to work. Apparently, ROX's 'pinboard' doesn't count as a window as such.....unlike most 'standard' DE's. Johny was doing this in the Dogs; I've no idea what you use in those.

----------------------------------------

So:-

How would I translate a hundred .01-sized 'steps' to 100 percentage points on that slider? Variables, obviously, but, er.....how? (*Pretty please.....with sprinkles on?*) "bats eyelashes"

Any ideas as to the easiest way? Johny's translated the full available 'range' in 'sys/class/backlight, etc.', to the scale.......whereas I want to use 100, fixed-size'steps'. I can't really translate Johny's script to my requirements, 'cos I just don't know how to modify it.

I can grovel with the best of 'em..! :oops: :roll: :lol: I really am a 'noob' at this stuff.....but (as my old mum used to say when we were nippers), 'If you never ask.....'


Mike. :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#509 Post by fredx181 »

Hi Mike, with the help of johnywhy's script and your xrandr findings, I found that these work for me using xrandr:

The yad slider style from you with the 'Done' button:

Code: Select all

#!/bin/bash

# detect monitor
MON=$(xrandr -q | grep " connected" | cut -f1 -d ' ')
# find current xrandr brightness value
XR=$(xrandr --verbose | grep -i brightness | cut -f2 -d ' ' | head -n1)
BrCur=`awk "BEGIN {print $XR*100}"` # calculate, so e.g. 0.5 gets 50
BrMax="100"
BrMin="5"
yad --undecorated --on-top --geometry=450x70+550+650 --scale --value $BrCur --print-partial --min-value $BrMin --max-value $BrMax --button="Done":1 | while read BrNew; do
# division using awk, so xrandr value gets e.g. 0.5 rather than 50
xrandr --output $MON --brightness $(awk "BEGIN {print $BrNew/100}")
done
The yad slider style from johnywhy:

Code: Select all

#!/bin/bash

# detect monitor
MON=$(xrandr -q | grep " connected" | cut -f1 -d ' ')
# find current xrandr brightness value
XR=$(xrandr --verbose | grep -i brightness | cut -f2 -d ' ' | head -n1)
BrCur=`awk "BEGIN {print $XR*100}"` # calculate, so e.g. 0.5 gets 50
BrMax="100"
BrMin="5"
yad --scale --min-value $BrMin --max-value $BrMax --value $BrCur --print-partial --undecorated --width 300 --fixed --sticky --mouse --on-top --escape-ok --no-buttons --hide-value --close-on-unfocus | while read BrNew; do
# division using awk, so xrandr value gets e.g. 0.5 rather than 50
xrandr --output $MON --brightness $(awk "BEGIN {print $BrNew/100}")
done
I used awk for the calculations because the more simple bash calculation (like johnywhy used) didn't work, e.g. doesn't accept 0.1 or 0.7 (bash can operate only on integers)

EDIT: Tip: yad --geometry accepts negative values, so to get it at "bottom-right", you can use e.g.:

Code: Select all

--geometry=450x70-50-50
And it will appear at bottom-right, no matter what resolution you have.

Fred

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#510 Post by Mike Walsh »

Hi, Fred.

Well, thank you! (I wasn't expecting a solution straight off the bat, but.....anyway, I gotta learn this stuff, little by little.....)

Question, if I may? Is 'awk' actually a separate language used within Bash? I see from the one of the many man pages on this that it's a
"pattern-directed scanning and processing language"
(from here.)

I must confess, it seems a pretty powerful function in its own right. I'm slowly beginning to understand how Bash scripting is able to perform so much, simply by using combinations of various things together like this.....

I see you're using the '*' symbol in the print statement. Am I right in thinking that here it's simply being used as the 'multiplication' symbol, rather than a 'wild card'?

---------------------------------------------

Anyway; just tried it out, and.....it works beautifully, Fred. The whole reason I wanted to do this was because I liked the idea of a straight-forward true 'brightness' control; RedShift has one built-in, as you know, but it's actually manipulating the gamma ramp, and (on my monitor at least) I get slightly odd side-effects from it.

I gave Johny's a try, but I rather suspect that /sys/class/backlight is used exclusively by lappies, rather than desktops.....in very much the same way that a lot of the ACPI stuff is used more by laptops than desktops. And I also figured that I can't be the only one who would benefit from this.....I'd like this to be available to the whole community.

Why should laptops have all the fun? :lol:

That being the case, I'm going to have a bit more of a play around with the slider appearance - 'tart it up' a bit more, if you like - and I'll run up a .pet package for it. I'll probably supply a recent version of YAD for it, too, but I'll do so as a separate package this time, rather than building it in. I need to experiment with some of the older Pup's versions of YAD, and see if they'll work with everything I've utilised.

I still think having an up-to-date version of YAD is a good idea for all (very easy to compile, and it's fully backward-compatible, after all).....but it's not a high priority for everyone, I dare say.

BTW - I see why you set 5 as a minimum! That way, if you should happen to take your cursor away from the slider, you can just about see to return it to the correct place again. Although I may just raise that to 10; I don't think anyone wants a completely black screen, do they? And, er.....point taken about the 'negative' geometry values. The values I used put it in the right place for my screen, but it's an old 1024x768 monitor. Most folks have far higher-res monitors these days, so for them it would end up being nearer the middle! (*D'oh..!*)

Gracias, mi amigo! Image


Mike. :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#511 Post by fredx181 »

Hi Mike,
Question, if I may? Is 'awk' actually a separate language used within Bash?
It's separate program with its own binary, not a bash builtin.
I see you're using the '*' symbol in the print statement. Am I right in thinking that here it's simply being used as the 'multiplication' symbol, rather than a 'wild card'?
Yes, multiplication.
Anyway; just tried it out, and.....it works beautifully, Fred. The whole reason I wanted to do this was because I liked the idea of a straight-forward true 'brightness' control; RedShift has one built-in, as you know, but it's actually manipulating the gamma ramp, and (on my monitor at least) I get slightly odd side-effects from it.
Ok, good to hear it works. The "redshiftgui" btw, has also a 'normal' brightness control (not manipulating the gamma)

https://sourceforge.net/projects/redshiftgui/files/
I see why you set 5 as a minimum!
Yes, better for who's afraid of the dark :) Yes, 10 may be better (in fact it is the same as 0.1 setting for xrandr)

EDIT:
I'll probably supply a recent version of YAD for it, too, but I'll do so as a separate package this time, rather than building it in
I agree, always better to keep it separate, in case someone downloads your "brightness slider" .pet who's running a 64-bit OS.
If a 32-bit yad binary would be inside the pet, then yad probably doesn't work anymore on 64-bit (if it's being overwritten).

Fred

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#512 Post by step »

This >gist deals with an issue you may encounter while developing tabbed/paned yad dialogs. Killing the dialog (with kill [options]) may lead to unreleased shared memory. The linked script can assist in reclaiming the shared memory.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

Buttons labels not translated anymore...

#513 Post by Argolance »

Bonjour,
I recently upgraded yad 0.33 to the latest 0.40 release and, with some small modifications of my scripts using it (especially yad --notification > icon size) all is right. One thing though, the button labels are now in English (close, execute, ok, cancel and so on).
What's wrong?

Thanks.
Cordialement.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#514 Post by fredx181 »

Discussing Here about display of gif images for gtkdialog-splash.
Always thought display of animated .gif isn't possible with yad, but it is: with the --picture option, e.g:

Code: Select all

yad --picture --size=orig --filename=/usr/share/pixmaps/launch.gif --width=280 --height=190 --center --inc=2 --text="<b>Working...</b>" --no-buttons --undecorated --text-align=center --timeout=13
Fred
Attachments
try.gif
Display animated .gif with yad
(253.98 KiB) Downloaded 1014 times

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

Re: Buttons labels not translated anymore...

#515 Post by step »

Argolance wrote:Bonjour,
I recently upgraded yad 0.33 to the latest 0.40 release and, with some small modifications of my scripts using it (especially yad --notification > icon size) all is right. One thing though, the button labels are now in English (close, execute, ok, cancel and so on).
What's wrong?

Thanks.
Cordialement.
How did you upgrade, did you compile the project from github source? https://github.com/v1cont/yad
There you will find a folder named po, inside it a file named fr.po, which needs to be compiled into fr.mo with msgfmt -o fr.mo fr.po, and copied to /usr/share/locale/fr/LC_MESSAGES/yad.mo. This is the standard way to add translations for GNU gettext.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

Post Reply