slitaz-tools view tinyutils/burnbox @ rev 37

Rewrite tazx and add more screen size and colors choice
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 14 13:25:50 2008 +0100 (2008-01-14)
parents 6766819798c7
children adb072794713
line source
1 #! /bin/sh
2 #
3 # Gtkdialog box to burn ISO images using Wodim with basic options.
4 # - SliTaz GNU/Linux 2008.
5 #
6 VERSION=20080106
8 # Burn/wodim dialog box. Sleep a bit with progress bar to let user cancel
9 # ISO burning and exit when finished.
10 #
11 export BURN_DIALOG='
12 <vbox>
13 <text use-markup="true" width-chars="28">
14 <label>
15 "
16 <b>Burnbox working</b>
17 "
18 </label>
19 </text>
20 <progressbar>
21 <label>Please wait...</label>
22 <input>for i in 15 30 45; do echo $i; sleep 1; done; echo "Burning ISO..."; wodim speed=$SPEED dev=$DEVICE $OPTIONS $ISO_IMAGE >/dev/null; echo "Done..."; for i in 60 75 90; do echo $i; sleep 1; done; echo 100</input>
23 <action type="exit">Burned</action>
24 </progressbar>
25 </vbox>
26 '
28 # We need at least devive, speed and ISO image path.
29 #
30 export MOUNT_DIALOG='
31 <vbox>
33 <text use-markup="true">
34 <label>
35 "
36 <b>SliTaz - Burnbox</b>"
37 </label>
38 </text>
39 <text wrap="true" width-chars="54" use-markup="true">
40 <label>
41 "
42 Burn ISO images to CD or DVD writer using Wodim from cdrkit.
43 Please verify device writer setting, add options if wanted or
44 needed and select an ISO image file. Note : You can manipulate
45 ISO images with ISO Master utility.
46 "
47 </label>
48 </text>
50 <frame Configuration>
51 <hbox>
52 <text use-markup="true">
53 <label>"<b>Device :</b>"</label>
54 </text>
55 <entry>
56 <default>/dev/cdrom</default>
57 <variable>DEVICE</variable>
58 </entry>
59 </hbox>
60 <hbox>
61 <text use-markup="true">
62 <label>"<b>Speed :</b>"</label>
63 </text>
64 <entry>
65 <input>cat /proc/sys/dev/cdrom/info | grep "drive speed" | cut -f 3</input>
66 <variable>SPEED</variable>
67 </entry>
68 </hbox>
69 <hbox>
70 <text use-markup="true">
71 <label>"<b>Options :</b>"</label>
72 </text>
73 <entry>
74 <default>-eject -multi</default>
75 <variable>OPTIONS</variable>
76 </entry>
77 </hbox>
78 </frame>
80 <frame ISO image>
81 <hbox>
82 <text use-markup="true">
83 <label>"<b>File :</b>"</label>
84 </text>
85 <entry>
86 <variable>ISO_IMAGE</variable>
87 </entry>
88 <button>
89 <input file stock="gtk-cdrom"></input>
90 <action type="fileselect">ISO_IMAGE</action>
91 </button>
92 </hbox>
93 </frame>
95 <hbox>
96 <button>
97 <label>Burn</label>
98 <input file icon="forward"></input>
99 <action>echo "Burning $ISO_IMAGE..."</action>
100 <action>gtkdialog --program=BURN_DIALOG</action>
101 </button>
103 <button>
104 <input file icon="exit"></input>
105 <action type="exit">Exit</action>
106 </button>
107 </hbox>
109 </vbox>
110 '
112 # Execute main dialog.
113 gtkdialog --program=MOUNT_DIALOG
115 exit 0