Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 18 Nov 2017, 06:32
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
YAD - Tips
Post new topic   Reply to topic View previous topic :: View next topic
Page 22 of 22 [321 Posts]   Goto page: Previous 1, 2, 3, ..., 20, 21, 22
Author Message
misko_2083


Joined: 08 Nov 2016
Posts: 19

PostPosted: Sun 06 Aug 2017, 20:46    Post subject: yad internet radio player  

Not so much stations in this little internet radio player, but at least got it working. Requres: mpv and yad

The radio stations are in a separate file, and should be in the same folder.
Otherwise, it can be this line in the script:
Code:
export pmrp_stations="stations"
pmrp.tar
Description 
tar

 Download 
Filename  pmrp.tar 
Filesize  20 KB 
Downloaded  45 Time(s) 
pmrp.png
 Description   
 Filesize   80.58 KB
 Viewed   353 Time(s)

pmrp.png

Back to top
View user's profile Send private message 
drxspace

Joined: 28 Jul 2017
Posts: 3

PostPosted: Tue 08 Aug 2017, 06:09    Post subject:  

Hello everyone,

as I've post here: https://groups.google.com/d/msg/yad-common/d4YLAE_3-5o/W0owMLv_FwAJ, I'm facing the same issue. Take for example the next code:
Code:
yad --form --width=320 --height=240 --borders=5 --fixed --center \
       --window-icon="system-software-install" --title="About ArchLinux Packages Viewer" \
       --image="system-software-install" --image-on-top \
       --text="<span font_size='medium' font_weight='bold'>View Lists of Installed Packages</span>\n\
These are packages from all enabled \nrepositories except for base and base-devel \nones. Also, you\'ll find packages that \nare locally installed such as AUR packages." \
       --buttons-layout="center" \
       --button=$"Κλείσιμο!window-close!Κλείνει το παράθυρο:0"


I would like to ask: Why the dialog window/form doesn't obey the --height=N rules?

Thanks for your prompt response to this matter.
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2657
Location: South Australia

PostPosted: Tue 08 Aug 2017, 06:29    Post subject:  

drxspace wrote:
Hello everyone,

as I've post here: https://groups.google.com/d/msg/yad-common/d4YLAE_3-5o/W0owMLv_FwAJ, I'm facing the same issue. Take for example the next code:
Code:
yad --form --width=320 --height=240 --borders=5 --fixed --center \
       --window-icon="system-software-install" --title="About ArchLinux Packages Viewer" \
       --image="system-software-install" --image-on-top \
       --text="<span font_size='medium' font_weight='bold'>View Lists of Installed Packages</span>\n\
These are packages from all enabled \nrepositories except for base and base-devel \nones. Also, you\'ll find packages that \nare locally installed such as AUR packages." \
       --buttons-layout="center" \
       --button=$"Κλείσιμο!window-close!Κλείνει το παράθυρο:0"


I would like to ask: Why the dialog window/form doesn't obey the --height=N rules?

Thanks for your prompt response to this matter.


It seems work to here: I changed the width and height and put the "N" in brackets, not that should make a difference.

My code:
Code:
yad --form --width="350" --height="130" --borders=5 --fixed --center \
       --window-icon="system-software-install" --title="About ArchLinux Packages Viewer" \
       --image="system-software-install" --image-on-top \
       --text="<span font_size='medium' font_weight='bold'>View Lists of Installed Packages</span>\n\
These are packages from all enabled \nrepositories except for base and base-devel \nones. Also, you\'ll find packages that \nare locally installed such as AUR packages." \
       --buttons-layout="center" \
       --button=$"Κλείσιμο!window-close!Κλείνει το παράθυρο:0"


What version of Yad are you using? yad --version
example.png
 Description   
 Filesize   13.32 KB
 Viewed   299 Time(s)

example.png


_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
drxspace

Joined: 28 Jul 2017
Posts: 3

PostPosted: Wed 09 Aug 2017, 06:32    Post subject:  

Hello,
thank you for your response.
smokey01 wrote:
What version of Yad are you using? yad --version

I'm running YAD 0.39.0 (GTK+ 3.22.18)

To be honest I've never thought that I could use string type values in these fields.

Anyway in order to address my problem I have to insist with with a different version of the same example.
In this version I removed some of the \n characters because I want my text, if possible, to be dynamically wrapped in the dialog window, also I removed the --fixed option...

Code:
yad --form --width="350" --height="130" --borders=5 --center --window-icon="system-software-install" --title="About ArchLinux Packages Viewer" --image="system-software-install" --image-on-top --text="<span font_size='medium' font_weight='bold'>View Lists of Installed Packages</span>\nThese are packages from all enabled repositories except for base and base-devel ones. Also, you\'ll find packages that are locally installed such as AUR packages." --buttons-layout="center" --button='Κλείσιμο!window-close!Κλείνει το παράθυρο:0'


...and the result was as shown below.

Why this behavior?

Thanks and again
About ArchLinux Packages Viewer.png
 Description   
 Filesize   15.23 KB
 Viewed   255 Time(s)

About ArchLinux Packages Viewer.png

Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2657
Location: South Australia

PostPosted: Thu 10 Aug 2017, 08:29    Post subject:  

@drxspace I am currently using yad 0.36.3 (GTK+ 2.24.31)

It may have something to do with gtk+3 or ArchLinux (assuming you are running Arch) as it's working fine here.

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
drxspace

Joined: 28 Jul 2017
Posts: 3

PostPosted: Thu 10 Aug 2017, 12:06    Post subject:  

Hi,
@smokey01 Yes, I'll agree with you it's probably a matter of GTK+ 3
Anyway, if I do not tire you, please have a look at the code below:
Code:
isitTheBlank=$(sed 's/[[:blank:]]*/·/g' <<<$"These are packages from all enabled repositories, except for base and base-devel ones. Also, you\'ll find packages that are locally installed, such as AUR packages.")

yad --form --width="350" --height="130" --borders=5 --center --window-icon="system-software-install" --title="About ArchLinux Packages Viewer" --image="system-software-install" --image-on-top --text="<span font_size='medium' font_weight='bold'>View Lists of Installed Packages</span>\n${isitTheBlank}" --buttons-layout="center" --button='Κλείσιμο!window-close!Κλείνει το παράθυρο:0'


Thank you for the remarks.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 22 of 22 [321 Posts]   Goto page: Previous 1, 2, 3, ..., 20, 21, 22
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0531s ][ Queries: 14 (0.0161s) ][ GZIP on ]