Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4119 from Montellese/peripherals_notifications

peripherals: don't show notifications for new devices during the initial scan
  • Loading branch information...
commit 0b15afabfa2beab317feaba29bfdf5acd4540cd4 2 parents 002c64a + 818f483
Lars Op den Kamp opdenkamp authored
4 xbmc/peripherals/Peripherals.cpp
View
@@ -322,7 +322,9 @@ void CPeripherals::OnDeviceAdded(const CPeripheralBus &bus, const CPeripheral &p
SetChanged();
- CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(35005), peripheral.DeviceName());
+ // don't show a notification for devices detected during the initial scan
+ if (bus.IsInitialised())
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(35005), peripheral.DeviceName());
}
void CPeripherals::OnDeviceDeleted(const CPeripheralBus &bus, const CPeripheral &peripheral)
2  xbmc/peripherals/bus/PeripheralBus.h
View
@@ -148,6 +148,8 @@ namespace PERIPHERALS
virtual bool FindComPort(CStdString &strLocation) { return false; }
+ virtual bool IsInitialised(void) const { return m_bInitialised; }
+
protected:
virtual void Process(void);
virtual bool ScanForDevices(void);
Please sign in to comment.
Something went wrong with that request. Please try again.