summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-17 21:28:05 +0000
committersr55 <[email protected]>2009-06-17 21:28:05 +0000
commit0f8e43685a29f6f35e7db7101494331f4d68ee40 (patch)
tree8b1b267709b2a8d1844554aa6c88fa4cf06803f7 /win
parent0d39089bce6ca2440e9f76af816c2b8cc467fade (diff)
WinGui:
- Overwrite warning after clicking "start" for those users who don't seem to use the "Browse" feature. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2563 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/frmMain.cs27
1 files changed, 16 insertions, 11 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 8329cc7c5..55da10ae3 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -542,21 +542,26 @@ namespace Handbrake
{
if (encodeQueue.count() != 0 || (text_source.Text != string.Empty && text_source.Text != "Click 'Source' to continue" && text_destination.Text != string.Empty))
{
- // Set the last action to encode.
- // This is used for tracking which file to load in the activity window
- lastAction = "encode";
-
String query = rtf_query.Text != "" ? rtf_query.Text : queryGen.generateTheQuery(this);
- if (encodeQueue.count() == 0)
- encodeQueue.add(query, text_source.Text, text_destination.Text);
+ DialogResult overwrite = DialogResult.Yes;
+ if (text_destination.Text != "")
+ if (File.Exists(text_destination.Text))
+ overwrite = MessageBox.Show("The destination file already exists. Are you sure you want to overwrite it?", "Overwrite File?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
- queueWindow.setQueue();
- if (encodeQueue.count() > 1)
- queueWindow.Show(false);
+ if (overwrite == DialogResult.Yes)
+ {
+ if (encodeQueue.count() == 0)
+ encodeQueue.add(query, text_source.Text, text_destination.Text);
- setEncodeStarted(); // Encode is running, so setup the GUI appropriately
- encodeQueue.startEncode(); // Start The Queue Encoding Process
+ queueWindow.setQueue();
+ if (encodeQueue.count() > 1)
+ queueWindow.Show(false);
+
+ setEncodeStarted(); // Encode is running, so setup the GUI appropriately
+ encodeQueue.startEncode(); // Start The Queue Encoding Process
+ lastAction = "encode"; // Set the last action to encode - Used for activity window.
+ }
this.Focus();
}
else if (text_source.Text == string.Empty || text_source.Text == "Click 'Source' to continue" || text_destination.Text == string.Empty)