r2524 - people/synrg/xjig
Ben Armstrong
synrg at alioth.debian.org
Wed Apr 4 14:41:06 UTC 2007
Author: synrg
Date: 2007-04-04 14:41:06 +0000 (Wed, 04 Apr 2007)
New Revision: 2524
Modified:
people/synrg/xjig/xjig-menu
Log:
Support short option name -s for --scale
Modified: people/synrg/xjig/xjig-menu
===================================================================
--- people/synrg/xjig/xjig-menu 2007-04-04 14:23:24 UTC (rev 2523)
+++ people/synrg/xjig/xjig-menu 2007-04-04 14:41:06 UTC (rev 2524)
@@ -110,6 +110,7 @@
if [ -z "$directory" ] ; then directory="${XJIG_DIRECTORY}"; fi
if [ -z "$directory" ] ; then directory="${HOME}"; fi
if [ -z "$scale" ] ; then scale="${XJIG_SCALE}"; fi
+ # FIXME: default scale as 80% of display size (use xwininfo -root?)
if [ -z "$scale" ] ; then scale="640x480"; fi
if [ -z "$desktop_directory" ] ; then desktop_directory="${XJIG_DESKTOP_DIRECTORY}"; fi
if [ -z "$desktop_directory" ] ; then desktop_directory="${HOME}/Desktop"; fi
@@ -153,7 +154,7 @@
Arguments ()
{
- ARGUMENTS="`getopt --longoptions pieces:,directory:,scale:,make,desktop_directory:,switches:,help,usage,version --name=${PROGRAM} --options p:d:mhuv --shell sh -- "${@}"`"
+ ARGUMENTS="`getopt --longoptions pieces:,directory:,scale:,switches:,make,desktop_directory:,help,usage,version --name=${PROGRAM} --options p:d:s:mhuv --shell sh -- "${@}"`"
if [ "${?}" != "0" ]
then
Error "${PROGRAM}: getopt error" >&2
@@ -177,7 +178,7 @@
make="enabled" ; shift
;;
- --scale)
+ -s|--scale)
scale="${2}" ; shift 2
;;
@@ -235,7 +236,6 @@
if [ $width -lt 1 ] || [ $height -lt 1 ] ; then
Error "${PROGRAM}: Invalid pieces: $pieces; specify XxY, where X and Y are positive integers"
fi
- # FIXME: specify scale as percentage of the most constrained display axis
scale_width="$(echo $scale | cut -dx -f1)"
scale_height="$(echo $scale | cut -dx -f2)"
if [ $scale_width -lt 1 ] || [ $scale_height -lt 1 ] ; then
More information about the Pkg-games-commits
mailing list