Commit d140cbaf authored by Ulrik Haugen's avatar Ulrik Haugen
Browse files

Applied patch in 6818352 from

<person 70:Calle Dybedahl (on a mission from Goddess)>: New function for
viewing a URL in Galeon.
parent dc4ae584
2001-07-31 Ulrik Haugen <qha@lysator.liu.se>
* lyskom-buttons.el (lyskom-view-url-galeon): ... and the other
files in this entry: Applied patch in 6818352 from
<person 70:Calle Dybedahl (on a mission from Goddess)>:
New function for viewing a URL in Galeon.
* vars.el.in (kom-url-managers): See above.
(kom-galeon-command): See above.
* swedish-strings.el (lyskom-custom-strings): See above.
(lyskom-custom-strings): See above.
(lyskom-custom-strings): See above.
* option-edit.el (lyskom-customize-buffer-format): See above.
(lyskom-custom-variables): See above.
(lyskom-url-viewer-widget): See above.
* english-strings.el (lyskom-custom-strings): See above.
(lyskom-custom-strings): See above.
(lyskom-custom-strings): See above.
2001-07-11 Christer Ekholm <che@init.se>
* swedish-strings.el, swedish-strings.el (lyskom-message): New
......
......@@ -2360,6 +2360,7 @@ Select whether to execute command or keyboard macro.")
(emacs-telnet-viewer . "Emacs Telnet mode (telnet)")
(mosaic-viewer . "NCSA Mosaic (all)")
(lynx-viewer . "Lynx (all)")
(galeon-viewer . "Galeon (all)")
(dont-check . "Don't ask for confirmation")
(check-before-open . "Confirm before writing the text")
......@@ -2990,6 +2991,9 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-netscape-command-doc . "\
This setting specifies the command to use to start Netscape.")
(kom-galeon-command-doc . "\
This setting specifies the command to use to start Galeon.")
(kom-inhibit-typeahead-doc . "\
Key presses are usually buffered while LysKOM is busy, and are executed
as soon as possible. With this setting off, LysKOM discards any key presses
......@@ -3352,6 +3356,7 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-url-viewer-preferences-tag . "Open URLs using the following program:")
(kom-mosaic-command-tag . "Command to start NCSA Mosaic:")
(kom-netscape-command-tag . "Command to start Netscape Navigator:")
(kom-galeon-command-tag . "Command to start Galeon:")
(kom-symbolic-marks-alist-tag . "Symbolic mark types:")
......
......@@ -973,6 +973,49 @@ existing Mosaic process. Failing that, it starts a new Mosaic."
(list url)))
(lyskom-url-manager-starting manager)))))
(defun lyskom-view-url-galeon (url manager)
"View the URL URL using Galeon. The second argument MANAGER is the URL
manager that started Galeon.
This function attempts to load the URL in a running Galeon, but failing
that, starts a new one."
(setq url (replace-in-string url "," "%2C"))
(setq url (replace-in-string url "(" "%28"))
(setq url (replace-in-string url ")" "%29"))
(let* ((url-string (if (memq window-system '(win32 mswindows w32))
(list url)
(list "-n"
(format "%s" url))))
(proc (apply 'start-process "galeon"
nil
(if (listp kom-galeon-command)
(car kom-galeon-command)
kom-galeon-command)
(if (listp kom-galeon-command)
(append (cdr kom-galeon-command)
url-string)
url-string)))
(status 'run)
(exit nil))
(lyskom-url-manager-starting manager)
(while (eq status 'run)
(accept-process-output)
(setq status (process-status proc)))
(setq exit (process-exit-status proc))
(cond ((and (eq status 'exit)
(eq exit 1))
(apply 'start-process "galeon"
nil
(if (listp kom-galeon-command)
(car kom-galeon-command)
kom-galeon-command)
(if (listp kom-galeon-command)
(append (cdr kom-galeon-command)
(list url))
(list url))))
(t nil))))
;; Added by Peter Liljenberg
(defun lyskom-view-url-lynx (url manager)
"View the URL URL using Lynx.
......
......@@ -213,6 +213,7 @@
[kom-url-viewer-preferences]
[kom-mosaic-command]
[kom-netscape-command]
[kom-galeon-command]
"\n\n"
section
......@@ -604,6 +605,7 @@ customize buffer but do not save them to the server."
:indent 4))
(kom-mosaic-command (file))
(kom-netscape-command (file))
(kom-galeon-command (file))
(kom-confirm-multiple-recipients
(choice ((const (dont-check nil))
(const (check-before-open before))
......@@ -961,7 +963,11 @@ customize buffer but do not save them to the server."
(list 'item
':tag (lyskom-custom-string 'lynx-viewer)
':format "%t"
':value "lynx")))
':value "lynx")
(list 'item
':tag (lyskom-custom-string 'galeon-viewer)
':format "%t"
':value "galeon")))
propl))
(defun lyskom-open-window-widget (type &optional args propl)
......
......@@ -2797,6 +2797,7 @@ Visar vilka som f
(emacs-telnet-viewer . "Emacs Telnet-mode (telnet)")
(mosaic-viewer . "NCSA Mosaic (alla)")
(lynx-viewer . "Lynx (alla)")
(galeon-viewer . "Galeon (alla)")
(dont-check . "Ingen bekrftelse")
(check-before-open . "Bekrfta innan inlgget skrivs")
......@@ -3436,6 +3437,9 @@ i servern. Annars sparas det i din .emacs.")
(kom-netscape-command-doc . "\
Denna instllning anger kommandot fr att kra Netscape.")
(kom-galeon-command-doc . "\
Denna instllning anger kommandot fr att kra Galeon.")
(kom-inhibit-typeahead-doc . "\
Normalt sparas tangenttryckningar som grs medan klienten r upptagen, och
utfrs nr det blir mjligt. Om denna instllning r avslagen s kommer
......@@ -3795,6 +3799,7 @@ i servern. Annars sparas det i din .emacs.")
(kom-url-viewer-preferences-tag . "ppna URLer med fljande program:")
(kom-mosaic-command-tag . "Kommando fr att starta NCSA Mosaic:")
(kom-netscape-command-tag . "Kommando fr att starta Netscape Navigator:")
(kom-galeon-command-tag . "Kommando fr att starta Galeon:")
(kom-symbolic-marks-alist-tag . "Symboliska markeringstyper:")
......
......@@ -843,7 +843,11 @@ to some URL viewers."
("lynx"
"\\(http\\|gopher\\|ftp\\|mailto\\|news\\|wais\\|file\\|telnet\\)"
"Lynx"
lyskom-view-url-lynx))
lyskom-view-url-lynx)
("galeon"
"\\(http\\|gopher\\|ftp\\|mailto\\|news\\|wais\\|file\\|telnet\\)"
"Galeon"
lyskom-view-url-galeon))
"List of URL managers. Each element is a list consisting of
(MANAGER-REGEXP PROTOCOLS NAME VIEW-FUNCTION). When LysKOM attempts to
......@@ -868,6 +872,17 @@ For instance, a value of \"netscape\" is valid, but \"netscape -d host:0\"
is not. Instead, the latter should be \(\"netscape\" \"-d\" \"host:0\"\)"
server)
(def-kom-var kom-galeon-command "galeon"
"*Command to run to start Galeon.
If a string, it should be a command that starts Galeon with no
arguments. If a list, the first element must be a command that starts
Galeon. The remaining elements are used as arguments to Galeon.
For instance, a value of \"galeon\" is valid, but \"galeon --display host:0\"
is not. Instead, the latter should be \(\"galeon\" \"--display\" \"host:0\"\)"
server)
(def-kom-var kom-lynx-terminal 'xterm
"*Where to start Lynx.
Valid values are 'xterm (start Lynx in an xterm) and 'terminal (start
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment