Open GoogleCodeExporter opened 8 years ago
yad pass data from all columns to double-click action as an arguments. if you
wish to use only some of them, make an action as a shell function
#! /bin/bash
function call_browser () {
/usr/bin/chromium-browser "$1"
}
export -f call_browser
yad --title='Testing' --dclick-action='bash -c "call_browser %s"' --width=1000
--height=500 --list --column='Site' --column='Description'
'http://code.google.com/p/yad/' 'Yad info page'
Original comment by ananasik
on 16 Oct 2012 at 9:46
[deleted comment]
I can use this!
I 'forgot' to mention that i use yad in Freebasic. That's why i use ' instead
of "
and was trying to call yad in my code with:
code to extract bookmarksdata from html file to bookmarks.txt
shell "yad --list --title='...' ... "
...
I now made a script file with your code, let my program make a file:
bookmarks.txt and changed the following line in the script file:
yad --title='Testing' --dclick-action='bash -c "call_browser %s"' --width=1000
--height=500 --list --column='Site' --column='Description'
'http://code.google.com/p/yad/' 'Yad info page'
to:
bookmarks.txt|yad --title='Testing' --dclick-action='bash -c "call_browser %s"'
--width=1000 --height=500 --list --column='Site' --column='Date'
--column='Description'
Made the script file executable and use it as follows:
test.bas
code to extract bookmarksdata from html file to bookmarks.txt
shell "./bookmark.sh"
...
It would be easier if one could choose which column to 'execute', but i am
happy with this.
Thanks.
Original comment by rensvans...@gmail.com
on 16 Oct 2012 at 8:40
Original issue reported on code.google.com by
rensvans...@gmail.com
on 15 Oct 2012 at 7:36