Compare commits

...

36 Commits

Author SHA1 Message Date
Jaime Bernardo
b1c1161d3b Merge branch 'main' into pr35429 2024-10-28 09:14:15 +00:00
Gokce Kantarci
4208e05826 [Runner] Open General page instead dashboard. 2024-10-25 18:33:35 +03:00
Gokce Kantarci
207b5dae50 [Runner] Remove unnecessary code. 2024-10-14 14:58:00 +03:00
Gokce Kantarci
6828961262 [Runner] Remove unnecessary code. 2024-10-14 14:55:18 +03:00
Gokce Kantarci
265e52967a [Runner] Remove unnecessary code. 2024-10-14 14:53:58 +03:00
Gokce Kantarci
f1308fad5e [Runner] Remove unnecessary code. 2024-10-14 14:52:48 +03:00
Gokce Kantarci
235a299b73 [Runner] Remove unnecessary code. 2024-10-14 14:51:01 +03:00
Gokce Kantarci
f60b294dcb [Runner] Clicking update notification opens PT Settings. 2024-10-14 14:49:06 +03:00
Gokce Kantarci
5149ed4c00 Merge branch 'main' of https://github.com/gokcekantarci/PowerToys 2024-10-11 12:56:02 +03:00
Gokce Kantarci
b92db8134b Merge remote-tracking branch 'upstream/main' 2024-10-11 12:53:46 +03:00
Gokce Kantarci
b18652ad6c Merge branch 'main' of https://github.com/gokcekantarci/PowerToys 2024-10-04 12:26:15 +03:00
Gokce Kantarci
9bbda17811 Merge remote-tracking branch 'upstream/main' 2024-10-04 12:21:06 +03:00
Gokce Kantarci
ee4440f65f Merge remote-tracking branch 'upstream/main' 2024-09-24 14:11:01 +03:00
Gokce Kantarci
2234db6c6b Merge remote-tracking branch 'upstream/main' 2024-09-19 15:12:31 +03:00
Gokce Kantarci
cf5afc6c1c Merge remote-tracking branch 'upstream/main' 2024-09-17 15:42:03 +03:00
Gokce Kantarci
3de225c8fe Merge remote-tracking branch 'upstream/main' 2024-07-23 13:34:02 +03:00
Gokce Kantarci
9324162007 [BugReport] bug_report.yml is changed. 2024-07-09 15:55:01 +03:00
Gokce Kantarci
e21783473e iselevated 2024-06-10 14:31:17 +03:00
Gokce Kantarci
e1fa78c50f iselevated 2024-06-10 14:22:57 +03:00
Gokce Kantarci
8cb70648d3 Main test bug_report.yml 2024-06-07 15:44:41 +03:00
Gokce Kantarci
d45ae2c197 Revert "Test version"
This reverts commit 65a313fb4e.
2024-06-07 13:52:24 +03:00
Gokce Kantarci
5c0e14656e Revert "Github URL"
This reverts commit 96c09532fa.
2024-06-07 13:52:19 +03:00
Gokce Kantarci
f9b1588375 Revert "repro"
This reverts commit f2ed58f329.
2024-06-07 13:52:16 +03:00
Gokce Kantarci
5596a32e3d Revert "os version"
This reverts commit 9c0ef91fd9.
2024-06-07 13:52:13 +03:00
Gokce Kantarci
51a33afbdb Revert "isadmin"
This reverts commit e7cc3a04f7.
2024-06-07 13:52:10 +03:00
Gokce Kantarci
ce010f5f7a Revert "report"
This reverts commit f97cc86f67.
2024-06-07 13:52:05 +03:00
Gokce Kantarci
27b234e38e Revert "report"
This reverts commit c87a344007.
2024-06-07 13:52:02 +03:00
Gokce Kantarci
c716aa65ae Revert "report"
This reverts commit 3c6d882e91.
2024-06-07 13:51:58 +03:00
Gokce Kantarci
3c6d882e91 report 2024-06-06 15:58:52 +03:00
Gokce Kantarci
c87a344007 report 2024-06-06 15:56:55 +03:00
Gokce Kantarci
f97cc86f67 report 2024-06-06 15:55:47 +03:00
Gokce Kantarci
e7cc3a04f7 isadmin 2024-06-05 17:27:18 +03:00
Gokce Kantarci
9c0ef91fd9 os version 2024-06-05 16:58:31 +03:00
Gokce Kantarci
f2ed58f329 repro 2024-06-04 17:02:31 +03:00
Gokce Kantarci
96c09532fa Github URL 2024-06-03 15:09:23 +03:00
Gokce Kantarci
65a313fb4e Test version 2024-06-03 15:07:45 +03:00
4 changed files with 27 additions and 7 deletions

View File

@@ -178,7 +178,8 @@ void notifications::show_toast_with_activations(std::wstring message,
std::wstring title,
std::wstring_view background_handler_id,
std::vector<action_t> actions,
toast_params params)
toast_params params,
std::wstring launch_uri)
{
// DO NOT LOCALIZE any string in this function, because they're XML tags and a subject to
// https://learn.microsoft.com/windows/uwp/design/shell/tiles-and-notifications/toast-xml-schema
@@ -189,7 +190,18 @@ void notifications::show_toast_with_activations(std::wstring message,
// We must set toast's title and contents immediately, because some of the toasts we send could be snoozed.
// Windows instantiates the snoozed toast from scratch before showing it again, so all bindings that were set
// using NotificationData would be empty.
toast_xml += LR"(<?xml version="1.0"?><toast><visual><binding template="ToastGeneric">)";
// Add the launch attribute if launch_uri is provided, otherwise omit it
toast_xml += LR"(<?xml version="1.0"?>)";
if (!launch_uri.empty())
{
toast_xml += LR"(<toast launch=")" + launch_uri + LR"(" activationType="protocol">)"; // Use the launch URI if provided
}
else
{
toast_xml += LR"(<toast>)"; // No launch attribute if empty
}
toast_xml += LR"(<visual><binding template="ToastGeneric">)";
toast_xml += LR"(<text id="1">)";
toast_xml += std::move(title);
toast_xml += LR"(</text>)";

View File

@@ -56,7 +56,7 @@ namespace notifications
using action_t = std::variant<link_button, background_activated_button, snooze_button>;
void show_toast(std::wstring plaintext_message, std::wstring title, toast_params params = {});
void show_toast_with_activations(std::wstring plaintext_message, std::wstring title, std::wstring_view background_handler_id, std::vector<action_t> actions, toast_params params = {});
void show_toast_with_activations(std::wstring plaintext_message, std::wstring title, std::wstring_view background_handler_id, std::vector<action_t> actions, toast_params params = {}, std::wstring launch_uri = L"");
void update_toast_progress_bar(std::wstring_view tag, progress_bar_params params);
void remove_toasts_by_tag(std::wstring_view tag);
void remove_all_scheduled_toasts();

View File

@@ -53,8 +53,9 @@ void ShowNewVersionAvailable(const new_version_download_info& info)
{ link_button{ GET_RESOURCE_STRING(IDS_GITHUB_NEW_VERSION_UPDATE_NOW),
L"powertoys://update_now/" },
link_button{ GET_RESOURCE_STRING(IDS_GITHUB_NEW_VERSION_MORE_INFO),
L"powertoys://open_settings/" } },
std::move(toast_params));
L"powertoys://open_overview/" } },
std::move(toast_params),
L"powertoys://open_overview/");
}
void ShowOpenSettingsForUpdate()
@@ -65,13 +66,14 @@ void ShowOpenSettingsForUpdate()
std::vector<action_t> actions = {
link_button{ GET_RESOURCE_STRING(IDS_GITHUB_NEW_VERSION_MORE_INFO),
L"powertoys://open_settings/" },
L"powertoys://open_overview/" },
};
show_toast_with_activations(GET_RESOURCE_STRING(IDS_GITHUB_NEW_VERSION_AVAILABLE),
GET_RESOURCE_STRING(IDS_TOAST_TITLE),
{},
std::move(actions),
std::move(toast_params));
std::move(toast_params),
L"powertoys://open_overview/");
}
SHELLEXECUTEINFOW LaunchPowerToysUpdate(const wchar_t* cmdline)

View File

@@ -275,6 +275,7 @@ toast_notification_handler_result toast_notification_handler(const std::wstring_
const std::wstring_view cant_drag_elevated_disable = L"cant_drag_elevated_disable/";
const std::wstring_view couldnt_toggle_powerpreview_modules_disable = L"couldnt_toggle_powerpreview_modules_disable/";
const std::wstring_view open_settings = L"open_settings/";
const std::wstring_view open_overview = L"open_overview/";
const std::wstring_view update_now = L"update_now/";
if (param == cant_drag_elevated_disable)
@@ -296,6 +297,11 @@ toast_notification_handler_result toast_notification_handler(const std::wstring_
open_menu_from_another_instance(std::nullopt);
return toast_notification_handler_result::exit_success;
}
else if (param == open_overview)
{
open_menu_from_another_instance("Overview");
return toast_notification_handler_result::exit_success;
}
else
{
return toast_notification_handler_result::exit_error;