A web page has one action on the desktop now, McdeWeb
(programs/types/datatypes.dt.src): it runs "dtsystemsettings -open-web
%Arg_1%", which reads the browser from ~/.dt/defaults (web:, chosen in the
Default Programs pane) and starts it with execlp -- no shell, and an argument
with a shell character is refused. -open-web is handled before Xt is set up,
so an action needs no display.
The .html and .htm criteria of programs/types/firefox.dt map their Open to
McdeWeb: a double click in dtfile now follows the file's choice instead of a
hard-wired Firefox. McdeWeb takes ARG_TYPE * -- an action that names a data
type the file does not have is refused ("Either action ... does not apply",
measured), and it is only named by the types that may use it.
dtthemesync gained the Firefox part: every profile under ~/.mozilla/firefox
with a prefs.js gets a user.js (downloads into ~/Downloads, reduced motion,
no cosmetic animations, no smooth scrolling, ui.key.accelKey 91 -- Command is
Mod4 in MCDE) and a chrome/userChrome.css written from the palette.
Measured under Xvfb with xdotool and a wrapper that records its arguments:
- dtsystemsettings -open-web http://example.org with web: true answers
"Opened in true: http://example.org" and exits 0, without a display;
- -open-web "http://x;rm -rf /" answers "That is not an address" and exits
1; -open-web "" answers "No address was given";
- a double click on page.html in dtfile with web: mcdetest-browser hands
exactly that path to the wrapper (cat of what it got);
- the same double click with web: firefox opens a "Mozilla Firefox" window;
- dtthemesync -v in a test home with a fake profile writes user.js and
chrome/userChrome.css; user.js carries browser.download.dir
<home>/Downloads, prefersReducedMotion 1, cosmeticAnimations false,
smoothScroll false, ui.key.accelKey 91, and the CSS starts with
--toolbar-bgcolor: #c6b2a8 (the palette Default.dp);
- the Default Programs pane shows web: firefox and, after the fix, the
links choice that the file has ("in a tab of the window that is there")
-- docs/screenshots/leopard/web-browser-default-mcde.png;
- make programs/dtsystemsettings, programs/dtthemesync, programs/types
exit=0; check programs/dtsystemsettings: test_panes PASS; check lib/DtSvc
PASS.
Not measured: Firefox's own Cmd+T/W/L in a running window (the user.js sets
the accelerator; that needs a person at the keyboard), and dtexplorer -- the
Motif browser of the task -- which is its own program and a follow-up.
144 lines
3.1 KiB
Plaintext
144 lines
3.1 KiB
Plaintext
######################################################################
|
|
#
|
|
# Common Desktop Environment (CDE)
|
|
#
|
|
# Action and DataType Definition File
|
|
#
|
|
# Generated by the CreateAction tool
|
|
#
|
|
# $Revision: 1.0
|
|
#
|
|
# $KEY: 4747
|
|
#
|
|
######################################################################
|
|
#
|
|
# WARNING:
|
|
#
|
|
# This file was generated by the CDE CreateAction tool.
|
|
# If this file is modified by some other tool, such as vi,
|
|
# the CreateAction tool will no longer be able to load and
|
|
# update this file. For this reason, changes to this file
|
|
# should be handled through CreateAction whenever possible.
|
|
#
|
|
######################################################################
|
|
|
|
ACTION firefox
|
|
{
|
|
LABEL Firefox
|
|
TYPE COMMAND
|
|
EXEC_STRING firefox %Arg_1%
|
|
ICON firefox
|
|
WINDOW_TYPE NO_STDIO
|
|
DESCRIPTION The firefox Web Browser.
|
|
}
|
|
|
|
DATA_ATTRIBUTES firefox_FILE_1
|
|
{
|
|
ACTIONS Open
|
|
ICON SDthtml
|
|
DESCRIPTION html files open with firefox Web Browser.
|
|
}
|
|
|
|
DATA_CRITERIA firefox_FILE_1A
|
|
{
|
|
DATA_ATTRIBUTES_NAME firefox_FILE_1
|
|
MODE !d
|
|
PATH_PATTERN *.html
|
|
}
|
|
|
|
ACTION Open
|
|
{
|
|
ARG_TYPE firefox_FILE_1
|
|
TYPE MAP
|
|
MAP_ACTION McdeWeb
|
|
LABEL Open
|
|
}
|
|
|
|
ACTION firefox_FILE_1_PRINT
|
|
{
|
|
TYPE COMMAND
|
|
EXEC_STRING firefox -print %Arg_1%
|
|
WINDOW_TYPE NO_STDIO
|
|
DESCRIPTION Printing for firefox by droping and html file on the \
|
|
penel's printer needs an add-on. Search \
|
|
the Internet to find a command-line printing add-on for \
|
|
firefox accordingly the print command in the file firefox.dt
|
|
}
|
|
|
|
ACTION Print
|
|
{
|
|
ARG_TYPE firefox_FILE_1
|
|
TYPE MAP
|
|
MAP_ACTION firefox_FILE_1_PRINT
|
|
LABEL Print
|
|
}
|
|
|
|
|
|
|
|
DATA_ATTRIBUTES firefox_FILE_3
|
|
{
|
|
ACTIONS Open
|
|
ICON SDthtml
|
|
DESCRIPTION htm files open with firefox Web Browser.
|
|
}
|
|
|
|
DATA_CRITERIA firefox_FILE_3A
|
|
{
|
|
DATA_ATTRIBUTES_NAME firefox_FILE_3
|
|
MODE !d
|
|
PATH_PATTERN *.htm
|
|
}
|
|
|
|
ACTION Open
|
|
{
|
|
ARG_TYPE firefox_FILE_3
|
|
TYPE MAP
|
|
MAP_ACTION McdeWeb
|
|
LABEL Open
|
|
}
|
|
|
|
ACTION firefox_FILE_3_PRINT
|
|
{
|
|
TYPE COMMAND
|
|
EXEC_STRING firefox -print %Arg_1%
|
|
WINDOW_TYPE NO_STDIO
|
|
DESCRIPTION Printing for firefox by droping and htm file on the \
|
|
penel's printer needs an add-on. Search \
|
|
the Internet to find a command-line printing add-on for \
|
|
firefox accordingly the print command in the file firefox.dt
|
|
}
|
|
|
|
ACTION Print
|
|
{
|
|
ARG_TYPE firefox_FILE_3
|
|
TYPE MAP
|
|
MAP_ACTION firefox_FILE_3_PRINT
|
|
LABEL Print
|
|
}
|
|
|
|
|
|
|
|
DATA_ATTRIBUTES firefox_FILE_5
|
|
{
|
|
ACTIONS Open
|
|
ICON SDturlweb
|
|
DESCRIPTION url files open with firefox Web Browser.
|
|
}
|
|
|
|
|
|
DATA_CRITERIA firefox_FILE_5A
|
|
{
|
|
DATA_ATTRIBUTES_NAME firefox_FILE_5
|
|
MODE !d
|
|
PATH_PATTERN *.url
|
|
}
|
|
|
|
ACTION Open
|
|
{
|
|
ARG_TYPE firefox_FILE_5
|
|
TYPE MAP
|
|
MAP_ACTION firefox
|
|
LABEL Open
|
|
}
|
|
|