mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 19:32:10 +02:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
b9096df218 | |||
1137485c55 | |||
61b1155a03 | |||
35624bcb1c | |||
6e262334ed | |||
829d69485a | |||
0d32c168eb | |||
38d6d93f65 | |||
9a280492c2 | |||
d49ee79c90 | |||
73b83af6b1 | |||
064673ef23 | |||
81bf93e5ab | |||
26d5a8ce08 | |||
c6f5c8d91f | |||
63a1928468 | |||
27c2aee8b9 | |||
5219d29aca | |||
84955352dd | |||
8e05c30063 | |||
6f98bcafec |
@@ -22,6 +22,7 @@ namespace TweetDck.Configuration{
|
|||||||
public bool DisplayNotificationColumn { get; set; }
|
public bool DisplayNotificationColumn { get; set; }
|
||||||
public bool DisplayNotificationTimer { get; set; }
|
public bool DisplayNotificationTimer { get; set; }
|
||||||
public bool NotificationTimerCountDown { get; set; }
|
public bool NotificationTimerCountDown { get; set; }
|
||||||
|
public bool NotificationSkipOnLinkClick { get; set; }
|
||||||
public bool NotificationNonIntrusiveMode { get; set; }
|
public bool NotificationNonIntrusiveMode { get; set; }
|
||||||
|
|
||||||
public TweetNotification.Position NotificationPosition { get; set; }
|
public TweetNotification.Position NotificationPosition { get; set; }
|
||||||
|
@@ -8,10 +8,12 @@ namespace TweetDck.Core.Bridge{
|
|||||||
ExpandLinksOnHover = 1,
|
ExpandLinksOnHover = 1,
|
||||||
MuteNotifications = 2,
|
MuteNotifications = 2,
|
||||||
HasCustomNotificationSound = 4,
|
HasCustomNotificationSound = 4,
|
||||||
All = ExpandLinksOnHover | MuteNotifications | HasCustomNotificationSound
|
SkipOnLinkClick = 8,
|
||||||
|
AllBrowser = ExpandLinksOnHover | MuteNotifications | HasCustomNotificationSound,
|
||||||
|
AllNotification = ExpandLinksOnHover | SkipOnLinkClick
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GenerateScript(Properties properties = Properties.All){
|
public static string GenerateScript(Properties properties){
|
||||||
StringBuilder build = new StringBuilder();
|
StringBuilder build = new StringBuilder();
|
||||||
build.Append("(function(c){");
|
build.Append("(function(c){");
|
||||||
|
|
||||||
@@ -27,6 +29,10 @@ namespace TweetDck.Core.Bridge{
|
|||||||
build.Append("c.hasCustomNotificationSound=").Append(Program.UserConfig.NotificationSoundPath.Length > 0 ? "true;" : "false;");
|
build.Append("c.hasCustomNotificationSound=").Append(Program.UserConfig.NotificationSoundPath.Length > 0 ? "true;" : "false;");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (properties.HasFlag(Properties.SkipOnLinkClick)){
|
||||||
|
build.Append("c.skipOnLinkClick=").Append(Program.UserConfig.NotificationSkipOnLinkClick ? "true;" : "false;");
|
||||||
|
}
|
||||||
|
|
||||||
build.Append("})(window.$TDX=window.$TDX||{})");
|
build.Append("})(window.$TDX=window.$TDX||{})");
|
||||||
return build.ToString();
|
return build.ToString();
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Windows.Forms;
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.IO;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using TweetDck.Core.Controls;
|
using TweetDck.Core.Controls;
|
||||||
using TweetDck.Core.Notification;
|
using TweetDck.Core.Notification;
|
||||||
using TweetDck.Core.Utils;
|
using TweetDck.Core.Utils;
|
||||||
@@ -12,10 +8,9 @@ namespace TweetDck.Core.Bridge{
|
|||||||
public static string LastRightClickedLink = string.Empty;
|
public static string LastRightClickedLink = string.Empty;
|
||||||
public static string LastHighlightedTweet = string.Empty;
|
public static string LastHighlightedTweet = string.Empty;
|
||||||
public static string LastHighlightedQuotedTweet = string.Empty;
|
public static string LastHighlightedQuotedTweet = string.Empty;
|
||||||
public static string ClipboardImagePath = string.Empty;
|
|
||||||
|
|
||||||
public static void ResetStaticProperties(){
|
public static void ResetStaticProperties(){
|
||||||
LastRightClickedLink = LastHighlightedTweet = LastHighlightedQuotedTweet = ClipboardImagePath = string.Empty;
|
LastRightClickedLink = LastHighlightedTweet = LastHighlightedQuotedTweet = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly FormBrowser form;
|
private readonly FormBrowser form;
|
||||||
@@ -49,18 +44,14 @@ namespace TweetDck.Core.Bridge{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetNotificationQuotedTweet(string link){
|
|
||||||
notification.InvokeAsyncSafe(() => notification.CurrentQuotedTweetUrl = link);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OpenContextMenu(){
|
public void OpenContextMenu(){
|
||||||
form.InvokeAsyncSafe(form.OpenContextMenu);
|
form.InvokeAsyncSafe(form.OpenContextMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnTweetPopup(string columnName, string tweetHtml, string tweetUrl, int tweetCharacters){
|
public void OnTweetPopup(string columnName, string tweetHtml, int tweetCharacters, string tweetUrl, string quoteUrl){
|
||||||
notification.InvokeAsyncSafe(() => {
|
notification.InvokeAsyncSafe(() => {
|
||||||
form.OnTweetNotification();
|
form.OnTweetNotification();
|
||||||
notification.ShowNotification(new TweetNotification(columnName, tweetHtml, tweetUrl, tweetCharacters));
|
notification.ShowNotification(new TweetNotification(columnName, tweetHtml, tweetCharacters, tweetUrl, quoteUrl));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,30 +75,6 @@ namespace TweetDck.Core.Bridge{
|
|||||||
notification.InvokeAsyncSafe(notification.FinishCurrentNotification);
|
notification.InvokeAsyncSafe(notification.FinishCurrentNotification);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TryPasteImage(){
|
|
||||||
form.InvokeSafe(() => {
|
|
||||||
if (Clipboard.ContainsImage()){
|
|
||||||
Image img = Clipboard.GetImage();
|
|
||||||
if (img == null)return;
|
|
||||||
|
|
||||||
try{
|
|
||||||
Directory.CreateDirectory(Program.TemporaryPath);
|
|
||||||
|
|
||||||
ClipboardImagePath = Path.Combine(Program.TemporaryPath, "TD-Img-"+DateTime.Now.Ticks+".png");
|
|
||||||
img.Save(ClipboardImagePath, ImageFormat.Png);
|
|
||||||
|
|
||||||
form.OnImagePasted();
|
|
||||||
}catch(Exception e){
|
|
||||||
Program.Reporter.HandleException("Clipboard Image Error", "Could not paste image from clipboard.", true, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ClickUploadImage(int offsetX, int offsetY){
|
|
||||||
form.InvokeAsyncSafe(() => form.TriggerImageUpload(offsetX, offsetY));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ScreenshotTweet(string html, int width, int height){
|
public void ScreenshotTweet(string html, int width, int height){
|
||||||
form.InvokeAsyncSafe(() => form.OnTweetScreenshotReady(html, width, height));
|
form.InvokeAsyncSafe(() => form.OnTweetScreenshotReady(html, width, height));
|
||||||
}
|
}
|
||||||
|
3
Core/Controls/FlatProgressBar.Designer.cs
generated
3
Core/Controls/FlatProgressBar.Designer.cs
generated
@@ -1,3 +0,0 @@
|
|||||||
namespace TweetDck.Core.Controls{
|
|
||||||
partial class FlatProgressBar{}
|
|
||||||
}
|
|
@@ -2,7 +2,7 @@
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace TweetDck.Core.Controls{
|
namespace TweetDck.Core.Controls{
|
||||||
sealed partial class FlatProgressBar : ProgressBar{
|
sealed class FlatProgressBar : ProgressBar{
|
||||||
private readonly SolidBrush brush;
|
private readonly SolidBrush brush;
|
||||||
|
|
||||||
public FlatProgressBar(){
|
public FlatProgressBar(){
|
||||||
|
3
Core/Controls/TabButton.Designer.cs
generated
3
Core/Controls/TabButton.Designer.cs
generated
@@ -1,3 +0,0 @@
|
|||||||
namespace TweetDck.Core.Controls{
|
|
||||||
partial class TabButton{}
|
|
||||||
}
|
|
@@ -3,7 +3,7 @@ using System.Drawing;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace TweetDck.Core.Controls{
|
namespace TweetDck.Core.Controls{
|
||||||
sealed partial class TabButton : FlatButton{
|
sealed class TabButton : FlatButton{
|
||||||
public Action Callback { get; private set; }
|
public Action Callback { get; private set; }
|
||||||
|
|
||||||
public void SetupButton(int locationX, int sizeWidth, string title, Action callback){
|
public void SetupButton(int locationX, int sizeWidth, string title, Action callback){
|
||||||
|
@@ -18,6 +18,7 @@ using TweetDck.Core.Notification;
|
|||||||
using TweetDck.Core.Notification.Screenshot;
|
using TweetDck.Core.Notification.Screenshot;
|
||||||
using TweetDck.Updates.Events;
|
using TweetDck.Updates.Events;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using TweetDck.Core.Notification.Sound;
|
using TweetDck.Core.Notification.Sound;
|
||||||
|
|
||||||
namespace TweetDck.Core{
|
namespace TweetDck.Core{
|
||||||
@@ -36,11 +37,8 @@ namespace TweetDck.Core{
|
|||||||
private readonly FormNotificationTweet notification;
|
private readonly FormNotificationTweet notification;
|
||||||
private readonly ContextMenu contextMenu;
|
private readonly ContextMenu contextMenu;
|
||||||
|
|
||||||
private FormSettings currentFormSettings;
|
|
||||||
private FormAbout currentFormAbout;
|
|
||||||
private FormPlugins currentFormPlugins;
|
|
||||||
private bool isLoaded;
|
private bool isLoaded;
|
||||||
|
private bool isBrowserReady;
|
||||||
private FormWindowState prevState;
|
private FormWindowState prevState;
|
||||||
|
|
||||||
private TweetScreenshotManager notificationScreenshotManager;
|
private TweetScreenshotManager notificationScreenshotManager;
|
||||||
@@ -69,7 +67,6 @@ namespace TweetDck.Core{
|
|||||||
|
|
||||||
this.browser = new ChromiumWebBrowser("https://tweetdeck.twitter.com/"){
|
this.browser = new ChromiumWebBrowser("https://tweetdeck.twitter.com/"){
|
||||||
MenuHandler = new ContextMenuBrowser(this),
|
MenuHandler = new ContextMenuBrowser(this),
|
||||||
DialogHandler = new FileDialogHandler(this),
|
|
||||||
JsDialogHandler = new JavaScriptDialogHandler(),
|
JsDialogHandler = new JavaScriptDialogHandler(),
|
||||||
LifeSpanHandler = new LifeSpanHandler()
|
LifeSpanHandler = new LifeSpanHandler()
|
||||||
};
|
};
|
||||||
@@ -120,6 +117,16 @@ namespace TweetDck.Core{
|
|||||||
RestoreWindow();
|
RestoreWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool TryBringToFront<T>() where T : Form{
|
||||||
|
T form = Application.OpenForms.OfType<T>().FirstOrDefault();
|
||||||
|
|
||||||
|
if (form != null){
|
||||||
|
form.BringToFront();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
|
||||||
private void ShowChildForm(Form form){
|
private void ShowChildForm(Form form){
|
||||||
form.VisibleChanged += (sender, args) => form.MoveToCenter(this);
|
form.VisibleChanged += (sender, args) => form.MoveToCenter(this);
|
||||||
form.Show(this);
|
form.Show(this);
|
||||||
@@ -135,13 +142,14 @@ namespace TweetDck.Core{
|
|||||||
private void RestoreWindow(){
|
private void RestoreWindow(){
|
||||||
Config.BrowserWindow.Restore(this, true);
|
Config.BrowserWindow.Restore(this, true);
|
||||||
prevState = WindowState;
|
prevState = WindowState;
|
||||||
|
isLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnLoaded(){
|
private void OnBrowserReady(){
|
||||||
if (!isLoaded){
|
if (!isBrowserReady){
|
||||||
browser.Location = Point.Empty;
|
browser.Location = Point.Empty;
|
||||||
browser.Dock = DockStyle.Fill;
|
browser.Dock = DockStyle.Fill;
|
||||||
isLoaded = true;
|
isBrowserReady = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +165,7 @@ namespace TweetDck.Core{
|
|||||||
browser.AddWordToDictionary(word);
|
browser.AddWordToDictionary(word);
|
||||||
}
|
}
|
||||||
|
|
||||||
BeginInvoke(new Action(OnLoaded));
|
BeginInvoke(new Action(OnBrowserReady));
|
||||||
browser.LoadingStateChanged -= browser_LoadingStateChanged;
|
browser.LoadingStateChanged -= browser_LoadingStateChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,7 +180,7 @@ namespace TweetDck.Core{
|
|||||||
if (e.Frame.IsMain && BrowserUtils.IsTweetDeckWebsite(e.Frame)){
|
if (e.Frame.IsMain && BrowserUtils.IsTweetDeckWebsite(e.Frame)){
|
||||||
e.Frame.ExecuteJavaScriptAsync(BrowserUtils.BackgroundColorFix);
|
e.Frame.ExecuteJavaScriptAsync(BrowserUtils.BackgroundColorFix);
|
||||||
|
|
||||||
UpdateProperties();
|
UpdateProperties(PropertyBridge.Properties.AllBrowser);
|
||||||
ScriptLoader.ExecuteFile(e.Frame, "code.js");
|
ScriptLoader.ExecuteFile(e.Frame, "code.js");
|
||||||
ReinjectCustomCSS(Config.CustomBrowserCSS);
|
ReinjectCustomCSS(Config.CustomBrowserCSS);
|
||||||
|
|
||||||
@@ -321,7 +329,7 @@ namespace TweetDck.Core{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLoaded && m.Msg == 0x210 && (m.WParam.ToInt32() & 0xFFFF) == 0x020B){ // WM_PARENTNOTIFY, WM_XBUTTONDOWN
|
if (isBrowserReady && m.Msg == 0x210 && (m.WParam.ToInt32() & 0xFFFF) == 0x020B){ // WM_PARENTNOTIFY, WM_XBUTTONDOWN
|
||||||
browser.ExecuteScriptAsync("TDGF_onMouseClickExtra", (m.WParam.ToInt32() >> 16) & 0xFFFF);
|
browser.ExecuteScriptAsync("TDGF_onMouseClickExtra", (m.WParam.ToInt32() >> 16) & 0xFFFF);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -349,7 +357,7 @@ namespace TweetDck.Core{
|
|||||||
browser.ExecuteScriptAsync("TDGF_reinjectCustomCSS", css == null ? string.Empty : css.Replace(Environment.NewLine, " "));
|
browser.ExecuteScriptAsync("TDGF_reinjectCustomCSS", css == null ? string.Empty : css.Replace(Environment.NewLine, " "));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateProperties(PropertyBridge.Properties properties = PropertyBridge.Properties.All){
|
public void UpdateProperties(PropertyBridge.Properties properties){
|
||||||
browser.ExecuteScriptAsync(PropertyBridge.GenerateScript(properties));
|
browser.ExecuteScriptAsync(PropertyBridge.GenerateScript(properties));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -368,17 +376,12 @@ namespace TweetDck.Core{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void OpenSettings(int tabIndex){
|
public void OpenSettings(int tabIndex){
|
||||||
if (currentFormSettings != null){
|
if (!TryBringToFront<FormSettings>()){
|
||||||
currentFormSettings.BringToFront();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
bool prevEnableUpdateCheck = Config.EnableUpdateCheck;
|
bool prevEnableUpdateCheck = Config.EnableUpdateCheck;
|
||||||
|
|
||||||
currentFormSettings = new FormSettings(this, plugins, updates, tabIndex);
|
FormSettings form = new FormSettings(this, plugins, updates, tabIndex);
|
||||||
|
|
||||||
currentFormSettings.FormClosed += (sender, args) => {
|
|
||||||
currentFormSettings = null;
|
|
||||||
|
|
||||||
|
form.FormClosed += (sender, args) => {
|
||||||
if (!prevEnableUpdateCheck && Config.EnableUpdateCheck){
|
if (!prevEnableUpdateCheck && Config.EnableUpdateCheck){
|
||||||
updates.DismissUpdate(string.Empty);
|
updates.DismissUpdate(string.Empty);
|
||||||
updates.Check(false);
|
updates.Check(false);
|
||||||
@@ -389,31 +392,22 @@ namespace TweetDck.Core{
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpdateProperties(PropertyBridge.Properties.ExpandLinksOnHover | PropertyBridge.Properties.HasCustomNotificationSound);
|
UpdateProperties(PropertyBridge.Properties.ExpandLinksOnHover | PropertyBridge.Properties.HasCustomNotificationSound);
|
||||||
|
form.Dispose();
|
||||||
};
|
};
|
||||||
|
|
||||||
ShowChildForm(currentFormSettings);
|
ShowChildForm(form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OpenAbout(){
|
public void OpenAbout(){
|
||||||
if (currentFormAbout != null){
|
if (!TryBringToFront<FormAbout>()){
|
||||||
currentFormAbout.BringToFront();
|
ShowChildForm(new FormAbout());
|
||||||
}
|
|
||||||
else{
|
|
||||||
currentFormAbout = new FormAbout();
|
|
||||||
currentFormAbout.FormClosed += (sender, args) => currentFormAbout = null;
|
|
||||||
ShowChildForm(currentFormAbout);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OpenPlugins(){
|
public void OpenPlugins(){
|
||||||
if (currentFormPlugins != null){
|
if (!TryBringToFront<FormPlugins>()){
|
||||||
currentFormPlugins.BringToFront();
|
ShowChildForm(new FormPlugins(plugins));
|
||||||
}
|
|
||||||
else{
|
|
||||||
currentFormPlugins = new FormPlugins(plugins);
|
|
||||||
currentFormPlugins.FormClosed += (sender, args) => currentFormPlugins = null;
|
|
||||||
ShowChildForm(currentFormPlugins);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,16 +449,6 @@ namespace TweetDck.Core{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnImagePasted(){
|
|
||||||
browser.ExecuteScriptAsync("TDGF_tryPasteImage()");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void TriggerImageUpload(int offsetX, int offsetY){
|
|
||||||
IBrowserHost host = browser.GetBrowser().GetHost();
|
|
||||||
host.SendMouseClickEvent(offsetX, offsetY, MouseButtonType.Left, false, 1, CefEventFlags.None);
|
|
||||||
host.SendMouseClickEvent(offsetX, offsetY, MouseButtonType.Left, true, 1, CefEventFlags.None);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void TriggerTweetScreenshot(){
|
public void TriggerTweetScreenshot(){
|
||||||
browser.ExecuteScriptAsync("TDGF_triggerScreenshot()");
|
browser.ExecuteScriptAsync("TDGF_triggerScreenshot()");
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ namespace TweetDck.Core.Handling{
|
|||||||
model.SetChecked((CefMenuCommand)MenuFreeze, form.FreezeTimer);
|
model.SetChecked((CefMenuCommand)MenuFreeze, form.FreezeTimer);
|
||||||
model.AddSeparator();
|
model.AddSeparator();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(form.CurrentUrl)){
|
if (!string.IsNullOrEmpty(form.CurrentTweetUrl)){
|
||||||
model.AddItem((CefMenuCommand)MenuCopyTweetUrl, "Copy tweet address");
|
model.AddItem((CefMenuCommand)MenuCopyTweetUrl, "Copy tweet address");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(form.CurrentQuotedTweetUrl)){
|
if (!string.IsNullOrEmpty(form.CurrentQuoteUrl)){
|
||||||
model.AddItem((CefMenuCommand)MenuCopyQuotedTweetUrl, "Copy quoted tweet address");
|
model.AddItem((CefMenuCommand)MenuCopyQuotedTweetUrl, "Copy quoted tweet address");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,11 +68,11 @@ namespace TweetDck.Core.Handling{
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case MenuCopyTweetUrl:
|
case MenuCopyTweetUrl:
|
||||||
SetClipboardText(form.CurrentUrl);
|
SetClipboardText(form.CurrentTweetUrl);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case MenuCopyQuotedTweetUrl:
|
case MenuCopyQuotedTweetUrl:
|
||||||
SetClipboardText(form.CurrentQuotedTweetUrl);
|
SetClipboardText(form.CurrentQuoteUrl);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
using CefSharp;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using TweetDck.Core.Bridge;
|
|
||||||
using TweetDck.Core.Controls;
|
|
||||||
|
|
||||||
namespace TweetDck.Core.Handling{
|
|
||||||
class FileDialogHandler : IDialogHandler{
|
|
||||||
private readonly FormBrowser form;
|
|
||||||
|
|
||||||
public FileDialogHandler(FormBrowser form){
|
|
||||||
this.form = form;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback){
|
|
||||||
if (!string.IsNullOrEmpty(TweetDeckBridge.ClipboardImagePath)){
|
|
||||||
callback.Continue(selectedAcceptFilter, new List<string>{ TweetDeckBridge.ClipboardImagePath });
|
|
||||||
|
|
||||||
form.InvokeSafe(() => {
|
|
||||||
TweetDeckBridge.ClipboardImagePath = string.Empty;
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
66
Core/Handling/ResourceHandlerNotification.cs
Normal file
66
Core/Handling/ResourceHandlerNotification.cs
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
using CefSharp;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Handling{
|
||||||
|
class ResourceHandlerNotification : IResourceHandler{
|
||||||
|
private readonly NameValueCollection headers = new NameValueCollection(0);
|
||||||
|
private MemoryStream dataIn;
|
||||||
|
|
||||||
|
public void SetHTML(string html){
|
||||||
|
if (dataIn != null){
|
||||||
|
dataIn.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
dataIn = ResourceHandler.GetMemoryStream(html, Encoding.UTF8);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose(){
|
||||||
|
if (dataIn != null){
|
||||||
|
dataIn.Dispose();
|
||||||
|
dataIn = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IResourceHandler.ProcessRequest(IRequest request, ICallback callback){
|
||||||
|
callback.Continue();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IResourceHandler.GetResponseHeaders(IResponse response, out long responseLength, out string redirectUrl){
|
||||||
|
redirectUrl = null;
|
||||||
|
|
||||||
|
response.MimeType = "text/html";
|
||||||
|
response.StatusCode = 200;
|
||||||
|
response.StatusText = "OK";
|
||||||
|
response.ResponseHeaders = headers;
|
||||||
|
responseLength = dataIn != null ? dataIn.Length : -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IResourceHandler.ReadResponse(Stream dataOut, out int bytesRead, ICallback callback){
|
||||||
|
callback.Dispose();
|
||||||
|
|
||||||
|
try{
|
||||||
|
int length = (int)dataIn.Length;
|
||||||
|
|
||||||
|
dataIn.CopyTo(dataOut, length);
|
||||||
|
bytesRead = length;
|
||||||
|
return true;
|
||||||
|
}catch{ // catch IOException, possibly NullReferenceException if dataIn is null
|
||||||
|
bytesRead = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IResourceHandler.CanGetCookie(Cookie cookie){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IResourceHandler.CanSetCookie(Cookie cookie){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IResourceHandler.Cancel(){}
|
||||||
|
}
|
||||||
|
}
|
@@ -71,6 +71,8 @@ namespace TweetDck.Core.Notification{
|
|||||||
protected readonly Form owner;
|
protected readonly Form owner;
|
||||||
protected readonly ChromiumWebBrowser browser;
|
protected readonly ChromiumWebBrowser browser;
|
||||||
|
|
||||||
|
private readonly ResourceHandlerNotification resourceHandler = new ResourceHandlerNotification();
|
||||||
|
|
||||||
private string currentColumn;
|
private string currentColumn;
|
||||||
private int pauseCounter;
|
private int pauseCounter;
|
||||||
|
|
||||||
@@ -88,8 +90,8 @@ namespace TweetDck.Core.Notification{
|
|||||||
|
|
||||||
public bool FreezeTimer { get; set; }
|
public bool FreezeTimer { get; set; }
|
||||||
public bool ContextMenuOpen { get; set; }
|
public bool ContextMenuOpen { get; set; }
|
||||||
public string CurrentUrl { get; private set; }
|
public string CurrentTweetUrl { get; private set; }
|
||||||
public string CurrentQuotedTweetUrl { get; set; }
|
public string CurrentQuoteUrl { get; private set; }
|
||||||
|
|
||||||
public event EventHandler Initialized;
|
public event EventHandler Initialized;
|
||||||
|
|
||||||
@@ -106,12 +108,14 @@ namespace TweetDck.Core.Notification{
|
|||||||
|
|
||||||
this.browser.Dock = DockStyle.None;
|
this.browser.Dock = DockStyle.None;
|
||||||
this.browser.ClientSize = ClientSize;
|
this.browser.ClientSize = ClientSize;
|
||||||
|
this.browser.IsBrowserInitializedChanged += Browser_IsBrowserInitializedChanged;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
this.browser.ConsoleMessage += BrowserUtils.HandleConsoleMessage;
|
this.browser.ConsoleMessage += BrowserUtils.HandleConsoleMessage;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
this.browser.IsBrowserInitializedChanged += Browser_IsBrowserInitializedChanged;
|
DefaultResourceHandlerFactory handlerFactory = (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
|
||||||
|
handlerFactory.RegisterHandler("https://tweetdeck.twitter.com", this.resourceHandler);
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
|
|
||||||
@@ -148,7 +152,7 @@ namespace TweetDck.Core.Notification{
|
|||||||
|
|
||||||
public virtual void HideNotification(bool loadBlank){
|
public virtual void HideNotification(bool loadBlank){
|
||||||
if (loadBlank){
|
if (loadBlank){
|
||||||
browser.LoadHtml("", "about:blank");
|
browser.Load("about:blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
Location = ControlExtensions.InvisibleLocation;
|
Location = ControlExtensions.InvisibleLocation;
|
||||||
@@ -175,10 +179,12 @@ namespace TweetDck.Core.Notification{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void LoadTweet(TweetNotification tweet){
|
protected virtual void LoadTweet(TweetNotification tweet){
|
||||||
CurrentUrl = tweet.Url;
|
CurrentTweetUrl = tweet.TweetUrl;
|
||||||
CurrentQuotedTweetUrl = string.Empty; // load from JS
|
CurrentQuoteUrl = tweet.QuoteUrl;
|
||||||
currentColumn = tweet.Column;
|
currentColumn = tweet.Column;
|
||||||
browser.LoadHtml(GetTweetHTML(tweet), "http://tweetdeck.twitter.com/?"+DateTime.Now.Ticks);
|
|
||||||
|
resourceHandler.SetHTML(GetTweetHTML(tweet));
|
||||||
|
browser.Load("https://tweetdeck.twitter.com");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void SetNotificationSize(int width, int height){
|
protected virtual void SetNotificationSize(int width, int height){
|
||||||
|
@@ -96,8 +96,9 @@ namespace TweetDck.Core.Notification{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){
|
private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){
|
||||||
if (wParam.ToInt32() == NativeMethods.WM_MOUSEWHEEL && browser.Bounds.Contains(PointToClient(Cursor.Position)) && !ContainsFocus && !owner.ContainsFocus){
|
if (nCode == 0 && wParam.ToInt32() == NativeMethods.WM_MOUSEWHEEL && browser.Bounds.Contains(PointToClient(Cursor.Position)) && !ContainsFocus && !owner.ContainsFocus){
|
||||||
browser.SendMouseWheelEvent(0, 0, 0, NativeMethods.GetHookWheelDelta(lParam), CefEventFlags.None);
|
browser.SendMouseWheelEvent(0, 0, 0, NativeMethods.GetHookWheelDelta(lParam), CefEventFlags.None);
|
||||||
|
return NativeMethods.HOOK_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NativeMethods.CallNextHookEx(mouseHook, nCode, wParam, lParam);
|
return NativeMethods.CallNextHookEx(mouseHook, nCode, wParam, lParam);
|
||||||
@@ -107,7 +108,7 @@ namespace TweetDck.Core.Notification{
|
|||||||
|
|
||||||
private void FormNotification_FormClosing(object sender, FormClosingEventArgs e){
|
private void FormNotification_FormClosing(object sender, FormClosingEventArgs e){
|
||||||
if (e.CloseReason == CloseReason.UserClosing){
|
if (e.CloseReason == CloseReason.UserClosing){
|
||||||
HideNotification(false);
|
HideNotification(true);
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,7 +124,7 @@ namespace TweetDck.Core.Notification{
|
|||||||
|
|
||||||
private void Browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){
|
private void Browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){
|
||||||
if (e.Frame.IsMain && NotificationJS != null && browser.Address != "about:blank"){
|
if (e.Frame.IsMain && NotificationJS != null && browser.Address != "about:blank"){
|
||||||
e.Frame.ExecuteJavaScriptAsync(PropertyBridge.GenerateScript(PropertyBridge.Properties.ExpandLinksOnHover));
|
e.Frame.ExecuteJavaScriptAsync(PropertyBridge.GenerateScript(PropertyBridge.Properties.AllNotification));
|
||||||
ScriptLoader.ExecuteScript(e.Frame, NotificationJS, NotificationScriptIdentifier);
|
ScriptLoader.ExecuteScript(e.Frame, NotificationJS, NotificationScriptIdentifier);
|
||||||
|
|
||||||
if (plugins.HasAnyPlugin(PluginEnvironment.Notification)){
|
if (plugins.HasAnyPlugin(PluginEnvironment.Notification)){
|
||||||
|
@@ -8,6 +8,7 @@ using TweetDck.Core.Utils;
|
|||||||
namespace TweetDck.Core.Notification{
|
namespace TweetDck.Core.Notification{
|
||||||
sealed partial class FormNotificationTweet : FormNotificationMain{
|
sealed partial class FormNotificationTweet : FormNotificationMain{
|
||||||
private const int NonIntrusiveIdleLimit = 30;
|
private const int NonIntrusiveIdleLimit = 30;
|
||||||
|
private const int TrimMinimum = 32;
|
||||||
|
|
||||||
private bool IsCursorOverNotificationArea{
|
private bool IsCursorOverNotificationArea{
|
||||||
get{
|
get{
|
||||||
@@ -16,6 +17,7 @@ namespace TweetDck.Core.Notification{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readonly Queue<TweetNotification> tweetQueue = new Queue<TweetNotification>(4);
|
private readonly Queue<TweetNotification> tweetQueue = new Queue<TweetNotification>(4);
|
||||||
|
private bool needsTrim;
|
||||||
|
|
||||||
public FormNotificationTweet(FormBrowser owner, PluginManager pluginManager) : base(owner, pluginManager, true){
|
public FormNotificationTweet(FormBrowser owner, PluginManager pluginManager) : base(owner, pluginManager, true){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -31,6 +33,14 @@ namespace TweetDck.Core.Notification{
|
|||||||
private void FormNotificationTweet_FormClosing(object sender, FormClosingEventArgs e){
|
private void FormNotificationTweet_FormClosing(object sender, FormClosingEventArgs e){
|
||||||
if (e.CloseReason == CloseReason.UserClosing){
|
if (e.CloseReason == CloseReason.UserClosing){
|
||||||
tweetQueue.Clear(); // already canceled
|
tweetQueue.Clear(); // already canceled
|
||||||
|
TrimQueue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TrimQueue(){
|
||||||
|
if (needsTrim){
|
||||||
|
tweetQueue.TrimExcess();
|
||||||
|
needsTrim = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +83,8 @@ namespace TweetDck.Core.Notification{
|
|||||||
LoadNextNotification();
|
LoadNextNotification();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
needsTrim |= tweetQueue.Count >= TrimMinimum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void FinishCurrentNotification(){
|
public override void FinishCurrentNotification(){
|
||||||
@@ -81,6 +93,7 @@ namespace TweetDck.Core.Notification{
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
HideNotification(true);
|
HideNotification(true);
|
||||||
|
TrimQueue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using CefSharp;
|
|
||||||
using TweetDck.Core.Bridge;
|
using TweetDck.Core.Bridge;
|
||||||
using TweetDck.Core.Controls;
|
|
||||||
using TweetDck.Resources;
|
using TweetDck.Resources;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
@@ -20,8 +18,12 @@ namespace TweetDck.Core.Notification.Screenshot{
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string GetTweetHTML(TweetNotification tweet){
|
||||||
|
return tweet.GenerateHtml(enableCustomCSS: false);
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadNotificationForScreenshot(TweetNotification tweet, int width, int height){
|
public void LoadNotificationForScreenshot(TweetNotification tweet, int width, int height){
|
||||||
browser.LoadHtml(tweet.GenerateHtml(enableCustomCSS: false), "http://tweetdeck.twitter.com/?"+DateTime.Now.Ticks);
|
LoadTweet(tweet);
|
||||||
SetNotificationSize(width, height);
|
SetNotificationSize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ namespace TweetDck.Core.Notification.Screenshot{
|
|||||||
CanMoveWindow = () => false
|
CanMoveWindow = () => false
|
||||||
};
|
};
|
||||||
|
|
||||||
screenshot.LoadNotificationForScreenshot(new TweetNotification(string.Empty, html, string.Empty, 0), width, height);
|
screenshot.LoadNotificationForScreenshot(new TweetNotification(string.Empty, html, 0, string.Empty, string.Empty), width, height);
|
||||||
screenshot.Show();
|
screenshot.Show();
|
||||||
timeout.Start();
|
timeout.Start();
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@ namespace TweetDck.Core.Notification{
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return new TweetNotification("Home", ExampleTweetHTML, "", 95, true);
|
return new TweetNotification("Home", ExampleTweetHTML, 95, string.Empty, string.Empty, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,24 +57,32 @@ namespace TweetDck.Core.Notification{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Url{
|
public string TweetUrl{
|
||||||
get{
|
get{
|
||||||
return url;
|
return tweetUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string QuoteUrl{
|
||||||
|
get{
|
||||||
|
return quoteUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly string column;
|
private readonly string column;
|
||||||
private readonly string html;
|
private readonly string html;
|
||||||
private readonly string url;
|
|
||||||
private readonly int characters;
|
private readonly int characters;
|
||||||
|
private readonly string tweetUrl;
|
||||||
|
private readonly string quoteUrl;
|
||||||
private readonly bool isExample;
|
private readonly bool isExample;
|
||||||
|
|
||||||
public TweetNotification(string column, string html, string url, int characters) : this(column, html, url, characters, false){}
|
public TweetNotification(string column, string html, int characters, string tweetUrl, string quoteUrl) : this(column, html, characters, tweetUrl, quoteUrl, false){}
|
||||||
|
|
||||||
private TweetNotification(string column, string html, string url, int characters, bool isExample){
|
private TweetNotification(string column, string html, int characters, string tweetUrl, string quoteUrl, bool isExample){
|
||||||
this.column = column;
|
this.column = column;
|
||||||
this.html = html;
|
this.html = html;
|
||||||
this.url = url;
|
this.tweetUrl = tweetUrl;
|
||||||
|
this.quoteUrl = quoteUrl;
|
||||||
this.characters = characters;
|
this.characters = characters;
|
||||||
this.isExample = isExample;
|
this.isExample = isExample;
|
||||||
}
|
}
|
||||||
@@ -98,7 +106,7 @@ namespace TweetDck.Core.Notification{
|
|||||||
}
|
}
|
||||||
|
|
||||||
build.Append("</head>");
|
build.Append("</head>");
|
||||||
build.Append("<body class='hearty scroll-styled-v");
|
build.Append("<body class='scroll-styled-v");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(bodyClasses)){
|
if (!string.IsNullOrEmpty(bodyClasses)){
|
||||||
build.Append(' ').Append(bodyClasses);
|
build.Append(' ').Append(bodyClasses);
|
||||||
|
11
Core/Other/FormSettings.Designer.cs
generated
11
Core/Other/FormSettings.Designer.cs
generated
@@ -32,7 +32,7 @@
|
|||||||
//
|
//
|
||||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnClose.AutoSize = true;
|
this.btnClose.AutoSize = true;
|
||||||
this.btnClose.Location = new System.Drawing.Point(443, 331);
|
this.btnClose.Location = new System.Drawing.Point(443, 349);
|
||||||
this.btnClose.Name = "btnClose";
|
this.btnClose.Name = "btnClose";
|
||||||
this.btnClose.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
this.btnClose.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
this.btnClose.Size = new System.Drawing.Size(49, 23);
|
this.btnClose.Size = new System.Drawing.Size(49, 23);
|
||||||
@@ -43,8 +43,9 @@
|
|||||||
//
|
//
|
||||||
// labelTip
|
// labelTip
|
||||||
//
|
//
|
||||||
|
this.labelTip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.labelTip.AutoSize = true;
|
this.labelTip.AutoSize = true;
|
||||||
this.labelTip.Location = new System.Drawing.Point(12, 333);
|
this.labelTip.Location = new System.Drawing.Point(12, 351);
|
||||||
this.labelTip.Name = "labelTip";
|
this.labelTip.Name = "labelTip";
|
||||||
this.labelTip.Size = new System.Drawing.Size(310, 13);
|
this.labelTip.Size = new System.Drawing.Size(310, 13);
|
||||||
this.labelTip.TabIndex = 5;
|
this.labelTip.TabIndex = 5;
|
||||||
@@ -57,19 +58,19 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.tabPanel.Location = new System.Drawing.Point(12, 12);
|
this.tabPanel.Location = new System.Drawing.Point(12, 12);
|
||||||
this.tabPanel.Name = "tabPanel";
|
this.tabPanel.Name = "tabPanel";
|
||||||
this.tabPanel.Size = new System.Drawing.Size(480, 313);
|
this.tabPanel.Size = new System.Drawing.Size(480, 331);
|
||||||
this.tabPanel.TabIndex = 3;
|
this.tabPanel.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// FormSettings
|
// FormSettings
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(504, 366);
|
this.ClientSize = new System.Drawing.Size(504, 384);
|
||||||
this.Controls.Add(this.labelTip);
|
this.Controls.Add(this.labelTip);
|
||||||
this.Controls.Add(this.btnClose);
|
this.Controls.Add(this.btnClose);
|
||||||
this.Controls.Add(this.tabPanel);
|
this.Controls.Add(this.tabPanel);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
this.Icon = Properties.Resources.icon;
|
this.Icon = global::TweetDck.Properties.Resources.icon;
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "FormSettings";
|
this.Name = "FormSettings";
|
||||||
|
3
Core/Other/Settings/BaseTabSettings.Designer.cs
generated
3
Core/Other/Settings/BaseTabSettings.Designer.cs
generated
@@ -1,3 +0,0 @@
|
|||||||
namespace TweetDck.Core.Other.Settings{
|
|
||||||
partial class BaseTabSettings{}
|
|
||||||
}
|
|
@@ -2,7 +2,7 @@
|
|||||||
using TweetDck.Configuration;
|
using TweetDck.Configuration;
|
||||||
|
|
||||||
namespace TweetDck.Core.Other.Settings{
|
namespace TweetDck.Core.Other.Settings{
|
||||||
partial class BaseTabSettings : UserControl{
|
class BaseTabSettings : UserControl{
|
||||||
protected static UserConfig Config{
|
protected static UserConfig Config{
|
||||||
get{
|
get{
|
||||||
return Program.UserConfig;
|
return Program.UserConfig;
|
||||||
|
@@ -133,7 +133,7 @@
|
|||||||
//
|
//
|
||||||
this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.btnReset.AutoSize = true;
|
this.btnReset.AutoSize = true;
|
||||||
this.btnReset.Location = new System.Drawing.Point(190, 250);
|
this.btnReset.Location = new System.Drawing.Point(190, 268);
|
||||||
this.btnReset.Name = "btnReset";
|
this.btnReset.Name = "btnReset";
|
||||||
this.btnReset.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
this.btnReset.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
this.btnReset.Size = new System.Drawing.Size(102, 23);
|
this.btnReset.Size = new System.Drawing.Size(102, 23);
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
//
|
//
|
||||||
this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.btnImport.AutoSize = true;
|
this.btnImport.AutoSize = true;
|
||||||
this.btnImport.Location = new System.Drawing.Point(100, 250);
|
this.btnImport.Location = new System.Drawing.Point(100, 268);
|
||||||
this.btnImport.Name = "btnImport";
|
this.btnImport.Name = "btnImport";
|
||||||
this.btnImport.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
this.btnImport.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
this.btnImport.Size = new System.Drawing.Size(84, 23);
|
this.btnImport.Size = new System.Drawing.Size(84, 23);
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.btnExport.AutoSize = true;
|
this.btnExport.AutoSize = true;
|
||||||
this.btnExport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.btnExport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.btnExport.Location = new System.Drawing.Point(9, 250);
|
this.btnExport.Location = new System.Drawing.Point(9, 268);
|
||||||
this.btnExport.Name = "btnExport";
|
this.btnExport.Name = "btnExport";
|
||||||
this.btnExport.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
this.btnExport.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
this.btnExport.Size = new System.Drawing.Size(85, 23);
|
this.btnExport.Size = new System.Drawing.Size(85, 23);
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
this.Controls.Add(this.btnImport);
|
this.Controls.Add(this.btnImport);
|
||||||
this.Controls.Add(this.btnExport);
|
this.Controls.Add(this.btnExport);
|
||||||
this.Name = "TabSettingsAdvanced";
|
this.Name = "TabSettingsAdvanced";
|
||||||
this.Size = new System.Drawing.Size(478, 282);
|
this.Size = new System.Drawing.Size(478, 300);
|
||||||
this.groupPerformance.ResumeLayout(false);
|
this.groupPerformance.ResumeLayout(false);
|
||||||
this.groupPerformance.PerformLayout();
|
this.groupPerformance.PerformLayout();
|
||||||
this.groupConfiguration.ResumeLayout(false);
|
this.groupConfiguration.ResumeLayout(false);
|
||||||
|
@@ -163,7 +163,7 @@
|
|||||||
this.Controls.Add(this.groupInterface);
|
this.Controls.Add(this.groupInterface);
|
||||||
this.Controls.Add(this.groupTray);
|
this.Controls.Add(this.groupTray);
|
||||||
this.Name = "TabSettingsGeneral";
|
this.Name = "TabSettingsGeneral";
|
||||||
this.Size = new System.Drawing.Size(478, 282);
|
this.Size = new System.Drawing.Size(478, 300);
|
||||||
this.groupTray.ResumeLayout(false);
|
this.groupTray.ResumeLayout(false);
|
||||||
this.groupTray.PerformLayout();
|
this.groupTray.PerformLayout();
|
||||||
this.groupInterface.ResumeLayout(false);
|
this.groupInterface.ResumeLayout(false);
|
||||||
|
@@ -43,13 +43,14 @@
|
|||||||
this.labelDurationValue = new System.Windows.Forms.Label();
|
this.labelDurationValue = new System.Windows.Forms.Label();
|
||||||
this.trackBarDuration = new System.Windows.Forms.TrackBar();
|
this.trackBarDuration = new System.Windows.Forms.TrackBar();
|
||||||
this.groupUserInterface = new System.Windows.Forms.GroupBox();
|
this.groupUserInterface = new System.Windows.Forms.GroupBox();
|
||||||
|
this.checkSkipOnLinkClick = new System.Windows.Forms.CheckBox();
|
||||||
this.checkColumnName = new System.Windows.Forms.CheckBox();
|
this.checkColumnName = new System.Windows.Forms.CheckBox();
|
||||||
this.labelIdlePause = new System.Windows.Forms.Label();
|
this.labelIdlePause = new System.Windows.Forms.Label();
|
||||||
this.comboBoxIdlePause = new System.Windows.Forms.ComboBox();
|
this.comboBoxIdlePause = new System.Windows.Forms.ComboBox();
|
||||||
this.checkNonIntrusive = new System.Windows.Forms.CheckBox();
|
this.checkNonIntrusive = new System.Windows.Forms.CheckBox();
|
||||||
this.checkTimerCountDown = new System.Windows.Forms.CheckBox();
|
|
||||||
this.checkNotificationTimer = new System.Windows.Forms.CheckBox();
|
|
||||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||||
|
this.checkNotificationTimer = new System.Windows.Forms.CheckBox();
|
||||||
|
this.checkTimerCountDown = new System.Windows.Forms.CheckBox();
|
||||||
this.groupNotificationLocation.SuspendLayout();
|
this.groupNotificationLocation.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.trackBarEdgeDistance)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.trackBarEdgeDistance)).BeginInit();
|
||||||
this.groupNotificationDuration.SuspendLayout();
|
this.groupNotificationDuration.SuspendLayout();
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
this.groupNotificationLocation.Controls.Add(this.trackBarEdgeDistance);
|
this.groupNotificationLocation.Controls.Add(this.trackBarEdgeDistance);
|
||||||
this.groupNotificationLocation.Location = new System.Drawing.Point(198, 9);
|
this.groupNotificationLocation.Location = new System.Drawing.Point(198, 9);
|
||||||
this.groupNotificationLocation.Name = "groupNotificationLocation";
|
this.groupNotificationLocation.Name = "groupNotificationLocation";
|
||||||
this.groupNotificationLocation.Size = new System.Drawing.Size(183, 264);
|
this.groupNotificationLocation.Size = new System.Drawing.Size(183, 282);
|
||||||
this.groupNotificationLocation.TabIndex = 2;
|
this.groupNotificationLocation.TabIndex = 2;
|
||||||
this.groupNotificationLocation.TabStop = false;
|
this.groupNotificationLocation.TabStop = false;
|
||||||
this.groupNotificationLocation.Text = "Location";
|
this.groupNotificationLocation.Text = "Location";
|
||||||
@@ -80,7 +81,7 @@
|
|||||||
// labelEdgeDistanceValue
|
// labelEdgeDistanceValue
|
||||||
//
|
//
|
||||||
this.labelEdgeDistanceValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.labelEdgeDistanceValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.labelEdgeDistanceValue.Location = new System.Drawing.Point(143, 214);
|
this.labelEdgeDistanceValue.Location = new System.Drawing.Point(143, 217);
|
||||||
this.labelEdgeDistanceValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
this.labelEdgeDistanceValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
||||||
this.labelEdgeDistanceValue.Name = "labelEdgeDistanceValue";
|
this.labelEdgeDistanceValue.Name = "labelEdgeDistanceValue";
|
||||||
this.labelEdgeDistanceValue.Size = new System.Drawing.Size(34, 13);
|
this.labelEdgeDistanceValue.Size = new System.Drawing.Size(34, 13);
|
||||||
@@ -112,8 +113,8 @@
|
|||||||
// labelEdgeDistance
|
// labelEdgeDistance
|
||||||
//
|
//
|
||||||
this.labelEdgeDistance.AutoSize = true;
|
this.labelEdgeDistance.AutoSize = true;
|
||||||
this.labelEdgeDistance.Location = new System.Drawing.Point(5, 193);
|
this.labelEdgeDistance.Location = new System.Drawing.Point(5, 196);
|
||||||
this.labelEdgeDistance.Margin = new System.Windows.Forms.Padding(3, 9, 3, 0);
|
this.labelEdgeDistance.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0);
|
||||||
this.labelEdgeDistance.Name = "labelEdgeDistance";
|
this.labelEdgeDistance.Name = "labelEdgeDistance";
|
||||||
this.labelEdgeDistance.Size = new System.Drawing.Size(103, 13);
|
this.labelEdgeDistance.Size = new System.Drawing.Size(103, 13);
|
||||||
this.labelEdgeDistance.TabIndex = 7;
|
this.labelEdgeDistance.TabIndex = 7;
|
||||||
@@ -185,7 +186,7 @@
|
|||||||
this.trackBarEdgeDistance.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.trackBarEdgeDistance.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.trackBarEdgeDistance.LargeChange = 8;
|
this.trackBarEdgeDistance.LargeChange = 8;
|
||||||
this.trackBarEdgeDistance.Location = new System.Drawing.Point(8, 209);
|
this.trackBarEdgeDistance.Location = new System.Drawing.Point(8, 212);
|
||||||
this.trackBarEdgeDistance.Maximum = 40;
|
this.trackBarEdgeDistance.Maximum = 40;
|
||||||
this.trackBarEdgeDistance.Minimum = 8;
|
this.trackBarEdgeDistance.Minimum = 8;
|
||||||
this.trackBarEdgeDistance.Name = "trackBarEdgeDistance";
|
this.trackBarEdgeDistance.Name = "trackBarEdgeDistance";
|
||||||
@@ -200,7 +201,7 @@
|
|||||||
this.groupNotificationDuration.Controls.Add(this.tableLayoutDurationButtons);
|
this.groupNotificationDuration.Controls.Add(this.tableLayoutDurationButtons);
|
||||||
this.groupNotificationDuration.Controls.Add(this.labelDurationValue);
|
this.groupNotificationDuration.Controls.Add(this.labelDurationValue);
|
||||||
this.groupNotificationDuration.Controls.Add(this.trackBarDuration);
|
this.groupNotificationDuration.Controls.Add(this.trackBarDuration);
|
||||||
this.groupNotificationDuration.Location = new System.Drawing.Point(9, 184);
|
this.groupNotificationDuration.Location = new System.Drawing.Point(9, 202);
|
||||||
this.groupNotificationDuration.Name = "groupNotificationDuration";
|
this.groupNotificationDuration.Name = "groupNotificationDuration";
|
||||||
this.groupNotificationDuration.Size = new System.Drawing.Size(183, 89);
|
this.groupNotificationDuration.Size = new System.Drawing.Size(183, 89);
|
||||||
this.groupNotificationDuration.TabIndex = 1;
|
this.groupNotificationDuration.TabIndex = 1;
|
||||||
@@ -298,6 +299,7 @@
|
|||||||
//
|
//
|
||||||
// groupUserInterface
|
// groupUserInterface
|
||||||
//
|
//
|
||||||
|
this.groupUserInterface.Controls.Add(this.checkSkipOnLinkClick);
|
||||||
this.groupUserInterface.Controls.Add(this.checkColumnName);
|
this.groupUserInterface.Controls.Add(this.checkColumnName);
|
||||||
this.groupUserInterface.Controls.Add(this.labelIdlePause);
|
this.groupUserInterface.Controls.Add(this.labelIdlePause);
|
||||||
this.groupUserInterface.Controls.Add(this.comboBoxIdlePause);
|
this.groupUserInterface.Controls.Add(this.comboBoxIdlePause);
|
||||||
@@ -306,11 +308,23 @@
|
|||||||
this.groupUserInterface.Controls.Add(this.checkNotificationTimer);
|
this.groupUserInterface.Controls.Add(this.checkNotificationTimer);
|
||||||
this.groupUserInterface.Location = new System.Drawing.Point(9, 9);
|
this.groupUserInterface.Location = new System.Drawing.Point(9, 9);
|
||||||
this.groupUserInterface.Name = "groupUserInterface";
|
this.groupUserInterface.Name = "groupUserInterface";
|
||||||
this.groupUserInterface.Size = new System.Drawing.Size(183, 169);
|
this.groupUserInterface.Size = new System.Drawing.Size(183, 187);
|
||||||
this.groupUserInterface.TabIndex = 0;
|
this.groupUserInterface.TabIndex = 0;
|
||||||
this.groupUserInterface.TabStop = false;
|
this.groupUserInterface.TabStop = false;
|
||||||
this.groupUserInterface.Text = "General";
|
this.groupUserInterface.Text = "General";
|
||||||
//
|
//
|
||||||
|
// checkSkipOnLinkClick
|
||||||
|
//
|
||||||
|
this.checkSkipOnLinkClick.AutoSize = true;
|
||||||
|
this.checkSkipOnLinkClick.Location = new System.Drawing.Point(9, 90);
|
||||||
|
this.checkSkipOnLinkClick.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
||||||
|
this.checkSkipOnLinkClick.Name = "checkSkipOnLinkClick";
|
||||||
|
this.checkSkipOnLinkClick.Size = new System.Drawing.Size(113, 17);
|
||||||
|
this.checkSkipOnLinkClick.TabIndex = 3;
|
||||||
|
this.checkSkipOnLinkClick.Text = "Skip On Link Click";
|
||||||
|
this.toolTip.SetToolTip(this.checkSkipOnLinkClick, "Skips current notification when a link\r\ninside the notification is clicked.");
|
||||||
|
this.checkSkipOnLinkClick.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// checkColumnName
|
// checkColumnName
|
||||||
//
|
//
|
||||||
this.checkColumnName.AutoSize = true;
|
this.checkColumnName.AutoSize = true;
|
||||||
@@ -318,7 +332,7 @@
|
|||||||
this.checkColumnName.Margin = new System.Windows.Forms.Padding(6, 5, 3, 3);
|
this.checkColumnName.Margin = new System.Windows.Forms.Padding(6, 5, 3, 3);
|
||||||
this.checkColumnName.Name = "checkColumnName";
|
this.checkColumnName.Name = "checkColumnName";
|
||||||
this.checkColumnName.Size = new System.Drawing.Size(129, 17);
|
this.checkColumnName.Size = new System.Drawing.Size(129, 17);
|
||||||
this.checkColumnName.TabIndex = 5;
|
this.checkColumnName.TabIndex = 0;
|
||||||
this.checkColumnName.Text = "Display Column Name";
|
this.checkColumnName.Text = "Display Column Name";
|
||||||
this.toolTip.SetToolTip(this.checkColumnName, "Shows column name each notification originated\r\nfrom in the notification window t" +
|
this.toolTip.SetToolTip(this.checkColumnName, "Shows column name each notification originated\r\nfrom in the notification window t" +
|
||||||
"itle.");
|
"itle.");
|
||||||
@@ -328,7 +342,7 @@
|
|||||||
//
|
//
|
||||||
this.labelIdlePause.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.labelIdlePause.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.labelIdlePause.AutoSize = true;
|
this.labelIdlePause.AutoSize = true;
|
||||||
this.labelIdlePause.Location = new System.Drawing.Point(3, 123);
|
this.labelIdlePause.Location = new System.Drawing.Point(3, 141);
|
||||||
this.labelIdlePause.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0);
|
this.labelIdlePause.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0);
|
||||||
this.labelIdlePause.Name = "labelIdlePause";
|
this.labelIdlePause.Name = "labelIdlePause";
|
||||||
this.labelIdlePause.Size = new System.Drawing.Size(89, 13);
|
this.labelIdlePause.Size = new System.Drawing.Size(89, 13);
|
||||||
@@ -341,7 +355,7 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.comboBoxIdlePause.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.comboBoxIdlePause.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.comboBoxIdlePause.FormattingEnabled = true;
|
this.comboBoxIdlePause.FormattingEnabled = true;
|
||||||
this.comboBoxIdlePause.Location = new System.Drawing.Point(6, 139);
|
this.comboBoxIdlePause.Location = new System.Drawing.Point(6, 157);
|
||||||
this.comboBoxIdlePause.Name = "comboBoxIdlePause";
|
this.comboBoxIdlePause.Name = "comboBoxIdlePause";
|
||||||
this.comboBoxIdlePause.Size = new System.Drawing.Size(171, 21);
|
this.comboBoxIdlePause.Size = new System.Drawing.Size(171, 21);
|
||||||
this.comboBoxIdlePause.TabIndex = 4;
|
this.comboBoxIdlePause.TabIndex = 4;
|
||||||
@@ -350,28 +364,16 @@
|
|||||||
// checkNonIntrusive
|
// checkNonIntrusive
|
||||||
//
|
//
|
||||||
this.checkNonIntrusive.AutoSize = true;
|
this.checkNonIntrusive.AutoSize = true;
|
||||||
this.checkNonIntrusive.Location = new System.Drawing.Point(9, 90);
|
this.checkNonIntrusive.Location = new System.Drawing.Point(9, 113);
|
||||||
this.checkNonIntrusive.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
this.checkNonIntrusive.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
||||||
this.checkNonIntrusive.Name = "checkNonIntrusive";
|
this.checkNonIntrusive.Name = "checkNonIntrusive";
|
||||||
this.checkNonIntrusive.Size = new System.Drawing.Size(128, 17);
|
this.checkNonIntrusive.Size = new System.Drawing.Size(128, 17);
|
||||||
this.checkNonIntrusive.TabIndex = 2;
|
this.checkNonIntrusive.TabIndex = 4;
|
||||||
this.checkNonIntrusive.Text = "Non-Intrusive Popups";
|
this.checkNonIntrusive.Text = "Non-Intrusive Popups";
|
||||||
this.toolTip.SetToolTip(this.checkNonIntrusive, "When not idle and the cursor is within the notification window area,\r\nit will be " +
|
this.toolTip.SetToolTip(this.checkNonIntrusive, "When not idle and the cursor is within the notification window area,\r\nit will be " +
|
||||||
"delayed until the cursor moves away to prevent accidental clicks.");
|
"delayed until the cursor moves away to prevent accidental clicks.");
|
||||||
this.checkNonIntrusive.UseVisualStyleBackColor = true;
|
this.checkNonIntrusive.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// checkTimerCountDown
|
|
||||||
//
|
|
||||||
this.checkTimerCountDown.AutoSize = true;
|
|
||||||
this.checkTimerCountDown.Location = new System.Drawing.Point(9, 67);
|
|
||||||
this.checkTimerCountDown.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
|
||||||
this.checkTimerCountDown.Name = "checkTimerCountDown";
|
|
||||||
this.checkTimerCountDown.Size = new System.Drawing.Size(119, 17);
|
|
||||||
this.checkTimerCountDown.TabIndex = 1;
|
|
||||||
this.checkTimerCountDown.Text = "Timer Counts Down";
|
|
||||||
this.toolTip.SetToolTip(this.checkTimerCountDown, "The notification timer counts down instead of up.");
|
|
||||||
this.checkTimerCountDown.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// checkNotificationTimer
|
// checkNotificationTimer
|
||||||
//
|
//
|
||||||
this.checkNotificationTimer.AutoSize = true;
|
this.checkNotificationTimer.AutoSize = true;
|
||||||
@@ -379,11 +381,22 @@
|
|||||||
this.checkNotificationTimer.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
this.checkNotificationTimer.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
||||||
this.checkNotificationTimer.Name = "checkNotificationTimer";
|
this.checkNotificationTimer.Name = "checkNotificationTimer";
|
||||||
this.checkNotificationTimer.Size = new System.Drawing.Size(145, 17);
|
this.checkNotificationTimer.Size = new System.Drawing.Size(145, 17);
|
||||||
this.checkNotificationTimer.TabIndex = 0;
|
this.checkNotificationTimer.TabIndex = 1;
|
||||||
this.checkNotificationTimer.Text = "Display Notification Timer";
|
this.checkNotificationTimer.Text = "Display Notification Timer";
|
||||||
this.toolTip.SetToolTip(this.checkNotificationTimer, "Shows how much time is left before the current notification disappears.");
|
|
||||||
this.checkNotificationTimer.UseVisualStyleBackColor = true;
|
this.checkNotificationTimer.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// checkTimerCountDown
|
||||||
|
//
|
||||||
|
this.checkTimerCountDown.AutoSize = true;
|
||||||
|
this.checkTimerCountDown.Location = new System.Drawing.Point(9, 67);
|
||||||
|
this.checkTimerCountDown.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
||||||
|
this.checkTimerCountDown.Name = "checkTimerCountDown";
|
||||||
|
this.checkTimerCountDown.Size = new System.Drawing.Size(119, 17);
|
||||||
|
this.checkTimerCountDown.TabIndex = 2;
|
||||||
|
this.checkTimerCountDown.Text = "Timer Counts Down";
|
||||||
|
this.toolTip.SetToolTip(this.checkTimerCountDown, "The notification timer counts down instead of up.");
|
||||||
|
this.checkTimerCountDown.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// TabSettingsNotifications
|
// TabSettingsNotifications
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -392,7 +405,7 @@
|
|||||||
this.Controls.Add(this.groupNotificationDuration);
|
this.Controls.Add(this.groupNotificationDuration);
|
||||||
this.Controls.Add(this.groupNotificationLocation);
|
this.Controls.Add(this.groupNotificationLocation);
|
||||||
this.Name = "TabSettingsNotifications";
|
this.Name = "TabSettingsNotifications";
|
||||||
this.Size = new System.Drawing.Size(478, 282);
|
this.Size = new System.Drawing.Size(478, 300);
|
||||||
this.ParentChanged += new System.EventHandler(this.TabSettingsNotifications_ParentChanged);
|
this.ParentChanged += new System.EventHandler(this.TabSettingsNotifications_ParentChanged);
|
||||||
this.groupNotificationLocation.ResumeLayout(false);
|
this.groupNotificationLocation.ResumeLayout(false);
|
||||||
this.groupNotificationLocation.PerformLayout();
|
this.groupNotificationLocation.PerformLayout();
|
||||||
@@ -421,10 +434,8 @@
|
|||||||
private System.Windows.Forms.RadioButton radioLocTL;
|
private System.Windows.Forms.RadioButton radioLocTL;
|
||||||
private System.Windows.Forms.GroupBox groupNotificationDuration;
|
private System.Windows.Forms.GroupBox groupNotificationDuration;
|
||||||
private System.Windows.Forms.GroupBox groupUserInterface;
|
private System.Windows.Forms.GroupBox groupUserInterface;
|
||||||
private System.Windows.Forms.CheckBox checkNotificationTimer;
|
|
||||||
private System.Windows.Forms.ToolTip toolTip;
|
private System.Windows.Forms.ToolTip toolTip;
|
||||||
private System.Windows.Forms.Label labelEdgeDistanceValue;
|
private System.Windows.Forms.Label labelEdgeDistanceValue;
|
||||||
private System.Windows.Forms.CheckBox checkTimerCountDown;
|
|
||||||
private System.Windows.Forms.Label labelDurationValue;
|
private System.Windows.Forms.Label labelDurationValue;
|
||||||
private System.Windows.Forms.TrackBar trackBarDuration;
|
private System.Windows.Forms.TrackBar trackBarDuration;
|
||||||
private System.Windows.Forms.TableLayoutPanel tableLayoutDurationButtons;
|
private System.Windows.Forms.TableLayoutPanel tableLayoutDurationButtons;
|
||||||
@@ -435,5 +446,8 @@
|
|||||||
private System.Windows.Forms.Label labelIdlePause;
|
private System.Windows.Forms.Label labelIdlePause;
|
||||||
private System.Windows.Forms.ComboBox comboBoxIdlePause;
|
private System.Windows.Forms.ComboBox comboBoxIdlePause;
|
||||||
private System.Windows.Forms.CheckBox checkColumnName;
|
private System.Windows.Forms.CheckBox checkColumnName;
|
||||||
|
private System.Windows.Forms.CheckBox checkSkipOnLinkClick;
|
||||||
|
private System.Windows.Forms.CheckBox checkTimerCountDown;
|
||||||
|
private System.Windows.Forms.CheckBox checkNotificationTimer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -59,6 +59,7 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
checkNotificationTimer.Checked = Config.DisplayNotificationTimer;
|
checkNotificationTimer.Checked = Config.DisplayNotificationTimer;
|
||||||
checkTimerCountDown.Enabled = checkNotificationTimer.Checked;
|
checkTimerCountDown.Enabled = checkNotificationTimer.Checked;
|
||||||
checkTimerCountDown.Checked = Config.NotificationTimerCountDown;
|
checkTimerCountDown.Checked = Config.NotificationTimerCountDown;
|
||||||
|
checkSkipOnLinkClick.Checked = Config.NotificationSkipOnLinkClick;
|
||||||
checkNonIntrusive.Checked = Config.NotificationNonIntrusiveMode;
|
checkNonIntrusive.Checked = Config.NotificationNonIntrusiveMode;
|
||||||
|
|
||||||
trackBarEdgeDistance.SetValueSafe(Config.NotificationEdgeDistance);
|
trackBarEdgeDistance.SetValueSafe(Config.NotificationEdgeDistance);
|
||||||
@@ -82,6 +83,7 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
checkColumnName.CheckedChanged += checkColumnName_CheckedChanged;
|
checkColumnName.CheckedChanged += checkColumnName_CheckedChanged;
|
||||||
checkNotificationTimer.CheckedChanged += checkNotificationTimer_CheckedChanged;
|
checkNotificationTimer.CheckedChanged += checkNotificationTimer_CheckedChanged;
|
||||||
checkTimerCountDown.CheckedChanged += checkTimerCountDown_CheckedChanged;
|
checkTimerCountDown.CheckedChanged += checkTimerCountDown_CheckedChanged;
|
||||||
|
checkSkipOnLinkClick.CheckedChanged += checkSkipOnLinkClick_CheckedChanged;
|
||||||
checkNonIntrusive.CheckedChanged += checkNonIntrusive_CheckedChanged;
|
checkNonIntrusive.CheckedChanged += checkNonIntrusive_CheckedChanged;
|
||||||
|
|
||||||
comboBoxIdlePause.SelectedValueChanged += comboBoxIdlePause_SelectedValueChanged;
|
comboBoxIdlePause.SelectedValueChanged += comboBoxIdlePause_SelectedValueChanged;
|
||||||
@@ -156,6 +158,10 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
notification.ShowNotificationForSettings(true);
|
notification.ShowNotificationForSettings(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkSkipOnLinkClick_CheckedChanged(object sender, EventArgs e){
|
||||||
|
Config.NotificationSkipOnLinkClick = checkSkipOnLinkClick.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
private void checkNonIntrusive_CheckedChanged(object sender, EventArgs e){
|
private void checkNonIntrusive_CheckedChanged(object sender, EventArgs e){
|
||||||
Config.NotificationNonIntrusiveMode = checkNonIntrusive.Checked;
|
Config.NotificationNonIntrusiveMode = checkNonIntrusive.Checked;
|
||||||
}
|
}
|
||||||
|
@@ -92,7 +92,7 @@
|
|||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.Controls.Add(this.groupCustomSound);
|
this.Controls.Add(this.groupCustomSound);
|
||||||
this.Name = "TabSettingsSounds";
|
this.Name = "TabSettingsSounds";
|
||||||
this.Size = new System.Drawing.Size(478, 282);
|
this.Size = new System.Drawing.Size(478, 300);
|
||||||
this.groupCustomSound.ResumeLayout(false);
|
this.groupCustomSound.ResumeLayout(false);
|
||||||
this.groupCustomSound.PerformLayout();
|
this.groupCustomSound.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
@@ -9,6 +9,7 @@ namespace TweetDck.Core.Utils{
|
|||||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Local")]
|
[SuppressMessage("ReSharper", "MemberCanBePrivate.Local")]
|
||||||
static class NativeMethods{
|
static class NativeMethods{
|
||||||
public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF);
|
public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF);
|
||||||
|
public static readonly IntPtr HOOK_HANDLED = new IntPtr(-1);
|
||||||
|
|
||||||
public const int HWND_TOPMOST = -1;
|
public const int HWND_TOPMOST = -1;
|
||||||
public const uint SWP_NOACTIVATE = 0x0010;
|
public const uint SWP_NOACTIVATE = 0x0010;
|
||||||
|
13
Program.cs
13
Program.cs
@@ -20,15 +20,14 @@ namespace TweetDck{
|
|||||||
public const string BrandName = "TweetDuck";
|
public const string BrandName = "TweetDuck";
|
||||||
public const string Website = "https://tweetduck.chylex.com";
|
public const string Website = "https://tweetduck.chylex.com";
|
||||||
|
|
||||||
public const string VersionTag = "1.7.1";
|
public const string VersionTag = "1.7.2";
|
||||||
public const string VersionFull = "1.7.1.0";
|
public const string VersionFull = "1.7.2.0";
|
||||||
|
|
||||||
public static readonly Version Version = new Version(VersionTag);
|
public static readonly Version Version = new Version(VersionTag);
|
||||||
public static readonly bool IsPortable = File.Exists("makeportable");
|
public static readonly bool IsPortable = File.Exists("makeportable");
|
||||||
|
|
||||||
public static readonly string ProgramPath = AppDomain.CurrentDomain.BaseDirectory;
|
public static readonly string ProgramPath = AppDomain.CurrentDomain.BaseDirectory;
|
||||||
public static readonly string StoragePath = IsPortable ? Path.Combine(ProgramPath, "portable", "storage") : GetDataStoragePath();
|
public static readonly string StoragePath = IsPortable ? Path.Combine(ProgramPath, "portable", "storage") : GetDataStoragePath();
|
||||||
public static readonly string TemporaryPath = IsPortable ? Path.Combine(ProgramPath, "portable", "tmp") : Path.Combine(Path.GetTempPath(), BrandName+'_'+Path.GetRandomFileName().Substring(0, 6));
|
|
||||||
|
|
||||||
public static readonly string PluginDataPath = Path.Combine(StoragePath, "TD_Plugins");
|
public static readonly string PluginDataPath = Path.Combine(StoragePath, "TD_Plugins");
|
||||||
public static readonly string ConfigFilePath = Path.Combine(StoragePath, "TD_UserConfig.cfg");
|
public static readonly string ConfigFilePath = Path.Combine(StoragePath, "TD_UserConfig.cfg");
|
||||||
@@ -260,14 +259,6 @@ namespace TweetDck{
|
|||||||
|
|
||||||
UserConfig.Save();
|
UserConfig.Save();
|
||||||
|
|
||||||
try{
|
|
||||||
Directory.Delete(TemporaryPath, true);
|
|
||||||
}catch(DirectoryNotFoundException){
|
|
||||||
}catch(Exception e){
|
|
||||||
// welp, too bad
|
|
||||||
Debug.WriteLine(e.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
Cef.Shutdown();
|
Cef.Shutdown();
|
||||||
BrowserCache.Exit();
|
BrowserCache.Exit();
|
||||||
|
|
||||||
|
@@ -18,6 +18,8 @@ enabled(){
|
|||||||
[ "1F3FF", "#8A6859" ],
|
[ "1F3FF", "#8A6859" ],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
this.emojiURL = "https://ton.twimg.com/tweetdeck-web/web/assets/emoji/";
|
||||||
|
|
||||||
this.emojiHTML1 = ""; // no skin tones, prepended
|
this.emojiHTML1 = ""; // no skin tones, prepended
|
||||||
this.emojiHTML2 = {}; // contains emojis with skin tones
|
this.emojiHTML2 = {}; // contains emojis with skin tones
|
||||||
this.emojiHTML3 = ""; // no skin tones, appended
|
this.emojiHTML3 = ""; // no skin tones, appended
|
||||||
@@ -30,7 +32,7 @@ enabled(){
|
|||||||
this.css.insert(".emoji-keyboard { position: absolute; width: 15.35em; background-color: white; border-radius: 2px 2px 3px 3px; font-size: 24px; z-index: 9999 }");
|
this.css.insert(".emoji-keyboard { position: absolute; width: 15.35em; background-color: white; border-radius: 2px 2px 3px 3px; font-size: 24px; z-index: 9999 }");
|
||||||
this.css.insert(".emoji-keyboard-list { height: 10.14em; padding: 0.1em; box-sizing: border-box; overflow-y: auto }");
|
this.css.insert(".emoji-keyboard-list { height: 10.14em; padding: 0.1em; box-sizing: border-box; overflow-y: auto }");
|
||||||
this.css.insert(".emoji-keyboard-list .separator { height: 26px }");
|
this.css.insert(".emoji-keyboard-list .separator { height: 26px }");
|
||||||
this.css.insert(".emoji-keyboard-list .emoji { padding: 0.1em !important; cursor: pointer }");
|
this.css.insert(".emoji-keyboard-list img { padding: 0.1em !important; width: 1em; height: 1em; vertical-align: -0.1em; cursor: pointer }");
|
||||||
this.css.insert(".emoji-keyboard-skintones { height: 1.3em; text-align: center; background-color: #292f33; border-radius: 0 0 2px 2px }");
|
this.css.insert(".emoji-keyboard-skintones { height: 1.3em; text-align: center; background-color: #292f33; border-radius: 0 0 2px 2px }");
|
||||||
this.css.insert(".emoji-keyboard-skintones div { width: 0.8em; height: 0.8em; margin: 0.25em 0.1em; border-radius: 50%; display: inline-block; box-sizing: border-box; cursor: pointer }");
|
this.css.insert(".emoji-keyboard-skintones div { width: 0.8em; height: 0.8em; margin: 0.25em 0.1em; border-radius: 50%; display: inline-block; box-sizing: border-box; cursor: pointer }");
|
||||||
this.css.insert(".emoji-keyboard-skintones .sel { border: 2px solid rgba(0, 0, 0, 0.35); box-shadow: 0 0 2px 0 rgba(255, 255, 255, 0.65), 0 0 1px 0 rgba(255, 255, 255, 0.4) inset }");
|
this.css.insert(".emoji-keyboard-skintones .sel { border: 2px solid rgba(0, 0, 0, 0.35); box-shadow: 0 0 2px 0 rgba(255, 255, 255, 0.65), 0 0 1px 0 rgba(255, 255, 255, 0.4) inset }");
|
||||||
@@ -62,7 +64,7 @@ enabled(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
var generateEmojiHTML = skinTone => {
|
var generateEmojiHTML = skinTone => {
|
||||||
return this.emojiHTML1+this.emojiHTML2[skinTone]+this.emojiHTML3;
|
return (this.emojiHTML1+this.emojiHTML2[skinTone]+this.emojiHTML3).replace(/u#/g, this.emojiURL);
|
||||||
};
|
};
|
||||||
|
|
||||||
var selectSkinTone = skinTone => {
|
var selectSkinTone = skinTone => {
|
||||||
@@ -265,16 +267,17 @@ ready(){
|
|||||||
|
|
||||||
// final processing
|
// final processing
|
||||||
|
|
||||||
let replaceSeparators = str => str.replace(/___/g, "<div class='separator'></div>");
|
let urlRegex = new RegExp(this.emojiURL.replace(/\./g, "\\."), "g");
|
||||||
|
let process = str => TD.util.cleanWithEmoji(str).replace(/ class=\"emoji\" draggable=\"false\"/g, "").replace(urlRegex, "u#").replace(/___/g, "<div class='separator'></div>");
|
||||||
|
|
||||||
let start = "<p style='font-size:13px;color:#444;margin:4px;text-align:center'>Please, note that most emoji will not show up properly in the text box above, but they will display in the tweet.</p>";
|
let start = "<p style='font-size:13px;color:#444;margin:4px;text-align:center'>Please, note that most emoji will not show up properly in the text box above, but they will display in the tweet.</p>";
|
||||||
this.emojiHTML1 = start+replaceSeparators(TD.util.cleanWithEmoji(generated1.join("")));
|
this.emojiHTML1 = start+process(generated1.join(""));
|
||||||
|
|
||||||
for(let skinTone of this.skinToneList){
|
for(let skinTone of this.skinToneList){
|
||||||
this.emojiHTML2[skinTone] = replaceSeparators(TD.util.cleanWithEmoji(generated2[skinTone].join("")));
|
this.emojiHTML2[skinTone] = process(generated2[skinTone].join(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emojiHTML3 = replaceSeparators(TD.util.cleanWithEmoji(generated3.join("")));
|
this.emojiHTML3 = process(generated3.join(""));
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
$TD.alert("error", "Problem loading emoji keyboard: "+err.message);
|
$TD.alert("error", "Problem loading emoji keyboard: "+err.message);
|
||||||
});
|
});
|
||||||
|
@@ -94,10 +94,18 @@
|
|||||||
html.css("border", "0");
|
html.css("border", "0");
|
||||||
html.find("footer").last().remove(); // apparently withTweetActions breaks for certain tweets, nice
|
html.find("footer").last().remove(); // apparently withTweetActions breaks for certain tweets, nice
|
||||||
html.find(".js-media").last().remove(); // and quoted tweets still show media previews, nice nice
|
html.find(".js-media").last().remove(); // and quoted tweets still show media previews, nice nice
|
||||||
html.find(".js-quote-detail").removeClass("is-actionable");
|
html.find(".js-quote-detail").removeClass("is-actionable"); // prevent quoted tweets from changing the cursor
|
||||||
|
|
||||||
let url = html.find("time").first().children("a").first().attr("href") || "";
|
html.find("a[href='#']").each(function(){ // remove <a> tags around links that don't lead anywhere (such as account names the tweet replied to)
|
||||||
$TD.onTweetPopup(columnTypes[column.getColumnType()] || "", html.html(), url, tweet.text.length);
|
this.outerHTML = this.innerHTML;
|
||||||
|
});
|
||||||
|
|
||||||
|
let source = tweet.getRelatedTweet();
|
||||||
|
let duration = source ? source.text.length+(source.quotedTweet ? source.quotedTweet.text.length : 0) : tweet.text.length;
|
||||||
|
let tweetUrl = source ? source.getChirpURL() : "";
|
||||||
|
let quoteUrl = source && source.quotedTweet ? source.quotedTweet.getChirpURL() : "";
|
||||||
|
|
||||||
|
$TD.onTweetPopup(columnTypes[column.getColumnType()] || "", html.html(), duration, tweetUrl, quoteUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (column.model.getHasSound()){
|
if (column.model.getHasSound()){
|
||||||
@@ -116,9 +124,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
tags.push("<style type='text/css'>");
|
tags.push("<style type='text/css'>");
|
||||||
tags.push("body { background-color: "+getClassStyleProperty("column", "background-color")+" }");
|
tags.push("body { background-color: "+getClassStyleProperty("column", "background-color")+" }"); // set background color
|
||||||
tags.push("a[data-full-url] { word-break: break-all }");
|
tags.push("a[data-full-url] { word-break: break-all }"); // break long urls
|
||||||
tags.push(".txt-base-smallest .badge-verified:before { height: 13px !important }");
|
tags.push(".txt-base-smallest .badge-verified:before { height: 13px !important }"); // fix cut off badge icon
|
||||||
tags.push("</style>");
|
tags.push("</style>");
|
||||||
|
|
||||||
return tags.join("");
|
return tags.join("");
|
||||||
@@ -397,72 +405,19 @@
|
|||||||
//
|
//
|
||||||
// Block: Paste images when tweeting.
|
// Block: Paste images when tweeting.
|
||||||
//
|
//
|
||||||
(function(){
|
onAppReady.push(function(){
|
||||||
var lastPasteElement;
|
var uploader = $._data(document, "events")["uiComposeAddImageClick"][0].handler.context;
|
||||||
var prevScrollTop;
|
|
||||||
|
|
||||||
var getScroller = function(){
|
app.delegate(".js-compose-text,.js-reply-tweetbox", "paste", function(e){
|
||||||
return $(".js-drawer").find(".js-compose-scroller").first().children().first();
|
for(let item of e.originalEvent.clipboardData.items){
|
||||||
};
|
if (item.type.startsWith("image/")){
|
||||||
|
$(this).closest(".rpl").find(".js-reply-popout").click(); // popout direct messages
|
||||||
var clickUpload = function(){
|
uploader.addFilesToUpload([ item.getAsFile() ]);
|
||||||
$(document).one("uiFilesAdded", function(){
|
break;
|
||||||
getScroller().scrollTop(prevScrollTop);
|
|
||||||
$(".js-drawer").find(".js-compose-text").first()[0].focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
var button = $(".js-add-image-button").first();
|
|
||||||
|
|
||||||
var scroller = getScroller();
|
|
||||||
prevScrollTop = scroller.scrollTop();
|
|
||||||
|
|
||||||
scroller.scrollTop(0);
|
|
||||||
scroller.scrollTop(button.offset().top); // scrolls the button into view
|
|
||||||
|
|
||||||
var buttonPos = button.children().first().offset(); // finds the camera icon offset
|
|
||||||
$TD.clickUploadImage(Math.floor(buttonPos.left), Math.floor(buttonPos.top));
|
|
||||||
};
|
|
||||||
|
|
||||||
app.delegate(".js-compose-text,.js-reply-tweetbox", "paste", function(){
|
|
||||||
lastPasteElement = $(this);
|
|
||||||
$TD.tryPasteImage();
|
|
||||||
});
|
|
||||||
|
|
||||||
window.TDGF_tryPasteImage = function(){
|
|
||||||
if (lastPasteElement){
|
|
||||||
var parent = lastPasteElement.parent();
|
|
||||||
|
|
||||||
if (parent.siblings(".js-add-image-button").length === 0){
|
|
||||||
var pop = parent.closest(".js-inline-reply,.rpl").find(".js-inline-compose-pop,.js-reply-popout");
|
|
||||||
|
|
||||||
if (pop.length === 0){
|
|
||||||
lastPasteElement = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pop.click();
|
|
||||||
|
|
||||||
var drawer = $(".js-drawer");
|
|
||||||
var counter = 0;
|
|
||||||
|
|
||||||
var interval = setInterval(function(){
|
|
||||||
if (drawer.offset().left >= 195){
|
|
||||||
clickUpload();
|
|
||||||
clearInterval(interval);
|
|
||||||
}
|
|
||||||
else if (++counter >= 10){
|
|
||||||
clearInterval(interval);
|
|
||||||
}
|
|
||||||
}, 51);
|
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
clickUpload();
|
|
||||||
}
|
|
||||||
|
|
||||||
lastPasteElement = null;
|
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
})();
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Support for extra mouse buttons.
|
// Block: Support for extra mouse buttons.
|
||||||
@@ -685,6 +640,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// Block: Skip the initial pre-login page.
|
||||||
|
//
|
||||||
$(document).on("uiLoginFormImpression", function(){
|
$(document).on("uiLoginFormImpression", function(){
|
||||||
location.href = $("a.btn", ".js-login-form").first().attr("href");
|
location.href = $("a.btn", ".js-login-form").first().attr("href");
|
||||||
});
|
});
|
||||||
|
@@ -19,6 +19,14 @@
|
|||||||
addEventListener(links, "click", function(e){
|
addEventListener(links, "click", function(e){
|
||||||
$TD.openBrowser(e.currentTarget.getAttribute("href"));
|
$TD.openBrowser(e.currentTarget.getAttribute("href"));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
if ($TDX.skipOnLinkClick){
|
||||||
|
let parentClasses = e.currentTarget.parentNode.classList;
|
||||||
|
|
||||||
|
if (parentClasses.contains("js-tweet-text") || parentClasses.contains("js-quoted-tweet-text") || parentClasses.contains("js-timestamp")){
|
||||||
|
$TD.loadNextNotification();
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -101,22 +109,6 @@
|
|||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
//
|
|
||||||
// Block: Setup embedded tweet address for context menu.
|
|
||||||
//
|
|
||||||
(function(){
|
|
||||||
var embedded = document.getElementsByClassName("quoted-tweet");
|
|
||||||
if (embedded.length === 0)return;
|
|
||||||
|
|
||||||
var tweetId = embedded[0].getAttribute("data-tweet-id");
|
|
||||||
if (!tweetId)return;
|
|
||||||
|
|
||||||
var account = embedded[0].getElementsByClassName("account-link");
|
|
||||||
if (account.length === 0)return;
|
|
||||||
|
|
||||||
$TD.setNotificationQuotedTweet(account[0].getAttribute("href")+"/status/"+tweetId);
|
|
||||||
})();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Setup a skip button.
|
// Block: Setup a skip button.
|
||||||
//
|
//
|
||||||
|
@@ -77,15 +77,9 @@
|
|||||||
<Compile Include="Core\Controls\FlatProgressBar.cs">
|
<Compile Include="Core\Controls\FlatProgressBar.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Core\Controls\FlatProgressBar.Designer.cs">
|
|
||||||
<DependentUpon>FlatProgressBar.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Core\Controls\TabButton.cs">
|
<Compile Include="Core\Controls\TabButton.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Core\Controls\TabButton.Designer.cs">
|
|
||||||
<DependentUpon>TabButton.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Core\Controls\TabPanel.cs">
|
<Compile Include="Core\Controls\TabPanel.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -101,6 +95,7 @@
|
|||||||
<Compile Include="Core\FormBrowser.Designer.cs">
|
<Compile Include="Core\FormBrowser.Designer.cs">
|
||||||
<DependentUpon>FormBrowser.cs</DependentUpon>
|
<DependentUpon>FormBrowser.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Core\Handling\ResourceHandlerNotification.cs" />
|
||||||
<Compile Include="Core\Notification\FormNotificationMain.cs">
|
<Compile Include="Core\Notification\FormNotificationMain.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -114,7 +109,6 @@
|
|||||||
<DependentUpon>FormNotificationBase.cs</DependentUpon>
|
<DependentUpon>FormNotificationBase.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Core\Handling\ContextMenuNotification.cs" />
|
<Compile Include="Core\Handling\ContextMenuNotification.cs" />
|
||||||
<Compile Include="Core\Handling\FileDialogHandler.cs" />
|
|
||||||
<Compile Include="Core\Handling\JavaScriptDialogHandler.cs" />
|
<Compile Include="Core\Handling\JavaScriptDialogHandler.cs" />
|
||||||
<Compile Include="Core\Handling\LifeSpanHandler.cs" />
|
<Compile Include="Core\Handling\LifeSpanHandler.cs" />
|
||||||
<Compile Include="Core\Notification\FormNotificationTweet.cs">
|
<Compile Include="Core\Notification\FormNotificationTweet.cs">
|
||||||
@@ -183,9 +177,6 @@
|
|||||||
<Compile Include="Core\Other\Settings\BaseTabSettings.cs">
|
<Compile Include="Core\Other\Settings\BaseTabSettings.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Core\Other\Settings\BaseTabSettings.Designer.cs">
|
|
||||||
<DependentUpon>BaseTabSettings.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Core\Other\Settings\TabSettingsGeneral.cs">
|
<Compile Include="Core\Other\Settings\TabSettingsGeneral.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -336,6 +327,7 @@
|
|||||||
<Content Include="Resources\Scripts\code.js" />
|
<Content Include="Resources\Scripts\code.js" />
|
||||||
<Content Include="Resources\Scripts\notification.js" />
|
<Content Include="Resources\Scripts\notification.js" />
|
||||||
<Content Include="Resources\Scripts\pages\error.html" />
|
<Content Include="Resources\Scripts\pages\error.html" />
|
||||||
|
<Content Include="Resources\Scripts\pages\example.html" />
|
||||||
<Content Include="Resources\Scripts\plugins.browser.js" />
|
<Content Include="Resources\Scripts\plugins.browser.js" />
|
||||||
<Content Include="Resources\Scripts\plugins.js" />
|
<Content Include="Resources\Scripts\plugins.js" />
|
||||||
<Content Include="Resources\Scripts\plugins.notification.js" />
|
<Content Include="Resources\Scripts\plugins.notification.js" />
|
||||||
|
Reference in New Issue
Block a user