19 #include "kautomount.h"
21 #include "kdirwatch.h"
22 #include "tdeio/job.h"
23 #include <kdirnotify_stub.h>
33 const TQString& _mountpoint,
const TQString & _desktopFile,
34 bool _show_filemanager_window )
35 : m_strDevice( _device ),
36 m_desktopFile( _desktopFile )
39 m_bShowFilemanagerWindow = _show_filemanager_window;
42 connect( job, TQT_SIGNAL( result(
TDEIO::Job * ) ),
this, TQT_SLOT( slotResult(
TDEIO::Job * ) ) );
45 void KAutoMount::slotResult(
TDEIO::Job * job )
56 Q_ASSERT( mountpoint.isValid() );
58 if ( mountpoint.path().isEmpty() )
59 kdWarning(7015) << m_strDevice <<
" was correctly mounted, but TDEIO::findDeviceMountPoint didn't find it. "
60 <<
"This looks like a bug, please report it on http://bugs.trinitydesktop.org, together with your /etc/fstab line" << endl;
61 else if ( m_bShowFilemanagerWindow )
65 KDirNotify_stub allDirNotify(
"*",
"KDirNotify*");
66 allDirNotify.FilesAdded( mountpoint );
69 kdDebug(7015) <<
" mount finished : updating " << m_desktopFile << endl;
71 dfURL.setPath( m_desktopFile );
72 allDirNotify.FilesChanged( dfURL );
81 : m_desktopFile( _desktopFile ), m_mountpoint( _mountpoint )
84 connect( job, TQT_SIGNAL( result(
TDEIO::Job * ) ),
this, TQT_SLOT( slotResult(
TDEIO::Job * ) ) );
87 void KAutoUnmount::slotResult(
TDEIO::Job * job )
95 KDirNotify_stub allDirNotify(
"*",
"KDirNotify*");
97 kdDebug(7015) <<
"unmount finished : updating " << m_desktopFile << endl;
99 dfURL.setPath( m_desktopFile );
100 allDirNotify.FilesChanged( dfURL );
108 mp.setPath( m_mountpoint );
109 allDirNotify.FilesAdded( mp );
117 #include "kautomount.moc"