1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-09-14 10:32:10 +02:00

Compare commits

..

13 Commits
1.25 ... 1.25.4

66 changed files with 70 additions and 10 deletions

View File

@@ -6,6 +6,6 @@ using TweetDuck;
namespace TweetDuck {
internal static class Version {
public const string Tag = "1.25";
public const string Tag = "1.25.4";
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bld/Redist/concrt140.dll Normal file

Binary file not shown.

BIN
bld/Redist/msvcp140.dll Normal file

Binary file not shown.

BIN
bld/Redist/msvcp140_1.dll Normal file

Binary file not shown.

BIN
bld/Redist/msvcp140_2.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bld/Redist/ucrtbase.dll Normal file

Binary file not shown.

BIN
bld/Redist/vccorlib140.dll Normal file

Binary file not shown.

BIN
bld/Redist/vcruntime140.dll Normal file

Binary file not shown.

View File

@@ -71,16 +71,19 @@ Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
Type: files; Name: "{app}\CEFSHARP-LICENSE.txt"
Type: files; Name: "{app}\LICENSE.txt"
Type: files; Name: "{app}\README.txt"
Type: files; Name: "{app}\natives_blob.bin"
Type: files; Name: "{app}\cef.pak"
Type: files; Name: "{app}\cef_100_percent.pak"
Type: files; Name: "{app}\cef_200_percent.pak"
Type: files; Name: "{app}\cef_extensions.pak"
Type: files; Name: "{app}\devtools_resources.pak"
Type: files; Name: "{app}\natives_blob.bin"
Type: files; Name: "{app}\dbgshim.dll"
Type: files; Name: "{app}\mscordaccore_x86_x86_6.*.dll"
Type: filesandordirs; Name: "{app}\guide"
Type: filesandordirs; Name: "{app}\plugins\official"
Type: filesandordirs; Name: "{app}\resources"
Type: filesandordirs; Name: "{app}\scripts"
Type: filesandordirs; Name: "{app}\swiftshader"
[Code]
function TDIsUninstallable: Boolean; forward;

View File

@@ -67,6 +67,7 @@ import setup_tweet_context_menu from "./tweetdeck/setup_tweet_context_menu.js";
import setup_tweetduck_account_bamboozle from "./tweetdeck/setup_tweetduck_account_bamboozle.js";
import setup_video_player from "./tweetdeck/setup_video_player.js";
import skip_pre_login_page from "./tweetdeck/skip_pre_login_page.js";
import tweetdeck_preview_warning from "./tweetdeck/tweetdeck_preview_warning.js";
import update from "./update/update.js";
const globalFunctions = [

View File

@@ -133,6 +133,14 @@ button {
bottom: 192px !important;
}
/***********************/
/* Hide Preview button */
/***********************/
.js-gryphon-beta-btn {
display: none !important;
}
/*************************************/
/* Tweak collapsed left panel layout */
/*************************************/

View File

@@ -0,0 +1,7 @@
import { $TD } from "../api/bridge.js";
export default function() {
if (!("TD" in window)) {
$TD.alert("warning", "Some TweetDuck features failed to load. This might happen if your Twitter account is enrolled into the TweetDeck Preview, which TweetDuck does not support. Try opting out of the TweetDeck Preview to restore TweetDuck's functionality.");
}
}

View File

@@ -237,7 +237,7 @@ namespace TweetDuck.Video {
int maxWidth = Math.Min(DpiScaled(media.imageSourceWidth), ownerWidth * 3 / 4);
int maxHeight = Math.Min(DpiScaled(media.imageSourceHeight), ownerHeight * 3 / 4);
bool isCursorInside = ClientRectangle.Contains(PointToClient(Cursor.Position));
bool isCursorInside = ClientRectangle.Contains(PointToClient(Cursor.Position)) && Handle == NativeMethods.GetFormHandleAt(Cursor.Position);
Size newSize = new Size(Math.Max(minWidth + 2, maxWidth), Math.Max(minHeight + 2, maxHeight));
Point newLocation = new Point(ownerLeft + (ownerWidth - newSize.Width) / 2, ownerTop + (ownerHeight - newSize.Height + SystemInformation.CaptionHeight) / 2);

View File

@@ -1,11 +1,13 @@
#nullable enable
using System;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Runtime.InteropServices;
namespace TweetDuck.Video {
[SuppressMessage("ReSharper", "InconsistentNaming")]
static class NativeMethods {
private const int GA_ROOT = 2;
private const int GWL_HWNDPARENT = -8;
[DllImport("user32.dll")]
@@ -25,6 +27,12 @@ namespace TweetDuck.Video {
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
private static extern IntPtr WindowFromPoint(Point point);
[DllImport("user32.dll")]
private static extern IntPtr GetAncestor(IntPtr hwnd, int flags);
[DllImport("user32.dll")]
public static extern bool SetProcessDPIAware();
@@ -49,5 +57,10 @@ namespace TweetDuck.Video {
* ...so technically, this is following the documentation to the word.
*/
}
public static IntPtr GetFormHandleAt(Point point) {
IntPtr window = WindowFromPoint(point);
return window == IntPtr.Zero ? IntPtr.Zero : GetAncestor(window, GA_ROOT);
}
}
}

View File

@@ -45,6 +45,7 @@ namespace TweetDuck {
internal static void SetupWinForms() {
Win.Application.EnableVisualStyles();
Win.Application.SetCompatibleTextRenderingDefault(false);
Win.LegacyWinForms.EnsureValid();
}
[STAThread]

View File

@@ -78,6 +78,7 @@
<ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\.debug\**\*.*" />
<ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\emoji-keyboard\emoji-instructions.txt" />
<ResourcesPluginsDebug Include="$(SolutionDir)resources\Plugins\.debug\**\*.*" Visible="false" />
<Redist Include="$(SolutionDir)bld\Redist\*.*" Visible="false" />
</ItemGroup>
<PropertyGroup>
@@ -124,6 +125,7 @@
<Copy SourceFiles="@(ResourcesContent)" DestinationFiles="@(ResourcesContent->'$(TargetDir)\resources\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ResourcesGuide)" DestinationFiles="@(ResourcesGuide->'$(TargetDir)\guide\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ResourcesPlugins)" DestinationFiles="@(ResourcesPlugins->'$(TargetDir)\plugins\official\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(Redist)" DestinationFolder="$(TargetDir)" />
<Exec Command="powershell -NoProfile -ExecutionPolicy Unrestricted -File &quot;$(ProjectDir)Resources\PostBuild.ps1&quot; &quot;$(TargetDir)\&quot;" IgnoreExitCode="false" />
</Target>

View File

@@ -23,6 +23,7 @@ namespace TweetDuck.Updates {
FileName = Path,
Arguments = arguments,
Verb = runElevated ? "runas" : string.Empty,
UseShellExecute = true,
ErrorDialog = true
})) {
return true;

View File

@@ -59,11 +59,15 @@ namespace TweetImpl.CefSharp.Component {
}
private void OnFrameLoadStart(object? sender, FrameLoadStartEventArgs e) {
if (!string.IsNullOrEmpty(e.Url)) {
base.OnFrameLoadStart(e.Url, e.Frame);
}
}
private void OnFrameLoadEnd(object? sender, FrameLoadEndEventArgs e) {
if (!string.IsNullOrEmpty(e.Url)) {
base.OnFrameLoadEnd(e.Url, e.Frame);
}
}
}
}

View File

@@ -4,9 +4,15 @@ using System.Reflection;
namespace System.Windows.Forms {
internal sealed class Command2 {
private static readonly Type Type = typeof(Form).Assembly.GetType("System.Windows.Forms.Command");
private static readonly ConstructorInfo Constructor = Type.GetConstructor(new Type[] { typeof(ICommandExecutor) }) ?? throw new NullReferenceException();
private static readonly MethodInfo DisposeMethod = Type.GetMethod("Dispose", BindingFlags.Instance | BindingFlags.Public) ?? throw new NullReferenceException();
private static readonly PropertyInfo IDProperty = Type.GetProperty("ID") ?? throw new NullReferenceException();
private static readonly ConstructorInfo Constructor = Type.GetConstructor(new Type[] { typeof(ICommandExecutor) });
private static readonly MethodInfo DisposeMethod = Type.GetMethod("Dispose", BindingFlags.Instance | BindingFlags.Public);
private static readonly PropertyInfo IDProperty = Type.GetProperty("ID");
internal static void EnsureValid() {
if (Constructor == null || DisposeMethod == null || IDProperty == null) {
throw new InvalidOperationException();
}
}
public int ID { get; }

View File

@@ -7,7 +7,13 @@ using System.Runtime.InteropServices;
namespace System.Windows.Forms {
public sealed class ContextMenu : Menu {
private static readonly FieldInfo NotifyIconWindowField = typeof(NotifyIcon).GetField("window", BindingFlags.Instance | BindingFlags.NonPublic) ?? throw new InvalidOperationException();
private static readonly FieldInfo NotifyIconWindowField = typeof(NotifyIcon).GetField("_window", BindingFlags.Instance | BindingFlags.NonPublic);
internal static void EnsureValid() {
if (NotifyIconWindowField == null) {
throw new InvalidOperationException();
}
}
public event EventHandler Popup;

View File

@@ -0,0 +1,8 @@
namespace System.Windows.Forms;
public static class LegacyWinForms {
public static void EnsureValid() {
Command2.EnsureValid();
ContextMenu.EnsureValid();
}
}