Commit c76671ae authored by David Byers's avatar David Byers
Browse files

Fix bug 1044, maybe.

Detailed changes:
> 	Fix bug 1044:
> 	* lyskom-buttons.el (lyskom-view-url-windows): Protect execution
> 	of w32-shell-execute from errors (e.g. caused by bad settings).
> 	(lyskom-view-url-windows): Added a bunch of paths to iexplore.exe.
>
parent b0ede6b3
2003-08-17 David Byers <byers@lysator.liu.se>
Fix bug 1044:
* lyskom-buttons.el (lyskom-view-url-windows): Protect execution
of w32-shell-execute from errors (e.g. caused by bad settings).
(lyskom-view-url-windows): Added a bunch of paths to iexplore.exe.
Support UTC time in the server:
* startup.el (lyskom): Select UTC time format if the server
supports it.
......
......@@ -977,7 +977,7 @@ after formating it as time. This is a LysKOM button action."
(lyskom-with-external-functions (w3-fetch)
(defun lyskom-view-url-w3 (url manager)
"View the URL URL using W3. Second argument MANAGER is ignored."
"View the URL using W3. Second argument MANAGER is ignored."
(w3-fetch url)))
(defun lyskom-view-url-dired (url manager)
......@@ -1053,7 +1053,12 @@ after formating it as time. This is a LysKOM button action."
(defun lyskom-view-url-windows (url manager)
"View the URL URL in Microsoft Windows. MANGER is the URL manager.
Fall back on Netscape if not running in Microsoft Windows."
Fall back on Netscape if not running in Microsoft Windows.
In theory, opening an URL on Windows should be a matter of doing
\(w32-shell-execute \"open\" URL\), but this sometimes fails, so
we protect ourselves by also trying to start some common defaults
using start-process."
(cond
((memq window-system '(win32 mswindows w32))
(cond
......@@ -1078,18 +1083,22 @@ Fall back on Netscape if not running in Microsoft Windows."
" kom-windows-browser-command"
" (%s)")
kom-windows-browser-command))))
((not (memq 'w32-shell-execute lyskom-compatibility-definitions))
(w32-shell-execute "open" url)
((and (not (memq 'w32-shell-execute lyskom-compatibility-definitions))
(condition-case nil
(progn (w32-shell-execute "open" url) t)
(error nil)))
(lyskom-url-manager-starting manager))
;;(lyskom-message "Webb via [%s \"%s\" \"%s\"] ..."
;; "w32-shell-execute" "open" url))
(t (let ((programs (list
"start"
"explorer"
(concat "C:\\Program Files\\Netscape"
"\\Communicator\\Program\\netscape.exe")
(concat "C:\\Program Files\\Netscape"
"\\Navigator\\Program\\netscape.exe"))))
;;(lyskom-message "Webb via [%s \"%s\" \"%s\"] ..."
;; "w32-shell-execute" "open" url))
(t (let ((programs
'("c:\\Program\\Internet Explorer\\iexplore.exe"
"c:\\Programs\\Internet Explorer\\iexplore.exe"
"c:\\Program Files\\Internet Explorer\\iexplore.exe"
"start"
"explorer"
"C:\\Program Files\\Netscape\\Communicator\\Program\\netscape.exe"
"C:\\Program Files\\Netscape\\Navigator\\Program\\netscape.exe"
)))
(while programs
(condition-case nil
(progn
......
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