By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1499
Collapse All | Expand All

(-)./tdeioslave/media/libmediacommon/medium.cpp.ori (+2 lines)
Lines 46-51 Link Here
46
	loadUserLabel();
46
	loadUserLabel();
47
47
48
	m_halmounted = false;
48
	m_halmounted = false;
49
	m_isHotplug = false;
49
}
50
}
50
51
51
Medium::Medium()
52
Medium::Medium()
Lines 69-74 Link Here
69
	m_properties+= "false";        /* HIDDEN */
70
	m_properties+= "false";        /* HIDDEN */
70
	
71
	
71
	m_halmounted = false;
72
	m_halmounted = false;
73
	m_isHotplug = false;
72
}
74
}
73
75
74
const Medium Medium::create(const TQStringList &properties)
76
const Medium Medium::create(const TQStringList &properties)
(-)./tdeioslave/media/libmediacommon/medium.h.ORI (+5 lines)
Lines 92-97 Link Here
92
	void setHalMounted(bool flag) const { m_halmounted = flag; }
92
	void setHalMounted(bool flag) const { m_halmounted = flag; }
93
	bool halMounted() const { return m_halmounted; }
93
	bool halMounted() const { return m_halmounted; }
94
94
95
	void setIsHotplug( bool state ) { m_isHotplug = state; }
96
	bool isHotplug() const { return m_isHotplug; }
97
95
//private:
98
//private:
96
	Medium();
99
	Medium();
97
100
Lines 100-105 Link Here
100
103
101
	TQStringList m_properties;
104
	TQStringList m_properties;
102
	mutable bool m_halmounted;
105
	mutable bool m_halmounted;
106
107
	bool m_isHotplug;
103
	
108
	
104
friend class TQValueListNode<const Medium>;
109
friend class TQValueListNode<const Medium>;
105
};
110
};
(-)./tdeioslave/media/mediamanager/mediamanager.cpp.ori (+51 lines)
Lines 354-359 Link Here
354
    emit mediumChanged(name);
354
    emit mediumChanged(name);
355
}
355
}
356
356
357
TQString MediaManager::unmountAllSuspend()
358
{
359
    TQPtrList<Medium> list = m_mediaList.list();
360
361
    TQPtrList<Medium>::const_iterator it = list.begin();
362
    TQPtrList<Medium>::const_iterator end = list.end();
363
364
    TQString result;
365
366
    for (; it!=end; ++it)
367
    {
368
        if ( (*it)->isMounted() && (*it)->isHotplug() )
369
        {
370
            TQString tmp = unmount( (*it)->id() );
371
            if ( !tmp.isEmpty() ) { // umount failed
372
                result = tmp;
373
            } else {
374
                m_suspendResumeMountList.append( (*it)->id() );
375
            }
376
        }
377
    }
378
379
    // return last error
380
    return result;
381
}
382
383
TQString MediaManager::remountAllResume()
384
{
385
    TQString result;
386
387
    for (TQStringList::const_iterator it = m_suspendResumeMountList.begin();
388
         it != m_suspendResumeMountList.end();
389
         ++it)
390
    {
391
        const Medium *m = m_mediaList.findById(*it);
392
393
        if ( m && m->needMounting() )
394
        {
395
            TQString tmp = mount( *it );
396
            if ( !tmp.isEmpty() ) { // mount failed
397
                result = tmp;
398
            }
399
        }
400
    }
401
402
    m_suspendResumeMountList.clear();
403
404
    // return last error
405
    return result;
406
}
407
357
408
358
extern "C" {
409
extern "C" {
359
    KDE_EXPORT KDEDModule *create_mediamanager(const TQCString &obj)
410
    KDE_EXPORT KDEDModule *create_mediamanager(const TQCString &obj)
(-)./tdeioslave/media/mediamanager/mediamanager.h.ORI (+15 lines)
Lines 60-65 Link Here
60
	bool removableUnplug(const TQString &devNode);
60
	bool removableUnplug(const TQString &devNode);
61
	bool removableCamera(const TQString &devNode);
61
	bool removableCamera(const TQString &devNode);
62
62
63
       /**
64
         * Unmount manually all partitions when going to suspend
65
         *
66
         * @return last error if any
67
         */
68
        TQString unmountAllSuspend();
69
70
        /**
71
         * Remount previously unmounted partitions in unmountAllSuspend()
72
         *
73
         * @return last error if any
74
         */
75
        TQString remountAllResume();
76
63
k_dcop_signals:
77
k_dcop_signals:
64
	void mediumAdded(const TQString &name, bool allowNotification);
78
	void mediumAdded(const TQString &name, bool allowNotification);
65
	void mediumRemoved(const TQString &name, bool allowNotification);
79
	void mediumRemoved(const TQString &name, bool allowNotification);
Lines 89-94 Link Here
89
	TDEBackend *m_tdebackend;
103
	TDEBackend *m_tdebackend;
90
	MediaDirNotify m_dirNotify;
104
	MediaDirNotify m_dirNotify;
91
	FstabBackend *m_fstabbackend;
105
	FstabBackend *m_fstabbackend;
106
	TQStringList m_suspendResumeMountList;
92
};
107
};
93
108
94
#endif
109
#endif
(-)./tdeioslave/media/mediamanager/halbackend.cpp.ori (+1 lines)
Lines 541-546 Link Here
541
            libhal_volume_is_mounted(halVolume) );		/* Mounted ? */
541
            libhal_volume_is_mounted(halVolume) );		/* Mounted ? */
542
    }
542
    }
543
543
544
    medium->setIsHotplug( libhal_drive_is_hotpluggable(halDrive) );
544
545
545
    char* name = libhal_volume_policy_compute_display_name(halDrive, halVolume, m_halStoragePolicy);
546
    char* name = libhal_volume_policy_compute_display_name(halDrive, halVolume, m_halStoragePolicy);
546
    TQString volume_name = TQString::fromUtf8(name);
547
    TQString volume_name = TQString::fromUtf8(name);
(-)./tdeioslave/media/mediamanager/halbackend.h.ORI (+2 lines)
Lines 89-94 Link Here
89
	TQString decrypt(const TQString &id, const TQString &password);
89
	TQString decrypt(const TQString &id, const TQString &password);
90
	TQString undecrypt(const TQString &id);
90
	TQString undecrypt(const TQString &id);
91
91
92
	static bool isHotplug( const TQString & id );
93
92
private:
94
private:
93
	/**
95
	/**
94
	* Append a device in the media list. This function will check if the device
96
	* Append a device in the media list. This function will check if the device

Return to bug 1499