Fix for issue #1532 - [PowerToys tray icon] Show version on tooltip (#2117)

* Fix for issue #1532

[PowerToys] Show version on tooltip

* Update src/runner/tray_icon.cpp

Co-Authored-By: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>

Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
This commit is contained in:
Nghia M. Luong 2020-04-17 01:47:24 -07:00 committed by GitHub
parent 0cbe7a16e3
commit 5cfa8889f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,7 +192,8 @@ void start_tray_icon()
tray_icon_data.hWnd = hwnd; tray_icon_data.hWnd = hwnd;
tray_icon_data.uID = id_tray_icon; tray_icon_data.uID = id_tray_icon;
tray_icon_data.uCallbackMessage = wm_icon_notify; tray_icon_data.uCallbackMessage = wm_icon_notify;
wcscpy_s(tray_icon_data.szTip, sizeof(tray_icon_data.szTip) / sizeof(WCHAR), L"PowerToys"); std::wstring about_msg_pt_version = L"PowerToys\n" + get_product_version();
wcscpy_s(tray_icon_data.szTip, sizeof(tray_icon_data.szTip) / sizeof(WCHAR), about_msg_pt_version.c_str());
tray_icon_data.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE; tray_icon_data.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
tray_icon_created = Shell_NotifyIcon(NIM_ADD, &tray_icon_data) == TRUE; tray_icon_created = Shell_NotifyIcon(NIM_ADD, &tray_icon_data) == TRUE;