mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
config: show message if server is stopped after profile change
This commit is contained in:
parent
a63b6a0e3d
commit
f022e09938
@ -211,8 +211,15 @@ void Config::OnFrontendEvent(enum obs_frontend_event event, void* param)
|
|||||||
if (config->ServerEnabled) {
|
if (config->ServerEnabled) {
|
||||||
server->start(config->ServerPort);
|
server->start(config->ServerPort);
|
||||||
|
|
||||||
QString message = "Profile changed, WebSockets server restarted";
|
Utils::SysTrayNotify(
|
||||||
Utils::SysTrayNotify(message, QSystemTrayIcon::MessageIcon::Information);
|
QString("Profile changed, WebSockets server restarted"),
|
||||||
|
QSystemTrayIcon::MessageIcon::Information
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Utils::SysTrayNotify(
|
||||||
|
QString("Profile changed, WebSockets server stopped"),
|
||||||
|
QSystemTrayIcon::MessageIcon::Information
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ QSystemTrayIcon* Utils::GetTrayIcon() {
|
|||||||
return main->findChildren<QSystemTrayIcon*>().first();
|
return main->findChildren<QSystemTrayIcon*>().first();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Utils::SysTrayNotify(QString &text,
|
void Utils::SysTrayNotify(QString text,
|
||||||
QSystemTrayIcon::MessageIcon icon, QString title) {
|
QSystemTrayIcon::MessageIcon icon, QString title) {
|
||||||
if (!Config::Current()->AlertsEnabled ||
|
if (!Config::Current()->AlertsEnabled ||
|
||||||
!QSystemTrayIcon::isSystemTrayAvailable() ||
|
!QSystemTrayIcon::isSystemTrayAvailable() ||
|
||||||
|
@ -71,7 +71,7 @@ class Utils {
|
|||||||
|
|
||||||
static QSystemTrayIcon* GetTrayIcon();
|
static QSystemTrayIcon* GetTrayIcon();
|
||||||
static void SysTrayNotify(
|
static void SysTrayNotify(
|
||||||
QString &text,
|
QString text,
|
||||||
QSystemTrayIcon::MessageIcon n,
|
QSystemTrayIcon::MessageIcon n,
|
||||||
QString title = QString("obs-websocket"));
|
QString title = QString("obs-websocket"));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user