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:
parent
2de9570c38
commit
c6aaa4fb04
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user