Browse Source

Apply our patches to the DockPanel Suite.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1147 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
5cadcaa96c
  1. 8
      src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs
  2. 16
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHidePane.cs
  3. 3
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs
  4. 16
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideTab.cs
  5. 10
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs
  6. 8
      src/Libraries/DockPanel_Src/patchnotes.txt
  7. 2
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

8
src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs

@ -114,11 +114,7 @@ namespace WeifenLuo.WinFormsUI @@ -114,11 +114,7 @@ namespace WeifenLuo.WinFormsUI
/// <include file='CodeDoc\InertButton.xml' path='//CodeDoc/Class[@name="InertButton"]/Property[@name="BorderColor"]/*'/>
[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 @@ -695,4 +691,4 @@ namespace WeifenLuo.WinFormsUI
Invalidate();
}
}
}
}

16
src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHidePane.cs

@ -24,12 +24,6 @@ namespace WeifenLuo.WinFormsUI @@ -24,12 +24,6 @@ namespace WeifenLuo.WinFormsUI
m_tabs = new AutoHideTabCollection(DockPane);
}
/// <exclude/>
~AutoHidePane()
{
Dispose(false);
}
/// <include file='CodeDoc/AutoHidePane.xml' path='//CodeDoc/Class[@name="AutoHidePane"]/Property[@name="DockPane"]/*'/>
public DockPane DockPane
{
@ -45,14 +39,10 @@ namespace WeifenLuo.WinFormsUI @@ -45,14 +39,10 @@ namespace WeifenLuo.WinFormsUI
/// <include file='CodeDoc/AutoHidePane.xml' path='//CodeDoc/Class[@name="AutoHidePane"]/Method[@name="Dispose"]/*'/>
/// <include file='CodeDoc/AutoHidePane.xml' path='//CodeDoc/Class[@name="AutoHidePane"]/Method[@name="Dispose()"]/*'/>
public void Dispose()
{
Dispose(true);
}
/// <include file='CodeDoc/AutoHidePane.xml' path='//CodeDoc/Class[@name="AutoHidePane"]/Method[@name="Dispose(bool)"]/*'/>
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
}
}
}

3
src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs

@ -196,8 +196,7 @@ namespace WeifenLuo.WinFormsUI @@ -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();
}
/// <exclude />

16
src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideTab.cs

@ -23,12 +23,6 @@ namespace WeifenLuo.WinFormsUI @@ -23,12 +23,6 @@ namespace WeifenLuo.WinFormsUI
m_content = content;
}
/// <exclude/>
~AutoHideTab()
{
Dispose(false);
}
/// <include file='CodeDoc/AutoHideTab.xml' path='//CodeDoc/Class[@name="AutoHideTab"]/Property[@name="Content"]/*'/>
public IDockContent Content
{
@ -37,14 +31,10 @@ namespace WeifenLuo.WinFormsUI @@ -37,14 +31,10 @@ namespace WeifenLuo.WinFormsUI
/// <include file='CodeDoc/AutoHideTab.xml' path='//CodeDoc/Class[@name="AutoHideTab"]/Method[@name="Dispose"]/*'/>
/// <include file='CodeDoc/AutoHideTab.xml' path='//CodeDoc/Class[@name="AutoHideTab"]/Method[@name="Dispose()"]/*'/>
public void Dispose()
{
Dispose(true);
}
/// <include file='CodeDoc/AutoHideTab.xml' path='//CodeDoc/Class[@name="AutoHideTab"]/Method[@name="Dispose(bool)"]/*'/>
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
}
}
}

10
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs

@ -107,6 +107,16 @@ namespace WeifenLuo.WinFormsUI @@ -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();

8
src/Libraries/DockPanel_Src/patchnotes.txt

@ -0,0 +1,8 @@ @@ -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.

2
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

@ -251,7 +251,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -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) {

Loading…
Cancel
Save