From ecc00d62b459a692f4101043b2d36c1ad112012d Mon Sep 17 00:00:00 2001 From: niksedk Date: Wed, 20 Apr 2011 12:26:38 +0000 Subject: [PATCH] AddWaveForm might work on Linux now (vlc file name=vlc for linux/mac) git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@405 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Forms/AddWareForm.cs | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Forms/AddWareForm.cs b/src/Forms/AddWareForm.cs index 5b9221541..fb60940d2 100644 --- a/src/Forms/AddWareForm.cs +++ b/src/Forms/AddWareForm.cs @@ -36,18 +36,26 @@ namespace Nikse.SubtitleEdit.Forms buttonRipWave.Enabled = false; _cancel = false; - string vlcPath = Nikse.SubtitleEdit.Logic.VideoPlayers.LibVlc11xDynamic.GetVlcPath("vlc.exe"); - if (!System.IO.File.Exists(vlcPath)) + string vlcPath; + if (Utilities.IsRunningOnLinux() || Utilities.IsRunningOnMac()) { - if (MessageBox.Show(Configuration.Settings.Language.AddWaveForm.VlcMediaPlayerNotFound + Environment.NewLine + - Environment.NewLine + - Configuration.Settings.Language.AddWaveForm.GoToVlcMediaPlayerHomePage, - Configuration.Settings.Language.AddWaveForm.VlcMediaPlayerNotFoundTitle , MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) + vlcPath = "vlc"; + } + else // windows + { + vlcPath = Nikse.SubtitleEdit.Logic.VideoPlayers.LibVlc11xDynamic.GetVlcPath("vlc.exe"); + if (!System.IO.File.Exists(vlcPath)) { - System.Diagnostics.Process.Start("http://www.videolan.org/"); + if (MessageBox.Show(Configuration.Settings.Language.AddWaveForm.VlcMediaPlayerNotFound + Environment.NewLine + + Environment.NewLine + + Configuration.Settings.Language.AddWaveForm.GoToVlcMediaPlayerHomePage, + Configuration.Settings.Language.AddWaveForm.VlcMediaPlayerNotFoundTitle, MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) + { + System.Diagnostics.Process.Start("http://www.videolan.org/"); + } + buttonRipWave.Enabled = true; + return; } - buttonRipWave.Enabled = true; - return; } labelPleaseWait.Visible = true;