Skip to content

Commit a46c5a1

Browse files
committed
Merge branch 'development' into distro_haxedevelop
2 parents 03f4cf3 + 6d33dee commit a46c5a1

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

External/Plugins/StartPage/PluginMain.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using ProjectManager;
1313
using StartPage.Controls;
1414
using WeifenLuo.WinFormsUI.Docking;
15-
using Microsoft.Win32;
1615

1716
namespace StartPage
1817
{
@@ -102,7 +101,6 @@ public void Initialize()
102101
this.InitBasics();
103102
this.LoadSettings();
104103
this.AddEventHandlers();
105-
this.UseLatestBrowserControl();
106104
this.CreateMenuItem();
107105
}
108106

@@ -199,24 +197,6 @@ public void AddEventHandlers()
199197
EventManager.AddEventHandler(this, EventType.RestoreSession);
200198
}
201199

202-
/// <summary>
203-
/// Sets a key in registry so that latest .NET browser control is used
204-
/// </summary>
205-
private void UseLatestBrowserControl()
206-
{
207-
try
208-
{
209-
String valueName = DistroConfig.DISTRIBUTION_NAME + ".exe";
210-
String subKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION\\";
211-
RegistryKey emu = Registry.CurrentUser.OpenSubKey(subKey, true);
212-
{
213-
Object value = emu.GetValue(valueName);
214-
if (value == null) emu.SetValue(valueName, 0, RegistryValueKind.DWord);
215-
}
216-
}
217-
catch {} // No errors please...
218-
}
219-
220200
/// <summary>
221201
/// Loads the plugin settings
222202
/// </summary>

FlashDevelop/Controls/Browser.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
using System;
2-
using System.Text;
32
using System.Drawing;
43
using System.Windows.Forms;
54
using System.ComponentModel;
6-
using System.Collections.Generic;
75
using PluginCore.Localization;
8-
using PluginCore.Controls;
96
using PluginCore.Helpers;
107
using PluginCore;
8+
using Microsoft.Win32;
9+
using System.Reflection;
10+
using System.IO;
1111

1212
namespace FlashDevelop.Controls
1313
{
@@ -21,6 +21,22 @@ public class Browser : UserControl
2121
private System.Windows.Forms.ToolStripSpringComboBox addressComboBox;
2222
private FlashDevelop.Controls.WebBrowserEx webBrowser;
2323

24+
static Browser()
25+
{
26+
try
27+
{
28+
// Sets a key in registry so that latest .NET browser control is used
29+
String valueName = Path.GetFileName(Application.ExecutablePath);
30+
String subKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION\\";
31+
RegistryKey emu = Registry.CurrentUser.OpenSubKey(subKey, true);
32+
{
33+
Object value = emu.GetValue(valueName);
34+
if (value == null) emu.SetValue(valueName, 0, RegistryValueKind.DWord);
35+
}
36+
}
37+
catch { } // No errors please...
38+
}
39+
2440
public Browser()
2541
{
2642
this.Font = Globals.Settings.DefaultFont;

0 commit comments

Comments
 (0)