view lwlib/energize/fidget-widget @ 90:99da576a67e7 xemacs-20-0

Import from CVS: tag xemacs-20-0
author cvs
date Mon, 13 Aug 2007 09:10:46 +0200
parents 376386a54a3c
children
line wrap: on
line source

#!/bin/sh
#  fidget-widget modifies the output of XDesigner.
#  the creation function returns widget1 and does not create the parent.
#  marc + matthieu

NAME=$2
FILE=$1
case $FILE in
  *ctreebr_ps.xdc|*classbr_ps.xdc|*leb_psheet.xdc) filter="grep -v Offset" ;;
  *) filter=cat ;;
esac
sed "
    /^\*\* Generated by / a\\
	** Modified by fidget-widget, `date +%d-%h-%y`
    /Widget widget0/d
    /^create_widget0/s//Widget $NAME/
    /int h_spacing/s//short h_spacing/
    /widget0 =/d
    /widget1 =/s/widget0/parent/
    /^}/i\\
	return widget1;
    " $FILE | $filter