Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tray): use PROJECT_NAME definition for tooltip #1958

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/system_tray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
#include "main.h"
#include "platform/common.h"
#include "process.h"
#include "version.h"

using namespace std::literals;

// system_tray namespace
namespace system_tray {

/**
* @brief Callback for opening the UI from the system tray.
* @param item The tray menu item.
Expand Down Expand Up @@ -126,9 +126,7 @@ namespace system_tray {
// Tray menu
static struct tray tray = {
.icon = TRAY_ICON,
#if defined(_WIN32)
.tooltip = const_cast<char *>("Sunshine"), // cast the string literal to a non-const char* pointer
#endif
.tooltip = PROJECT_NAME,
.menu =
(struct tray_menu[]) {
// todo - use boost/locale to translate menu strings
Expand Down Expand Up @@ -340,7 +338,7 @@ namespace system_tray {
tray.notification_icon = TRAY_ICON;
tray.notification_title = "Application Stopped";
tray.notification_text = msg;
tray.tooltip = "Sunshine";
tray.tooltip = PROJECT_NAME;
tray_update(&tray);
}

Expand All @@ -359,7 +357,7 @@ namespace system_tray {
tray.notification_title = "Incoming Pairing Request";
tray.notification_text = "Click here to complete the pairing process";
tray.notification_icon = TRAY_ICON_LOCKED;
tray.tooltip = "Sunshine";
tray.tooltip = PROJECT_NAME;
tray.notification_cb = []() {
launch_ui_with_path("/pin");
};
Expand Down
2 changes: 1 addition & 1 deletion third-party/tray
Submodule tray updated 1 files
+1 −1 tray.h