From afa69dcabb84b190537d186be8e552ad7ad79ef2 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 3 Jul 2011 18:18:56 +0000 Subject: WinGui: Replace the old-school Windows 9x folder dialog with a 3rd party (ookii) control which uses the new Vista / 7 style folder dialog which is significantly easier to use. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4083 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/frmMain.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'win/CS/frmMain.cs') diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index 261077aa2..3654e41d1 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -31,6 +31,9 @@ namespace Handbrake using Handbrake.ToolWindows; using Model; + + using Ookii.Dialogs.Wpf; + using Properties; using Main = Handbrake.Functions.Main; @@ -391,7 +394,6 @@ namespace Handbrake } #endregion - #region Tools Menu /// @@ -1316,11 +1318,12 @@ namespace Handbrake // Source private void BtnFolderScanClicked(object sender, EventArgs e) { + VistaFolderBrowserDialog modernFolderDialog = new VistaFolderBrowserDialog { ShowNewFolderButton = true, RootFolder = Environment.SpecialFolder.DesktopDirectory }; this.btn_source.HideDropDown(); - if (DVD_Open.ShowDialog() == DialogResult.OK) + if (modernFolderDialog.ShowDialog() == true) { this.selectedSourceType = SourceType.Folder; - SelectSource(DVD_Open.SelectedPath, 0); + SelectSource(modernFolderDialog.SelectedPath, 0); } else UpdateSourceLabel(); @@ -1379,16 +1382,18 @@ namespace Handbrake private void FolderTitleSpecificScanClick(object sender, EventArgs e) { this.btn_source.HideDropDown(); - if (DVD_Open.ShowDialog() == DialogResult.OK) + + VistaFolderBrowserDialog modernFolderDialog = new VistaFolderBrowserDialog { ShowNewFolderButton = true, RootFolder = Environment.SpecialFolder.DesktopDirectory }; + if (modernFolderDialog.ShowDialog() == true) { this.selectedSourceType = SourceType.Folder; - int sourceTitle = 0; + int sourceTitle; TitleSpecificScan title = new TitleSpecificScan(); if (title.ShowDialog() == DialogResult.OK) { sourceTitle = title.Title; - SelectSource(DVD_Open.SelectedPath, sourceTitle); + SelectSource(modernFolderDialog.SelectedPath, sourceTitle); } } else -- cgit v1.2.3