Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

Commit

Permalink
Fix issues with vs2017/vs2019, support for vs2015, bump version to 2.…
Browse files Browse the repository at this point in the history
…1.11
  • Loading branch information
pasztorpisti committed Apr 8, 2019
1 parent dc8c49a commit fe16ee5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
6 changes: 5 additions & 1 deletion Forms/Controls/ColorizedPlainTextBox.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ public bool IsMsftEditDllAvailable()
}
static MsftLoader m_MsftLoader = new MsftLoader();

/*
// We don't anymore build for framework 2.0 and on with versions the below code caused
// a crash during startup: System.ComponentModel.Win32Exception 'Class already exists'
protected override CreateParams CreateParams
{
// This makes the framework 2.0 RichTextBox much faster. It handles well some other things too, for example
Expand All @@ -181,7 +185,7 @@ protected override CreateParams CreateParams
return create_params;
}
}

*/
string m_PrevText;
int m_PrevSelStart;
int m_PrevSelLength;
Expand Down
26 changes: 13 additions & 13 deletions VSMainWindow.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,19 @@ protected override void WndProc(ref Message m)

void TryfindTitleTextBlock()
{
DependencyObject root = HwndSource.FromHwnd(m_MainHWND).RootVisual as DependencyObject;
if (root != null)
{
DependencyObject titlebar = FindInSubtreeByClassNamePostfix(root, ".MainWindowTitleBar") as DependencyObject;
if (titlebar != null)
{
DependencyObject dock_panel = FindChildByClassNamePostfix(titlebar, ".DockPanel");
if (dock_panel != null)
{
m_TitleTextBlock = FindChildByClassNamePostfix(dock_panel, ".TextBlock") as TextBlock;
}
}
}
HwndSource hs = HwndSource.FromHwnd(m_MainHWND);
if (hs == null)
return;
DependencyObject root = hs.RootVisual as DependencyObject;
if (root == null)
return;
DependencyObject titlebar = FindInSubtreeByClassNamePostfix(root, ".MainWindowTitleBar") as DependencyObject;
if (titlebar == null)
return;
DependencyObject dock_panel = FindChildByClassNamePostfix(titlebar, ".DockPanel");
if (dock_panel == null)
return;
m_TitleTextBlock = FindChildByClassNamePostfix(dock_panel, ".TextBlock") as TextBlock;
}

DependencyObject FindChildByClassNamePostfix(DependencyObject parent, string postfix)
Expand Down
2 changes: 1 addition & 1 deletion VSWindowTitleChangerPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace VSWindowTitleChanger
[ProvideLoadKey("Standard", "2.0", "Visual Studio Window Title Changer", "WoofWoof", 1)]
// This attribute is used to register the informations needed to show the this package
// in the Help/About dialog of Visual Studio.
[InstalledProductRegistration(false, "#110", "#112", "2.1.10", IconResourceID = 400)]
[InstalledProductRegistration(false, "#110", "#112", "2.1.11", IconResourceID = 400)]
[Guid(GuidList.guidVSWindowTitleChangerPkgString)]
[ProvideOptionPage(typeof(ToolOptions), "VS Window Title Changer", "Settings", 0, 0, true)]
[ProvideAutoLoad(Microsoft.VisualStudio.Shell.Interop.UIContextGuids80.DesignMode)]
Expand Down
4 changes: 2 additions & 2 deletions VSWindowTitleChanger_2017.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@
<Reference Include="EnvDTE80" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.OLE.Interop" />
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.15.3.DesignTime" />
<Reference Include="Microsoft.VisualStudio.Shell.15.0" />
<Reference Include="Microsoft.VisualStudio.Shell.14.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Framework" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
Expand Down
12 changes: 6 additions & 6 deletions source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="1e0c061a-af97-43bb-930d-7e3629676249" Version="2.1.10" Language="en-US" Publisher="István Pásztor" />
<Identity Id="1e0c061a-af97-43bb-930d-7e3629676249" Version="2.1.11" Language="en-US" Publisher="István Pásztor" />
<DisplayName>Visual Studio Window Title Changer</DisplayName>
<Description xml:space="preserve">Changes the Visual Studio Window Title by evaluating a user defined expression. Extremely helpful when working with multiple branches of the same project.</Description>
<MoreInfo>http://visualstudiogallery.msdn.microsoft.com/2e8ebfe4-023f-4c4d-9b7a-d05bbc5cb239</MoreInfo>
Expand All @@ -11,10 +11,10 @@
<PreviewImage>VSWindowTitleChanger_Preview.png</PreviewImage>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,)" />
<InstallationTarget Version="[15.0,)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[15.0,)" Id="Microsoft.VisualStudio.Enterprise" />
<InstallationTarget Version="[15.0,)" Id="Microsoft.VisualStudio.IntegratedShell" />
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0,)" />
<InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Enterprise" />
<InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.IntegratedShell" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.0,)" />
Expand All @@ -23,6 +23,6 @@
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[14.0,)" DisplayName="Visual Studio core editor" />
</Prerequisites>
</PackageManifest>

0 comments on commit fe16ee5

Please sign in to comment.