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 16 Oct 2017, 20:25
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 19 of 22 [321 Posts]   Goto page: Previous 1, 2, 3, ..., 17, 18, 19, 20, 21, 22 Next
Author Message
seaside

Joined: 11 Apr 2007
Posts: 915

PostPosted: Sun 22 Jan 2017, 21:32    Post subject:  

I have the same version-
Code:
yad --version
0.38.1 (GTK+ 2.24.30)


After "create folder" is clicked and a name entered, a "tab" writes the new folder and returns the dialog to a "no selected directory" mode.

Or you could click on the dark section to the right of the entry.

The path of the new directory is returned in both cases.

Cheers,
s
(Not exactly my idea of intuitive Very Happy )
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1401
Location: Brisbane, Australia

PostPosted: Sun 22 Jan 2017, 23:08    Post subject:  

@seaside,

Thanks.
I think "Enter" is more intuitive than "Tab", but that's life.
But, at least it's not just me.

@Geoffrey,
Thanks.
I'll try to give "0.36.3" a go to see if it is different for me.

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

Joined: 28 Oct 2008
Posts: 1401
Location: Brisbane, Australia

PostPosted: Mon 23 Jan 2017, 01:56    Post subject:  

@Geoffrey and seaside,
gyro wrote:
It all seems to work fine except when I use the "Create Folder" button. After typing in the name of the new folder I hit the "Enter" key, and nothing happens.
Using
Code:
yad --version
0.36.3 (GTK+ 2.24.30)
The "Enter" key does what I expect. It causes the new directory to be accepted and it gets opened.
So the remaining question is, do any of the versions between 0.36.3 and 0.38.1 function "correctly"?

gyro
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2301
Location: Queensland

PostPosted: Mon 23 Jan 2017, 03:06    Post subject:  

gyro wrote:
@Geoffrey and seaside,
gyro wrote:
It all seems to work fine except when I use the "Create Folder" button. After typing in the name of the new folder I hit the "Enter" key, and nothing happens.
Using
Code:
yad --version
0.36.3 (GTK+ 2.24.30)
The "Enter" key does what I expect. It causes the new directory to be accepted and it gets opened.
So the remaining question is, do any of the versions between 0.36.3 and 0.38.1 function "correctly"?

gyro


I'm most likely getting it wrong on what you want to do.
Code:
INIT_DIR="$(pwd)"
RET_DIR=$(yad --center --borders=6 --title "dircrypt - Select encrypted directory" \
        --file --directory --width=600 --height=400 --filename="$INIT_DIR/")
       
echo $RET_DIR

This works fine, create directory press enter or left mouse on new directory text to create and select directory,
OK button to confirm selected directory and continue to next script action, or Cancel button to abort.

_________________
Carolina: Recent Repository Additions

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

Joined: 28 Oct 2008
Posts: 1401
Location: Brisbane, Australia

PostPosted: Mon 23 Jan 2017, 17:23    Post subject:  

Geoffrey wrote:
I'm most likely getting it wrong on what you want to do.
Unfortunately, sort of yes.
I'm happy with the script code, as the rest of my script makes use of $RET_DIR.
My problem was with yad version 0.38.1, where the "Enter" key failed to do what I expected when using the "Create Folder" button in the select directory dialog.

Problem solved:
The "Enter" key works as expected in both yad version 0.36.3 and the recent 0.38.2.

@seaside,
Upgrade to yad 0.38.2 and the problem is fixed.

So the YAD tip is: avoid version 0.38.1

gyro
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2301
Location: Queensland

PostPosted: Mon 23 Jan 2017, 18:31    Post subject:  

gyro wrote:
So the YAD tip is: avoid version 0.38.1


Yes, https://groups.google.com/forum/#!forum/yad-common

Quote:
YAD 0.38.2 released

This is a bugfix release. One serious bug was fixed, update is highly recommended

Changes in this release:

- fix enter behavior

_________________
Carolina: Recent Repository Additions

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

Joined: 28 Oct 2008
Posts: 1401
Location: Brisbane, Australia

PostPosted: Mon 23 Jan 2017, 20:50    Post subject:  

Geoffrey wrote:
Buttons in --form --field are the width of the window
Code:
yad --form --field="test1:FBTN" "yad --text='test1'" \
--field="test2:FBTN" "yad --text='test2'" \
--field="test3:FBTN" "yad --text='test3'"
Thanks for this example, I find such a column of buttons quite useful as a kind of menu with each button executing a corresponding script.

gyro
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 931

PostPosted: Sun 05 Feb 2017, 06:18    Post subject:  

I see that some people are using YAD 0.38.2. I have upgraded too, from 0.36.3, but I think 0.38.2 bombs X11. Twice already I clicked a yad --entry dialog button and X11 crashed. The first time I found myself back at the console prompt, and had to restart X manually. The second time X restarted automatically. All this happened on Fatdog64-710.
My script involves closing the yad dialog with "kill -USR2 $YAD_PID", but I'm not positive this is connected to X11 crashing.

edited after vovchik's post below: X11 restarted again with yad 0.36.3, so this issue isn't version dependent. On to more investigation...

_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus

Last edited by step on Sun 05 Feb 2017, 08:37; edited 1 time in total
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1440
Location: Ukraine

PostPosted: Sun 05 Feb 2017, 07:05    Post subject:  

Dear step,

I am using the same version (0.38.2) and have not experienced your problem in Tahr, so I don't really think it is a "version" problem. I compiled YAD myself for Inetl and for my Raspberry PI. This runs fine on my various machines:

Code:

#!/bin/bash

function CLOSE_EXIT()
{
    echo "Close and exit..."
    kill -s SIGUSR1 $YAD_PID
} ; export -f CLOSE_EXIT

yad  --text "<b>Simple Dialog</b>" --button="OK:bash -c CLOSE_EXIT"


With kind regards,
vovchik
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 931

PostPosted: Sun 05 Feb 2017, 08:35    Post subject:  

Dear vovchik,

thank you. I'm using kill -USR1 in a similar fashion. I also don't think anymore that it's a "version" problem, because the X11 restart just happened again, this time with yad 0.36.3. I need to investigate further what's going on.

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

Joined: 12 Oct 2012
Posts: 1424
Location: The other Mr. 305

PostPosted: Wed 08 Feb 2017, 19:55    Post subject:  

Code:
   
yad --form --field="test1:FBTN" "yad --text='test1'" \
--field="test2:FBTN" "yad --text='test2'" \
--field="test3:FBTN" "yad --text='test3'"


Strangely, the above code just gives me the first box. Maybe it's my version of YAD? I'm using 37, which is I guess a bit dated now.....

Anyone?
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 2007
Location: Germany

PostPosted: Wed 08 Feb 2017, 20:02    Post subject:  

Image
Screenshot-2017-02-09-01-00-09.jpg
 Description   
 Filesize   41.67 KB
 Viewed   247 Time(s)

Screenshot-2017-02-09-01-00-09.jpg


_________________
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) Laughing

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! Wink
Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 1424
Location: The other Mr. 305

PostPosted: Wed 08 Feb 2017, 22:18    Post subject:  

Works in terminal but not as a script written via Geany and saved as an executable file. Anyone? Very strange to me...

More strange, it works now but this way:

yad --form --field="test1:FBTN" "yad --text='test1'" --field="test2:FBTN" "yad --text='test2'" --field="test3:FBTN" "yad --text='test3'"

Why does yad have to be typed over and over? I don't get it...

For some strange reason, when it's all one line; it works. When lines are separated with the \ and continued on the next line.... she doesn't work for me....
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2301
Location: Queensland

PostPosted: Thu 09 Feb 2017, 01:39    Post subject:  

slavvo67 wrote:
Works in terminal but not as a script written via Geany and saved as an executable file. Anyone? Very strange to me...

More strange, it works now but this way:

yad --form --field="test1:FBTN" "yad --text='test1'" --field="test2:FBTN" "yad --text='test2'" --field="test3:FBTN" "yad --text='test3'"

Why does yad have to be typed over and over? I don't get it...

For some strange reason, when it's all one line; it works. When lines are separated with the \ and continued on the next line.... she doesn't work for me....


yad --text='test1' is the sample function of yad --form --field="test1:FBTN", it displays a yad window with the text "test1" for the buttons field that's all, it can be any function you like

LazY Puppy try a more recent yad version.

Code:
#! /bin/bash
yad --form --field="test1:FBTN" "yad --text='test1'" \
--field="test2:FBTN" "yad --text='test2'" \
--field="test3:FBTN" "yad --text='test3'"


This in a bash script works for me
yad-field-buttons.jpg
 Description   
 Filesize   36.72 KB
 Viewed   224 Time(s)

yad-field-buttons.jpg


_________________
Carolina: Recent Repository Additions

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

Joined: 28 Oct 2008
Posts: 1401
Location: Brisbane, Australia

PostPosted: Thu 09 Feb 2017, 12:01    Post subject:  

From my memory of reading the changelog, the FBTN feature was introduced at version 0.26.0

Yad tip: To use the FBTN feature, use yad >= 0.26.0

Real example:
The main screen of "dircrypt", http://www.murga-linux.com/puppy/viewtopic.php?t=109598.

gyro
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 19 of 22 [321 Posts]   Goto page: Previous 1, 2, 3, ..., 17, 18, 19, 20, 21, 22 Next
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.1556s ][ Queries: 14 (0.0156s) ][ GZIP on ]