> Hi all,
>
> First off, greate work! I'm testing and playing with Yad for a few
> month now and it as beccome the new tool of choice for all SliTaz GNU/
> Linux GUi boxes/script that we need. We was using the unmaintained
> gtkdialog untill now and have somethinf like 5000 lines of code to
> move. We are splitting things in our new CGI web base admin tool and
> in Yad scripts taking advantage of all GTK functions.
>
> One thing who was nice with gtkdialog was the ability to build quite
> complex GUI mainly using GtkNetbook.
>
> I did a small guideline and example for other SliTaz devs if you want
> to have a look and a new packages notifier with your so cool --
> notification
>
> http://hg.slitaz.org/slitaz-dev-tools/file/tip/tazyad
> http://hg.slitaz.org/tazpkg/raw-file/tip/tazpkg-notify
>
> Our apps are fully gettextized so users can have Yad GUI in there
> native language, also to say that no problem to tranlate Yad script
> with standard POT files.
>
> That said I have a few small requests and a question (hope I dont miss
> somthing already implemented).
>
> * It would be nice to have an --exit or --kill option for
> notification
just click a middle button on an icon.
> * A way to have a custom icon for button would be sexy
> * A way to keep window open even if entry was validate (for a
> pemante search box on desktop)
>
> And my question of the day :-) My goal is to use --dnd to have a small
> window, with no decoration, no button and who will handle all dropped
> stuff. It will site in a corner of the screen and let user dl or open
> file, install packages, etc. It will also be a complement to our home
> made Web browser wich is 16kb and will stay unbloated. So having a
> tiny download manager with Yad would be perfect!
>
> I trid many thing but I'm unable to use --dnd --command=, can't get
> and use the DND data var in an embed function or an externel script.
yad --dnd --command "yad --text"
this command will show received data in a new yad window.
if you wish to use functions as a commands, export them first.
this is an example of such trick - http://code.google.com/p/yad/wiki/Notes
--
Victor Ananjevsky <anan...@gmail.com>
>
>
> Hi,
>
> > > О©Ґ О©Ґ * It would be nice to have an --exit or --kill option for
> Delivered-To
example of simple downloader
#! /bin/bash
# FlashGot arguments are: [URL] [REFERER] [POST]
DOWNLOAD_DIR=$HOME/Download
url=$1
case $url in
http*|ftp*)
filename=$(yad --file --save --confirm-overwrite \
--title="Downloader" --text="Select file name" \
--filename $DOWNLOAD_DIR/$(basename $url))
if [[ $? -eq 0 ]]; then
id=$(wget -c -b -o /tmp/wget-$$.log --referer="$2" --post-data="$3" -O "$filename" "$url" | egrep -o "[0-9]+")
tail -f --pid="$id" /tmp/wget-$$.log \
| sed -u -n 's/.*\.[ ]*\([[:print:]]*\)%[ ]*\([[:graph:]]*\) \([[:graph:]]*\)$/#\1% [\2] (\3)\n\1/p' \
| yad --title="Downloader" --no-markup --text "Download $url" --button=gtk-close --progress --percentage=0 --auto-close
rm -f /tmp/wget-$$.log
fi
;;
*)
yad --image=dialog-error --text="URI '$url' is not supported"
exit 1
;;
esac
save this code to $HOME/bin/dload.sh and try
yad --image=gtk-save --no-buttons --sticky --undecorated --geometry=-0-0 --dnd --command="$HOME/bin/dload.sh"
--
Victor Ananjevsky <anan...@gmail.com>
i'll add such option in a next release. as a workaround you may try to use devilspie (http://live.gnome.org/DevilsPie)
> Hugs,
> Delivered-To
--
Victor Ananjevsky <anan...@gmail.com>