summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-01-03 14:48:49 +0000
committersr55 <[email protected]>2011-01-03 14:48:49 +0000
commitc95b467ad33ce9b2e157ca83629f45e67f7e2ad1 (patch)
treec4b84c68d58811824eb9d3dc4e2488b7aef6b163
parent3c26a1b029e0ee9ebb286df95f779428e9902155 (diff)
WinGui:
- Fix for the autonaming when a drive letter is selected in folder mode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3726 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/Job.cs3
-rw-r--r--win/C#/frmMain.cs13
2 files changed, 16 insertions, 0 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Model/Job.cs b/win/C#/HandBrake.ApplicationServices/Model/Job.cs
index 07f84b4f3..a18a6117c 100644
--- a/win/C#/HandBrake.ApplicationServices/Model/Job.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/Job.cs
@@ -10,6 +10,9 @@ namespace HandBrake.ApplicationServices.Model
/// </summary>
public class Job
{
+ /// <summary>
+ /// the CLI Query.
+ /// </summary>
private string query;
/// <summary>
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 4d341731d..1f2e15bfa 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -83,6 +83,19 @@ namespace Handbrake
return Path.GetFileName(selectedTitle.SourceName);
}
+ // We have a drive, selected as a folder.
+ if (this.sourcePath.EndsWith("\\"))
+ {
+ drives = Main.GetDrives();
+ foreach (DriveInformation item in drives)
+ {
+ if (item.RootDirectory.Contains(this.sourcePath))
+ {
+ return item.VolumeLabel;
+ }
+ }
+ }
+
if (Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS")
return Path.GetFileNameWithoutExtension(this.sourcePath);