Author: cwittich
Date: Thu May 28 02:47:43 2009
New Revision: 41165
URL:
http://svn.reactos.org/svn/reactos?rev=41165&view=rev
Log:
-only enable copy menu when req.
Modified:
trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs
trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs
trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.Designer.cs
trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.cs
Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%2…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs [iso-8859-1]
(original)
+++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs [iso-8859-1] Thu
May 28 02:47:43 2009
@@ -86,6 +86,7 @@
//
// copyToolStripMenuItem
//
+ this.copyToolStripMenuItem.Enabled = false;
this.copyToolStripMenuItem.Image =
global::RosDBG.Properties.Resources.copyToolStripMenuItem_Image;
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%2…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] Thu May 28
02:47:43 2009
@@ -94,13 +94,15 @@
private void RawTrafficText_MouseUp(object sender, MouseEventArgs e)
{
+ copyToolStripMenuItem.Enabled = (RawTrafficText.SelectionLength > 0);
/* if (CanCopyChangedEvent != null)
CanCopyChangedEvent(this, new
CanCopyChangedEventArgs(RawTrafficText.SelectionLength != 0)); */
}
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
- Clipboard.SetText(RawTrafficText.SelectedText);
+ if (RawTrafficText.SelectionLength != 0)
+ Clipboard.SetText(RawTrafficText.SelectedText);
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.Designer.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%2…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.Designer.cs [iso-8859-1]
(original)
+++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.Designer.cs [iso-8859-1] Thu
May 28 02:47:43 2009
@@ -50,7 +50,7 @@
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
- this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer1.Location = new System.Drawing.Point(0, 24);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation =
System.Windows.Forms.Orientation.Horizontal;
//
@@ -61,7 +61,7 @@
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.SourceCode);
- this.splitContainer1.Size = new System.Drawing.Size(481, 272);
+ this.splitContainer1.Size = new System.Drawing.Size(481, 248);
this.splitContainer1.SplitterDistance = 25;
this.splitContainer1.TabIndex = 2;
//
@@ -103,7 +103,7 @@
this.SourceCode.Location = new System.Drawing.Point(0, 0);
this.SourceCode.Name = "SourceCode";
this.SourceCode.ReadOnly = true;
- this.SourceCode.Size = new System.Drawing.Size(481, 243);
+ this.SourceCode.Size = new System.Drawing.Size(481, 219);
this.SourceCode.TabIndex = 3;
this.SourceCode.Text = "";
this.SourceCode.SelectionChanged += new
System.EventHandler(this.SourceCode_SelectionChanged);
@@ -133,6 +133,7 @@
//
// copyToolStripMenuItem
//
+ this.copyToolStripMenuItem.Enabled = false;
this.copyToolStripMenuItem.Image =
global::RosDBG.Properties.Resources.copyToolStripMenuItem_Image;
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%2…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/SourceView.cs [iso-8859-1] Thu May 28
02:47:43 2009
@@ -96,6 +96,7 @@
private void SourceCode_SelectionChanged(object sender, EventArgs e)
{
btnCopy.Enabled = (SourceCode.SelectionLength > 0);
+ copyToolStripMenuItem.Enabled = btnCopy.Enabled;
/* if (CanCopyChangedEvent != null)
CanCopyChangedEvent(this, new CanCopyChangedEventArgs(btnCopy.Enabled));
*/
@@ -108,7 +109,8 @@
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
- Clipboard.SetText(SourceCode.SelectedText);
+ if (SourceCode.SelectionLength != 0)
+ Clipboard.SetText(SourceCode.SelectedText);
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)