@ -206,7 +206,7 @@ void HwDeviceSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu) {
menu - > insertTitle ( SmallIcon ( " configure " ) , i18n ( " Global Configuration " ) ) ;
TDEAction * actHardwareConfig = new TDEAction ( i18n ( " Configure Devices ..." ) , SmallIconSet ( " kcmpci " ) , TDEShortcut ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotHardwareConfig ( ) ) , actionCollection ( ) ) ;
TDEAction * actHardwareConfig = new TDEAction ( i18n ( " Show Device Manager ..." ) , SmallIconSet ( " kcmpci " ) , TDEShortcut ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotHardwareConfig ( ) ) , actionCollection ( ) ) ;
actHardwareConfig - > plug ( menu ) ;
TDEAction * actShortcutKeys = new TDEAction ( i18n ( " Configure Shortcut Keys... " ) , SmallIconSet ( " configure " ) , TDEShortcut ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditShortcutKeys ( ) ) , actionCollection ( ) ) ;
@ -637,11 +637,18 @@ void HwDeviceSystemTray::slotEditShortcutKeys() {
void HwDeviceSystemTray : : deviceAdded ( TDEGenericDevice * device ) {
# ifdef __TDE_HAVE_TDEHWLIB
if ( device - > type ( ) = = TDEGenericDeviceType : : Disk ) {
TDEConfig config ( " mediamanagerrc " ) ;
config . setGroup ( " Global " ) ;
if ( config . readBoolEntry ( " DeviceMonitorPopupsEnabled " , true ) )
{
if ( device - > type ( ) = = TDEGenericDeviceType : : Disk )
{
TDEStorageDevice * sdevice = static_cast < TDEStorageDevice * > ( device ) ;
if ( isMonitoredDevice ( sdevice ) ) {
if ( isMonitoredDevice ( sdevice ) )
{
TQString uuid = sdevice - > diskUUID ( ) ;
if ( uuid = = " " ) {
if ( uuid = = " " )
{
uuid = sdevice - > systemPath ( ) ;
}
m_hardwareNotifierContainer - > displayMessage (
@ -650,16 +657,24 @@ void HwDeviceSystemTray::deviceAdded(TDEGenericDevice* device) {
0 , 0 , " ADD: " + uuid ) ;
}
}
}
# endif
}
void HwDeviceSystemTray : : deviceRemoved ( TDEGenericDevice * device ) {
# ifdef __TDE_HAVE_TDEHWLIB
if ( device - > type ( ) = = TDEGenericDeviceType : : Disk ) {
TDEConfig config ( " mediamanagerrc " ) ;
config . setGroup ( " Global " ) ;
if ( config . readBoolEntry ( " DeviceMonitorPopupsEnabled " , true ) )
{
if ( device - > type ( ) = = TDEGenericDeviceType : : Disk )
{
TDEStorageDevice * sdevice = static_cast < TDEStorageDevice * > ( device ) ;
if ( isMonitoredDevice ( sdevice ) ) {
if ( isMonitoredDevice ( sdevice ) )
{
TQString uuid = sdevice - > diskUUID ( ) ;
if ( uuid = = " " ) {
if ( uuid = = " " )
{
uuid = sdevice - > systemPath ( ) ;
}
m_hardwareNotifierContainer - > displayMessage (
@ -668,16 +683,24 @@ void HwDeviceSystemTray::deviceRemoved(TDEGenericDevice* device) {
0 , 0 , " REMOVE: " + uuid ) ;
}
}
}
# endif
}
void HwDeviceSystemTray : : deviceChanged ( TDEGenericDevice * device ) {
# ifdef __TDE_HAVE_TDEHWLIB
if ( device - > type ( ) = = TDEGenericDeviceType : : Disk ) {
TDEConfig config ( " mediamanagerrc " ) ;
config . setGroup ( " Global " ) ;
if ( config . readBoolEntry ( " DeviceMonitorPopupsEnabled " , true ) )
{
if ( device - > type ( ) = = TDEGenericDeviceType : : Disk )
{
TDEStorageDevice * sdevice = static_cast < TDEStorageDevice * > ( device ) ;
if ( isMonitoredDevice ( sdevice ) ) {
if ( isMonitoredDevice ( sdevice ) )
{
TQString uuid = sdevice - > diskUUID ( ) ;
if ( uuid = = " " ) {
if ( uuid = = " " )
{
uuid = sdevice - > systemPath ( ) ;
}
m_hardwareNotifierContainer - > displayMessage (
@ -686,6 +709,7 @@ void HwDeviceSystemTray::deviceChanged(TDEGenericDevice* device) {
0 , 0 , " CHANGE: " + uuid ) ;
}
}
}
# endif
}