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 Wed 26 Nov 2014, 10:17
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Zenity/Yad and scripts
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 5 of 5 Posts_count   Goto page: Previous 1, 2, 3, 4, 5
Author Message
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Fri 18 Oct 2013, 19:01    Post_subject:  

Yad still seems to be going ahead, the latest version is 0.23.1, the issue of text placement is fixed in " yad --text " it now can be centered, the window resizing is resolved and buttons can also be centered.

It's been very quite here in regard to Yad.
Code:
#!/bin/bash

process=`ps -u $USER | yad --list --title="Kill Process" --window-icon="process-stop" --buttons-layout=center --column "Please select a process to kill:" --text="List all $USER processes:" --width 350 --height 450`

ans=`echo $?`

   if test "$ans" -eq "0" ;
   then

      select=`echo $process | cut -d" " -f1`

      kill $select
         ans1=`echo $?`
         if [ "$ans1" == "0" ] ;
         then
         select1=`echo $process | cut -d":" -f3  | cut -d" " -f2`
          echo | yad --fixed --timeout="5" --title="Kill Process" --window-icon="process-stop" --buttons-layout=center --button="gtk-ok:0" --text-align="center" --borders="30" \
          --text="<big><big><b>${select1%|*}</b></big></big><big><b> was killed!</b></big>"
         else
          echo | yad --fixed --timeout="5" --title="Kill Process" --window-icon="process-stop" --buttons-layout=center --button="gtk-ok:0" --text-align="center" --borders="30" \
          --text="<big><big><b>Process</b></big></big><big><b> not found!</b></big>"
         fi
   exit 0
    fi
 
   if test "$ans" -eq "1" ;
   then
   exit 0
   fi
yad-0.23.1.tar.gz
Description  Yad version 0.23.1 compiled in Carolina
gz

 Download 
Filename  yad-0.23.1.tar.gz 
Filesize  57.3 KB 
Downloaded  176 Time(s) 

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE
Back to top
View user's profile Send_private_message 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Fri 06 Dec 2013, 16:41    Post_subject:  

Latest Yad compiled in Carolina.
Quote:
Victor Ananjevsky
Dec 6 (15 hours ago)

hi, list

new version (0.25.1) of yad is available for download
this is a bugfix release.

changes are:
- fix bug with popup menu of notification icon (http://code.google.com/p/yad/issues/detail?id=196)
- use normal hints for windows, so now window managers doesn't treats yad windows as a dialogs

yad-0.25.1-i486.pet
Description 
pet

 Download 
Filename  yad-0.25.1-i486.pet 
Filesize  97.68 KB 
Downloaded  171 Time(s) 
yad_DOC-0.25.1-i486.pet
Description 
pet

 Download 
Filename  yad_DOC-0.25.1-i486.pet 
Filesize  9.51 KB 
Downloaded  148 Time(s) 
yad_NLS-0.25.1-i486.pet
Description 
pet

 Download 
Filename  yad_NLS-0.25.1-i486.pet 
Filesize  55.68 KB 
Downloaded  144 Time(s) 

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8693

PostPosted: Fri 06 Dec 2013, 18:27    Post_subject:  

Quote:
It's been very quite here in regard to Yad.

It gets quietly used here Very Happy.
Did a redo of pburn using it recently just to try out various options.

Thanks for the update and supporting it and not being trapped in the box Smile

mike

Edited_time_total
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2579
Location: www.eussenheim.de/

PostPosted: Sat 07 Dec 2013, 03:44    Post_subject:  

Did work on a "redo of pmount" ymount http://www.murga-linux.com/puppy/viewtopic.php?t=69283&start=101 long time ago

Thanks for the update.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8693

PostPosted: Sat 07 Dec 2013, 04:24    Post_subject:  

Ah ymount...neat. ..playing with it now.

Did not know about yad when I rewrote pmount ... ended up around 3k and auto refreshing and faster but remained gtkdialog3...recently used that desktop widget thingy to make pseudo icons with it along with a revitalised mut for the backend .. was not sure if I could do it with yad but perhaps I could revisit it.

mike
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2579
Location: www.eussenheim.de/

PostPosted: Sat 07 Dec 2013, 05:45    Post_subject:  

mikeb wrote:
Ah ymount...neat. ..playing with it now.

Ymount was started by iguleder.
My contribution and interest was mainly addition of GUI language switchable between several languages from ymount-NLS.pet.
You can play with them, no need to add or change locale IIRC.

edit
Just switch between your installed locales Crying or Very sad
Back to top
View user's profile Send_private_message 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Fri 08 Aug 2014, 21:35    Post_subject:  

Yad 0.27.0 Updated: Aug 1 2014

YAD WIKI

Compiled in Carolina.

Changelog:
- add --hidden option to notification icon
- add --tooltip-column option to list dialog
- add --gtkrc option
- fix detection of expanding columns in list dialog
- fix markup handling
- add YAD_XID variable for dialogs children
- code cleanup for remove deprecated api
yad-0.27.0.pet
Description 
pet

 Download 
Filename  yad-0.27.0.pet 
Filesize  98 KB 
Downloaded  48 Time(s) 
yad_DOC-0.27.0.pet
Description 
pet

 Download 
Filename  yad_DOC-0.27.0.pet 
Filesize  9.76 KB 
Downloaded  41 Time(s) 
yad_NLS-0.27.0.pet
Description 
pet

 Download 
Filename  yad_NLS-0.27.0.pet 
Filesize  58.33 KB 
Downloaded  38 Time(s) 

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE
Back to top
View user's profile Send_private_message 
WoodLark


Joined: 17 Apr 2007
Posts: 69
Location: South Carolina, USA

PostPosted: Sun 12 Oct 2014, 14:52    Post_subject:  

When using YAD to open a file search dialogue, it is possible to set the start directory for the search as follows:

--filename "/home/user/directorytostartin/"

However when using a file search button within a form, this does not work:

--form
--field:FL "/home.user/directorytostartin/"

Is there a way to set the start directory within a form?
Back to top
View user's profile Send_private_message 
ASRI éducation


Joined: 09 May 2009
Posts: 2591
Location: France

PostPosted: Sun 12 Oct 2014, 15:43    Post_subject:  

Geoffrey wrote:
Yad 0.27.0 Updated: Aug 1 2014

Thank you Geoffrey!

_________________
Projet ASRI éducation => Association | Forum | Dépôt | Espace kids
Back to top
View user's profile Send_private_message Visit_website 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Sun 12 Oct 2014, 17:38    Post_subject:  

WoodLark wrote:
When using YAD to open a file search dialogue, it is possible to set the start directory for the search as follows:

--filename "/home/user/directorytostartin/"

However when using a file search button within a form, this does not work:

--form
--field:FL "/home.user/directorytostartin/"

Is there a way to set the start directory within a form?


Shouldn't that have a "="
Code:
--field=":FL" "/home.user/directorytostartin/"


Code:
# yad --help-form
Usage:
  yad [OPTION...] Yet another dialoging program

Form options
  --form                                         Display form dialog
  --field=LABEL[:TYPE]                           Add field to form (TYPE - H, RO, NUM, CHK, CB, CBE, FL, SFL, MFL, DIR, CDIR, MDIR, FN, DT, SCL, CLR, BTN, LBL or TXT)
  --align=TYPE                                   Set alignment of filed labels (left, center or right)
  --columns=NUMBER                               Set number of columns in form
  --separator=SEPARATOR                          Set output separator character
  --item-separator=SEPARATOR                     Set separator character for combobox or scale data
  --date-format=PATTERN                          Set the format for the returned date
  --scroll                                       Make form scrollable
  --quoted-output                                Quote dialogs output

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE
Back to top
View user's profile Send_private_message 
WoodLark


Joined: 17 Apr 2007
Posts: 69
Location: South Carolina, USA

PostPosted: Mon 13 Oct 2014, 13:22    Post_subject:  

Geoffrey wrote:
WoodLark wrote:
When using YAD to open a file search dialogue, it is possible to set the start directory for the search as follows:

--filename "/home/user/directorytostartin/"

However when using a file search button within a form, this does not work:

--form
--field:FL "/home.user/directorytostartin/"

Is there a way to set the start directory within a form?


Shouldn't that have a "="
Code:
--field=":FL" "/home.user/directorytostartin/"


Code:
# yad --help-form
Usage:
  yad [OPTION...] Yet another dialoging program

Form options
  --form                                         Display form dialog
  --field=LABEL[:TYPE]                           Add field to form (TYPE - H, RO, NUM, CHK, CB, CBE, FL, SFL, MFL, DIR, CDIR, MDIR, FN, DT, SCL, CLR, BTN, LBL or TXT)
  --align=TYPE                                   Set alignment of filed labels (left, center or right)
  --columns=NUMBER                               Set number of columns in form
  --separator=SEPARATOR                          Set output separator character
  --item-separator=SEPARATOR                     Set separator character for combobox or scale data
  --date-format=PATTERN                          Set the format for the returned date
  --scroll                                       Make form scrollable
  --quoted-output                                Quote dialogs output


You are correct. I left out the equals sign in my post. However, I had not left it out in my actual code, so I still have the problem.
Back to top
View user's profile Send_private_message 
WoodLark


Joined: 17 Apr 2007
Posts: 69
Location: South Carolina, USA

PostPosted: Mon 13 Oct 2014, 13:57    Post_subject:  

I believe I have solved this problem, but I am not really sure why my solution works. Here is my actual form code:

Code:

   response=$(yad --width=500 --title="SRRPC Club Mail" \
      --form \
      --button="NEXT" \
      --field="Distribution":CB \
         'Members!Officers' \
      --field="Subject" \
      --field="Message":FL '' '/root/SRRPC/Messages/*' \
      --field="Address":FL '/root/SRRPC/AddressLists/*' \
      ) ; echo $response


Note that I had to put an extra pair of single quotes in the "Message" field parameters, but not in the "Address" field parameters.

Without the extra quotes, the expression "/root/SRRPC/Messages/*" appeared as default text in the "Subject" field.

I am curious as to why this is so!

OK, I may have answered my own question. If I move the single quotes to the parameters of the "subject" field, it works the same way. This is probably where they belong anyway.

Code:

   response=$(yad --width=500 --title="SRRPC Club Mail" \
      --form \
      --button="NEXT" \
      --field="Distribution":CB \
         'Members!Officers' \
      --field="Subject" '' \
      --field="Message":FL '/root/SRRPC/Messages/*' \
      --field="Address":FL '/root/SRRPC/AddressLists/*' \
      ) ; echo $response
Back to top
View user's profile Send_private_message 
rg66


Joined: 23 Jul 2012
Posts: 595
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

PostPosted: Mon 13 Oct 2014, 21:15    Post_subject:  

Code:
response=$(yad --width=500 --title="SRRPC Club Mail" \
      --form \
      --button="NEXT" \
      --field="Distribution:CB" \
         "Members!Officers" \
      --field="Subject" "" \
      --field="Message:FL" "/root/SRRPC/Messages/*" \
      --field="Address:FL" "/root/SRRPC/AddressLists/*" \
      ) ; echo $response


You should also be quoting the :CB part and I've found that when using --form and you have a default for one field you need one for all of them so "" will work as a blank default.

Check out this page on yad which has better explanations than yad --help-all

http://rpm.pbone.net/index.php3/stat/45/idpl/20231177/numer/1/nazwa/yad

_________________
Carolite-1.2 / Carolina-1.2 / X-precise-2.4 / X-slacko-2.2
Carolina
X-precise/X-slacko
Back to top
View user's profile Send_private_message 
WoodLark


Joined: 17 Apr 2007
Posts: 69
Location: South Carolina, USA

PostPosted: Tue 14 Oct 2014, 10:41    Post_subject:  

rg66 wrote:
Code:
response=$(yad --width=500 --title="SRRPC Club Mail" \
      --form \
      --button="NEXT" \
      --field="Distribution:CB" \
         "Members!Officers" \
      --field="Subject" "" \
      --field="Message:FL" "/root/SRRPC/Messages/*" \
      --field="Address:FL" "/root/SRRPC/AddressLists/*" \
      ) ; echo $response


You should also be quoting the :CB part and I've found that when using --form and you have a default for one field you need one for all of them so "" will work as a blank default.

Check out this page on yad which has better explanations than yad --help-all

http://rpm.pbone.net/index.php3/stat/45/idpl/20231177/numer/1/nazwa/yad


Thank you, the documentation I had been able to find about YAD was not clear on where quote marks needed to be. In fact it seems to work whether you use the quotes or not (but I imagine there are cases where it would matter a great deal).

I'll just have to remember "default for one, default for all".
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 5 of 5 Posts_count   Goto page: Previous 1, 2, 3, 4, 5
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1130s ][ Queries: 13 (0.0073s) ][ GZIP on ]