5ab19b14 | 2014-11-27 02:17:02 | Timothy Pearson |
Honor disk hidden flag when handling device insertion notifiers This relates to Bug 2211 |
||
M kcontrol/hwmanager/devicepropsdlg.cpp M tdeioslave/media/mediamanager/tdehardwarebackend.cpp |
||
diff --git a/kcontrol/hwmanager/devicepropsdlg.cpp b/kcontrol/hwmanager/devicepropsdlg.cpp index c6c8cde..12de8ce 100644 --- a/kcontrol/hwmanager/devicepropsdlg.cpp +++ b/kcontrol/hwmanager/devicepropsdlg.cpp @@ -415,6 +415,9 @@ if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable)) { status_text += "Hotpluggable<br>"; } + if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hidden)) { + status_text += "Hidden<br>"; + } if (status_text == "<qt>") { status_text += "<i>Unavailable</i>"; } diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp index ce9d8fb..56eab25 100644 --- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp +++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp @@ -140,6 +140,12 @@ return; } + // Respect the device's hidden flag--we will still make the device available via the tdeioslave + // but we will not generate popups or other notifications on device insertion + if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hidden)) { + allowNotification = false; + } + // Add volume block devices if (sdevice->isDiskOfType(TDEDiskDeviceType::HDD)) { /* We only list volumes that... |