1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-04 17:34:07 +02:00

Revert "Hopefully fix a completely random bug that opened links in notifications in the popup window?"

This reverts commit 2de9570c38.
This commit is contained in:
chylex 2016-07-06 02:04:26 +02:00
parent 2de9570c38
commit c6aaa4fb04
3 changed files with 2 additions and 13 deletions

View File

@ -53,7 +53,7 @@ public FormBrowser(PluginManager pluginManager){
browser = new ChromiumWebBrowser("https://tweetdeck.twitter.com/"){
MenuHandler = new ContextMenuBrowser(this),
DialogHandler = new DialogHandlerBrowser(this),
LifeSpanHandler = new LifeSpanHandler(false)
LifeSpanHandler = new LifeSpanHandler()
};
browser.LoadingStateChanged += Browser_LoadingStateChanged;

View File

@ -95,7 +95,7 @@ public FormNotification(FormBrowser owner, PluginManager plugins, TrayIcon trayI
browser = new ChromiumWebBrowser("about:blank"){
MenuHandler = new ContextMenuNotification(this,autoHide),
LifeSpanHandler = new LifeSpanHandler(true)
LifeSpanHandler = new LifeSpanHandler()
};
browser.IsBrowserInitializedChanged += Browser_IsBrowserInitializedChanged;

View File

@ -3,20 +3,9 @@
namespace TweetDck.Core.Handling{
class LifeSpanHandler : ILifeSpanHandler{
private readonly bool openAllExternally;
public LifeSpanHandler(bool openAllExternally){
this.openAllExternally = openAllExternally;
}
public bool OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser){
newBrowser = null;
if (openAllExternally){
BrowserUtils.OpenExternalBrowser(targetUrl);
return true;
}
switch(targetDisposition){
case WindowOpenDisposition.NewBackgroundTab:
case WindowOpenDisposition.NewForegroundTab: