diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ext/menu.lua | 13 | ||||
-rw-r--r-- | core/locale.conf | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/core/ext/menu.lua b/core/ext/menu.lua index b8391d6b..703910e7 100644 --- a/core/ext/menu.lua +++ b/core/ext/menu.lua @@ -325,15 +325,14 @@ local function set_lexer(lexer) end local function open_webpage(url) local cmd - if not WIN32 then - cmd = - string.format('"%s" "file://%s"', not MAC and 'firefox' or 'open', url) + if WIN32 then + cmd = string.format('start "" "%s"', url) + local p = io.popen(cmd) + if not p then error(l.MENU_BROWSER_ERROR..url) else p:close() end else - cmd = - string.format('"%s" %s', - 'c:/program files/internet explorer/iexplore.exe', url) + cmd = string.format(MAC and 'open "file://%s"' or 'xdg-open "%s"', url) + if os.execute(cmd) ~= 0 then error(l.MENU_BROWSER_ERROR..url) end end - if os.execute(cmd) ~= 0 then error(l.MENU_BROWSER_ERROR) end end local actions = { diff --git a/core/locale.conf b/core/locale.conf index 2a5720da..ffd03818 100644 --- a/core/locale.conf +++ b/core/locale.conf @@ -620,8 +620,8 @@ MENU_HELP_MANUAL "_Manual" MENU_HELP_LUADOC "_LuaDoc" % core/ext/menu.lua -% "Error loading webpage.\nCheck the browser path in core/ext/menu.lua" -MENU_BROWSER_ERROR "Error loading webpage.\nCheck the browser path in core/ext/menu.lua" +% "Error loading webpage: " +MENU_BROWSER_ERROR "Error loading webpage: " % core/ext/menu.lua % "Load Session" |