aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2014-01-31 21:06:48 +0100
committermontellese <montellese@xbmc.org>2014-01-31 21:06:48 +0100
commit818f48350d50674f7b969da6e2f002c31c48d748 (patch)
tree196c83d6c32aaf612c8f453bd8a859dc9d05524d
parente55212c5cb9bbe1e087b91bb35743649622f5837 (diff)
peripherals: don't show notifications for new devices during the initial scan
-rw-r--r--xbmc/peripherals/Peripherals.cpp4
-rw-r--r--xbmc/peripherals/bus/PeripheralBus.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/xbmc/peripherals/Peripherals.cpp b/xbmc/peripherals/Peripherals.cpp
index 7d800ec5c9..b0c184edb7 100644
--- a/xbmc/peripherals/Peripherals.cpp
+++ b/xbmc/peripherals/Peripherals.cpp
@@ -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)
diff --git a/xbmc/peripherals/bus/PeripheralBus.h b/xbmc/peripherals/bus/PeripheralBus.h
index 879821dd40..795f88b6a4 100644
--- a/xbmc/peripherals/bus/PeripheralBus.h
+++ b/xbmc/peripherals/bus/PeripheralBus.h
@@ -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);