From 701a7d99c4f569cf2bd17f9c75593ed19303299d Mon Sep 17 00:00:00 2001
From: Serge <5920850+seerge@users.noreply.github.com>
Date: Wed, 4 Oct 2023 15:03:07 +0200
Subject: [PATCH 1/4] Tray icon-click fix
https://github.com/seerge/g-helper/pull/1407#issuecomment-1746823625
---
app/Program.cs | 6 +++---
app/Settings.cs | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/Program.cs b/app/Program.cs
index b068f834..662ac677 100644
--- a/app/Program.cs
+++ b/app/Program.cs
@@ -213,13 +213,13 @@ namespace GHelper
SetAutoModes(true);
}
- public static void SettingsToggle(string action = "", bool checkForFocus = true)
+ public static void SettingsToggle(string action = "", bool checkForFocus = true, bool trayClick = false)
{
if (settingsForm.Visible)
{
// If helper window is not on top, this just focuses on the app again
// Pressing the ghelper button again will hide the app
- if (checkForFocus && !settingsForm.HasAnyFocus())
+ if (checkForFocus && !settingsForm.HasAnyFocus(trayClick))
{
settingsForm.ShowAll();
}
@@ -275,7 +275,7 @@ namespace GHelper
static void TrayIcon_MouseClick(object? sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
- SettingsToggle();
+ SettingsToggle(trayClick: true);
}
diff --git a/app/Settings.cs b/app/Settings.cs
index 8851f94e..b126d5bc 100644
--- a/app/Settings.cs
+++ b/app/Settings.cs
@@ -882,14 +882,14 @@ namespace GHelper
/// Check if any of fans, keyboard, update, or itself has focus
///
/// Focus state
- public bool HasAnyFocus()
+ public bool HasAnyFocus(bool lostFocusCheck = false)
{
return (fansForm != null && fansForm.ContainsFocus) ||
(extraForm != null && extraForm.ContainsFocus) ||
(updatesForm != null && updatesForm.ContainsFocus) ||
(matrixForm != null && matrixForm.ContainsFocus) ||
this.ContainsFocus ||
- Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300;
+ (lostFocusCheck && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300);
}
private void SettingsForm_FormClosing(object? sender, FormClosingEventArgs e)
From a0628ef36895fffc41eb6cddb66870ff22737266 Mon Sep 17 00:00:00 2001
From: Serge <5920850+seerge@users.noreply.github.com>
Date: Wed, 4 Oct 2023 17:32:21 +0200
Subject: [PATCH 2/4] New translations strings.resx (Polish)
---
app/Properties/Strings.pl.resx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/Properties/Strings.pl.resx b/app/Properties/Strings.pl.resx
index d82875b7..ad8d0c17 100644
--- a/app/Properties/Strings.pl.resx
+++ b/app/Properties/Strings.pl.resx
@@ -253,7 +253,7 @@
Stan baterii
- One time charge to 100%
+ Jednorazowo naładuj do 100%
Aktualizacje BIOS i sterowników
From ee90fe4a3dab0828278d42a5691c7d0bf53a846c Mon Sep 17 00:00:00 2001
From: nopeless <38830903+nopeless@users.noreply.github.com>
Date: Wed, 4 Oct 2023 10:35:04 -0500
Subject: [PATCH 3/4] feat: allow manual executable build for github (#1415)
---
.github/workflows/release.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e7531691..3565ce40 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -3,6 +3,8 @@ name: Release
on:
release:
types: [ published ]
+ workflow_dispatch:
+
permissions:
contents: write
From 393cb3300c0d7864c725a91f5984af6a348dfa52 Mon Sep 17 00:00:00 2001
From: nopeless <38830903+nopeless@users.noreply.github.com>
Date: Wed, 4 Oct 2023 11:14:31 -0500
Subject: [PATCH 4/4] fix: breaking workflow and upload artifact (#1417)
* feat: allow manual executable build for github
* fix: manual dispatch behavior
* fix: use full sha
---
.github/workflows/release.yml | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3565ce40..1acfae9e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -22,9 +22,18 @@ jobs:
- name: Publish
run: |
dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
- powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/* GHelper.zip
+ powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/* GHelper-${{ github.sha }}.zip
+
- name: Upload
+ if: github.event_name != 'workflow_dispatch'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ github.ref_name }} GHelper.zip
+
+ - name: Artifact
+ if: github.event_name == 'workflow_dispatch'
+ uses: actions/upload-artifact@v3
+ with:
+ name: GHelper-release-${{ github.sha }}
+ path: GHelper-*.zip