Skip to content
Closed
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
54 changes: 19 additions & 35 deletions src/system_tray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,19 +248,16 @@ namespace system_tray {
return;
}

tray.notification_title = NULL;
tray.notification_text = NULL;
tray.notification_cb = NULL;
tray.notification_icon = NULL;
tray.icon = TRAY_ICON_PLAYING;
tray_update(&tray);
tray.icon = TRAY_ICON_PLAYING;
tray.notification_title = "Stream Started";
char msg[256];
snprintf(msg, std::size(msg), "Streaming started for %s", app_name.c_str());
tray.notification_text = msg;

tray.icon = TRAY_ICON_PLAYING;
tray.tooltip = msg;
tray.notification_icon = TRAY_ICON_PLAYING;
tray.notification_title = "Stream Started";
tray.notification_text = msg;
tray.notification_cb = NULL;

tray_update(&tray);
}

Expand All @@ -270,19 +267,16 @@ namespace system_tray {
return;
}

tray.notification_title = NULL;
tray.notification_text = NULL;
tray.notification_cb = NULL;
tray.notification_icon = NULL;
tray.icon = TRAY_ICON_PAUSING;
tray_update(&tray);
char msg[256];
snprintf(msg, std::size(msg), "Streaming paused for %s", app_name.c_str());

tray.icon = TRAY_ICON_PAUSING;
tray.notification_title = "Stream Paused";
tray.notification_text = msg;
tray.tooltip = msg;
tray.notification_icon = TRAY_ICON_PAUSING;
tray.notification_title = "Stream Paused";
tray.notification_text = msg;
tray.notification_cb = NULL;

tray_update(&tray);
}

Expand All @@ -292,19 +286,16 @@ namespace system_tray {
return;
}

tray.notification_title = NULL;
tray.notification_text = NULL;
tray.notification_cb = NULL;
tray.notification_icon = NULL;
tray.icon = TRAY_ICON;
tray_update(&tray);
char msg[256];
snprintf(msg, std::size(msg), "Application %s successfully stopped", app_name.c_str());

tray.icon = TRAY_ICON;
tray.tooltip = PROJECT_NAME;
tray.notification_icon = TRAY_ICON;
tray.notification_title = "Application Stopped";
tray.notification_text = msg;
tray.tooltip = PROJECT_NAME;
tray.notification_cb = NULL;

tray_update(&tray);
}

Expand All @@ -314,20 +305,13 @@ namespace system_tray {
return;
}

tray.notification_title = NULL;
tray.notification_text = NULL;
tray.notification_cb = NULL;
tray.notification_icon = NULL;
tray.icon = TRAY_ICON;
tray_update(&tray);
tray.icon = TRAY_ICON;
tray.tooltip = PROJECT_NAME;
tray.notification_icon = TRAY_ICON_LOCKED;
tray.notification_title = "Incoming Pairing Request";
tray.notification_text = "Click here to complete the pairing process";
tray.notification_icon = TRAY_ICON_LOCKED;
tray.tooltip = PROJECT_NAME;
tray.notification_cb = []() {
launch_ui_with_path("/pin");
};
tray.notification_cb = [] { launch_ui_with_path("/pin"); };

tray_update(&tray);
}

Expand Down