diff options
author | sr55 <[email protected]> | 2010-01-16 21:32:19 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-01-16 21:32:19 +0000 |
commit | f1cc4752f0f6b3c5160bc39b7d1115b18fbae4f1 (patch) | |
tree | b7e9dd3fccc6d9547c209bdb5eb46eb448466d2e /win/C#/frmMain.cs | |
parent | a6a1746f4f521a01b5fe2fe82d09c1b4ffa82bdc (diff) |
WinGui:
- Improve the In-Gui encode status option. by default, the CLI window is not completely hidden when this is set however there is an option to show it to allow "ctrl-c" clean exits.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3073 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 4d45b7fcc..fc8728f4c 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -81,6 +81,15 @@ namespace Handbrake }
}
+ // Clear the log files in the background
+ if (Properties.Settings.Default.clearOldLogs)
+ {
+ lblStatus.Text = "Clearing Old Log Files ...";
+ Application.DoEvents();
+ Thread clearLog = new Thread(Main.ClearOldLogs);
+ clearLog.Start();
+ }
+
// Setup the GUI components
lblStatus.Text = "Setting up the GUI ...";
Application.DoEvents();
@@ -102,14 +111,11 @@ namespace Handbrake if (query != null)
{
- //Ok, Reset all the H264 widgets before changing the preset
x264Panel.reset2Defaults();
- // Send the query from the file to the Query Parser class, then load the preset
QueryParser presetQuery = QueryParser.Parse(query);
PresetLoader.presetLoader(this, presetQuery, Properties.Settings.Default.defaultPreset, loadPictureSettings);
- // The x264 widgets will need updated, so do this now:
x264Panel.X264_StandardizeOptString();
x264Panel.X264_SetCurrentSettingsInPanel();
}
@@ -663,16 +669,31 @@ namespace Handbrake {
if (btn_start.Text == "Stop")
{
- DialogResult result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+ DialogResult result;
+ if (Properties.Settings.Default.enocdeStatusInGui && !Properties.Settings.Default.showCliForInGuiEncodeStatus)
+ result = MessageBox.Show("Are you sure you wish to cancel the encode?\n\nPlease note, when 'Enable in-GUI encode status' is enabled, stopping this encode will render the file unplayable. ",
+ "Cancel Encode?",MessageBoxButtons.YesNo,MessageBoxIcon.Question);
+ else
+ result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?",
+ MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
// Pause The Queue
encodeQueue.Pause();
- // Allow the CLI to exit cleanly
- Win32.SetForegroundWindow((int)encodeQueue.ProcessHandle);
- SendKeys.Send("^C");
+ if (Properties.Settings.Default.enocdeStatusInGui && !Properties.Settings.Default.showCliForInGuiEncodeStatus)
+ {
+ encodeQueue.Stop();
+ if (encodeQueue.HbProcess != null)
+ encodeQueue.HbProcess.WaitForExit();
+ }
+ else
+ {
+ // Allow the CLI to exit cleanly
+ Win32.SetForegroundWindow((int) encodeQueue.ProcessHandle);
+ SendKeys.Send("^C");
+ }
// Update the GUI
setEncodeFinished();
@@ -1845,11 +1866,6 @@ namespace Handbrake }
- private void UpdateGuiWithQueueItemAfterScan()
- {
-
- }
-
// This is the END of the road ****************************************
}
}
\ No newline at end of file |