YAD - Tips

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Re: "form-field-button"

#81 Post by Geoffrey »

Bert wrote:Maybe the GTK version is important? I have this:
Na, it's work as rg66 said, needs to be run in a bash script, not in a terminal, I just changed it to icons I have, tooltip works too.
Attachments
yadthing.png
(19.3 KiB) Downloaded 1290 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]

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#82 Post by Bert »

Great! Glad it's solved. :wink:
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

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

#83 Post by slavvo67 »

Has anyone noticed that you can drag your YAD scripts to the desktop and just click on them? Can't do that with a regular shell script. :-)

By the way, latest version is already 31.1

Actively being developed, for sure.

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#84 Post by Bert »

slavvo67 wrote:Has anyone noticed that you can drag your YAD scripts to the desktop and just click on them? Can't do that with a regular shell script. :-)
Hi Slavvo67,

Thanks for this tip. I knew this is possible for gtkdialog scripts, but didn't realize yad can do this too
By the way, latest version is already 31.1

Actively being developed, for sure.
Yes, nice to see such development.
Version 31.1 is just one bug fix for the new HTML function.
For compiling in this HTML, webkit must be installed.
I briefly looked into this while compiling: according to PPM some 76 MB needed to be downloaded....A bit much for one still unknown yad feature.
And also I don't know if the user also needs to have webkit aboard in order to enjoy the new HTML function.

Have a nice day!
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

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

#85 Post by Geoffrey »

I compiled the latest yad-0.31.1 in Carolina with html support, I'm making this post from Yad, seems to work ok.

Code: Select all

yad --html --browser --uri="murga-linux.com/puppy"
I'll update the repo and post in the Carolina thread when I've done so, it will need the webkit (7.5 MB) installed from the repo,
Attachments
yad-browser.png
(128.78 KiB) Downloaded 1212 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]

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#86 Post by Bert »

Congrats Geoffrey 8)
Looks like a very worthy addition to yad.

I know this was meant for Carolina, but I couldn't resist trying it in Puppy Precise... no luck:

Code: Select all

yad: error while loading shared libraries: libgstapp-0.10.so.0: cannot open shared object file: No such file or directory
If I could find a working webkit package for Precise, I would compile yad-0.31.1 for Precise.

Thanks.
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#87 Post by 666philb »

Bert wrote:Congrats Geoffrey 8)
Looks like a very worthy addition to yad.

I know this was meant for Carolina, but I couldn't resist trying it in Puppy Precise... no luck:

Code: Select all

yad: error while loading shared libraries: libgstapp-0.10.so.0: cannot open shared object file: No such file or directory
If I could find a working webkit package for Precise, I would compile yad-0.31.1 for Precise.

Thanks.
hi bert ,
libgstapp-0.10.so.0 is in libgstreamer-plugins-base0.10 from the PPM
webkit is also in precises PPM ... tick the .dev box as you'll probably need libwebkitgtk-dev for compiling
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#88 Post by Bert »

Thanks for trying to help me 666philb.

I tried, but compiling webkit is not for daydreamers like me. :wink:
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#89 Post by Bert »

Icon-only button:

Code: Select all

#!/bin/sh

yad --button="""!/root/spot/spot.png!Hey Spot..."
Again doesn't seem to work from terminal. Okay as a script.
Attachments
capture32115.png
(7.83 KiB) Downloaded 1111 times
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#90 Post by rcrsn51 »

Bert wrote:Icon-only button:

Code: Select all

#!/bin/sh

yad --button="""!/root/spot/spot.png!Hey Spot..."
Again doesn't seem to work from terminal. Okay as a script.
I have found that commands with exclamation marks don't work in the terminal.

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#91 Post by Bert »

rcrsn51 wrote: I have found that commands with exclamation marks don't work in the terminal.
Ah, thanks for that!
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

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

#92 Post by slavvo67 »

Geoffrey:

Oddly, your HTML example did not work for me in Quirky Unicorn:
yad --html --browser --uri="murga-linux.com/puppy"
I only receive the YAD box with the OK and Cancel buttons.

YAD Version: 0.31.1 (GTK+ 2.24.25)

By the way, I stumbled upon this YAD man page if anyone is interested:

https://www.mankier.com/1/yad#Options-Html_Options

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

#93 Post by Geoffrey »

slavvo67 wrote:Geoffrey:

Oddly, your HTML example did not work for me in Quirky Unicorn:
yad --html --browser --uri="murga-linux.com/puppy"
I only receive the YAD box with the OK and Cancel buttons.

YAD Version: 0.31.1 (GTK+ 2.24.25)

By the way, I stumbled upon this YAD man page if anyone is interested:

https://www.mankier.com/1/yad#Options-Html_Options
This format works for me

Code: Select all

yad --html --browser --uri="google.com" --no-buttons --geometry=800x500
Attachments
yadbrowser.png
(55.53 KiB) Downloaded 2329 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]

User avatar
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#94 Post by rg66 »

rcrsn51 wrote:I have found that commands with exclamation marks don't work in the terminal.
It works from cli with single quotes.
Attachments
Screenshot(2).jpg
(19.31 KiB) Downloaded 2123 times
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#95 Post by rcrsn51 »

Thanks. Why is bash mis-interpreting the ! inside double quotes?

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#96 Post by Bert »

Single quotes, double quotes...it doesn't matter in a script. What I learned from rg66 is that the "" I used to indicate "no button text", is not even needed.

So my code:

Code: Select all

#!/bin/sh
yad --button="""!/root/spot/spot.png!Hey Spot..."
can be written more elegantly:

Code: Select all

#!/bin/sh
yad --button="!/root/spot/spot.png!Hey Spot..."
Thanks rg66
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

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

#97 Post by slavvo67 »

@Geoffrey:

Do you happen to have Webkit 1.0 dev installed in the distro you're using?

I'm not getting a segmentation fault as described below but I'm not seeing websites.

http://sourceforge.net/p/yad-dialog/tickets/263/

It's really a minor issue for me but I'd love to get the feature working properly. I'm using Barry's QU.

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

#98 Post by Geoffrey »

slavvo67 wrote:@Geoffrey:

Do you happen to have Webkit 1.0 dev installed in the distro you're using?

I'm not getting a segmentation fault as described below but I'm not seeing websites.

http://sourceforge.net/p/yad-dialog/tickets/263/

It's really a minor issue for me but I'd love to get the feature working properly. I'm using Barry's QU.
I have both the webkit and webkit-dev in Carolina installed, you may have to compile yad with the webkit-dev for your particular version of puppy for it to work effectively.
I'll see if it works in any other pups I have and report back.

Well I tried the yad with webkit support with Tahr, Slacko and livid, had to install webkit in Slacko and livid, also glib-networks was needed.

Just need to run it from terminal to see what it's missing, I got a few glib object warnings but it still seems to work ok.

You are trying the correct yad package?, http://smokey01.com/carolina/pet_packag ... ersion.pet
[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]

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

#99 Post by slavvo67 »

Hi Geoffrey:

Thanks for your help. I'm going to leave this one alone as it seems easier to just create a menu and use the default browser via script. Thank you, though. I noticed you have a substantial set of pets for Carolina. I may need to revisit you Puppy.

UPDATE: YAD newest version is now 0.31.2

minor bugfix release availeble for download

in this release was fixed bug with segmentation fault in list dialog
when separators enabled but --sep-value is unset


Funny how Victor houses the program at Sourceforge but posts about the updates in the google forum.

Kind regards,

Slavvo67

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#100 Post by Bert »

Buttons NOT closing dialog

Code: Select all

 yad --button="Home":rox --button="Edit":geany --button="BFN"
Never thought it would be that simple :wink:
Found this in the man page slavvo67 posted. Thanks!
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

Post Reply