Hello Everyone,
I manager to shrink a bit more tas code and update as well still one issue i saw i didnt fix it since need to wait for more days without reboot OS
Hope it helps anyone
Code: Select all
Add it : To shrink GTK code
############################################################
# Functions to avoid Repeating GTK some code over and over #
############################################################
BTN_LAB_INP () { echo '<button><label>"'$1'"</label><input file stock="gtk-'$2'"></input><action>'$3'</action></button>' ; }
export -f BTN_LAB_INP
CHECKBOX_00 () { echo '<checkbox><label>"'$1'"</label><variable>'$2'</variable><default>'$3'</default></checkbox>' ; }
export -f CHECKBOX_00
RADIOBTN_00 () { echo '<radiobutton><label>"'$1'"</label><variable>'$2'</variable><default>'$3'</default></radiobutton>' ; }
export -f RADIOBTN_00
PIXMAP_00 () { echo '<pixmap><input file>'$1'</input><width>'$2'</width> <height>'$3'</height></pixmap>' ; }
export -f PIXMAP_00
-------------------------------------------------------
Removed :
if [ "$FFMPEG" = "ffmpeg" ] && [ "$FORMAT" = "GIF" ] ; then
Add it :
if [ "$( echo $FFMPEG | grep "ffmpeg")" ] && [ "$FORMAT" = "GIF" ] ; then
-------------------------------------------------------
Removed :
if [ ! "`which ffmpeg 2>/dev/null`" ] && [ ! "`which avconv 2>/dev/null`" ] ; then
func_dlg ERROR "$(gettext "Please install 'ffmpeg' or 'avconv' first!")"
exit 1
fi
Add it :
export FFMPEG="`which ffmpeg avconv | head -1`"
[ -z "$FFMPEG" ] && func_dlg ERROR "$(gettext "Please install 'ffmpeg' or 'avconv' first!")" && exit 1
-------------------------------------------------------
Removed :
[ "`which avconv 2>/dev/null`" ] && FFMPEG=avconv || FFMPEG=ffmpeg
-------------------------------------------------------
Removed :
if [ "$FFMPEG" = "ffmpeg" ] ; then
Add it :
if [ "$( echo $FFMPEG | grep "ffmpeg")" ] ; then
-------------------------------------------------------
Removed :
if [ "$PLAYER" = "aplay" ] ; then
$PLAYER "${BEEPFILE}" >/dev/null 2>&1
else
$PLAYER -vn -nodisp -autoexit "${BEEPFILE}" >/dev/null 2>&1
fi
Add it :
[ "$( echo $PLAYER | grep "aplay")" ] && opt='' || opt=" -vn -nodisp -autoexit "
$PLAYER "$opt" "${BEEPFILE}" >/dev/null 2>&1
-------------------------------------------------------
Removed :
PLAYER=aplay
for i in avplay ffplay; do
which $i >/dev/null 2>&1 && { PLAYER=$i; break; }
done
Add it :
export PLAYER="`which avplay ffplay aplay | head -1`"
[ -z $PLAYER ] && echo "No audio player install so..."
Remove fake gz