summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-04-02 15:10:21 +0000
committersr55 <[email protected]>2009-04-02 15:10:21 +0000
commitdf3c74d3c2c64781f119d1b0c80f0f744be6bc0b (patch)
tree4f49670c1c12745c96d43fa9c44bc78c18c811cd /win/C#/frmMain.cs
parent85f4f0c7ca4b5c07ca9a71c0f3067ec86c2915a9 (diff)
WinGui:
- Fix for Destination Browse button exception is destination is empty. (http://forum.handbrake.fr/viewtopic.php?f=12&t=10140) - Added warning if user is about to add 2 or more items to the queue with the same destination path. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2294 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index a915148fb..bdce184de 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -635,9 +635,18 @@ namespace Handbrake
if (rtf_query.Text != "")
query = rtf_query.Text;
- encodeQueue.add(query, text_source.Text, text_destination.Text);
- encodeQueue.write2disk("hb_queue_recovery.xml"); // Writes the queue to the recovery file, just incase the GUI crashes.
+ if (encodeQueue.checkDestinationPath(text_destination.Text))
+ {
+ DialogResult result = MessageBox.Show("There is already a queue item for this destination path. \n\n If you continue, the encode will be overwritten. Do you wish to continue?",
+ "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+ if (result == DialogResult.Yes)
+ encodeQueue.add(query, text_source.Text, text_destination.Text);
+
+ } else
+ encodeQueue.add(query, text_source.Text, text_destination.Text);
+
+ encodeQueue.write2disk("hb_queue_recovery.xml"); // Writes the queue to the recovery file, just incase the GUI crashes.
queueWindow.Show();
}
}
@@ -936,8 +945,8 @@ namespace Handbrake
{
// This removes the file extension from the filename box on the save file dialog.
// It's daft but some users don't realise that typing an extension overrides the dropdown extension selected.
- DVD_Save.FileName = Path.Combine(Path.GetDirectoryName(text_destination.Text), Path.GetFileNameWithoutExtension(text_destination.Text));
-
+ if (Path.HasExtension(text_destination.Text))
+ DVD_Save.FileName = Path.Combine(Path.GetDirectoryName(text_destination.Text), Path.GetFileNameWithoutExtension(text_destination.Text));
// Show the dialog and set the main form file path
if (drop_format.SelectedIndex.Equals(0))