tazbug rev 16

Small fixes and improvment
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 03 19:51:05 2012 +0200 (2012-04-03)
parents 95129e40c9df
children 4e45eb4505eb
files tazbug-box
line diff
     1.1 --- a/tazbug-box	Tue Apr 03 19:18:26 2012 +0200
     1.2 +++ b/tazbug-box	Tue Apr 03 19:51:05 2012 +0200
     1.3 @@ -26,7 +26,12 @@
     1.4  # Output cmd in GTK box.
     1.5  output() {
     1.6  	yad $opts --text-info --text="<b>SliTaz Bug</b>" --title="SliTaz Bug" \
     1.7 -		--margins=8 --tail $btns --button="gtk-close":1
     1.8 +		--margins=8 --tail --button="$(gettext "My account"):0" \
     1.9 +		--button="gtk-close":1
    1.10 +	case $? in
    1.11 +		0) $0 account ;;
    1.12 +		1) exit 0 ;;
    1.13 +	esac
    1.14  }
    1.15  
    1.16  # New message box
    1.17 @@ -36,6 +41,7 @@
    1.18  		--text="<b>SliTaz Bugs Message</b>" \
    1.19  		--field="$(gettext "Bug ID")":NUM \
    1.20  		--field="$(gettext "Message")":TXT \
    1.21 +		--button="$(gettext "New bug"):2" \
    1.22  		--button="$(gettext "Send message"):0" \
    1.23  		--button="gtk-close:1"
    1.24  }
    1.25 @@ -48,6 +54,7 @@
    1.26  	# Deal with --button values
    1.27  	case $ret in
    1.28  		1) exit 0 ;;
    1.29 +		2) $0 new-bug && exit 0 ;;
    1.30  		*) continue ;;
    1.31  	esac
    1.32  	id="$(echo $main | cut -d "|" -f 1 | cut -d "," -f 1)"
    1.33 @@ -98,10 +105,16 @@
    1.34  # Account information.
    1.35  account_info() {
    1.36  	. $HOME/.config/slitaz/account.conf
    1.37 -	echo -e "Name\n$NAME
    1.38 -Login\n$LOGIN
    1.39 -Mail\n$MAIL
    1.40 -Secure key\n$KEY"
    1.41 +	cat << EOT
    1.42 +$(gettext "Real name")
    1.43 +$NAME
    1.44 +$(gettext "User name")
    1.45 +$USER
    1.46 +Email
    1.47 +$MAIL
    1.48 +$(gettext "Secure key")
    1.49 +$KEY
    1.50 +EOT
    1.51  }
    1.52  
    1.53  # Main GUI box function with pure Yad spec
    1.54 @@ -162,7 +175,7 @@
    1.55  	user="$(echo $main | cut -d "|" -f 2)"
    1.56  	mail="$(echo $main | cut -d "|" -f 3)"
    1.57  	pass="$(echo $main | cut -d "|" -f 4)"
    1.58 -	./tazbug signup --name="$name" --user=$user --mail=$mail \
    1.59 +	tazbug signup --name="$name" --user=$user --mail=$mail \
    1.60  		--pass="$pass" | output
    1.61  }
    1.62