summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-08-28 15:04:25 +0000
committersr55 <[email protected]>2009-08-28 15:04:25 +0000
commit3ef0219c4c3113616869f9ff2395b65b947aef7a (patch)
treed2addd30e6d04e59258eb54a963260b16f799f16 /win/C#/Functions
parentd72c71e8718762f44b218f0124a2026df2735e74 (diff)
WinGui:
- Fix issue changing file format causing the audio encoder dropdown to be set to "" - Fixed an issue with autoName function and format dropdown with regards to AC3 in the audio list. Also, CC or SRT - Combined a bunch of functions in x264Panel into one. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2784 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Main.cs24
-rw-r--r--win/C#/Functions/PresetLoader.cs6
-rw-r--r--win/C#/Functions/QueryGenerator.cs2
3 files changed, 16 insertions, 16 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 55b95c4a8..7516e52da 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -124,21 +124,21 @@ namespace Handbrake.Functions
/// Function which generates the filename and path automatically based on
/// the Source Name, DVD title and DVD Chapters
/// </summary>
- public static string autoName(ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format, Boolean chapters)
+ public static string autoName(frmMain mainWindow ) //ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format, Boolean chapters)
{
string AutoNamePath = string.Empty;
- if (drpDvdtitle.Text != "Automatic")
+ if (mainWindow.drp_dvdtitle.Text != "Automatic")
{
// Get the Source Name
- string sourceName = Path.GetFileNameWithoutExtension(source);
+ string sourceName = Path.GetFileNameWithoutExtension(mainWindow.sourcePath);
// Get the Selected Title Number
- string[] titlesplit = drpDvdtitle.Text.Split(' ');
+ string[] titlesplit = mainWindow.drp_dvdtitle.Text.Split(' ');
string dvdTitle = titlesplit[0].Replace("Automatic", "");
// Get the Chapter Start and Chapter End Numbers
- string chapterStart = chapter_start.Replace("Auto", "");
- string chapterFinish = chatper_end.Replace("Auto", "");
+ string chapterStart = mainWindow.drop_chapterStart.Text.Replace("Auto", "");
+ string chapterFinish = mainWindow.drop_chapterFinish.Text.Replace("Auto", "");
string combinedChapterTag = chapterStart;
if (chapterFinish != chapterStart && chapterFinish != "")
combinedChapterTag = chapterStart + "-" + chapterFinish;
@@ -154,19 +154,19 @@ namespace Handbrake.Functions
destinationFilename = sourceName + "_T" + dvdTitle + "_C" + combinedChapterTag;
// Add the appropriate file extension
- if (format == 0)
+ if (mainWindow.drop_format.SelectedIndex == 0)
{
- if (Properties.Settings.Default.useM4v || chapters)
+ if (Properties.Settings.Default.useM4v || mainWindow.Check_ChapterMarkers.Checked || mainWindow.AudioSettings.RequiresM4V() || mainWindow.Subtitles.RequiresM4V())
destinationFilename += ".m4v";
else
destinationFilename += ".mp4";
}
- else if (format == 1)
+ else if (mainWindow.drop_format.SelectedIndex == 1)
destinationFilename += ".mkv";
// Now work out the path where the file will be stored.
// First case: If the destination box doesn't already contain a path, make one.
- if (!dest.Contains(Path.DirectorySeparatorChar.ToString()))
+ if (!mainWindow.text_destination.Text.Contains(Path.DirectorySeparatorChar.ToString()))
{
// If there is an auto name path, use it...
if (Properties.Settings.Default.autoNamePath.Trim() != "" && Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location")
@@ -177,8 +177,8 @@ namespace Handbrake.Functions
else // Otherwise, use the path that is already there.
{
// Use the path and change the file extension to match the previous destination
- AutoNamePath = Path.Combine(Path.GetDirectoryName(dest), destinationFilename);
- AutoNamePath = Path.ChangeExtension(AutoNamePath, Path.GetExtension(dest));
+ AutoNamePath = Path.Combine(Path.GetDirectoryName(mainWindow.text_destination.Text), destinationFilename);
+ AutoNamePath = Path.ChangeExtension(AutoNamePath, Path.GetExtension(mainWindow.text_destination.Text));
}
}
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 4345f6f9a..90f16f658 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -205,12 +205,12 @@ namespace Handbrake.Functions
#region Audio
// Clear the audio listing
- mainWindow.AudioSettings.clearAudioList();
+ mainWindow.AudioSettings.ClearAudioList();
if (presetQuery.AudioInformation != null)
foreach (AudioTrack track in presetQuery.AudioInformation)
{
- ListViewItem newTrack = new ListViewItem(mainWindow.AudioSettings.getNewID().ToString());
+ ListViewItem newTrack = new ListViewItem(mainWindow.AudioSettings.GetNewID().ToString());
newTrack.SubItems.Add("Automatic");
newTrack.SubItems.Add(track.Encoder);
@@ -221,7 +221,7 @@ namespace Handbrake.Functions
else
newTrack.SubItems.Add(track.Bitrate);
newTrack.SubItems.Add(track.DRC);
- mainWindow.AudioSettings.addTrackForPreset(newTrack);
+ mainWindow.AudioSettings.AddTrackForPreset(newTrack);
}
#endregion
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index 0fb6248e6..198be2d43 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -227,7 +227,7 @@ namespace Handbrake.Functions
#region Audio Settings Tab
- ListView audioTracks = mainWindow.AudioSettings.getAudioPanel();
+ ListView audioTracks = mainWindow.AudioSettings.GetAudioPanel();
List<string> tracks = new List<string>();
List<string> codecs = new List<string>();
List<string> mixdowns = new List<string>();