slitaz-tools rev 38

Set window title and icon for *box
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 14 16:28:04 2008 +0100 (2008-01-14)
parents c1064e88ccb1
children 8b562f767838
files tinyutils/burnbox tinyutils/mountbox tinyutils/netbox tinyutils/subox
line diff
     1.1 --- a/tinyutils/burnbox	Mon Jan 14 13:25:50 2008 +0100
     1.2 +++ b/tinyutils/burnbox	Mon Jan 14 16:28:04 2008 +0100
     1.3 @@ -3,12 +3,13 @@
     1.4  # Gtkdialog box to burn ISO images using Wodim with basic options.
     1.5  # - SliTaz GNU/Linux 2008.
     1.6  #
     1.7 -VERSION=20080106
     1.8 +VERSION=20080114
     1.9  
    1.10  # Burn/wodim dialog box. Sleep a bit with progress bar to let user cancel
    1.11  # ISO burning and exit when finished.
    1.12  #
    1.13  export BURN_DIALOG='
    1.14 +<window title="Burnbox working" icon-name="dialog-warning">
    1.15    <vbox>
    1.16      <text use-markup="true" width-chars="28">
    1.17        <label>
    1.18 @@ -23,90 +24,92 @@
    1.19        <action type="exit">Burned</action>
    1.20      </progressbar>
    1.21    </vbox>
    1.22 +</window>
    1.23  '
    1.24  
    1.25  # We need at least devive, speed and ISO image path.
    1.26  #
    1.27  export MOUNT_DIALOG='
    1.28 -<vbox>
    1.29 +<window title="Burnbox" icon-name="drive-optical">
    1.30 +  <vbox>
    1.31  
    1.32 -  <text use-markup="true">
    1.33 -    <label>
    1.34 +    <text use-markup="true">
    1.35 +      <label>
    1.36  "
    1.37  <b>SliTaz - Burnbox</b>"
    1.38 -    </label>
    1.39 -  </text>
    1.40 -  <text wrap="true" width-chars="54" use-markup="true">
    1.41 -    <label>
    1.42 +      </label>
    1.43 +    </text>
    1.44 +    <text wrap="true" width-chars="54" use-markup="true">
    1.45 +      <label>
    1.46  "
    1.47  Burn ISO images to CD or DVD writer using Wodim from cdrkit.
    1.48  Please verify device writer setting, add options if wanted or
    1.49  needed and select an ISO image file. Note : You can manipulate 
    1.50  ISO images with ISO Master utility.
    1.51  "
    1.52 -    </label>
    1.53 -  </text>
    1.54 +      </label>
    1.55 +    </text>
    1.56    
    1.57 -  <frame Configuration>
    1.58 -  <hbox>
    1.59 -    <text use-markup="true">
    1.60 -      <label>"<b>Device     :</b>"</label>
    1.61 -    </text>
    1.62 -    <entry>
    1.63 -      <default>/dev/cdrom</default>
    1.64 -      <variable>DEVICE</variable>
    1.65 -    </entry>
    1.66 -  </hbox>
    1.67 -  <hbox>
    1.68 -    <text use-markup="true">
    1.69 -      <label>"<b>Speed     :</b>"</label>
    1.70 -    </text>
    1.71 -    <entry>
    1.72 -      <input>cat /proc/sys/dev/cdrom/info | grep "drive speed" | cut -f 3</input>
    1.73 -      <variable>SPEED</variable>
    1.74 -    </entry>
    1.75 -  </hbox>
    1.76 -  <hbox>
    1.77 -    <text use-markup="true">
    1.78 -      <label>"<b>Options  :</b>"</label>
    1.79 -    </text>
    1.80 -    <entry>
    1.81 -      <default>-eject -multi</default>
    1.82 -      <variable>OPTIONS</variable>
    1.83 -    </entry>
    1.84 -  </hbox>
    1.85 -  </frame>
    1.86 +    <frame Configuration>
    1.87 +      <hbox>
    1.88 +        <text use-markup="true">
    1.89 +          <label>"<b>Device     :</b>"</label>
    1.90 +        </text>
    1.91 +        <entry>
    1.92 +          <default>/dev/cdrom</default>
    1.93 +          <variable>DEVICE</variable>
    1.94 +        </entry>
    1.95 +      </hbox>
    1.96 +      <hbox>
    1.97 +        <text use-markup="true">
    1.98 +          <label>"<b>Speed     :</b>"</label>
    1.99 +        </text>
   1.100 +        <entry>
   1.101 +          <input>cat /proc/sys/dev/cdrom/info | grep "drive speed" | cut -f 3</input>
   1.102 +          <variable>SPEED</variable>
   1.103 +        </entry>
   1.104 +      </hbox>
   1.105 +      <hbox>
   1.106 +        <text use-markup="true">
   1.107 +          <label>"<b>Options  :</b>"</label>
   1.108 +        </text>
   1.109 +        <entry>
   1.110 +          <default>-eject -multi</default>
   1.111 +          <variable>OPTIONS</variable>
   1.112 +        </entry>
   1.113 +      </hbox>
   1.114 +    </frame>
   1.115     
   1.116 -  <frame ISO image>
   1.117 +    <frame ISO image>
   1.118 +      <hbox>
   1.119 +        <text use-markup="true">
   1.120 +          <label>"<b>File :</b>"</label>
   1.121 +        </text>
   1.122 +        <entry>
   1.123 +          <variable>ISO_IMAGE</variable>
   1.124 +        </entry>
   1.125 +        <button>
   1.126 +          <input file stock="gtk-cdrom"></input>
   1.127 +          <action type="fileselect">ISO_IMAGE</action>
   1.128 +        </button>
   1.129 +      </hbox>
   1.130 +    </frame>
   1.131 +    
   1.132      <hbox>
   1.133 -      <text use-markup="true">
   1.134 -        <label>"<b>File :</b>"</label>
   1.135 -      </text>
   1.136 -      <entry>
   1.137 -        <variable>ISO_IMAGE</variable>
   1.138 -      </entry>
   1.139        <button>
   1.140 -        <input file stock="gtk-cdrom"></input>
   1.141 -        <action type="fileselect">ISO_IMAGE</action>
   1.142 +        <label>Burn</label>
   1.143 +        <input file icon="forward"></input>
   1.144 +        <action>echo "Burning $ISO_IMAGE..."</action>
   1.145 +        <action>gtkdialog --program=BURN_DIALOG</action>
   1.146 +      </button>
   1.147 +      <button>
   1.148 +        <input file icon="exit"></input>
   1.149 +        <action type="exit">Exit</action>
   1.150        </button>
   1.151      </hbox>
   1.152 -  </frame>
   1.153 -    
   1.154 -  <hbox>
   1.155 -    <button>
   1.156 -      <label>Burn</label>
   1.157 -      <input file icon="forward"></input>
   1.158 -      <action>echo "Burning $ISO_IMAGE..."</action>
   1.159 -      <action>gtkdialog --program=BURN_DIALOG</action>
   1.160 -    </button>
   1.161 -    
   1.162 -    <button>
   1.163 -      <input file icon="exit"></input>
   1.164 -      <action type="exit">Exit</action>
   1.165 -    </button>
   1.166 -  </hbox>
   1.167    
   1.168 -</vbox>
   1.169 +  </vbox>
   1.170 +</window>
   1.171  '
   1.172  
   1.173  # Execute main dialog.
     2.1 --- a/tinyutils/mountbox	Mon Jan 14 13:25:50 2008 +0100
     2.2 +++ b/tinyutils/mountbox	Mon Jan 14 16:28:04 2008 +0100
     2.3 @@ -16,6 +16,7 @@
     2.4  }
     2.5  
     2.6  export FDISK_LIST='
     2.7 +<window title="Fdisk -l" icon-name="media-flash">
     2.8    <vbox>
     2.9      <text use-markup="true">
    2.10        <label>"
    2.11 @@ -34,11 +35,13 @@
    2.12        </button>
    2.13      </hbox>
    2.14    </vbox>
    2.15 +</window>
    2.16  '
    2.17  
    2.18  # Mount and umount buttons with fiel for devive and mount point.
    2.19  #
    2.20  export MOUNT_DIALOG='
    2.21 +<window title="Mountbox" icon-name="media-flash">
    2.22    <vbox>
    2.23   
    2.24      <text use-markup="true">
    2.25 @@ -81,7 +84,6 @@
    2.26            <variable>MOUNT_POINT</variable>
    2.27          </entry>
    2.28        </hbox>
    2.29 -    
    2.30      </frame>
    2.31      
    2.32      <hbox>
    2.33 @@ -106,6 +108,7 @@
    2.34      </hbox>
    2.35    
    2.36    </vbox>
    2.37 +</window>
    2.38  '
    2.39  
    2.40  # Only root can mount.
     3.1 --- a/tinyutils/netbox	Mon Jan 14 13:25:50 2008 +0100
     3.2 +++ b/tinyutils/netbox	Mon Jan 14 16:28:04 2008 +0100
     3.3 @@ -20,6 +20,7 @@
     3.4  # active connections.
     3.5  #
     3.6  export IFCONFIG='
     3.7 +<window title="Ifconfig" icon-name="network-wired">
     3.8    <vbox>
     3.9      <text use-markup="true">
    3.10        <label>"
    3.11 @@ -41,12 +42,14 @@
    3.12        </button>
    3.13      </hbox>
    3.14    </vbox>
    3.15 +</window>
    3.16  '
    3.17  
    3.18  # The main dialog with notebook, start/stop buttons and all options.
    3.19  # Note than /etc/network.conf is seded wehwn an interafce is activate
    3.20  #
    3.21  export NET_BOX='
    3.22 +<window title="Netbox" icon-name="network-wired">
    3.23    <vbox>
    3.24      <text use-markup="true">
    3.25        <label>
    3.26 @@ -244,6 +247,7 @@
    3.27      </hbox>
    3.28    
    3.29    </vbox>
    3.30 +</window>
    3.31  '
    3.32  
    3.33  # Only root can configure network.
     4.1 --- a/tinyutils/subox	Mon Jan 14 13:25:50 2008 +0100
     4.2 +++ b/tinyutils/subox	Mon Jan 14 16:28:04 2008 +0100
     4.3 @@ -17,6 +17,7 @@
     4.4  
     4.5  # Main window and root passord default entry set to 'root'.
     4.6  export SU_DIALOG='
     4.7 +<window title="Subox">
     4.8    <vbox>
     4.9    
    4.10      <text use-markup="true">
    4.11 @@ -54,6 +55,7 @@
    4.12      </hbox>
    4.13    
    4.14    </vbox>
    4.15 +</window>
    4.16  '
    4.17  
    4.18  gtkdialog --center --program=SU_DIALOG