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 Mon 10 Dec 2018, 22:28
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 35 of 35 [521 Posts]   Goto page: Previous 1, 2, 3, ..., 33, 34, 35
Author Message
fredx181


Joined: 11 Dec 2013
Posts: 3573
Location: holland

PostPosted: Thu 13 Sep 2018, 10:34    Post subject:  

Hi Mike,

Quote:
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.

Quote:
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.

Quote:
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/

Quote:
I see why you set 5 as a minimum!

Yes, better for who's afraid of the dark Smile Yes, 10 may be better (in fact it is the same as 0.1 setting for xrandr)

EDIT:
Quote:
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

_________________
Dog Linux website
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1117

PostPosted: Tue 18 Sep 2018, 07:30    Post subject:
Subject description: Remove (yad) unreleased shared memory blocks (Linux)
 

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.
_________________
Fatdog64-800|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3483
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 13 Oct 2018, 12:05    Post subject: Buttons labels not translated anymore...  

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.

_________________

Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 3573
Location: holland

PostPosted: Sun 14 Oct 2018, 11:16    Post subject:  

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:
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
try.gif
 Description   Display animated .gif with yad
 Filesize   253.98 KB
 Viewed   364 Time(s)

try.gif


_________________
Dog Linux website
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1117

PostPosted: Sun 14 Oct 2018, 18:11    Post subject: Re: Buttons labels not translated anymore...  

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.

_________________
Fatdog64-800|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3483
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Mon 15 Oct 2018, 06:37    Post subject: Re: Buttons labels not translated anymore...  

Bonjour,
step wrote:
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.

Thank you for replying.
I compiled it from github source and the mo files were automatically generated. But it seems that the problem doesn't depend on any translation file but more on an integration of yad to the system. For example, gtkdialog has no translation file but all the main button labels of the gtkdialog GUIs are displayed in the current language.
It seems to me that there is something else to configure, but what and where?

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
Argolance


Joined: 06 Jan 2008
Posts: 3483
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Tue 04 Dec 2018, 18:28    Post subject:  

Bonjour,
Code:
yad --borders=10 --width=400 --undecorated --mouse --skip-taskbar --on-top --fixed --sticky\
       --entry-label="$(gettext 'Command:')" --entry --editable --entry-text list --column="command"\
       --button="$(gettext 'Clear list')!gtk-clear":2 --button="$(gettext 'Run')!gtk-execute":0 --button="$(gettext 'Cancel')!gtk-cancel":1

How could I add such a check box in the window?
Code:
yad --form --field check:chk

Additional question: why do I get this warning message in console:
Code:
(yad:17944): Gtk-WARNING **: Error loading icon from file 'yad':
   Couldn't recognize the image file format for file 'yad'

Thanks.
Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 3573
Location: holland

PostPosted: Thu 06 Dec 2018, 04:01    Post subject:  

Hi Argolance, something like this maybe ?

Code:
yad --borders=10 --width=400 --undecorated --mouse --skip-taskbar --on-top --fixed --sticky --form  \
--field "$(gettext 'Command:'): " "list" \
--field check:chk \
--button="$(gettext 'Clear list')!gtk-clear":2 --button="$(gettext 'Run')!gtk-execute":0 --button="$(gettext 'Cancel')!gtk-cancel":1


The first field can also be this (using "txt")
Code:
--field "$(gettext 'Command:'):txt" "list" \

But then the text window will be larger.

In your code you have also --column="command", I don't think it's doing anything, as far as I know it only applies for when using --list.

Quote:
Additional question: why do I get this warning message in console:
Code:
(yad:17944): Gtk-WARNING **: Error loading icon from file 'yad':
Couldn't recognize the image file format for file 'yad'

Could be because you don't have the yad icon in one of the icon paths.

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3483
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Yesterday, at 09:55    Post subject:  

Bonjour,
Thanks for replying.
(Sorry, I don't know why, but I do not receive any notification when replies are posted to the messages Confused !)
Your lines work - I already tried this - but the 3 buttons "Clear", "Run" and "Cancel" are not displayed anymore.
fredx181 wrote:
Could be because you don't have the yad icon in one of the icon paths.

The yad icon is in /usr/share/pixmaps. Probably due to the way I compiled yad (--prefix /usr)? Copying the icon to /usr/local/share/pixmaps solves the problem and this may give an answer to my question above about the button labels...

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4448
Location: King's Lynn, UK.

PostPosted: Yesterday, at 16:10    Post subject:  

@ Argolance:-

You don't necessarily need to worry about placing the icon in one of the *recognized* paths. You could put the icon anywhere you wanted to, as long as you then give the FULL path to its location.

I know folks think I'm odd.....because even though I place icons in the accepted 'paths', I still give the full path-name to make absolutely certain I get it!


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Argolance


Joined: 06 Jan 2008
Posts: 3483
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Today, at 06:44    Post subject:  

Bonjour,
Mike Walsh wrote:
I know folks think I'm odd.....because even though I place icons in the accepted 'paths', I still give the full path-name to make absolutely certain I get it!

I'm not of those who think so: I usually do the same! Wink
My script doesn't have any icon except the yad one (that I copied to /usr/local/share/pixmaps but should be ignored because the window is "undecorated") and the gtk stock icons for which the problem of the path does not arise either...
I recompiled yad but the standard button labels (ok, cancel..) are still in English while there were in French running the 0.30 yad version.

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 35 of 35 [521 Posts]   Goto page: Previous 1, 2, 3, ..., 33, 34, 35
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.1587s ][ Queries: 13 (0.0499s) ][ GZIP on ]