diff --git a/plugins/windows-notification/api/include/shortcutcreator.h b/plugins/windows-notification/api/include/shortcutcreator.h index 0fdcb078..d7ba598c 100644 --- a/plugins/windows-notification/api/include/shortcutcreator.h +++ b/plugins/windows-notification/api/include/shortcutcreator.h @@ -10,7 +10,7 @@ #define NOEXCEPT #endif -EXTERN gboolean TryCreateShortcut(const gchar* aumid) NOEXCEPT; +EXTERN gboolean EnsureAumiddedShortcutExists(const gchar* aumid) NOEXCEPT; #undef EXTERN #undef NOEXCEPT diff --git a/plugins/windows-notification/api/include/win32.hpp b/plugins/windows-notification/api/include/win32.hpp index aa00121c..79d9e610 100644 --- a/plugins/windows-notification/api/include/win32.hpp +++ b/plugins/windows-notification/api/include/win32.hpp @@ -19,8 +19,8 @@ std::optional GetShortcutPath(); #define NOEXCEPT #endif -EXTERN gboolean SupportsModernNotifications() NOEXCEPT; -EXTERN gboolean SetAppModelID(const gchar* aumid) NOEXCEPT; +EXTERN gboolean IsWindows10() NOEXCEPT; +EXTERN gboolean SetProcessAumid(const gchar* aumid) NOEXCEPT; #undef EXTERN #undef NOEXCEPT diff --git a/plugins/windows-notification/api/src/shortcutcreator.cpp b/plugins/windows-notification/api/src/shortcutcreator.cpp index 49df2e3a..e7e93168 100644 --- a/plugins/windows-notification/api/src/shortcutcreator.cpp +++ b/plugins/windows-notification/api/src/shortcutcreator.cpp @@ -125,7 +125,7 @@ int32_t ValidateShortcut(const std::wstring& shortcut_path, const std::wstring& return hr; } -bool TryCreateShortcutInternal(const char *const aumid) +bool ImplEnsureAumiddedShortcutExists(const char *const aumid) { auto waumid = sview_to_wstr(aumid); if (waumid.empty()) @@ -153,8 +153,8 @@ bool TryCreateShortcutInternal(const char *const aumid) extern "C" { - gboolean TryCreateShortcut(const gchar* aumid) noexcept + gboolean EnsureAumiddedShortcutExists(const gchar* aumid) noexcept { - return g_try_invoke(TryCreateShortcutInternal, aumid); + return g_try_invoke(ImplEnsureAumiddedShortcutExists, aumid); } } diff --git a/plugins/windows-notification/api/src/win32.cpp b/plugins/windows-notification/api/src/win32.cpp index 57e99bb5..8f1051b6 100644 --- a/plugins/windows-notification/api/src/win32.cpp +++ b/plugins/windows-notification/api/src/win32.cpp @@ -29,7 +29,7 @@ std::optional GetShortcutPath() return std::nullopt; } -bool SetAppModelIDInternal(const char *const aumid) +bool ImplSetProcessAumid(const char *const aumid) { auto waumid = sview_to_wstr(aumid); if (waumid.empty()) @@ -44,7 +44,7 @@ extern "C" // Not available in mingw headers, but linking works. NTSTATUS NTAPI RtlGetVersion(PRTL_OSVERSIONINFOW); - gboolean SupportsModernNotifications() noexcept + gboolean IsWindows10() noexcept { RTL_OSVERSIONINFOW rovi = { 0 }; rovi.dwOSVersionInfoSize = sizeof(rovi); @@ -55,9 +55,8 @@ extern "C" return FALSE; } - gboolean SetAppModelID(const gchar* aumid) noexcept + gboolean SetProcessAumid(const gchar* aumid) noexcept { - return g_try_invoke(SetAppModelIDInternal, aumid); + return g_try_invoke(ImplSetProcessAumid, aumid); } } - diff --git a/plugins/windows-notification/src/toast_notification_builder.vala b/plugins/windows-notification/src/toast_notification_builder.vala index d38aca79..c8a24b51 100644 --- a/plugins/windows-notification/src/toast_notification_builder.vala +++ b/plugins/windows-notification/src/toast_notification_builder.vala @@ -12,7 +12,7 @@ namespace Dino.Plugins.WindowsNotification { } public class ToastNotificationBuilder { - private static bool _supportsModernFeatures = SupportsModernNotifications(); + private static bool _supportsModernFeatures = IsWindows10(); private Gee.List