Skip to content
This repository
Browse code

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
@@ -322,7 +322,9 @@ void CPeripherals::OnDeviceAdded(const CPeripheralBus &bus, const CPeripheral &p
322 322
323 323 SetChanged();
324 324
325   - CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(35005), peripheral.DeviceName());
  325 + // don't show a notification for devices detected during the initial scan
  326 + if (bus.IsInitialised())
  327 + CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(35005), peripheral.DeviceName());
326 328 }
327 329
328 330 void CPeripherals::OnDeviceDeleted(const CPeripheralBus &bus, const CPeripheral &peripheral)
2  xbmc/peripherals/bus/PeripheralBus.h
@@ -148,6 +148,8 @@ namespace PERIPHERALS
148 148
149 149 virtual bool FindComPort(CStdString &strLocation) { return false; }
150 150
  151 + virtual bool IsInitialised(void) const { return m_bInitialised; }
  152 +
151 153 protected:
152 154 virtual void Process(void);
153 155 virtual bool ScanForDevices(void);

0 comments on commit 0b15afa

Please sign in to comment.
Something went wrong with that request. Please try again.