summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-01-08 19:51:08 +0000
committersr55 <[email protected]>2009-01-08 19:51:08 +0000
commita385d189c2830994e460b8739546825d7f4418d2 (patch)
tree3659a2f82578a3c894974c355532a6a6e8f744d2 /win/C#/frmMain.cs
parent603a154a73ced4dbdfa187ee88eda66833952d87 (diff)
WinGui:
- Patch (slightly modified) by ween to allow users to update their own presets via a "save changes" option in the presets right click menu. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2068 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs36
1 files changed, 29 insertions, 7 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 828ff1ef0..83ea0de12 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -8,14 +8,10 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
-using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Threading;
-using System.Runtime.InteropServices;
-using System.Globalization;
-using System.Text.RegularExpressions;
namespace Handbrake
{
@@ -136,7 +132,7 @@ namespace Handbrake
events();
// Queue Recovery
- queueRecovery();
+ queueRecovery();
}
// Startup Functions
@@ -332,6 +328,14 @@ namespace Handbrake
{
treeView_presets.CollapseAll();
}
+ private void pmnu_saveChanges_Click(object sender, EventArgs e)
+ {
+ DialogResult result = MessageBox.Show("Do you wish to include picture settings when updating the preset: " + treeView_presets.SelectedNode.Text, "Update Preset", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
+ if (result == DialogResult.Yes)
+ presetHandler.updatePreset(treeView_presets.SelectedNode.Text, queryGen.generateTabbedComponentsQuery(this), true);
+ else if (result == DialogResult.No)
+ presetHandler.updatePreset(treeView_presets.SelectedNode.Text, queryGen.generateTabbedComponentsQuery(this), false);
+ }
private void pmnu_delete_click(object sender, EventArgs e)
{
if (treeView_presets.SelectedNode != null)
@@ -349,6 +353,21 @@ namespace Handbrake
}
treeView_presets.Select();
}
+ private void presets_menu_Opening(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ // Make sure that the save menu is always disabled by default
+ pmnu_saveChanges.Enabled = false;
+
+ // Now enable the save menu if the selected preset is a user preset
+ if (treeView_presets.SelectedNode != null)
+ {
+ if (presetHandler.checkIfUserPresetExists(treeView_presets.SelectedNode.Text))
+ {
+ pmnu_saveChanges.Enabled = true;
+ }
+ }
+ treeView_presets.Select();
+ }
// Presets Management
private void btn_addPreset_Click(object sender, EventArgs e)
@@ -542,7 +561,7 @@ namespace Handbrake
HandBrakeCLI = aProc[0];
HandBrakeCLI.Kill();
}
-
+
// Update the GUI
setEncodeFinished();
}
@@ -572,7 +591,7 @@ namespace Handbrake
setEncodeStarted(); // Encode is running, so setup the GUI appropriately
encodeQueue.startEncode(); // Start The Queue Encoding Process
-
+
}
else if (text_source.Text == string.Empty || text_source.Text == "Click 'Source' to continue" || text_destination.Text == string.Empty)
MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
@@ -1928,6 +1947,9 @@ namespace Handbrake
#endregion
+
+
+
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file