diff options
author | sr55 <[email protected]> | 2009-12-02 13:33:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-12-02 13:33:39 +0000 |
commit | 59c73a20b4b39cfe984f2a2baac9e7f5f00791b1 (patch) | |
tree | 8b5d7aacac3f5137c6f8a052b60865d93a28108d /win | |
parent | 9a1803de5f35ee233f42630420851b3c8bd7be12 (diff) |
WinGui:
- Re-enabled UNC path support in the GUI. Seems the switch to MinGW enabled UNC paths to work correctly. Note: This is not supported for CygWin users.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2997 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/frmMain.cs | 72 |
1 files changed, 24 insertions, 48 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index aeff93fc7..ecbd85996 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -293,20 +293,10 @@ namespace Handbrake if (fileList != null)
{
- if (fileList[0].StartsWith("\\"))
- {
- MessageBox.Show(
- "Sorry, HandBrake does not support UNC file paths. \nTry mounting the network share as a network drive in My Computer",
- "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- UpdateSourceLabel();
- }
+ if (fileList[0] != "")
+ StartScan(fileList[0]);
else
- {
- if (fileList[0] != "")
- StartScan(fileList[0]);
- else
- UpdateSourceLabel();
- }
+ UpdateSourceLabel();
}
else
UpdateSourceLabel();
@@ -887,15 +877,6 @@ namespace Handbrake return;
}
- if (file.StartsWith("\\")) // NO UNC Paths
- {
- MessageBox.Show(
- "Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer",
- "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- UpdateSourceLabel();
- return;
- }
-
sourcePath = Path.GetFileName(file);
StartScan(file);
}
@@ -1080,34 +1061,29 @@ namespace Handbrake if (DVD_Save.ShowDialog() == DialogResult.OK)
{
- if (DVD_Save.FileName.StartsWith("\\"))
- MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- else
+ // Add a file extension manually, as FileDialog.AddExtension has issues with dots in filenames
+ switch (DVD_Save.FilterIndex)
{
- // Add a file extension manually, as FileDialog.AddExtension has issues with dots in filenames
- switch (DVD_Save.FilterIndex)
- {
- case 1:
- if (!Path.GetExtension(DVD_Save.FileName).Equals(".mp4", StringComparison.InvariantCultureIgnoreCase))
- if (Properties.Settings.Default.useM4v)
- DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".m4v").Replace(".mkv", ".m4v");
- else
- DVD_Save.FileName = DVD_Save.FileName.Replace(".m4v", ".mp4").Replace(".mkv", ".mp4");
- break;
- case 2:
- if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
- DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".mkv").Replace(".m4v", ".mkv");
- break;
- default:
- //do nothing
- break;
- }
- text_destination.Text = DVD_Save.FileName;
-
- // Quicktime requires .m4v file for chapter markers to work. If checked, change the extension to .m4v (mp4 and m4v are the same thing)
- if (Check_ChapterMarkers.Checked && DVD_Save.FilterIndex != 2)
- SetExtension(".m4v");
+ case 1:
+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".mp4", StringComparison.InvariantCultureIgnoreCase))
+ if (Properties.Settings.Default.useM4v)
+ DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".m4v").Replace(".mkv", ".m4v");
+ else
+ DVD_Save.FileName = DVD_Save.FileName.Replace(".m4v", ".mp4").Replace(".mkv", ".mp4");
+ break;
+ case 2:
+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
+ DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".mkv").Replace(".m4v", ".mkv");
+ break;
+ default:
+ //do nothing
+ break;
}
+ text_destination.Text = DVD_Save.FileName;
+
+ // Quicktime requires .m4v file for chapter markers to work. If checked, change the extension to .m4v (mp4 and m4v are the same thing)
+ if (Check_ChapterMarkers.Checked && DVD_Save.FilterIndex != 2)
+ SetExtension(".m4v");
}
}
private void text_destination_TextChanged(object sender, EventArgs e)
|