diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs
index 64bc54dacb..8df41cddc6 100644
--- a/src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs
+++ b/src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs
@@ -114,11 +114,7 @@ namespace WeifenLuo.WinFormsUI
///
[Category("Appearance")]
[LocalizedDescription("InertButton.BorderColor.Description")]
- #if FRAMEWORK_VER_2x
- public new Color BorderColor
- #else
- public Color BorderColor
- #endif
+ public Color BorderColor
{
get { return m_borderColor; }
set
@@ -695,4 +691,4 @@ namespace WeifenLuo.WinFormsUI
Invalidate();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHidePane.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHidePane.cs
index 1566585131..3d2212745b 100644
--- a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHidePane.cs
+++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHidePane.cs
@@ -24,12 +24,6 @@ namespace WeifenLuo.WinFormsUI
m_tabs = new AutoHideTabCollection(DockPane);
}
- ///
- ~AutoHidePane()
- {
- Dispose(false);
- }
-
///
public DockPane DockPane
{
@@ -45,14 +39,10 @@ namespace WeifenLuo.WinFormsUI
///
///
- public void Dispose()
- {
- Dispose(true);
- }
-
- ///
- protected virtual void Dispose(bool disposing)
+ public virtual void Dispose()
{
+ // we don't need to dispose anything here, but we want to allow deriving classes
+ // to override dispose
}
}
}
diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs
index 139f33edd8..89e0881bb1 100644
--- a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs
+++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs
@@ -196,8 +196,7 @@ namespace WeifenLuo.WinFormsUI
// requires further tracking of mouse hover behavior,
// call TrackMouseEvent
- Win32.TRACKMOUSEEVENTS tme = new Win32.TRACKMOUSEEVENTS(Win32.TRACKMOUSEEVENTS.TME_HOVER, Handle, Win32.TRACKMOUSEEVENTS.HOVER_DEFAULT);
- User32.TrackMouseEvent(ref tme);
+ this.ResetMouseEventArgs();
}
///
diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideTab.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideTab.cs
index 47e905de19..7155bb3aa7 100644
--- a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideTab.cs
+++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideTab.cs
@@ -23,12 +23,6 @@ namespace WeifenLuo.WinFormsUI
m_content = content;
}
- ///
- ~AutoHideTab()
- {
- Dispose(false);
- }
-
///
public IDockContent Content
{
@@ -37,14 +31,10 @@ namespace WeifenLuo.WinFormsUI
///
///
- public void Dispose()
- {
- Dispose(true);
- }
-
- ///
- protected virtual void Dispose(bool disposing)
+ public virtual void Dispose()
{
+ // we don't need to dispose anything here, but we want to allow deriving classes
+ // to override dispose
}
}
}
diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs
index 7ecce5c604..7356cfdc69 100644
--- a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs
+++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs
@@ -107,6 +107,16 @@ namespace WeifenLuo.WinFormsUI
base.WndProc(ref m);
return;
}
+ else if (m.Msg == (int)Win32.Msgs.WM_MBUTTONUP)
+ {
+ base.WndProc(ref m);
+ int index = GetHitTest();
+ if (index != -1)
+ {
+ DockPane.CloseContent(Tabs[index].Content);
+ }
+ return;
+ }
else if (m.Msg == (int)Win32.Msgs.WM_RBUTTONDOWN)
{
int index = GetHitTest();
diff --git a/src/Libraries/DockPanel_Src/patchnotes.txt b/src/Libraries/DockPanel_Src/patchnotes.txt
new file mode 100644
index 0000000000..194a56190f
--- /dev/null
+++ b/src/Libraries/DockPanel_Src/patchnotes.txt
@@ -0,0 +1,8 @@
+List of our custom patches to apply to the DockPanel Suite:
+
+Patch #1:
+ Close documents with middle click - in DockPaneTabStripBase.cs
+ Remove redundant finalizers - in AutoHidePane.cs and AutoHideTab.cs
+ Remove redundant P/Invoke call - in AutoHideStripBase.cs
+ Fix compilation warning - in InertButton.cs
+ Committed in revision 1147.
diff --git a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
index 6db9903d56..03608f0036 100644
--- a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
+++ b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
@@ -251,7 +251,7 @@ namespace ICSharpCode.SharpDevelop.Gui
string configPath = Path.Combine(PropertyService.ConfigDirectory, "layouts");
if (!Directory.Exists(configPath))
Directory.CreateDirectory(configPath);
- dockPanel.SaveAsXml(Path.Combine(configPath, current.FileName));
+ dockPanel.SaveAsXml(Path.Combine(configPath, current.FileName), System.Text.Encoding.UTF8);
}
}
} catch (Exception e) {