mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-07 08:34:06 +02:00
Move ITweetDeckBrowser and refactor some things
This commit is contained in:
parent
063d3a2637
commit
5add8a1d0e
@ -38,8 +38,7 @@ public bool IsWaiting{
|
||||
}
|
||||
|
||||
public string UpdateInstallerPath { get; private set; }
|
||||
|
||||
public PluginManager PluginManager => plugins;
|
||||
|
||||
public AnalyticsFile AnalyticsFile => analytics?.File ?? AnalyticsFile.Dummy;
|
||||
|
||||
private readonly TweetDeckBrowser browser;
|
||||
|
@ -5,6 +5,7 @@
|
||||
using TweetDuck.Core.Bridge;
|
||||
using TweetDuck.Core.Controls;
|
||||
using TweetDuck.Core.Handling;
|
||||
using TweetDuck.Core.Other.Interfaces;
|
||||
using TweetDuck.Core.Utils;
|
||||
using TweetDuck.Data;
|
||||
using TweetDuck.Plugins;
|
||||
|
@ -36,7 +36,7 @@ public FormSettings(FormBrowser browser, PluginManager plugins, UpdateHandler up
|
||||
|
||||
this.buttonHeight = BrowserUtils.Scale(39, this.GetDPIScale()) | 1;
|
||||
|
||||
AddButton("General", () => new TabSettingsGeneral(this.browser, updates));
|
||||
AddButton("General", () => new TabSettingsGeneral(this.browser.ReloadColumns, updates));
|
||||
AddButton("Locales", () => new TabSettingsLocales());
|
||||
AddButton("System Tray", () => new TabSettingsTray());
|
||||
AddButton("Notifications", () => new TabSettingsNotifications(new FormNotificationExample(this.browser, this.plugins)));
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using CefSharp;
|
||||
|
||||
namespace TweetDuck.Core{
|
||||
namespace TweetDuck.Core.Other.Interfaces{
|
||||
interface ITweetDeckBrowser{
|
||||
bool IsTweetDeckWebsite { get; }
|
||||
|
@ -9,18 +9,19 @@
|
||||
|
||||
namespace TweetDuck.Core.Other.Settings{
|
||||
sealed partial class TabSettingsGeneral : BaseTabSettings{
|
||||
private readonly FormBrowser browser;
|
||||
private readonly Action reloadColumns;
|
||||
|
||||
private readonly UpdateHandler updates;
|
||||
private int updateCheckEventId = -1;
|
||||
|
||||
private readonly int browserListIndexDefault;
|
||||
private readonly int browserListIndexCustom;
|
||||
|
||||
public TabSettingsGeneral(FormBrowser browser, UpdateHandler updates){
|
||||
public TabSettingsGeneral(Action reloadColumns, UpdateHandler updates){
|
||||
InitializeComponent();
|
||||
|
||||
this.browser = browser;
|
||||
|
||||
this.reloadColumns = reloadColumns;
|
||||
|
||||
this.updates = updates;
|
||||
this.updates.CheckFinished += updates_CheckFinished;
|
||||
Disposed += (sender, args) => this.updates.CheckFinished -= updates_CheckFinished;
|
||||
@ -98,7 +99,7 @@ private void checkBestImageQuality_CheckedChanged(object sender, EventArgs e){
|
||||
|
||||
private void checkAnimatedAvatars_CheckedChanged(object sender, EventArgs e){
|
||||
Config.EnableAnimatedImages = checkAnimatedAvatars.Checked;
|
||||
BrowserProcessHandler.UpdatePrefs().ContinueWith(task => browser.ReloadColumns());
|
||||
BrowserProcessHandler.UpdatePrefs().ContinueWith(task => reloadColumns());
|
||||
}
|
||||
|
||||
private void checkSmoothScrolling_CheckedChanged(object sender, EventArgs e){
|
||||
|
@ -8,6 +8,7 @@
|
||||
using TweetDuck.Core.Handling;
|
||||
using TweetDuck.Core.Handling.General;
|
||||
using TweetDuck.Core.Notification;
|
||||
using TweetDuck.Core.Other.Interfaces;
|
||||
using TweetDuck.Core.Utils;
|
||||
using TweetDuck.Resources;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using TweetDuck.Core;
|
||||
using TweetDuck.Core.Other.Interfaces;
|
||||
using TweetDuck.Data;
|
||||
using TweetDuck.Plugins.Enums;
|
||||
using TweetDuck.Plugins.Events;
|
||||
|
@ -107,7 +107,7 @@
|
||||
<Compile Include="Core\Handling\RequestHandlerBase.cs" />
|
||||
<Compile Include="Core\Handling\RequestHandlerBrowser.cs" />
|
||||
<Compile Include="Core\Handling\ResourceHandlerNotification.cs" />
|
||||
<Compile Include="Core\ITweetDeckBrowser.cs" />
|
||||
<Compile Include="Core\Other\Interfaces\ITweetDeckBrowser.cs" />
|
||||
<Compile Include="Core\Management\ContextInfo.cs" />
|
||||
<Compile Include="Core\Notification\Example\FormNotificationExample.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
@ -1,8 +1,8 @@
|
||||
using CefSharp;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using TweetDuck.Core;
|
||||
using TweetDuck.Core.Controls;
|
||||
using TweetDuck.Core.Other.Interfaces;
|
||||
using TweetDuck.Core.Utils;
|
||||
using TweetDuck.Resources;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user