mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-19 00:41:49 +03:00
Show notification only on Debug level or above #4745
This commit is contained in:
parent
ebb7edfb0f
commit
f3472c84e2
@ -467,24 +467,26 @@ void MainWindow::checkFingerprint(const QString& line)
|
||||
|
||||
void MainWindow::checkTransmission(const QString& line)
|
||||
{
|
||||
if (line.contains("Transmission")) {
|
||||
if (line.contains("Started")) {
|
||||
setSynergyState(synergyTransfering);
|
||||
}
|
||||
else if (line.contains("Failed") ||
|
||||
line.contains("Complete") ||
|
||||
line.contains("Interrupted")) {
|
||||
setSynergyState(synergyConnected);
|
||||
}
|
||||
if (appConfig().logLevel() >= 2) {
|
||||
if (line.contains("Transmission")) {
|
||||
if (line.contains("Started")) {
|
||||
setSynergyState(synergyTransfering);
|
||||
}
|
||||
else if (line.contains("Failed") ||
|
||||
line.contains("Complete") ||
|
||||
line.contains("Interrupted")) {
|
||||
setSynergyState(synergyConnected);
|
||||
}
|
||||
|
||||
// NOTIFY: Title: Detail
|
||||
int p1 = line.indexOf(':');
|
||||
if (p1 > 0) {
|
||||
int p2 = line.indexOf(':', p1 + 1);
|
||||
if (p2 > 0) {
|
||||
QString title = line.mid(p1 + 2, p2 - p1 - 2);
|
||||
QString detail = line.mid(p2 + 2);
|
||||
m_pTrayIcon->showMessage(title, detail);
|
||||
// NOTIFY: Title: Detail
|
||||
int p1 = line.indexOf(':');
|
||||
if (p1 > 0) {
|
||||
int p2 = line.indexOf(':', p1 + 1);
|
||||
if (p2 > 0) {
|
||||
QString title = line.mid(p1 + 2, p2 - p1 - 2);
|
||||
QString detail = line.mid(p2 + 2);
|
||||
m_pTrayIcon->showMessage(title, detail);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user