YAD - Tips

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#241 Post by B.K. Johnson »

@slavvo67
I saw the v0.36.2 pet mentioned in a thread with a link to it at Smokey's.

I have reverted to 0.12.4 so I can get some work done, but I will most certainly test your compile in tahr-6.0.5.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#242 Post by slavvo67 »

Ok. Just let me know if you're 32 bit or 64 bit so I can make one... I can't sleep, anyway so if you let me know and give me about an hour......

Hey, I didn't see the DEVX files for the Tahr 6.0.5 versions so I asked Phil to post them. I make one for each just so we have... (Found the DEVX files)

BTW - YAD had a significant update somewhere around version 25. One of the commands in there will really screw up in an older YAD. I don't recall which one, exactly but it'll come to me....

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#243 Post by slavvo67 »

Well, we might as well go bleeding edge. Both were compiled and tested in their respective versions of Tahr 6.0.5. I'm not sure if the PAE version will work in the non-PAE. Don't have a separate DEVX for that one so maybe some testing ???

YAD 37.0 for Tahr PAE 32 bit
https://drive.google.com/file/d/0B672gI ... sp=sharing

MD5: 098786907641d4c054acec99bf4a9a4a
SHA1: 91b7c027b27880c7fd3841c524d34417f0aa4473

SHA256: 5ea60ee07d43ba6d37ceaa4214424f67024fab14054d187d1b4ec218847238af

YAD 37.0 for Tahr64
https://drive.google.com/file/d/0B672gI ... sp=sharing

MD5: d9a144e4d6212ae850b08c09dadd2665
SHA1: a246c8b13a26d9063b85b7c8a3a70adb885b01d5
SHA256:
acf4ed42ad33c71a2615d04a658f443ce4716cbee556146849c2b70d062a3953

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#244 Post by B.K. Johnson »

@slavvo67
YAD 37.0 for Tahr PAE 32 bit downloaded. MD5 OK. Problem persists.

I think it is a problem with the flash drive.

Thanks for your intervention, although no success ...for now :( .
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#245 Post by slavvo67 »

Well, I tried. Interesting is that I get an error when trying to install the YAD37 64bit into Quirky Xerus. When I unpackage the .pet and drag the YAD program to /usr/bin, it works like a charm.

I'll need to look at that closer. For convenience, I use Pet Maker Plus to make the pets. I wonder if there's a glitch there, somewhere. Anyway, it works in the distro in which it was compiled, Tahr64.

If I can suggest using one of Barry's Quirky distro's if you're going the USB route. I think the Woof-CE distros are still primarily focused on cd / dvd burn. To me, Quirky provides a true USB environment. That's to take nothing away from Tahr, which is a real good distro!

Best,

Slavvo67

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#246 Post by B.K. Johnson »

@slavvo67
If I can suggest using one of Barry's Quirky distro's if you're going the USB route. I think the Woof-CE distros are still primarily focused on cd / dvd burn. To me, Quirky provides a true USB environment. That's to take nothing away from Tahr, which is a real good distro!
The only Quirky I ever used was 4.3.1. Barry says Quirkies are not puppies and I don't do quirkies. Quirky is Barry's toy, his lab for trying out ideas. I expected that after he had pursued an idea and was satisfied that it had merit, we would see him create a legitimate puppy from time to time that incorporated those ideas. That's not the way it seems to be going. If a dev likes something in a quirky offering and uses it in true pup, that's another matter.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#247 Post by B.K. Johnson »

Found in the yad mailing list.
yad 0.33.0 and 0.33.1 do not show text with --timeout option
I have a user on on Fedora 23 with the following issue

yad --title='Title' --button 'Button:0' --text='Hello' --width=150 --height=80

shows the text "Hello", but

yad --title='Title' --button 'Button:0' --text='Hello' --width=150 --height=80 --timeout=5

does not show the text.

For the user it was working on yad-0.32.0-1.fc23.x86_64

Thanks
Oliver
The solution from Victor Ananjevsky (yad creator)
delete yad config file ($XDG_CONFIG_HOME/yad.conf)
What path is $XDG_CONFIG_HOME?
A search for yad.conf found 1 at /root/.config/

[EDIT]
With the deletion of /root/.config/yad.conf, timeout now works in these tested versions: 0.12.4, 0.36.2 and 0.37.
ISSUE FIRST RAISED HERE IS NOW SOLVED.
Last edited by B.K. Johnson on Sun 04 Sep 2016, 14:50, edited 2 times in total.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#248 Post by Semme »

:idea: Load "env" into a shell. You'll then learn the path for >> $XDG_CONFIG_HOME

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#249 Post by B.K. Johnson »

Thanks Semme.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#250 Post by B.K. Johnson »

I AM A NON-PROGRAMMER!
I am writing in bash and gtkdialog.
For debugging purposes, I wrote something like:

Code: Select all

case $DIRECTION in
south) echo "Travelling south"
exit;;
north) echo "Travelling north"
exit;;
esac
That worked in the script, but wanting to use yad, the prog being gui based, I tried replacing echo as below

Code: Select all

case $DIRECTION in
south)
yad --title "Direction" --text="You are going South" --timeout=5
yad --title "Direction" --text="If that's not the direction you wish, then turn back"
exit;;
north)
yad --title "Direction" --text="You are going North" --timeout=5
yad --title "Direction" --text="If that's not the direction you wish, then turn back"
exit;;
esac
I encountered the usual incomprehensible error message about syntax error near a token in line x.

Putzing around with the code, I eventually got this to work:

Code: Select all

case $DIRECTION in
south)
yad --title "Direction" --text="You are going South" --timeout=5;
yad --title "Direction" --text="If that's not the direction you wish, then turn back";
exit;;
north)
yad --title "Direction" --text="You are going North" --timeout=5;
yad --title "Direction" --text="If that's not the direction you wish, then turn back";
exit;
esac	
but I don't know why. Or if there's a better way? Would braces work and be preferable? Does a single semicolon end a statement? Does a double semicolon end a case segment? Obviously, new line does not signify execution. Is this a bashism or gtkdialog issue?

Comments and help solicited. Thanks.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#251 Post by MochiMoppel »

B.K. Johnson wrote:That worked in the script, but wanting to use yad, the prog being gui based, I tried replacing echo as below

Code: Select all

case $DIRECTION in
south)
yad --title "Direction" --text="You are going South" --timeout=5
yad --title "Direction" --text="If that's not the direction you wish, then turn back"
exit;;
north)
yad --title "Direction" --text="You are going North" --timeout=5
yad --title "Direction" --text="If that's not the direction you wish, then turn back"
exit;;
esac
I encountered the usual incomprehensible error message about syntax error near a token in line x.
I don't. Syntax is correct and code works fine.

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#252 Post by B.K. Johnson »

Thanks MochiMoppel
What you did was insert/add the missing semicolon near the end of my script.

Follow-up Q:
What if I wanted to add a 'catch all' in the case statement; what would I add/change? Thanks in advance.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#253 Post by 6502coder »

Add a case named "*" to implement a catch-all.
It has to be the last case, and like all other cases, it is terminated with ";;"

E.g.

Code: Select all

case $DIRECTION in
south)
yad --title "Direction" --text="You are going South" --timeout=5
yad --title "Direction" --text="If that's not the direction you wish, then turn back"
exit;;
north)
yad --title "Direction" --text="You are going North" --timeout=5
yad --title "Direction" --text="If that's not the direction you wish, then turn back"
exit;;
*)
   Stuff to do in all other cases...
;;
esac 

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#254 Post by MochiMoppel »

B.K. Johnson wrote:Thanks MochiMoppel
What you did was insert/add the missing semicolon near the end of my script.
I didn't insert/add anything. I quoted your code.

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#255 Post by B.K. Johnson »

@6502coder
Thanks

@MochiMoppel
You are correct, of course :lol: . My mistake; blame it on the eyes, not the brain :oops: .

Both of you guys are a great help. Much appreciated.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#256 Post by mcewanw »

Anyone know if there is a 'width' attribute for buttons in YAD, and if so, how to use it? (to change the displayed width of buttons)

William
github mcewanw

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#257 Post by MochiMoppel »

There is no 'width' attribute for buttons. Button width for all buttons is determined by the width of the widest button. You can add spaces to the button with the longest label to make all buttons wider.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#258 Post by Geoffrey »

Buttons in --form --field are the width of the window

Code: Select all

yad --form --field="test1:FBTN" "yad --text='test1'" \
--field="test2:FBTN" "yad --text='test2'" \
--field="test3:FBTN" "yad --text='test3'"
Attachments
yad-button.jpg
(8.64 KiB) Downloaded 1317 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#259 Post by mcewanw »

Thanks for the button width information. Good to know.

William
github mcewanw

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

multiprogress dialog tip

#260 Post by misko_2083 »

Hi everyone,
Check my youtube-dl wrapper for youtube. works for youtube lists and videos. Has two GUIs. I figure someone will find it usefull because it supports multiple downloads at the same time and displays a multiprogress dialog. Cheers

https://github.com/Misko-2083/yt-get/blob/master/yt-get
Image

Post Reply