Page 6 of 42

Posted: Fri 09 Oct 2015, 19:26
by Bert
My impression is most people in this thread are experienced yad-coders, to whom my examples are probably boring. My apologies to you, I'm only sharing my learning process for other yad-beginners and to possibly help build a small examples library for smokey01. (Victor's examples are often way above beginners level)

Form-field-buttons:

Last night I was reading this in the Mankier Yad Manual, under "Form options":
Initial value is a command which is running when button is clicked. A special sympols %N in command are replaced by value of field N.
A bit cryptic, but I could smell a solution in there...
>>Does anyone understand his %N method?<< Hours after bedtime, I gave up and almost accidentally found my own solution. So today, I tried to build something useful...a yad-panel:

Code: Select all

#!/bin/sh

yad --form --undecorated --no-buttons --geometry="+0+0" \
       --columns="1" \
       --field="!./icons/file-manager.png! Rox :fbtn" "rox $HOME" \
       --field="!./icons/terminal-icon.png! lxterminal :fbtn" lxterminal \
       --field="!./icons/mozicon64.png! Palemoon :fbtn" /mnt/home/palemoon/palemoon \
       --field="!./icons/Apps-geany-icon.png! Geany :fbtn" geany \
       --field="!./icons/Paint.png! mtPaint :fbtn"  /usr/bin/mtpaint \
       --field="!./icons/seamonkey.png! Composer :fbtn" mozedit \
Happy Bert :)
It's fun to just play with the value in --columns:
One column:
Image

Three columns:
Image

Six columns:
Image

Here's my desktop with yad-panel:
Image
It works really well. I like it and think it's worth developing further.

If anyone wants to play with this script, I've attached it here. Download and unpack it anywhere. It's a very small script, the weight comes from the quality icons. Most of the icons come from iconarchive.com and I've compressed them without quality loss with the help of TinyPNG.

Have a nice weekend!

Posted: Sat 10 Oct 2015, 17:38
by stemsee
yad-0.31.2 --enable-html

Posted: Sat 10 Oct 2015, 19:45
by Bert
Thank you stemsee!

It's working great in both Precise 5.7.2 and Librepup. 8)
The html --browser function opens without errors, but does not open the url.
But that's not your problem: I still have to find out how to add webkit to both Precise and Librepup.
Thanks again,
Bert

Posted: Tue 13 Oct 2015, 10:46
by stemsee
popcorntime has nw.pak webkit archive, but I do not know how to open the binary to see the code to call/use this archive format. It is node-webkit.

Posted: Fri 06 Nov 2015, 23:05
by Bert
--image-on-top

I'm struggling with this one:

Code: Select all

#!/bin/sh
yad  --image="/root/Johannes_Itten_die-Begegnung_1916.jpg"  \
		--text="\"Die Begegnung\" (\"The encounter\") is a painting by Johannes Itten, 1916"
gives this result:
Image
If I add "--image-on-top" to the script:

Code: Select all

#!/bin/sh
yad  --image="/root/Johannes_Itten_die-Begegnung_1916.jpg" --image-on-top \
		--text="\"Die Begegnung\" (\"The encounter\") is a painting by Johannes Itten, 1916"
the result is:
Image
Hmm, image not really on top..

If I add more text, this is the result:
Image
So we're back to --image-NOT-on-top :wink:

Has anybody mastered --image-on-top?
Thanks.

image-on-top

Posted: Sat 07 Nov 2015, 01:24
by seaside
Bert,

It seems that "image-on-top" isn't what it appears to be. :D

https://code.google.com/p/yad/issues/detail?id=113

Cheers,
s

Posted: Sat 07 Nov 2015, 05:04
by rg66
Can't get the image centered but can trick it to show the text underneath by adding blank lines.
yad --text="\n\n\n\nThis is a test" --image="/usr/share/pixmaps/firefox48.png"
More tricks:

Code: Select all

yad --text="\n      <b>Title</b>\n\n\n\nThis is a test" --image="/usr/share/pixmaps/firefox48.png"

Re: image-on-top

Posted: Sat 07 Nov 2015, 13:27
by Bert
seaside wrote:Bert,

It seems that "image-on-top" isn't what it appears to be. :D

https://code.google.com/p/yad/issues/detail?id=113

Cheers,
s
Ah OK, thanks!

Posted: Sat 07 Nov 2015, 13:30
by Bert
rg66 wrote:Can't get the image centered but can trick it to show the text underneath by adding blank lines.
yad --text="\n\n\n\nThis is a test" --image="/usr/share/pixmaps/firefox48.png"
More tricks:

Code: Select all

yad --text="\n      <b>Title</b>\n\n\n\nThis is a test" --image="/usr/share/pixmaps/firefox48.png"
Thanks for the tricks rg66.

YAD 32.0

Posted: Wed 25 Nov 2015, 03:04
by slavvo67
YAD 32.0 compiled in Quirky Unicorn.

https://copy.com/1TiI9bckdABFUJNa

The changes are listed in the following post. Just don't ask me how to use them. :lol:

Follow YAD fixes

Posted: Wed 25 Nov 2015, 03:14
by slavvo67
Victor's Updates for 32.0 per Google Forum :

YAD 0.32.0 released

Changes in this release:
- enable rules-hint for icons list in icon browser
- add --splash options (thanks to Konstantin Baierer)
- add --no-focus option
- fix timeout progressbar layout for gtk3 builds
- add --num-output option for output index of active element in combo-boxes

YAD 31.3 Changes

New 0.31.3 bugfix release of YAD available for download

This release fixes setting default value for completion entry in form
dialog

Posted: Wed 25 Nov 2015, 10:51
by Geoffrey
Yad html browser to run flash swf games, needs flash and webkit installed to work.

Code: Select all

yad --title="Pacman" --window-icon="/usr/share/pixmaps/pacman.png" --html --browser --uri="./pacman.swf" --no-buttons --geometry="800x600"

Posted: Wed 25 Nov 2015, 22:58
by slavvo67
Dang Webkit! Why do you mock me so!! :roll:

Posted: Fri 27 Nov 2015, 12:55
by stemsee
Me too!

Posted: Fri 27 Nov 2015, 12:55
by stemsee
Me too!

Posted: Fri 27 Nov 2015, 12:55
by stemsee
Me too!

Posted: Mon 04 Jan 2016, 04:00
by slavvo67
YAD 33.0 Pet. Now, I'm putting a YAD changes text file in root so all can see what's been added.

https://copy.com/JJZAd0afRdX7el8P

Best,

Slavvo67

Posted: Sun 24 Jan 2016, 20:46
by slavvo67
YAD 33.1 tested for Vivid and Upup Precise. Should work for most. I created the others posted in this thread in Quirky Unicorn and noticed they didn't work in some other Puppies.

https://copy.com/a9YhztWGAVlJF2jU

Posted: Fri 29 Jan 2016, 15:16
by step
I got word from a fried that (untested by me):

the recent update to yad - 0.33.1 (GTK+ 2.24.10) breaks all dialogs with time outs in them.

The fix is to delete the yad config file.

It is at one or two places:

rm $XDG_CONFIG_HOME/yad.conf

and/or

rm $HOME/.config/yad.conf

Posted: Mon 21 Mar 2016, 22:05
by stemsee
I don't know if anyone found this, but if you want a yad form with entry box showing 'default' values it works like this.

Code: Select all

yad --title "Eduroam University WiFi Connection Tool:" \
--form --field="Your University id:" -text "abc123" -entry \
--field="Your University password" -text "aBcD3210" -entry --field="Interface:" -text "wlan0" -entry
for the password field I wanted to used --hide-text eg

Code: Select all

yad --title "Life" --form --field="love" --entry --hide-text
That works but only as a single line occurrence, in among several fields it doesn't work ... for me! Anyone?