Add option to disable mDNS PC discovery. Fixes #50

This commit is contained in:
Cameron Gutman
2018-09-09 12:33:19 -07:00
parent 6e0a657b76
commit af17d56cbd
5 changed files with 46 additions and 11 deletions
+21
View File
@@ -2,6 +2,7 @@ import QtQuick 2.9
import QtQuick.Controls 2.2
import StreamingPreferences 1.0
import ComputerManager 1.0
ScrollView {
id: settingsPage
@@ -601,6 +602,26 @@ ScrollView {
fpsComboBox.reinitialize()
}
}
CheckBox {
id: enableMdns
text: "<font color=\"white\">Automatically find PCs on the local network (Recommended)</font>"
font.pointSize: 12
checked: prefs.enableMdns
onCheckedChanged: {
prefs.enableMdns = checked
// We must save the updated preference to ensure
// ComputerManager can observe the change internally.
prefs.save()
// Restart polling so the mDNS change takes effect
if (window.pollingActive) {
ComputerManager.stopPollingAsync()
ComputerManager.startPolling()
}
}
}
}
}
}