aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorToshiaki Asai <toshi.alternative@gmail.com>2016-10-07 22:56:26 +0900
committerToshiaki Asai <toshi.alternative@gmail.com>2016-10-07 22:56:26 +0900
commit52cd1303a2e95dc22df655cc603cdf011e7a642f (patch)
treeabe02d724a4503121990e6a740919332d5c8f982 /core
parent4e47d38e8ca48bb1490c327e5281201da90753e7 (diff)
downloadmikutter-52cd1303a2e95dc22df655cc603cdf011e7a642f.tar.gz
URLを開く方法>デフォルトブラウザを使う がレニウムされていた refs #866
Diffstat (limited to 'core')
-rw-r--r--core/plugin/web/web.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/plugin/web/web.rb b/core/plugin/web/web.rb
index 7273c991..a22da33e 100644
--- a/core/plugin/web/web.rb
+++ b/core/plugin/web/web.rb
@@ -14,6 +14,7 @@ Plugin.create(:web) do
shellExecuteA = Win32API.new('shell32.dll','ShellExecuteA',%w(p p p p p i),'i')
shellExecuteA.call(0, 'open', url, 0, 0, 1)
else
+ url_open_command = find_url_open_command
if url_open_command
bg_system(url_open_command, url)
else
@@ -30,7 +31,7 @@ Plugin.create(:web) do
end
# URLを開くことができるコマンドを返す。
- memoize def url_open_command
+ memoize def find_url_open_command
openable_commands = %w{xdg-open open /etc/alternatives/x-www-browser}
wellknown_browsers = %w{firefox chromium opera}
command = nil