summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-03-06 14:27:44 +0000
committersr55 <[email protected]>2009-03-06 14:27:44 +0000
commit881abedc7ce136b57d8adde824a3235b5526dc52 (patch)
tree58f5036b9d90c5f96e39d274107ae4f5a651ffcc /win
parentf282e004f6cee533d16704527173b1b137dc5260 (diff)
WinGui:
- Add an override for the queue show method. Saves calling setQueue() before Show(). - Fix a couple of message boxes appearing behind windows. Thanks go to: ExDeus git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2230 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/frmMain.cs16
-rw-r--r--win/C#/frmPreview.cs16
-rw-r--r--win/C#/frmQueue.cs21
3 files changed, 35 insertions, 18 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index b0e61fd27..07828e81a 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -615,7 +615,7 @@ namespace Handbrake
}
queueWindow.setQueue();
if (encodeQueue.count() > 1)
- queueWindow.Show();
+ queueWindow.Show(false);
setEncodeStarted(); // Encode is running, so setup the GUI appropriately
encodeQueue.startEncode(); // Start The Queue Encoding Process
@@ -639,13 +639,11 @@ namespace Handbrake
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.setQueue();
queueWindow.Show();
}
}
private void btn_showQueue_Click(object sender, EventArgs e)
{
- queueWindow.setQueue();
queueWindow.Show();
queueWindow.Activate();
}
@@ -666,7 +664,7 @@ namespace Handbrake
qtpreview.Show();
}
else
- MessageBox.Show("The preview window is already open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(qtpreview, "The preview window is already open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
private void btn_ActivityWindow_Click(object sender, EventArgs e)
@@ -1740,11 +1738,11 @@ namespace Handbrake
if (curDrive.IsReady)
{
if (File.Exists(curDrive.RootDirectory + "VIDEO_TS\\VIDEO_TS.IFO"))
+ {
mnu_dvd_drive.Text = curDrive.RootDirectory + "VIDEO_TS (" + curDrive.VolumeLabel + ")";
- else
- mnu_dvd_drive.Text = "[No DVD Drive Ready]";
-
- foundDrive = true;
+ foundDrive = true;
+ break;
+ }
}
}
@@ -2109,4 +2107,4 @@ namespace Handbrake
// This is the END of the road ------------------------------------------------------------------------------
}
-} \ No newline at end of file
+}
diff --git a/win/C#/frmPreview.cs b/win/C#/frmPreview.cs
index 52aabe6f6..e2022ca2b 100644
--- a/win/C#/frmPreview.cs
+++ b/win/C#/frmPreview.cs
@@ -28,7 +28,7 @@ namespace Handbrake
}
catch (Exception exc)
{
- MessageBox.Show("It would appear QuickTime 7 is not installed. QuickTime preview functionality will be disabled! \n\n Debug Info:\n" + exc, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(mw, "It would appear QuickTime 7 is not installed. QuickTime preview functionality will be disabled! \n\n Debug Info:\n" + exc, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
btn_playQT.Enabled = false;
noQT = true;
}
@@ -58,7 +58,7 @@ namespace Handbrake
{
// Make sure we are not already encoding and if we are then display an error.
if (hbProc != null)
- MessageBox.Show("Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(this, "Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
hbProc = process.runCli(this, (string)state);
@@ -99,7 +99,7 @@ namespace Handbrake
}
catch (Exception exc)
{
- MessageBox.Show("frmPreview.cs encodeCompleted " + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ MessageBox.Show(this, "frmPreview.cs encodeCompleted " + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
#endregion
@@ -133,10 +133,10 @@ namespace Handbrake
lbl_status.Text = "VLC will now launch.";
}
else
- MessageBox.Show("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in the program options is correct.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(this, "Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in the program options is correct.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
- MessageBox.Show("Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(this, "Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
@@ -169,13 +169,13 @@ namespace Handbrake
catch (COMException ex)
{
QTUtils qtu = new QTUtils();
- MessageBox.Show("Unable to open movie:\n\nError Code: " + ex.ErrorCode.ToString("X") + "\nQT Error code : " + qtu.QTErrorFromErrorCode(ex.ErrorCode));
+ MessageBox.Show(this, "Unable to open movie:\n\nError Code: " + ex.ErrorCode.ToString("X") + "\nQT Error code : " + qtu.QTErrorFromErrorCode(ex.ErrorCode), "QT", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
catch (Exception ex)
{
- MessageBox.Show("Unable to open movie:\n\n" + ex);
+ MessageBox.Show(this, "Unable to open movie:\n\n" + ex, "QT", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
#endregion
}
-} \ No newline at end of file
+}
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 36e8b067e..86549a20f 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -50,6 +50,25 @@ namespace Handbrake
updateUIElements();
}
+ /// <summary>
+ /// Initializes the Queue list, then shows and activates the window
+ /// </summary>
+ public new void Show()
+ {
+ Show(true);
+ }
+
+ /// <summary>
+ /// Initializes the Queue list only if doSetQueue is true, then shows and activates the window
+ /// </summary>
+ /// <param name="doSetQueue">Indicates whether to call setQueue() before showing the window</param>
+ public void Show(bool doSetQueue)
+ {
+ if (doSetQueue) setQueue();
+ base.Show();
+ Activate();
+ }
+
// Start and Stop Controls
private void btn_encode_Click(object sender, EventArgs e)
{
@@ -287,4 +306,4 @@ namespace Handbrake
base.OnClosing(e);
}
}
-} \ No newline at end of file
+}