wok-next view ctorrent-dnh/stuff/torrentbox @ rev 7448

gecko-mediaplayer: fix compile_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 30 12:49:24 2010 +0100 (2010-11-30)
parents
children
line source
1 #! /bin/sh
2 #
3 # Gtkdialog box to dl a torrent file with ctorrent throught a Xterm.
4 # - SliTaz GNU/Linux 2008.
5 #
6 VERSION=2008041
8 mkdir -p ~/Downloads
9 cd ~/Downloads
11 # We need at least a torrent filename.
12 #
13 export MOUNT_DIALOG='
14 <window title="Torrentbox" icon-name="drive-optical">
15 <vbox>
17 <text use-markup="true">
18 <label>
19 "
20 <b>SliTaz - Torrentbox</b>"
21 </label>
22 </text>
23 <text wrap="true" width-chars="54" use-markup="true">
24 <label>
25 "
26 Download a torrent file with ctorrent.
27 "
28 </label>
29 </text>
31 <frame Ctorrent options>
32 <hbox>
33 <text use-markup="true">
34 <label>"<b>Options :</b>"</label>
35 </text>
36 <entry>
37 <variable>DL_OPTS</variable>
38 </entry>
39 <button>
40 <input file icon="help"></input>
41 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x46 -T "ctorrent help" -e "ctorrent -h ; echo -e \"----\nENTER to continue...\" && read close"</action>
42 </button>
43 </hbox>
44 </frame>
46 <frame Download Torrent>
47 <hbox>
48 <text use-markup="true">
49 <label>"<b>File :</b>"</label>
50 </text>
51 <entry>
52 <variable>TORRENT</variable>
53 </entry>
54 <button>
55 <input file stock="gtk-open"></input>
56 <action type="fileselect">TORRENT</action>
57 </button>
58 </hbox>
59 </frame>
61 <hbox>
62 <button>
63 <label>Download</label>
64 <input file icon="forward"></input>
65 <action>exec xterm -T "Ctorrent download" -e "ctorrent $DL_OPTS \"$TORRENT\" ; echo -e \"----\nENTER to close window...\" && read close"</action>
66 </button>
67 <button>
68 <input file icon="exit"></input>
69 <action type="exit">Exit</action>
70 </button>
71 </hbox>
73 </vbox>
74 </window>
75 '
77 # Execute main dialog.
78 gtkdialog --program=MOUNT_DIALOG
80 exit 0