tazpkg diff tazpkgbox-install @ rev 359

Add default button in search box (thanks Frederic Guilbault)
author Antoine Bodin <gokhlayeh@mailoo.org>
date Tue Sep 28 00:40:34 2010 +0200 (2010-09-28)
parents
children f1d05bd96d7f
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tazpkgbox-install	Tue Sep 28 00:40:34 2010 +0200
     1.3 @@ -0,0 +1,47 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# GTKdialog interface to SliTaz Packages Manager aka Tazpkg. Notes:
     1.7 +# Notebook tab are vbox, tabs are used to indent and functions are
     1.8 +# split and found in $LIB.
     1.9 +#
    1.10 +# (C) GNU gpl v3 - SliTaz GNU/Linux 2010.
    1.11 +#
    1.12 +VERSION=1.0
    1.13 +
    1.14 +export PKG="$@"
    1.15 +export PKG_SHORT_NAME=$(basename $PKG)
    1.16 +
    1.17 +
    1.18 +# Tazpkgbox is only for root.
    1.19 +if test $(id -u) != 0 ; then
    1.20 +	exec subox tazpkgbox-install $PKG
    1.21 +	exit 0
    1.22 +fi
    1.23 +
    1.24 +
    1.25 +
    1.26 +# English/French help dialog.
    1.27 +export MAIN_DIALOG="
    1.28 +<window title=\"Tazpkg install\" icon-name=\"tazpkg\">
    1.29 +<vbox>
    1.30 +	<text use-markup=\"true\" width-chars=\"54\">
    1.31 +		<label>\"
    1.32 +Package <b>$PKG_SHORT_NAME</b> will be installed\"
    1.33 +		</label>
    1.34 +	</text>
    1.35 +	<hbox>
    1.36 +		<button ok>
    1.37 +			<action>xterm -T \"Install package \" -geometry 80x16+120+120 -e \"tazpkg install $PKG; sleep 2\"</action>
    1.38 +			<action type=\"closewindow\">\"\"</action>
    1.39 +		</button>
    1.40 +		<button cancel>
    1.41 +			<action type=\"closewindow\">HELP</action>
    1.42 +		</button>
    1.43 +	</hbox>
    1.44 +</vbox>
    1.45 +</window>
    1.46 +"
    1.47 +
    1.48 +gtkdialog --center --program=MAIN_DIALOG >/dev/null
    1.49 +
    1.50 +exit 0