Finish integrating Antonis's desktop_approots work

In addition:

- moved video type detection into a separate file: videoTypes.dt out
  of datatypes.dt.  Also, removed all actions from Antonis' dt files,
  as these are handled by the new actions (listed below).

  Image, postscript, and PDF types definitions are still located in
  datatypes.dt.src

- supports most image files, PDFs, postscript files, and video files
  via dtapp now.

- Added new actions:

  - DisplayImage
  - DisplayVideo
  - DisplayPDF
  - DisplayPS

  All of these call the dtapp_* helpers to locate an appropriate
  program to handle the task.

- Added a camera icon

- standardized the icons used to display the various types - all
  images use the Dtimage icon now, as an example.

- moved the new *.dt files to their proper place in programs/types,
  rather than programs/localized/C/types (my bad).

Please add any further video types into videoTypes.dt, and everything
else (for now) into datatypes.dt.

In the future, we should probably separate these out into
type-specific .dt files.  Also, something should be done about playing
audio files too (maybe DisplayVideo.dt can handle all those too?)
This commit is contained in:
Jon Trulson
2018-07-19 18:39:56 -06:00
parent 2b41b84c33
commit 2f6f1d2afb
81 changed files with 1302 additions and 576 deletions

View File

@@ -23,23 +23,15 @@ fi
XCOMM video viewing
if [ -z "$DTAPP_VVIDEO" ]
then
VVIDEO="mplayer vlc ffplay"
VVIDEO="vlc ffplay"
else
VVIDEO="$DTAPP_VVIDEO"
fi
XCOMM web (html) viewing
if [ -z "$DTAPP_VWEB" ]
then
VWEB="firefox chrome chromium-browser lynx"
else
VWEB="$DTAPP_VWEB"
fi
XCOMM postscript viewing
if [ -z "$DTAPP_VPS" ]
then
VPS="gv"
VPS="mgv gv"
else
VPS="$DTAPP_VPS"
fi
@@ -100,7 +92,7 @@ DoSimpleCmd()
if [ ! -z "$thecmd" ]
then # it's there
$thecmd $*
$thecmd "$args"
didone=1
break
fi
@@ -116,58 +108,6 @@ DoSimpleCmd()
}
XCOMM ###############################################################
XCOMM ### Actions
XCOMM ## Web browsing
DoWeb()
{
# DoWeb [[arg] ...]
didone=0
url="$1"
for i in $VWEB
do
thecmd="$(FindProg $i)"
if [ ! -z "$thecmd" ]
then # it's there
# We'll do special things for lynx,
# else we'll just call whatever is available, and
# hope it's X aware...
case $i in
lynx)
# start a dtterm
CDE_INSTALLATION_TOP/bin/dtterm -e $thecmd $url
didone=1
;;
*)
# any others
$thecmd $url
didone=1
;;
esac
if [ $didone -eq 1 ]
then
break
fi
fi
done
if [ $didone -eq 0 ]
then # couldn't find a viewer
ErrorMsg "Helper not found" \
"${DTAPP}: Could not find any of the following\nweb browsers:\n\n$VWEB"
fi
return 0
}
XCOMM ##################################################################
XCOMM ## MAIN
@@ -181,9 +121,6 @@ case $APPNAME in
dtapp_vimage)
DoSimpleCmd "$VIMAGE" $*
;;
dtapp_vweb)
DoWeb $*
;;
dtapp_vpdf)
DoSimpleCmd "$VPDF" $*
;;