--- a/filemanager/src/bwins/fmbkupenginewrapperu.def Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/bwins/fmbkupenginewrapperu.def Mon May 03 12:24:39 2010 +0300
@@ -23,42 +23,44 @@
?CreateEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@ABVQString@@0W4TSettingType@2@@Z @ 22 NONAME ; class FmBackupEntry * FmBackupSettings::CreateEntry(class QString const &, class QString const &, enum FmBackupEntry::TSettingType)
?content@FmBackupSettings@@QBEIXZ @ 23 NONAME ; unsigned int FmBackupSettings::content(void) const
?targetDrive@FmBackupSettings@@QBE?AVQString@@XZ @ 24 NONAME ; class QString FmBackupSettings::targetDrive(void) const
- ??0FmBkupEngine@@QAE@PAVQObject@@@Z @ 25 NONAME ; FmBkupEngine::FmBkupEngine(class QObject *)
- ?notifyPreparing@FmBkupEngine@@IAEX_N@Z @ 26 NONAME ; void FmBkupEngine::notifyPreparing(bool)
- ?setWeekday@FmBackupSettings@@QAEXW4TFileManagerBackupWeekday@1@@Z @ 27 NONAME ; void FmBackupSettings::setWeekday(enum FmBackupSettings::TFileManagerBackupWeekday)
- ?load@FmRestoreSettings@@QAEXV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 28 NONAME ; void FmRestoreSettings::load(class QList<class FmBkupDrivesAndOperation *>)
- ?resetAndDestoryRestoreEntry@FmRestoreSettings@@AAEXXZ @ 29 NONAME ; void FmRestoreSettings::resetAndDestoryRestoreEntry(void)
- ?targetDriveToString@FmBackupSettings@@QAE?AVQString@@ABV2@@Z @ 30 NONAME ; class QString FmBackupSettings::targetDriveToString(class QString const &)
- ?setScheduling@FmBackupSettings@@QAEXW4TFileManagerBackupSchedule@1@@Z @ 31 NONAME ; void FmBackupSettings::setScheduling(enum FmBackupSettings::TFileManagerBackupSchedule)
- ??1FmRestoreSettings@@QAE@XZ @ 32 NONAME ; FmRestoreSettings::~FmRestoreSettings(void)
- ?notifyFinish@FmBkupEngine@@IAEXH@Z @ 33 NONAME ; void FmBkupEngine::notifyFinish(int)
- ?createContentsEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 34 NONAME ; class FmBackupEntry * FmBackupSettings::createContentsEntry(void)
- ?qt_metacast@FmBkupEngine@@UAEPAXPBD@Z @ 35 NONAME ; void * FmBkupEngine::qt_metacast(char const *)
- ?SetSelection@FmRestoreSettings@@QAEXAB_K@Z @ 36 NONAME ; void FmRestoreSettings::SetSelection(unsigned long long const &)
- ?createSchedulingEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 37 NONAME ; class FmBackupEntry * FmBackupSettings::createSchedulingEntry(void)
- ?metaObject@FmBkupEngine@@UBEPBUQMetaObject@@XZ @ 38 NONAME ; struct QMetaObject const * FmBkupEngine::metaObject(void) const
- ?startBackup@FmBkupEngine@@QAE_NV?$QList@PAVFmBkupDrivesAndOperation@@@@V?$QList@PAVFmBkupBackupCategory@@@@VQString@@I@Z @ 39 NONAME ; bool FmBkupEngine::startBackup(class QList<class FmBkupDrivesAndOperation *>, class QList<class FmBkupBackupCategory *>, class QString, unsigned int)
- ?createTargetDriveEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 40 NONAME ; class FmBackupEntry * FmBackupSettings::createTargetDriveEntry(void)
- ?load@FmBackupSettings@@QAEXXZ @ 41 NONAME ; void FmBackupSettings::load(void)
- ?notifyMemoryLow@FmBkupEngine@@IAEXHAAH@Z @ 42 NONAME ; void FmBkupEngine::notifyMemoryLow(int, int &)
- ??1FmBkupEngine@@UAE@XZ @ 43 NONAME ; FmBkupEngine::~FmBkupEngine(void)
- ??0FmBackupSettings@@QAE@XZ @ 44 NONAME ; FmBackupSettings::FmBackupSettings(void)
- ?CreateEntry@FmRestoreSettings@@AAEPAVFmRestoreEntry@@ABVFmRestoreInfo@@@Z @ 45 NONAME ; class FmRestoreEntry * FmRestoreSettings::CreateEntry(class FmRestoreInfo const &)
- ?startRestore@FmBkupEngine@@QAE_NV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 46 NONAME ; bool FmBkupEngine::startRestore(class QList<class FmBkupDrivesAndOperation *>)
- ?resetAndDestoryBackupEntry@FmBackupSettings@@AAEXXZ @ 47 NONAME ; void FmBackupSettings::resetAndDestoryBackupEntry(void)
- ?BackupSettingsL@FmBkupEngine@@QAEPAVFmBackupSettings@@XZ @ 48 NONAME ; class FmBackupSettings * FmBkupEngine::BackupSettingsL(void)
- ?setContent@FmBackupSettings@@QAEXI@Z @ 49 NONAME ; void FmBackupSettings::setContent(unsigned int)
- ?staticMetaObject@FmBkupEngine@@2UQMetaObject@@B @ 50 NONAME ; struct QMetaObject const FmBkupEngine::staticMetaObject
- ?setTargetDrive@FmBackupSettings@@QAEXABVQString@@@Z @ 51 NONAME ; void FmBackupSettings::setTargetDrive(class QString const &)
- ?schedulingToString@FmBackupSettings@@QAE?AVQString@@W4TFileManagerBackupSchedule@1@@Z @ 52 NONAME ; class QString FmBackupSettings::schedulingToString(enum FmBackupSettings::TFileManagerBackupSchedule)
- ?refreshList@FmRestoreSettings@@AAEXAAV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 53 NONAME ; void FmRestoreSettings::refreshList(class QList<class FmBkupDrivesAndOperation *> &)
- ?weekdayToString@FmBackupSettings@@SA?AVQString@@W4TFileManagerBackupWeekday@1@@Z @ 54 NONAME ; class QString FmBackupSettings::weekdayToString(enum FmBackupSettings::TFileManagerBackupWeekday)
- ?tr@FmBkupEngine@@SA?AVQString@@PBD0H@Z @ 55 NONAME ; class QString FmBkupEngine::tr(char const *, char const *, int)
- ?contentToString@FmBackupSettings@@SA?AVQString@@I@Z @ 56 NONAME ; class QString FmBackupSettings::contentToString(unsigned int)
- ?RestoreSettingsL@FmBkupEngine@@QAEPAVFmRestoreSettings@@XZ @ 57 NONAME ; class FmRestoreSettings * FmBkupEngine::RestoreSettingsL(void)
- ?time@FmBackupSettings@@QBEABVQTime@@XZ @ 58 NONAME ; class QTime const & FmBackupSettings::time(void) const
- ?notifyStart@FmBkupEngine@@IAEX_NH@Z @ 59 NONAME ; void FmBkupEngine::notifyStart(bool, int)
- ?scheduling@FmBackupSettings@@QBE?AW4TFileManagerBackupSchedule@1@XZ @ 60 NONAME ; enum FmBackupSettings::TFileManagerBackupSchedule FmBackupSettings::scheduling(void) const
- ?qt_metacall@FmBkupEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 61 NONAME ; int FmBkupEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?createWeekdayEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 62 NONAME ; class FmBackupEntry * FmBackupSettings::createWeekdayEntry(void)
+ ?getBackupDriveList@FmBkupEngine@@QAEXAAVQStringList@@@Z @ 25 NONAME ; void FmBkupEngine::getBackupDriveList(class QStringList &)
+ ??0FmBkupEngine@@QAE@PAVQObject@@@Z @ 26 NONAME ; FmBkupEngine::FmBkupEngine(class QObject *)
+ ?notifyPreparing@FmBkupEngine@@IAEX_N@Z @ 27 NONAME ; void FmBkupEngine::notifyPreparing(bool)
+ ?setWeekday@FmBackupSettings@@QAEXW4TFileManagerBackupWeekday@1@@Z @ 28 NONAME ; void FmBackupSettings::setWeekday(enum FmBackupSettings::TFileManagerBackupWeekday)
+ ?load@FmRestoreSettings@@QAEXV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 29 NONAME ; void FmRestoreSettings::load(class QList<class FmBkupDrivesAndOperation *>)
+ ?resetAndDestoryRestoreEntry@FmRestoreSettings@@AAEXXZ @ 30 NONAME ; void FmRestoreSettings::resetAndDestoryRestoreEntry(void)
+ ?targetDriveToString@FmBackupSettings@@QAE?AVQString@@ABV2@@Z @ 31 NONAME ; class QString FmBackupSettings::targetDriveToString(class QString const &)
+ ?setScheduling@FmBackupSettings@@QAEXW4TFileManagerBackupSchedule@1@@Z @ 32 NONAME ; void FmBackupSettings::setScheduling(enum FmBackupSettings::TFileManagerBackupSchedule)
+ ??1FmRestoreSettings@@QAE@XZ @ 33 NONAME ; FmRestoreSettings::~FmRestoreSettings(void)
+ ?notifyFinish@FmBkupEngine@@IAEXH@Z @ 34 NONAME ; void FmBkupEngine::notifyFinish(int)
+ ?createContentsEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 35 NONAME ; class FmBackupEntry * FmBackupSettings::createContentsEntry(void)
+ ?qt_metacast@FmBkupEngine@@UAEPAXPBD@Z @ 36 NONAME ; void * FmBkupEngine::qt_metacast(char const *)
+ ??0FmBackupSettings@@QAE@PAVFmBkupEngine@@@Z @ 37 NONAME ; FmBackupSettings::FmBackupSettings(class FmBkupEngine *)
+ ?SetSelection@FmRestoreSettings@@QAEXAB_K@Z @ 38 NONAME ; void FmRestoreSettings::SetSelection(unsigned long long const &)
+ ?createSchedulingEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 39 NONAME ; class FmBackupEntry * FmBackupSettings::createSchedulingEntry(void)
+ ?metaObject@FmBkupEngine@@UBEPBUQMetaObject@@XZ @ 40 NONAME ; struct QMetaObject const * FmBkupEngine::metaObject(void) const
+ ?startBackup@FmBkupEngine@@QAE_NV?$QList@PAVFmBkupDrivesAndOperation@@@@V?$QList@PAVFmBkupBackupCategory@@@@VQString@@I@Z @ 41 NONAME ; bool FmBkupEngine::startBackup(class QList<class FmBkupDrivesAndOperation *>, class QList<class FmBkupBackupCategory *>, class QString, unsigned int)
+ ?createTargetDriveEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 42 NONAME ; class FmBackupEntry * FmBackupSettings::createTargetDriveEntry(void)
+ ?load@FmBackupSettings@@QAEXXZ @ 43 NONAME ; void FmBackupSettings::load(void)
+ ?notifyMemoryLow@FmBkupEngine@@IAEXHAAH@Z @ 44 NONAME ; void FmBkupEngine::notifyMemoryLow(int, int &)
+ ??1FmBkupEngine@@UAE@XZ @ 45 NONAME ; FmBkupEngine::~FmBkupEngine(void)
+ ?CreateEntry@FmRestoreSettings@@AAEPAVFmRestoreEntry@@ABVFmRestoreInfo@@@Z @ 46 NONAME ; class FmRestoreEntry * FmRestoreSettings::CreateEntry(class FmRestoreInfo const &)
+ ?startRestore@FmBkupEngine@@QAE_NV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 47 NONAME ; bool FmBkupEngine::startRestore(class QList<class FmBkupDrivesAndOperation *>)
+ ?resetAndDestoryBackupEntry@FmBackupSettings@@AAEXXZ @ 48 NONAME ; void FmBackupSettings::resetAndDestoryBackupEntry(void)
+ ?BackupSettingsL@FmBkupEngine@@QAEPAVFmBackupSettings@@XZ @ 49 NONAME ; class FmBackupSettings * FmBkupEngine::BackupSettingsL(void)
+ ?setContent@FmBackupSettings@@QAEXI@Z @ 50 NONAME ; void FmBackupSettings::setContent(unsigned int)
+ ?staticMetaObject@FmBkupEngine@@2UQMetaObject@@B @ 51 NONAME ; struct QMetaObject const FmBkupEngine::staticMetaObject
+ ?setTargetDrive@FmBackupSettings@@QAEXABVQString@@@Z @ 52 NONAME ; void FmBackupSettings::setTargetDrive(class QString const &)
+ ?schedulingToString@FmBackupSettings@@QAE?AVQString@@W4TFileManagerBackupSchedule@1@@Z @ 53 NONAME ; class QString FmBackupSettings::schedulingToString(enum FmBackupSettings::TFileManagerBackupSchedule)
+ ?refreshList@FmRestoreSettings@@AAEXAAV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 54 NONAME ; void FmRestoreSettings::refreshList(class QList<class FmBkupDrivesAndOperation *> &)
+ ?weekdayToString@FmBackupSettings@@SA?AVQString@@W4TFileManagerBackupWeekday@1@@Z @ 55 NONAME ; class QString FmBackupSettings::weekdayToString(enum FmBackupSettings::TFileManagerBackupWeekday)
+ ?tr@FmBkupEngine@@SA?AVQString@@PBD0H@Z @ 56 NONAME ; class QString FmBkupEngine::tr(char const *, char const *, int)
+ ?contentToString@FmBackupSettings@@SA?AVQString@@I@Z @ 57 NONAME ; class QString FmBackupSettings::contentToString(unsigned int)
+ ?RestoreSettingsL@FmBkupEngine@@QAEPAVFmRestoreSettings@@XZ @ 58 NONAME ; class FmRestoreSettings * FmBkupEngine::RestoreSettingsL(void)
+ ?time@FmBackupSettings@@QBEABVQTime@@XZ @ 59 NONAME ; class QTime const & FmBackupSettings::time(void) const
+ ?notifyStart@FmBkupEngine@@IAEX_NH@Z @ 60 NONAME ; void FmBkupEngine::notifyStart(bool, int)
+ ?scheduling@FmBackupSettings@@QBE?AW4TFileManagerBackupSchedule@1@XZ @ 61 NONAME ; enum FmBackupSettings::TFileManagerBackupSchedule FmBackupSettings::scheduling(void) const
+ ?qt_metacall@FmBkupEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 62 NONAME ; int FmBkupEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?createWeekdayEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 63 NONAME ; class FmBackupEntry * FmBackupSettings::createWeekdayEntry(void)
+ ?notifyBackupFilesExist@FmBkupEngine@@IAEXAA_N@Z @ 64 NONAME ; void FmBkupEngine::notifyBackupFilesExist(bool &)
--- a/filemanager/src/eabi/fmbkupenginewrapperu.def Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/eabi/fmbkupenginewrapperu.def Mon May 03 12:24:39 2010 +0300
@@ -13,56 +13,58 @@
_ZN12FmBkupEngine15notifyPreparingEb @ 12 NONAME
_ZN12FmBkupEngine16RestoreSettingsLEv @ 13 NONAME
_ZN12FmBkupEngine16staticMetaObjectE @ 14 NONAME DATA 16
- _ZN12FmBkupEngine19GetRestoreInfoArrayER5QListIP24FmBkupDrivesAndOperationERS0_I13FmRestoreInfoEi @ 15 NONAME
- _ZN12FmBkupEngine19getStaticMetaObjectEv @ 16 NONAME
- _ZN12FmBkupEngineC1EP7QObject @ 17 NONAME
- _ZN12FmBkupEngineC2EP7QObject @ 18 NONAME
- _ZN12FmBkupEngineD0Ev @ 19 NONAME
- _ZN12FmBkupEngineD1Ev @ 20 NONAME
- _ZN12FmBkupEngineD2Ev @ 21 NONAME
- _ZN16FmBackupSettings10setContentEj @ 22 NONAME
- _ZN16FmBackupSettings10setWeekdayENS_25TFileManagerBackupWeekdayE @ 23 NONAME
- _ZN16FmBackupSettings11CreateEntryERK7QStringS2_N13FmBackupEntry12TSettingTypeE @ 24 NONAME
- _ZN16FmBackupSettings11refreshListEv @ 25 NONAME
- _ZN16FmBackupSettings13setSchedulingENS_26TFileManagerBackupScheduleE @ 26 NONAME
- _ZN16FmBackupSettings14setTargetDriveERK7QString @ 27 NONAME
- _ZN16FmBackupSettings15backupEntryListEv @ 28 NONAME
- _ZN16FmBackupSettings15contentToStringEj @ 29 NONAME
- _ZN16FmBackupSettings15createTimeEntryEv @ 30 NONAME
- _ZN16FmBackupSettings15weekdayToStringENS_25TFileManagerBackupWeekdayE @ 31 NONAME
- _ZN16FmBackupSettings18createWeekdayEntryEv @ 32 NONAME
- _ZN16FmBackupSettings18schedulingToStringENS_26TFileManagerBackupScheduleE @ 33 NONAME
- _ZN16FmBackupSettings19createContentsEntryEv @ 34 NONAME
- _ZN16FmBackupSettings19targetDriveToStringERK7QString @ 35 NONAME
- _ZN16FmBackupSettings21createSchedulingEntryEv @ 36 NONAME
- _ZN16FmBackupSettings22createTargetDriveEntryEv @ 37 NONAME
- _ZN16FmBackupSettings26resetAndDestoryBackupEntryEv @ 38 NONAME
- _ZN16FmBackupSettings4loadEv @ 39 NONAME
- _ZN16FmBackupSettings4saveEv @ 40 NONAME
- _ZN16FmBackupSettings7setTimeERK5QTime @ 41 NONAME
- _ZN16FmBackupSettingsC1Ev @ 42 NONAME
- _ZN16FmBackupSettingsC2Ev @ 43 NONAME
- _ZN16FmBackupSettingsD1Ev @ 44 NONAME
- _ZN16FmBackupSettingsD2Ev @ 45 NONAME
- _ZN17FmRestoreSettings11CreateEntryERK13FmRestoreInfo @ 46 NONAME
- _ZN17FmRestoreSettings11refreshListER5QListIP24FmBkupDrivesAndOperationE @ 47 NONAME
- _ZN17FmRestoreSettings12SetSelectionERKy @ 48 NONAME
- _ZN17FmRestoreSettings16restoreEntryListEv @ 49 NONAME
- _ZN17FmRestoreSettings27resetAndDestoryRestoreEntryEv @ 50 NONAME
- _ZN17FmRestoreSettings4loadE5QListIP24FmBkupDrivesAndOperationE @ 51 NONAME
- _ZN17FmRestoreSettingsC1ER12FmBkupEngine @ 52 NONAME
- _ZN17FmRestoreSettingsC2ER12FmBkupEngine @ 53 NONAME
- _ZN17FmRestoreSettingsD1Ev @ 54 NONAME
- _ZN17FmRestoreSettingsD2Ev @ 55 NONAME
- _ZNK12FmBkupEngine10metaObjectEv @ 56 NONAME
- _ZNK12FmBkupEngine5errorEv @ 57 NONAME
- _ZNK16FmBackupSettings10schedulingEv @ 58 NONAME
- _ZNK16FmBackupSettings11targetDriveEv @ 59 NONAME
- _ZNK16FmBackupSettings16contentsSelectedEv @ 60 NONAME
- _ZNK16FmBackupSettings4timeEv @ 61 NONAME
- _ZNK16FmBackupSettings7contentEv @ 62 NONAME
- _ZNK16FmBackupSettings7weekdayEv @ 63 NONAME
- _ZNK17FmRestoreSettings13GetSelectionLER5QListI13FmRestoreInfoE @ 64 NONAME
- _ZTI12FmBkupEngine @ 65 NONAME
- _ZTV12FmBkupEngine @ 66 NONAME
+ _ZN12FmBkupEngine18getBackupDriveListER11QStringList @ 15 NONAME
+ _ZN12FmBkupEngine19GetRestoreInfoArrayER5QListIP24FmBkupDrivesAndOperationERS0_I13FmRestoreInfoEi @ 16 NONAME
+ _ZN12FmBkupEngine19getStaticMetaObjectEv @ 17 NONAME
+ _ZN12FmBkupEngineC1EP7QObject @ 18 NONAME
+ _ZN12FmBkupEngineC2EP7QObject @ 19 NONAME
+ _ZN12FmBkupEngineD0Ev @ 20 NONAME
+ _ZN12FmBkupEngineD1Ev @ 21 NONAME
+ _ZN12FmBkupEngineD2Ev @ 22 NONAME
+ _ZN16FmBackupSettings10setContentEj @ 23 NONAME
+ _ZN16FmBackupSettings10setWeekdayENS_25TFileManagerBackupWeekdayE @ 24 NONAME
+ _ZN16FmBackupSettings11CreateEntryERK7QStringS2_N13FmBackupEntry12TSettingTypeE @ 25 NONAME
+ _ZN16FmBackupSettings11refreshListEv @ 26 NONAME
+ _ZN16FmBackupSettings13setSchedulingENS_26TFileManagerBackupScheduleE @ 27 NONAME
+ _ZN16FmBackupSettings14setTargetDriveERK7QString @ 28 NONAME
+ _ZN16FmBackupSettings15backupEntryListEv @ 29 NONAME
+ _ZN16FmBackupSettings15contentToStringEj @ 30 NONAME
+ _ZN16FmBackupSettings15createTimeEntryEv @ 31 NONAME
+ _ZN16FmBackupSettings15weekdayToStringENS_25TFileManagerBackupWeekdayE @ 32 NONAME
+ _ZN16FmBackupSettings18createWeekdayEntryEv @ 33 NONAME
+ _ZN16FmBackupSettings18schedulingToStringENS_26TFileManagerBackupScheduleE @ 34 NONAME
+ _ZN16FmBackupSettings19createContentsEntryEv @ 35 NONAME
+ _ZN16FmBackupSettings19targetDriveToStringERK7QString @ 36 NONAME
+ _ZN16FmBackupSettings21createSchedulingEntryEv @ 37 NONAME
+ _ZN16FmBackupSettings22createTargetDriveEntryEv @ 38 NONAME
+ _ZN16FmBackupSettings26resetAndDestoryBackupEntryEv @ 39 NONAME
+ _ZN16FmBackupSettings4loadEv @ 40 NONAME
+ _ZN16FmBackupSettings4saveEv @ 41 NONAME
+ _ZN16FmBackupSettings7setTimeERK5QTime @ 42 NONAME
+ _ZN16FmBackupSettingsC1EP12FmBkupEngine @ 43 NONAME
+ _ZN16FmBackupSettingsC2EP12FmBkupEngine @ 44 NONAME
+ _ZN16FmBackupSettingsD1Ev @ 45 NONAME
+ _ZN16FmBackupSettingsD2Ev @ 46 NONAME
+ _ZN17FmRestoreSettings11CreateEntryERK13FmRestoreInfo @ 47 NONAME
+ _ZN17FmRestoreSettings11refreshListER5QListIP24FmBkupDrivesAndOperationE @ 48 NONAME
+ _ZN17FmRestoreSettings12SetSelectionERKy @ 49 NONAME
+ _ZN17FmRestoreSettings16restoreEntryListEv @ 50 NONAME
+ _ZN17FmRestoreSettings27resetAndDestoryRestoreEntryEv @ 51 NONAME
+ _ZN17FmRestoreSettings4loadE5QListIP24FmBkupDrivesAndOperationE @ 52 NONAME
+ _ZN17FmRestoreSettingsC1ER12FmBkupEngine @ 53 NONAME
+ _ZN17FmRestoreSettingsC2ER12FmBkupEngine @ 54 NONAME
+ _ZN17FmRestoreSettingsD1Ev @ 55 NONAME
+ _ZN17FmRestoreSettingsD2Ev @ 56 NONAME
+ _ZNK12FmBkupEngine10metaObjectEv @ 57 NONAME
+ _ZNK12FmBkupEngine5errorEv @ 58 NONAME
+ _ZNK16FmBackupSettings10schedulingEv @ 59 NONAME
+ _ZNK16FmBackupSettings11targetDriveEv @ 60 NONAME
+ _ZNK16FmBackupSettings16contentsSelectedEv @ 61 NONAME
+ _ZNK16FmBackupSettings4timeEv @ 62 NONAME
+ _ZNK16FmBackupSettings7contentEv @ 63 NONAME
+ _ZNK16FmBackupSettings7weekdayEv @ 64 NONAME
+ _ZNK17FmRestoreSettings13GetSelectionLER5QListI13FmRestoreInfoE @ 65 NONAME
+ _ZTI12FmBkupEngine @ 66 NONAME
+ _ZTV12FmBkupEngine @ 67 NONAME
+ _ZN12FmBkupEngine22notifyBackupFilesExistERb @ 68 NONAME
--- a/filemanager/src/filemanager/filemanager.pri Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/filemanager.pri Mon May 03 12:24:39 2010 +0300
@@ -18,16 +18,6 @@
INCLUDEPATH += ./src/components
INCLUDEPATH += ./src/backuprestore
INCLUDEPATH += ./src/operationservice
-INCLUDEPATH += ./src/fmdrivewatcher
-
-win32 {
- INCLUDEPATH += ./src/fmdrivewatcher/private/win32
-}
-
-
-symbian {
- INCLUDEPATH += ./src/fmdrivewatcher/private/symbian
-}
HEADERS += src/fmdriverlistwidget.h \
src/listviewitems.h \
@@ -49,6 +39,7 @@
src/operationservice/fmoperationcopy.h \
src/operationservice/fmoperationmove.h \
src/operationservice/fmoperationremove.h \
+ src/operationservice/fmoperationformat.h \
src/backuprestore/fmbackupview.h \
src/backuprestore/fmbackupwidget.h \
src/backuprestore/fmrestoreview.h \
@@ -67,16 +58,6 @@
src/components/fmviewdetailsdialog.h \
src/components/fmviewdetailsitem.h \
src/components/fmdrivedetailstype.h \
- src/fmdrivewatcher/fmdrivewatcher.h \
-
-win32 {
- HEADERS += src/fmdrivewatcher/private/win32/fmdrivewatcherprivate.h \
-
-}
-symbian {
- HEADERS += src/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.h \
- src/fmdrivewatcher/private/symbian/fmdriveevent.h
-}
SOURCES += src/main.cpp \
src/fmdriverlistwidget.cpp \
@@ -116,14 +97,11 @@
src/components/fmmultitextquery.cpp \
src/components/fmviewdetailsdialog.cpp \
src/components/fmviewdetailsitem.cpp \
- src/components/fmdrivedetailstype.cpp \
- src/fmdrivewatcher/fmdrivewatcher.cpp
-
+ src/components/fmdrivedetailstype.cpp
win32 {
- SOURCES += src/fmdrivewatcher/private/win32/fmdrivewatcherprivate.cpp
+ SOURCES += src/operationservice/fmoperationformat_win.cpp
}
symbian {
- SOURCES += src/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.cpp \
- src/fmdrivewatcher/private/symbian/fmdriveevent.cpp
+ SOURCES += src/operationservice/fmoperationformat_s60.cpp
}
\ No newline at end of file
--- a/filemanager/src/filemanager/filemanager.pro Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/filemanager.pro Mon May 03 12:24:39 2010 +0300
@@ -18,7 +18,7 @@
CONFIG += hb
TEMPLATE = app
TARGET = filemngr
-
+RESOURCES += filemanager.qrc
INCLUDEPATH += ../fmbkupenginewrapper/inc
# remove this path when export plat header to app layer path
INCLUDEPATH += ../../filemanager_plat/inc
@@ -37,7 +37,11 @@
-lapmime \
-lxqservice \
-lxqutils \
- -lshareui
+ -lshareui \
+ -lefsrv \
+ -lapgrfx \
+ -lcone \
+ -ldirectorylocalizer
TARGET.UID3 = 0x2002BCC0
TARGET.EPOCHEAPSIZE = 0x020000 0x1000000
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/filemanager.qrc Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,11 @@
+<RCC>
+ <qresource prefix="/">
+ <file>image/qtg_indi_status_back.svg</file>
+ <file>image/qgn_prop_mmc_locked.svg</file>
+ <file>image/qgn_prop_mmc_memc.svg</file>
+ <file>image/qgn_prop_fmgr_mmc_no_sub.svg</file>
+ <file>image/qgn_prop_phone_memc.svg</file>
+ <file>image/qgn_prop_usb_memc.svg</file>
+ <file>image/qgn_prop_fmgr_ms.svg</file>
+ </qresource>
+</RCC>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/image/qgn_prop_fmgr_mmc_no_sub.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="57px" version="1.1" viewBox="0 0 67 57" width="67px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M49.375,9.715c-0.012,0-0.029-0.002-0.041-0.002l-38.13,0.004h38.027 C49.231,9.717,49.289,9.713,49.375,9.715z M60.67,19.506l-8.727-8.727c-0.896-0.896-1.979-1.046-2.498-1.063 c0.371,0.018,1.154,0.133,1.791,0.77l8.728,8.728c0,0,0.366,0.316,0.637,0.97C60.6,20.182,60.6,20.18,60.6,20.179 c0.314,0.412,0.783,1.231,0.783,2.49v23.125c0,2.044-1.662,3.706-3.706,3.706H11.204c-2.042,0-3.704-1.662-3.704-3.706V13.922 c0-0.823,0.279-1.577,0.735-2.193c-0.002,0.004-0.002,0.01-0.004,0.014c0.394-0.99,1.262-1.742,2.328-1.961 C8.547,10.096,7,11.824,7,13.922v31.872C7,48.113,8.886,50,11.204,50h46.473c2.319,0,4.206-1.887,4.206-4.206V22.669 C61.883,20.556,60.694,19.524,60.67,19.506z" fill-opacity="0.08" stroke-opacity="0.08"/>
+<path d="M60.6,20.179c0.157,0.38,0.283,0.874,0.283,1.49v24.125c0,1.771-1.436,3.206-3.206,3.206H11.204 C9.436,49,8,47.564,8,45.794V12.922c0-0.422,0.086-0.824,0.235-1.193C7.779,12.345,7.5,13.099,7.5,13.922v31.872 c0,2.044,1.662,3.706,3.704,3.706h46.473c2.044,0,3.706-1.662,3.706-3.706V22.669C61.383,21.41,60.914,20.591,60.6,20.179z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M57.677,48H11.204C9.436,48,8,46.564,8,44.794v1C8,47.564,9.436,49,11.204,49h46.473 c1.771,0,3.206-1.436,3.206-3.206v-1C60.883,46.564,59.447,48,57.677,48z" fill-opacity="0.3" stroke-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="34.4414" x2="34.4414" y1="-6.5947" y2="62.0571">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M59.257,19.921l-8.728-8.728c-0.446-0.445-1.028-0.48-1.195-0.48l-38.13,0.004 C9.988,10.717,9,11.706,9,12.922v31.872C9,46.01,9.988,47,11.204,47h46.473c1.217,0,2.206-0.99,2.206-2.206V21.669 C59.883,20.521,59.321,19.982,59.257,19.921z M58.065,45H47.78v-5.144h10.285V45z M58.065,38.743H47.78V33.6h10.285V38.743z M58.065,32.48H47.78v-5.143h10.285V32.48z M58.065,26.219H47.78v-5.143h10.285V26.219z" fill="url(#SVGID_1_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="34.4414" x2="34.4414" y1="-0.6313" y2="58.201">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M59.964,19.214l-8.728-8.728c-0.865-0.865-2.005-0.77-2.005-0.77H11.204 C9.436,9.717,8,11.151,8,12.922v31.872C8,46.564,9.436,48,11.204,48h46.473c1.771,0,3.206-1.436,3.206-3.206V21.669 C60.883,20,59.964,19.214,59.964,19.214z M59.883,44.794c0,1.216-0.989,2.206-2.206,2.206H11.204C9.988,47,9,46.01,9,44.794V12.922 c0-1.216,0.988-2.205,2.204-2.205l38.13-0.004c0.167,0,0.749,0.035,1.195,0.48l8.728,8.728c0.064,0.062,0.626,0.601,0.626,1.748 V44.794z" fill="url(#SVGID_2_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="33.27" x2="33.27" y1="35.7666" y2="7.9984">
+<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M9,12.922v26.053c7.021-11.342,26.082-20.758,48.54-20.771l-7.011-7.01 c-0.446-0.445-1.028-0.48-1.195-0.48l-38.13,0.004C9.988,10.717,9,11.706,9,12.922z" fill="url(#SVGID_3_)" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M59.065,21.076c0-0.553-0.447-1-1-1H47.78c-0.553,0-1,0.447-1,1v5.143c0,0.207,0.063,0.4,0.171,0.56 c-0.107,0.159-0.171,0.353-0.171,0.56v5.143c0,0.208,0.063,0.4,0.171,0.561C46.844,33.2,46.78,33.393,46.78,33.6v5.144 c0,0.206,0.063,0.397,0.169,0.557c-0.106,0.159-0.169,0.351-0.169,0.557V45c0,0.552,0.447,1,1,1h10.285c0.553,0,1-0.448,1-1v-5.144 c0-0.206-0.063-0.397-0.169-0.557c0.106-0.159,0.169-0.351,0.169-0.557V33.6c0-0.207-0.063-0.399-0.171-0.559 c0.107-0.16,0.171-0.353,0.171-0.561v-5.143c0-0.207-0.063-0.4-0.171-0.56c0.107-0.159,0.171-0.353,0.171-0.56V21.076z M58.065,45 H47.78v-5.144h10.285V45z M58.065,38.743H47.78V33.6h10.285V38.743z M58.065,32.48H47.78v-5.143h10.285V32.48z M58.065,26.219H47.78 v-5.143h10.285V26.219z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="52.9229" x2="52.9229" y1="49.0088" y2="25.5829">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_4_)" fill-opacity="0.5" height="5.144" stroke-opacity="0.5" width="10.285" x="47.78" y="39.856"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="52.9229" x2="52.9229" y1="42.752" y2="19.3261">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_5_)" fill-opacity="0.5" height="5.144" stroke-opacity="0.5" width="10.285" x="47.78" y="33.6"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_6_" x1="52.9229" x2="52.9229" y1="36.4883" y2="13.0691">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_6_)" fill-opacity="0.5" height="5.143" stroke-opacity="0.5" width="10.285" x="47.78" y="27.338"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_7_" x1="52.9229" x2="52.9229" y1="30.2275" y2="6.8061">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_7_)" fill-opacity="0.5" height="5.143" stroke-opacity="0.5" width="10.285" x="47.78" y="21.076"/>
+<path d="M47.78,44.99l1-0.99v-3.144h8.285l1-1H47.78V44.99z M47.78,38.724l1-0.991V34.59h8.285l1-1H47.78V38.724z M47.78,32.461l1-0.99v-3.144h8.285l1-1H47.78V32.461z M48.78,22.065h8.285l1-1H47.78v5.134l1-0.99V22.065z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M57.065,44H48.78l-0.99,1h10.275v-5.132l-1,0.988V44z M57.065,37.732H48.78l-0.99,1h10.275 v-5.131l-1,0.988V37.732z M57.065,31.471H48.78l-0.99,1h10.275v-5.132l-1,0.988V31.471z M57.065,22.065v3.144H48.78l-0.99,1h10.275 v-5.132L57.065,22.065z" fill="#FFFFFF" fill-opacity="0.25" stroke-opacity="0.25"/>
+<rect fill="none" height="57" width="67"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/image/qgn_prop_fmgr_ms.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="57px" version="1.1" viewBox="0 0 67 57" width="67px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M63.977,26.966c0.079-1.848-0.215-3.706-0.903-5.479c-1.959-5.042-6.597-8.367-11.943-8.646 c-0.548-1.742-2.165-3.016-4.086-3.016H9.106c-2.369,0-4.296,1.927-4.296,4.296V40.49c0,2.369,1.927,4.296,4.296,4.296h2.296V44.9 c0,1.158,0.941,2.1,2.099,2.1h29.665c1.157,0,2.099-0.941,2.099-2.1v-0.114h1.779c2.208,0,4.031-1.674,4.27-3.819 c1.369-0.092,2.717-0.392,4.012-0.895c3.379-1.313,6.046-3.865,7.512-7.191C63.672,30.986,64.042,28.973,63.977,26.966z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M62.606,22.666c-1.911-4.92-6.472-8.151-11.767-8.341v-0.204c0-2.093-1.703-3.796-3.796-3.796H9.106 c-2.093,0-3.796,1.703-3.796,3.796V40.49c0,2.094,1.703,3.796,3.796,3.796h2.796V44.9c0,0.883,0.717,1.6,1.599,1.6h29.665 c0.882,0,1.599-0.717,1.599-1.6v-0.614h2.279c2.093,0,3.796-1.702,3.796-3.796c1.471-0.049,2.917-0.346,4.305-0.884 c3.254-1.264,5.823-3.724,7.234-6.927S63.871,25.921,62.606,22.666z M50.874,28.611c-0.012,0.005-0.022,0.01-0.034,0.014v-2.439 c0.349,0.122,0.632,0.391,0.772,0.752C51.87,27.602,51.538,28.354,50.874,28.611z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M62.141,22.848c-1.896-4.881-56.33,16.535-56.33,16.535v1.107c0,1.82,1.475,3.296,3.296,3.296h3.296V44.9 c0,0.604,0.495,1.1,1.099,1.1h29.665c0.604,0,1.099-0.495,1.099-1.1v-1.114h2.779c1.819,0,3.296-1.476,3.296-3.296v-0.495 c0.023,0,0.045,0.003,0.068,0.003c0.001,0,0.001,0,0.001,0c1.558,0,3.09-0.289,4.555-0.857 C61.434,36.627,64.654,29.318,62.141,22.848z M50.406,29.2c-0.023,0-0.044-0.009-0.066-0.01v-3.573c0.022,0,0.044-0.006,0.066-0.006 c0.745,0,1.402,0.449,1.672,1.145c0.357,0.922-0.102,1.964-1.023,2.322C50.846,29.159,50.628,29.2,50.406,29.2z" fill-opacity="0.4" stroke-opacity="0.4"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="51.7969" x2="58.3651" y1="25.7554" y2="22.6821">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.5401" style="stop-color:#B3B3B3"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M61.544,22.079c-2.391-6.15-9.313-9.199-15.464-6.81c-6.151,2.389-9.2,9.312-6.812,15.462 c2.389,6.151,9.313,9.2,15.463,6.812C60.883,35.154,63.933,28.23,61.544,22.079z M51.567,29.395c-1.65,0.642-3.51-0.178-4.15-1.828 c-0.642-1.65,0.178-3.508,1.828-4.149c1.651-0.642,3.509,0.178,4.149,1.827C54.037,26.895,53.218,28.754,51.567,29.395z" fill="url(#SVGID_1_)"/>
+<path d="M49.551,13.843c0.283-0.02,0.568-0.029,0.854-0.029c5.233,0,9.841,3.153,11.736,8.034 c2.514,6.471-0.707,13.779-7.177,16.293c-1.465,0.568-2.997,0.857-4.555,0.857c0,0,0,0-0.001,0c-0.373,0-0.742-0.017-1.108-0.049 L49.551,13.843z M50.404,24.295c-0.26,0-2.387,1.791-1.966,2.875c0.318,0.818,1.091,1.347,1.968,1.347 c0.261,0,0.518-0.048,0.764-0.144c0.526-0.205,0.94-0.602,1.168-1.117c0.227-0.516,0.239-1.088,0.035-1.614 C52.055,24.823,51.282,24.295,50.404,24.295L50.404,24.295z" fill="#F2F2F2"/>
+<path d="M49.883,38.176c1.586,0.07,3.212-0.18,4.787-0.791c6.063-2.355,9.07-9.181,6.716-15.243 c-1.888-4.86-6.646-7.756-11.581-7.503L49.883,38.176z M51.551,29.352c-1.628,0.633-3.459-0.174-4.092-1.801 c-0.632-1.627,0.176-3.459,1.803-4.092c1.627-0.631,3.458,0.176,4.091,1.802C53.985,26.889,53.179,28.721,51.551,29.352z" fill="url(#SVGID_2_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="45.5869" x2="54.5387" y1="20.1924" y2="31.7645">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.546" style="stop-color:#B2B2B2"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M50.402,15.176c-6.208,0-11.24,5.033-11.24,11.241s5.032,11.241,11.24,11.241 s11.24-5.033,11.24-11.241S56.61,15.176,50.402,15.176z M51.135,28.282c-1.035,0.402-2.201-0.112-2.604-1.147 c-0.403-1.036,0.111-2.202,1.147-2.605c1.035-0.402,2.202,0.112,2.604,1.148C52.686,26.713,52.171,27.879,51.135,28.282z" fill="url(#SVGID_3_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="57.3125" x2="57.6039" y1="29.4717" y2="26.0613">
+<stop offset="0" style="stop-color:#EEE3B1;stop-opacity:0.5918"/>
+<stop offset="1" style="stop-color:#D8A9A9;stop-opacity:0.57"/>
+</linearGradient>
+<path d="M61.643,26.417c0-0.136-0.005-0.269-0.011-0.401l-8.021,0.289c0.027,0.516-0.106,0.985-0.253,1.334 l7.539,2.805C61.377,29.193,61.643,27.836,61.643,26.417z" fill="url(#SVGID_4_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="55.5752" x2="58.5098" y1="31.2334" y2="28.1805">
+<stop offset="0" style="stop-color:#B7B4E6;stop-opacity:0"/>
+<stop offset="0.1879" style="stop-color:#B7B4E6;stop-opacity:0.5"/>
+<stop offset="0.4036" style="stop-color:#BAEABA;stop-opacity:0.75"/>
+<stop offset="0.9036" style="stop-color:#BAEABA;stop-opacity:0.247"/>
+<stop offset="1" style="stop-color:#BAEABA;stop-opacity:0"/>
+</linearGradient>
+<path d="M61.069,29.961l-7.635-2.525c-0.135,0.378-0.302,0.658-0.37,0.763l5.303,6.149 C59.582,33.129,60.515,31.632,61.069,29.961z" fill="url(#SVGID_5_)"/>
+<path d="M53.827,25.077c-0.734-1.89-2.86-2.827-4.75-2.093s-2.826,2.86-2.093,4.75s2.861,2.827,4.75,2.093 C53.625,29.094,54.562,26.967,53.827,25.077z M51.485,29.182c-1.533,0.596-3.259-0.166-3.854-1.697 c-0.596-1.533,0.166-3.26,1.697-3.855c1.534-0.595,3.259,0.166,3.854,1.699C53.778,26.859,53.018,28.586,51.485,29.182z" fill="url(#SVGID_6_)"/>
+<path d="M53.282,25.289c-0.617-1.59-2.405-2.377-3.993-1.76c-1.589,0.617-2.377,2.405-1.76,3.994 c0.617,1.588,2.405,2.376,3.994,1.759S53.899,26.877,53.282,25.289z M51.055,28.078c-0.209,0.081-0.427,0.122-0.648,0.122 c-0.746,0-1.402-0.449-1.672-1.145c-0.174-0.446,0.575-2.148,1.021-2.321c0.21-0.082,0.429-0.123,0.65-0.123 c0.745,0,1.402,0.449,1.672,1.145C52.436,26.678,51.977,27.72,51.055,28.078z" fill="url(#SVGID_7_)"/>
+<linearGradient gradientTransform="matrix(-0.0913 -0.2351 0.2351 -0.0913 -494.9365 2956.155)" gradientUnits="userSpaceOnUse" id="SVGID_8_" x1="10037.0195" x2="10053.5957" y1="6220.8838" y2="6220.8838">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.5401" style="stop-color:#B3B3B3"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M53.527,25.193c-0.67-1.724-2.61-2.578-4.334-1.908c-1.724,0.669-2.577,2.609-1.909,4.332 c0.67,1.725,2.61,2.578,4.334,1.91C53.342,28.857,54.196,26.917,53.527,25.193z M51.417,29.01c-1.438,0.559-3.057-0.154-3.615-1.592 c-0.559-1.439,0.154-3.059,1.593-3.616c1.438-0.56,3.058,0.154,3.616,1.593C53.568,26.833,52.855,28.451,51.417,29.01z" fill="url(#SVGID_8_)"/>
+<path d="M49.756,24.734c0.21-0.082,0.429-0.123,0.65-0.123c0.581,0,1.102,0.279,1.434,0.729V13.902 c-0.473-0.053-2.006-0.079-2.289-0.06l0.08,25.132c0.258,0.016,1.734-0.014,2.209-0.068V27.475 c-0.194,0.262-0.459,0.477-0.785,0.604c-0.209,0.081-0.427,0.122-0.648,0.122c-0.187,0-0.367-0.028-0.539-0.081L49.756,24.734z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M49.756,24.734c0.21-0.082,0.429-0.123,0.65-0.123c0.341,0,0.658,0.104,0.934,0.272V13.849 c-0.31-0.022-1.282-0.032-1.455-0.024l-0.254,25.15c0.258,0.016,1.399,0.003,1.709-0.021V27.933 c-0.09,0.056-0.184,0.106-0.285,0.146c-0.209,0.081-0.427,0.122-0.648,0.122c-0.186,0-0.365-0.028-0.534-0.08L49.756,24.734z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M49.799,38.982c0.202,0.01,0.897,0,1.041-0.005V28.14c-0.143,0.036-0.286,0.061-0.434,0.061 c-0.186,0-0.365-0.028-0.534-0.08c-0.514-0.157-0.935-0.542-1.138-1.064c-0.174-0.446-0.163-0.935,0.03-1.373 c0.192-0.438,0.545-0.775,0.991-0.948c0.099-0.039,0.199-0.068,0.302-0.089c0.114-0.022,0.231-0.034,0.349-0.034 c0.15,0,0.293,0.03,0.434,0.065V13.83c-0.146-0.005-0.782-0.014-0.955-0.006L49.799,38.982z" fill-opacity="0.3" stroke-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_9_" x1="28.0747" x2="28.0747" y1="1.3354" y2="49.4483">
+<stop offset="0" style="stop-color:#E6E6E6"/>
+<stop offset="1" style="stop-color:#808080"/>
+</linearGradient>
+<path d="M50.34,39.49c0,1.82-1.477,3.296-3.296,3.296H9.106c-1.821,0-3.296-1.476-3.296-3.296V13.121 c0-1.821,1.475-3.296,3.296-3.296h37.938c1.819,0,3.296,1.475,3.296,3.296V39.49z" fill="url(#SVGID_9_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_10_" x1="5.7827" x2="7.8687" y1="26.3057" y2="26.3057">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M9.106,9.825c-1.821,0-3.296,1.475-3.296,3.296V39.49c0,1.82,1.475,3.296,3.296,3.296 V9.825z" fill="url(#SVGID_10_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_11_" x1="48.4219" x2="50.5078" y1="26.3057" y2="26.3057">
+<stop offset="0" style="stop-color:#000000;stop-opacity:0"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M47.044,9.825v32.961c1.819,0,3.296-1.476,3.296-3.296V13.121 C50.34,11.3,48.863,9.825,47.044,9.825z" fill="url(#SVGID_11_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientTransform="matrix(0 1 -1 0 709.498 -875.5039)" gradientUnits="userSpaceOnUse" id="SVGID_12_" x1="885.5039" x2="887.4564" y1="681.4229" y2="681.4229">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M50.34,13.121c0-1.821-1.475-3.296-3.296-3.296H9.106 c-1.819,0-3.296,1.475-3.296,3.296H50.34z" fill="url(#SVGID_12_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_13_" x1="28.0747" x2="28.0747" y1="8.6724" y2="28.815">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M49.34,21.205v-8.084c0-1.266-1.03-2.296-2.296-2.296H9.106 c-1.266,0-2.296,1.03-2.296,2.296v17.393C13.689,26.037,36.434,22.624,49.34,21.205z" fill="url(#SVGID_13_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_14_" x1="28.0435" x2="28.0435" y1="42.6533" y2="39.7841">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M48.11,40.039c0,0.91-0.738,1.648-1.648,1.648H9.624 c-0.912,0-1.648-0.738-1.648-1.648l0,0c0-0.909,0.736-1.647,1.648-1.647h36.838C47.372,38.392,48.11,39.13,48.11,40.039 L48.11,40.039z" fill="url(#SVGID_14_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<path d="M43.166,35.809H13.501c-1.433,0-2.599,1.166-2.599,2.6v4.378h34.862v-4.378 C45.765,36.975,44.599,35.809,43.166,35.809z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M43.166,36.309H13.501c-1.157,0-2.099,0.941-2.099,2.1v4.378h33.862v-4.378 C45.265,37.25,44.323,36.309,43.166,36.309z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M43.166,36.809H13.501c-0.882,0-1.599,0.718-1.599,1.6v4.378h32.862v-4.378 C44.765,37.526,44.048,36.809,43.166,36.809z" fill-opacity="0.3" stroke-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_15_" x1="28.3335" x2="28.3335" y1="26.687" y2="52.4374">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.6688" style="stop-color:#565656"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M44.265,43.9c0,0.604-0.494,1.1-1.099,1.1H13.501c-0.604,0-1.099-0.495-1.099-1.1v-5.492 c0-0.604,0.495-1.1,1.099-1.1h29.665c0.604,0,1.099,0.495,1.099,1.1V43.9z" fill="url(#SVGID_15_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_16_" x1="12.3906" x2="13.2769" y1="41.1543" y2="41.1543">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M13.501,45h0.302v-7.691h-0.302c-0.604,0-1.099,0.495-1.099,1.1V43.9 C12.402,44.505,12.897,45,13.501,45z" fill="url(#SVGID_16_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_17_" x1="43.4502" x2="44.3365" y1="41.1543" y2="41.1543">
+<stop offset="0" style="stop-color:#000000;stop-opacity:0"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M43.166,37.309h-0.302V45h0.302c0.604,0,1.099-0.495,1.099-1.1v-5.492 C44.265,37.804,43.771,37.309,43.166,37.309z" fill="url(#SVGID_17_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_18_" x1="28.3335" x2="28.3335" y1="37.3086" y2="38.466">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M43.166,37.309H13.501c-0.604,0-1.099,0.495-1.099,1.1h31.862 C44.265,37.804,43.771,37.309,43.166,37.309z" fill="url(#SVGID_18_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_19_" x1="28.3335" x2="28.3335" y1="37.793" y2="42.6174">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M43.166,38.309H13.501c-0.052,0-0.099,0.047-0.099,0.1v4.616 c5.909-1.655,20.551-2.927,29.862-3.53v-1.086C43.265,38.355,43.218,38.309,43.166,38.309z" fill="url(#SVGID_19_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_20_" x1="28.1343" x2="28.1343" y1="44.5771" y2="43.2538">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M42.963,43.468c0,0.386-0.177,0.699-0.865,0.699H14.173 c-0.69,0-0.868-0.313-0.868-0.699l0,0c0-0.388,0.178-0.7,0.868-0.7h27.925C42.786,42.768,42.963,43.08,42.963,43.468L42.963,43.468z " fill="url(#SVGID_20_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<rect fill="none" height="57" width="67"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/image/qgn_prop_mmc_locked.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect fill="none" height="16" width="16"/>
+<path d="M15.713,4.934L12.87,2.043c-0.185-0.208-0.452-0.34-0.751-0.34c0,0,0,0-0.002,0 H1.824C0.819,1.703,0,2.521,0,3.524v8.648c0,1.008,0.819,1.826,1.824,1.826h3.673v1C5.497,15.553,5.945,16,6.498,16h7.501 c0.553,0,1-0.447,1-1.001v-1.205C15.59,13.491,16,12.882,16,12.173V5.634C16,5.37,15.896,5.12,15.713,4.934z" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(-1 0 0 -1 -1181.5664 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="-1189.5679" x2="-1189.5679" y1="9.6611" y2="0.1906">
+<stop offset="0" style="stop-color:#B2B2B2"/>
+<stop offset="1" style="stop-color:#666666"/>
+</linearGradient>
+<path d="M12.119,2.704L12.119,2.704H1.824c-0.452,0-0.823,0.37-0.823,0.822v8.648 c0,0.452,0.371,0.823,0.823,0.823h12.354c0.452,0,0.823-0.371,0.823-0.823V5.635L12.119,2.704z" fill="url(#SVGID_1_)"/>
+<path d="M14.001,7.57h-0.073V5.891c0-1.229-0.974-1.892-1.892-1.892H8.463 c-0.917,0-1.892,0.663-1.892,1.892V7.57H6.499c-0.553,0-1.001,0.448-1.001,1v4.427h8.68c0.452,0,0.823-0.371,0.823-0.823V8.57 C15.001,8.018,14.555,7.57,14.001,7.57z M10.857,7.57H9.643V7.072h1.215V7.57L10.857,7.57z" fill-opacity="0.4" stroke-opacity="0.4"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="10.1123" x2="10.1123" y1="10.6953" y2="2.1215">
+<stop offset="0" style="stop-color:#E3E3E3"/>
+<stop offset="1" style="stop-color:#404040"/>
+</linearGradient>
+<path d="M12.928,9.643h-1.07V6.07H8.643v3.573H7.572v-3.75c0-0.707,0.585-0.893,0.893-0.893h3.572 c0.309,0,0.893,0.186,0.893,0.893v3.75H12.928z" fill="url(#SVGID_2_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="10.1113" x2="10.1113" y1="7.2837" y2="0.3186">
+<stop offset="0" style="stop-color:#E6E6E6"/>
+<stop offset="1" style="stop-color:#B2B2B2"/>
+</linearGradient>
+<rect fill="url(#SVGID_3_)" height="6.429" width="7.5" x="6.5" y="8.57"/>
+<path d="M11.32,10.893c0-0.593-0.479-1.072-1.07-1.072S9.18,10.3,9.18,10.893c0,0.396,0.215,0.735,0.534,0.922v1.936h1.072v-1.936 C11.104,11.628,11.32,11.287,11.32,10.893z"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/image/qgn_prop_mmc_memc.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect fill="none" height="16" width="16"/>
+<path d="M15.713,4.934l-2.843-2.89c-0.185-0.208-0.452-0.34-0.751-0.34c0,0,0,0-0.002,0 H1.824C0.819,1.703,0,2.522,0,3.525v8.648C0,13.182,0.819,14,1.824,14h12.352C15.182,14,16,13.182,16,12.174V5.635 C16,5.371,15.896,5.121,15.713,4.934z" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(-1 0 0 -1 -1181.5664 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="-1189.5679" x2="-1189.5679" y1="9.6611" y2="0.1897">
+<stop offset="0" style="stop-color:#B2B2B2"/>
+<stop offset="1" style="stop-color:#666666"/>
+</linearGradient>
+<path d="M12.119,2.704L12.119,2.704H1.824c-0.452,0-0.823,0.37-0.823,0.822v8.648 c0,0.453,0.371,0.824,0.823,0.824h12.354c0.452,0,0.823-0.371,0.823-0.824V5.635L12.119,2.704z" fill="url(#SVGID_1_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="12.2109" x2="12.2109" y1="8.7246" y2="0.6938">
+<stop offset="0" style="stop-color:#FFE23D"/>
+<stop offset="0.2239" style="stop-color:#FAD337"/>
+<stop offset="0.6537" style="stop-color:#EFAB26"/>
+<stop offset="1" style="stop-color:#E48717"/>
+</linearGradient>
+<path d="M11.32,11.762h2.06v-1.234h-2.06V11.762z M11.32,9.703h2.06V8.469h-2.06V9.703z M11.32,6.408v1.236 h2.06V6.408H11.32z" fill="url(#SVGID_2_)"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/image/qgn_prop_phone_memc.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<polygon fill="none" points="16,16 0.008,16 0,0 15.992,0 "/>
+<path d="M5,0C3.897,0,3,0.896,3,2v11c0,1.104,0.897,2,2,2h6 c1.104,0,2-0.896,2-2V2c0-1.104-0.896-2-2-2H5z" fill="#030303" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="7.8623" x2="7.8623" y1="15.2266" y2="-1.9516">
+<stop offset="0" style="stop-color:#3687FF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
+</linearGradient>
+<path d="M5,1C4.448,1,4,1.447,4,2v11c0,0.553,0.448,1,1,1h6c0.553,0,1-0.447,1-1V2c0-0.553-0.447-1-1-1H5z" fill="url(#SVGID_1_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="7.8623" x2="7.8623" y1="15.9453" y2="-0.4995">
+<stop offset="0" style="stop-color:#F2F2F2"/>
+<stop offset="0.1364" style="stop-color:#E4EDF0"/>
+<stop offset="0.3929" style="stop-color:#C0DFEB"/>
+<stop offset="0.7391" style="stop-color:#86C8E3"/>
+<stop offset="0.9945" style="stop-color:#57B6DD"/>
+<stop offset="1" style="stop-color:#57B6DD"/>
+</linearGradient>
+<rect fill="url(#SVGID_2_)" height="8" width="6" x="5" y="2"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="7.8623" x2="7.8623" y1="3.8335" y2="1.8335">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2B2"/>
+</linearGradient>
+<rect fill="url(#SVGID_3_)" height="2" width="2" x="7" y="11"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/image/qgn_prop_usb_memc.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M16,4h-4V3H2.769C1.24,3,0,5.239,0,8c0,2.762,1.24,5,2.769,5H12 v-1h4V4z" fill="#030303" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="13.8613" x2="13.8613" y1="9.834" y2="5.9063">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2C9"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" height="2" width="2" x="13" y="5"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="13.8613" x2="13.8613" y1="5.8335" y2="1.9049">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2C9"/>
+</linearGradient>
+<rect fill="url(#SVGID_2_)" height="2" width="2" x="13" y="9"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="5.8623" x2="5.8623" y1="10.834" y2="-4.8804">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2C9"/>
+</linearGradient>
+<path d="M2.818,4C1.959,4,1,5.71,1,8c0,2.289,0.959,4,1.818,4H11V4H2.818z" fill="url(#SVGID_3_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="5.7031" x2="5.7031" y1="9.6699" y2="3.834">
+<stop offset="0" style="stop-color:#5487E3"/>
+<stop offset="1" style="stop-color:#051F7D"/>
+</linearGradient>
+<path d="M8.445,8.869V8.376H5.513l1.219,1.836h0.517V9.854H8.45V11H7.249v-0.252h-0.65L4.856,8.376h-1.33 c-0.097,0.369-0.396,0.64-0.747,0.64C2.348,9.016,2,8.616,2,8.122C2,7.63,2.348,7.229,2.777,7.229c0.347,0,0.638,0.256,0.741,0.609 h0.599l1.582-2.275l0.96-0.015C6.757,5.32,6.961,5.165,7.194,5.165c0.501,0,0.702,0.309,0.702,0.688 c0,0.381-0.189,0.688-0.702,0.689c-0.26,0-0.48-0.194-0.564-0.459H6.027l-1.25,1.754h3.667V7.226l1.238,0.823L8.445,8.869z" fill="url(#SVGID_4_)"/>
+<rect fill="none" height="16" width="16"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/image/qtg_indi_status_back.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="36px" height="36px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve">
+<defs>
+</defs>
+<path fill="#FFFFFF" d="M2.631,9.923l9.245-7.078c0.286-0.164,0.637-0.164,0.923,0c0.285,0.166,0.461,0.471,0.461,0.801v4.633h7.069
+ c7.455,0.001,13.498,5.043,13.501,12.498c-0.003,7.459-6.046,12.498-13.501,12.502c0,0-0.604,0-1.207,0s-1-0.473-1-1.129
+ c0-0.654,0-2.432,0-2.871s0.493-1.002,1-1.002s2.207,0,2.207,0c4.137-0.008,7.492-3.361,7.499-7.5
+ c-0.007-4.139-3.362-7.493-7.499-7.5H13.26V17.8c0,0.33-0.176,0.635-0.461,0.799c-0.286,0.164-0.637,0.166-0.923,0l-9.245-7.078
+ c-0.285-0.164-0.461-0.469-0.461-0.799C2.17,10.394,2.346,10.089,2.631,9.923z"/>
+<rect fill-rule="evenodd" clip-rule="evenodd" fill="none" width="36" height="36"/>
+</svg>
--- a/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.cpp Mon May 03 12:24:39 2010 +0300
@@ -40,6 +40,8 @@
this, SLOT( onNotifyFinish(int) ), Qt::QueuedConnection );
connect( mBkupEngine, SIGNAL( notifyMemoryLow(int, int& ) ),
this, SLOT( onNotifyMemoryLow(int, int&) ) );
+ connect( mBkupEngine, SIGNAL( notifyBackupFilesExist( bool& )), this, SLOT( onNotifyBackupFilesExist( bool& )));
+
}
FmBackupRestoreHandler::~FmBackupRestoreHandler()
{
@@ -74,10 +76,8 @@
mBkupEngine->BackupSettingsL()->targetDrive(),
mBkupEngine->BackupSettingsL()->content() );
- if( !ret )
- {
+ if( !ret ) {
mCurrentProcess = ProcessNone;
- HbMessageBox::information(tr("backup failed"));
}
return ret;
}
@@ -90,10 +90,8 @@
mCurrentProcess = ProcessRestore;
mBkupEngine->RestoreSettingsL()->SetSelection( operationRestore->selection() );
bool ret = mBkupEngine->startRestore( backupConfigLoader()->driversAndOperationList() );
- if( !ret )
- {
+ if( !ret ) {
mCurrentProcess = ProcessNone;
- HbMessageBox::information(tr("restore failed"));
}
return ret;
}
@@ -116,6 +114,17 @@
}
}
}
+void FmBackupRestoreHandler::onNotifyBackupFilesExist( bool &isContinue )
+ {
+ if ( HbMessageBox::question( "some bacup files exist, continue?" ) )
+ {
+ isContinue = true;
+ }
+ else
+ {
+ isContinue = false;
+ }
+ }
void FmBackupRestoreHandler::onNotifyPreparing( bool cancelable )
@@ -140,3 +149,8 @@
emit notifyError( err, QString("") );
}
}
+
+void FmBackupRestoreHandler::getBackupDriveList( QStringList &driveList )
+{
+ mBkupEngine->getBackupDriveList( driveList );
+}
--- a/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.h Mon May 03 12:24:39 2010 +0300
@@ -47,6 +47,7 @@
int deleteBackup( quint64 selection );
FmBkupEngine *bkupEngine();
FmBackupConfigLoader *backupConfigLoader();
+ void getBackupDriveList( QStringList &driveList );
signals:
void notifyPreparing( bool cancelable );
@@ -64,6 +65,8 @@
void onNotifyStart( bool cancelable, int maxSteps );
void onNotifyUpdate( int currentStep );
void onNotifyFinish( int err );
+
+ void onNotifyBackupFilesExist( bool &isContinue );
private:
enum Process{
ProcessNone = 0,
--- a/filemanager/src/filemanager/src/backuprestore/fmbackupview.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/backuprestore/fmbackupview.cpp Mon May 03 12:24:39 2010 +0300
@@ -55,18 +55,18 @@
#ifdef FM_CHANGE_ORIENT_ENABLE
action = new HbAction( this );
action->setObjectName( "rotateAction" );
- action->setText( tr( "Change orientation" ) );
+ action->setText( hbTrId( "Change orientation" ) );
menu()->addAction( action );
#endif
action = new HbAction( this );
action->setObjectName( "backupAction" );
- action->setText( tr( "Start backup" ) );
+ action->setText( hbTrId( "Start backup" ) );
menu()->addAction( action );
action = new HbAction( this );
action->setObjectName( "deleteBackupAction" );
- action->setText( tr( "Delete backup" ) );
+ action->setText( hbTrId( "Delete backup" ) );
menu()->addAction( action );
}
@@ -96,13 +96,19 @@
case FmErrNone:
break;
case FmErrWrongParam:
- HbMessageBox::information( QString( tr("Operation canceled with wrong param!") ) );
+ HbMessageBox::information( QString( hbTrId("Operation canceled with wrong param!") ) );
break;
case FmErrAlreadyStarted:
- HbMessageBox::information( QString( tr("Operation canceled because already started!") ) );
+ HbMessageBox::information( QString( hbTrId("Operation canceled because already started!") ) );
+ break;
+ case FmErrPathNotFound:
+ HbMessageBox::information( QString( hbTrId("Operation canceled because can not find target drive!") ) );
+ break;
+ case FmErrAlreadyExists:
+ HbMessageBox::information( QString( hbTrId("backup canceled") ) );
break;
default:
- HbMessageBox::information( QString( tr("Operation canceled with error!") ) );
+ HbMessageBox::information( QString( hbTrId("backup failed") ) );
break;
}
}
@@ -120,21 +126,7 @@
void FmBackupView::on_backupAction_triggered()
{
- int ret = mOperationService->asyncBackup();
- switch( ret )
- {
- case FmErrNone:
- break;
- case FmErrWrongParam:
- HbMessageBox::information( QString( tr("Operation canceled with wrong param!") ) );
- break;
- case FmErrAlreadyStarted:
- HbMessageBox::information( QString( tr("Operation canceled because already started!") ) );
- break;
- default:
- HbMessageBox::information( QString( tr("Operation canceled with error!") ) );
- break;
- }
+ on_leftAction_triggered();
}
void FmBackupView::on_deleteBackupAction_triggered()
--- a/filemanager/src/filemanager/src/backuprestore/fmbackupwidget.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/backuprestore/fmbackupwidget.cpp Mon May 03 12:24:39 2010 +0300
@@ -115,20 +115,27 @@
void FmBackupWidget::expandAllGroup()
{
+ FmLogger::log( QString( "function expandAllGroup start" ) );
+
mDataForm->setModel( 0 );
mDataForm->setModel( mModel );
HbDataFormViewItem *itemScheduling =
(HbDataFormViewItem *)(mDataForm->itemByIndex(mModel->indexFromItem(mSchedulingGroup)));
if( itemScheduling ){
+ FmLogger::log( QString( "expand itemScheduling start" ) );
itemScheduling->setExpanded( true );
+ FmLogger::log( QString( "expand itemScheduling end" ) );
}
HbDataFormViewItem *itemGroup =
(HbDataFormViewItem *)(mDataForm->itemByIndex(mModel->indexFromItem(mContentsGroup)));
if( itemGroup ){
+ FmLogger::log( QString( "expand itemGroup start" ) );
itemGroup->setExpanded( true );
+ FmLogger::log( QString( "expand itemGroup end" ) );
}
+ FmLogger::log( QString( "function expandAllGroup end" ) );
}
void FmBackupWidget::initModel()
@@ -167,8 +174,25 @@
mBackupSettings->load();
- bool isWeekdayExist = false;
- bool isTimeExist = false;
+ int index = 0;
+
+ index = mSchedulingGroup->indexOf( mWeekdayItem );
+ if( index >=0 ){
+ mSchedulingGroup->removeChild( index );
+ mWeekdayItem = 0;
+ }
+
+ index = mSchedulingGroup->indexOf( mTimeItem );
+ if( index >=0 ){
+ mSchedulingGroup->removeChild( index );
+ mTimeItem = 0;
+ }
+
+ index = mContentsGroup->indexOf( mTargetItem );
+ if( index >=0 ){
+ mContentsGroup->removeChild( index );
+ mTargetItem = 0;
+ }
QList< FmBackupEntry* > backupEntryList = mBackupSettings->backupEntryList();
@@ -191,6 +215,9 @@
}
case FmBackupEntry::ETarget:
{
+ mTargetItem = mModel->appendDataFormItem(
+ HbDataFormModelItem::TextItem, QString( "" ), mContentsGroup );
+ mTargetItem->setContentWidgetData( QString("readOnly"), QString("true") );
mTargetItem->setLabel(title);
mTargetItem->setContentWidgetData( QString("text"), tips );
break;
@@ -203,39 +230,24 @@
}
case FmBackupEntry::EWeekday:
{
+ mWeekdayItem = mModel->appendDataFormItem(
+ HbDataFormModelItem::TextItem, QString( "" ), mSchedulingGroup );
+ mWeekdayItem->setContentWidgetData( QString("readOnly"), QString("true") );
mWeekdayItem->setLabel(title);
mWeekdayItem->setContentWidgetData( QString("text"), tips );
- isWeekdayExist = true;
break;
}
case FmBackupEntry::ETime:
{
+ mTimeItem = mModel->appendDataFormItem(
+ HbDataFormModelItem::TextItem, QString( "" ), mSchedulingGroup );
+ mTimeItem->setContentWidgetData( QString("readOnly"), QString("true") );
mTimeItem->setLabel(title);
mTimeItem->setContentWidgetData( QString("text"), tips );
- isTimeExist = true;
break;
}
}
}
- int index = 0;
-
- index = mSchedulingGroup->indexOf( mWeekdayItem );
- if( index >=0 ){
- mSchedulingGroup->removeChild( index );
- }
-
- index = mSchedulingGroup->indexOf( mTimeItem );
- if( index >=0 ){
- mSchedulingGroup->removeChild( index );
- }
-
- if( isWeekdayExist ) {
- mSchedulingGroup->appendChild( mWeekdayItem );
- }
-
- if( isTimeExist ){
- mSchedulingGroup->appendChild( mTimeItem );
- }
mDataForm->setModel( mModel );
@@ -329,11 +341,13 @@
QStringList driveStringList;
QStringList driveList;
- FmUtils::getDriveList( driveList, true );
+ //FmUtils::getDriveList( driveList, true );
+ FmViewManager::viewManager()->operationService()->backupRestoreHandler()->getBackupDriveList( driveList );
QString targetDrive = mBackupSettings->targetDrive();
int selectIndex = -1;
int currentIndex = 0;
+ QString associatedDrives;
for( QStringList::const_iterator it = driveList.begin(); it != driveList.end(); ++it )
{
QString drive = (*it);
@@ -342,7 +356,7 @@
driveStringList.push_back( drive );
queryStringList.push_back( driveWithVolume );
-
+ associatedDrives += FmUtils::getDriveLetterFromPath(drive);
if( drive == targetDrive )
{
@@ -352,7 +366,7 @@
++currentIndex;
}
- if( FmDlgUtils::showSingleSettingQuery( title, queryStringList, selectIndex ) )
+ if( FmDlgUtils::showSingleSettingQuery( title, queryStringList, selectIndex, associatedDrives ) )
{
mBackupSettings->setTargetDrive( driveStringList.at( selectIndex ) );
emit doModelRefresh();
--- a/filemanager/src/filemanager/src/backuprestore/fmdeletebackupview.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/backuprestore/fmdeletebackupview.cpp Mon May 03 12:24:39 2010 +0300
@@ -33,7 +33,7 @@
FmDeleteBackupView::FmDeleteBackupView() : FmViewBase( EDeleteBackupView )
{
- setTitle( tr( "Delete Backup" ) );
+ setTitle( hbTrId( "Delete Backup" ) );
initMainWidget();
initToolBar();
@@ -55,13 +55,13 @@
HbAction *action = 0;
action = new HbAction( this );
action->setObjectName( "rotateAction" );
- action->setText( tr( "Change orientation" ) );
+ action->setText( hbTrId( "Change orientation" ) );
menu()->addAction( action );
#endif
mDeleteAction = new HbAction( this );
mDeleteAction->setObjectName( "deleteAction" );
- mDeleteAction->setText( tr( "Delete backups" ) );
+ mDeleteAction->setText( hbTrId( "Delete backups" ) );
menu()->addAction( mDeleteAction );
}
@@ -77,7 +77,7 @@
{
mLeftAction = new HbAction( this );
mLeftAction->setObjectName( "leftAction" );
- mLeftAction->setText( tr( "delete" ) );
+ mLeftAction->setText( hbTrId( "delete" ) );
toolBar()->addAction( mLeftAction );
toolBar()->setOrientation( Qt::Horizontal );
--- a/filemanager/src/filemanager/src/backuprestore/fmrestoreview.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/backuprestore/fmrestoreview.cpp Mon May 03 12:24:39 2010 +0300
@@ -33,7 +33,7 @@
FmRestoreView::FmRestoreView(): FmViewBase( ERestoreView )
{
- setTitle( tr( "Restore" ) );
+ setTitle( hbTrId( "Restore" ) );
initMainWidget();
initToolBar();
@@ -55,13 +55,13 @@
HbAction *action = 0;
action = new HbAction( this );
action->setObjectName( "rotateAction" );
- action->setText( tr( "Change orientation" ) );
+ action->setText( hbTrId( "Change orientation" ) );
menu()->addAction( action );
#endif
mRestoreAction = new HbAction( this );
mRestoreAction->setObjectName( "restoreAction" );
- mRestoreAction->setText( tr( "Restore data" ) );
+ mRestoreAction->setText( hbTrId( "Restore data" ) );
menu()->addAction( mRestoreAction );
}
@@ -77,7 +77,7 @@
{
mLeftAction = new HbAction( this );
mLeftAction->setObjectName( "leftAction" );
- mLeftAction->setText( tr( "Restore" ) );
+ mLeftAction->setText( hbTrId( "Restore" ) );
toolBar()->addAction( mLeftAction );
toolBar()->setOrientation( Qt::Horizontal );
@@ -92,7 +92,21 @@
selection |= ( ( quint64 ) 1 ) << ( items[ i ] );
}
- mOperationService->asyncRestore( selection );
+ int ret = mOperationService->asyncRestore( selection );
+ switch( ret )
+ {
+ case FmErrNone:
+ break;
+ case FmErrWrongParam:
+ HbMessageBox::information( QString( hbTrId("Operation canceled with wrong param!") ) );
+ break;
+ case FmErrAlreadyStarted:
+ HbMessageBox::information( QString( hbTrId("Operation canceled because already started!") ) );
+ break;
+ default:
+ HbMessageBox::information(tr("restore failed"));
+ break;
+ }
}
#ifdef FM_CHANGE_ORIENT_ENABLE
--- a/filemanager/src/filemanager/src/components/fmdlgutils.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmdlgutils.cpp Mon May 03 12:24:39 2010 +0300
@@ -22,6 +22,7 @@
#include "fmsingletextquery.h"
#include "fmmultitextquery.h"
#include "fmutils.h"
+#include "fmviewmanager.h"
#include <QString>
#include <QStringList>
@@ -38,11 +39,29 @@
FmDlgUtils::~FmDlgUtils( void )
{
}
+HbAction *FmDlgUtils::executeDialog( HbDialog *dialog, const QString &associatedDrives )
+{
+ for( int i = 0; i < associatedDrives.length(); i++ ) {
+ QString drive( associatedDrives[i] + QString( ":/" ) );
+ if( !FmUtils::isDriveAvailable( drive ) ) {
+ FmLogger::log( "executeDialog return 0_ " + associatedDrives );
+ return 0;
+ }
+ }
+
+ FmDlgCloseUnit dlgCloseUnit( dialog );
+ dlgCloseUnit.addAssociatedDrives( associatedDrives );
+
+ FmViewManager::viewManager()->addDlgCloseUnit( &dlgCloseUnit );
+ HbAction* action = dialog->exec();
+ FmViewManager::viewManager()->removeDlgCloseUnit( &dlgCloseUnit );
+ return action;
+}
bool FmDlgUtils::showSingleSettingQuery(
const QString &title,
const QStringList &textList,
- int &selectedIndex )
+ int &selectedIndex, const QString &associatedDrives )
{
bool ret( false );
@@ -66,21 +85,23 @@
QString sk1 ( tr ( "ok" ) );
QString sk2 ( tr ("cancel" ) );
- if(sk1.isEmpty() == false) {
+ if( !sk1.isEmpty() ) {
HbAction *primary = new HbAction( sk1 );
cQuery->setPrimaryAction( primary );
}
- if( sk2.isEmpty() == false ) {
+ if( !sk2.isEmpty() ) {
HbAction *secondary = new HbAction( sk2 );
cQuery->setSecondaryAction( secondary );
}
- HbAction* action = cQuery->exec();
- if( action == cQuery->secondaryAction() ){
- ok = false;
+
+ //HbAction* action = cQuery->exec();
+ HbAction* action = executeDialog( cQuery, associatedDrives );
+ if( action == cQuery->primaryAction() ){
+ ok = true;
}
else{
- ok = true;
+ ok = false;
}
if( ok ){
//get selected key list.
@@ -110,7 +131,7 @@
const QString &title,
const QStringList &textList,
quint32 &selection,
- int dominantIndex )
+ int dominantIndex, const QString &associatedDrives )
{
bool ret( false );
@@ -137,24 +158,25 @@
}
- QString sk1 ( tr( "ok" ) );
- QString sk2 ( tr( "cancel" ) );
+ QString sk1 ( hbTrId( "ok" ) );
+ QString sk2 ( hbTrId( "cancel" ) );
- if(sk1.isEmpty() == false) {
+ if( !sk1.isEmpty() ) {
HbAction *primary = new HbAction( sk1 );
cQuery->setPrimaryAction( primary );
}
- if( sk2.isEmpty() == false ) {
+ if( !sk2.isEmpty() ) {
HbAction *secondary = new HbAction( sk2 );
cQuery->setSecondaryAction( secondary );
}
- HbAction* action = cQuery->exec();
- if( action == cQuery->secondaryAction() ){
- ok = false;
+
+ HbAction* action = executeDialog( cQuery, associatedDrives );
+ if( action == cQuery->primaryAction() ){
+ ok = true;
}
else{
- ok = true;
+ ok = false;
}
if( ok )
{
@@ -181,7 +203,7 @@
}
bool FmDlgUtils::showTimeSettingQuery(
- const QString &title, QTime &time )
+ const QString &title, QTime &time, const QString &associatedDrives )
{
bool ret( false );
bool ok ( false ); // SK return (out parameter)
@@ -190,24 +212,25 @@
cQuery->setHeadingWidget( new HbLabel( title ) );
cQuery->setTime( time );
- QString sk1 ( tr( "ok" ) );
- QString sk2 ( tr( "cancel" ) );
+ QString sk1 ( hbTrId( "ok" ) );
+ QString sk2 ( hbTrId( "cancel" ) );
- if(sk1.isEmpty() == false) {
+ if( !sk1.isEmpty() ) {
HbAction *primary = new HbAction( sk1 );
cQuery->setPrimaryAction( primary );
}
- if( sk2.isEmpty() == false ) {
+ if( !sk2.isEmpty() ) {
HbAction *secondary = new HbAction( sk2 );
cQuery->setSecondaryAction( secondary );
}
- HbAction* action = cQuery->exec();
- if( action == cQuery->secondaryAction() ){
- ok = false;
+
+ HbAction* action = executeDialog( cQuery, associatedDrives );
+ if( action == cQuery->primaryAction() ){
+ ok = true;
}
else{
- ok = true;
+ ok = false;
}
if( ok )
{
@@ -220,42 +243,51 @@
delete cQuery;
return ret;
}
+
bool FmDlgUtils::showTextQuery(
- const QString& title, QString& driveName )
+ const QString& title, QString& text, bool isDimPrimaryActionWhenEmpty, int maxLength,
+ const QString &associatedDrives )
{
bool ret( false );
bool ok ( true ); // SK return (out parameter)
- FmSingleTextQuery *cQuery=new FmSingleTextQuery;
+ FmSingleTextQuery::Options options( 0 );
+ if( isDimPrimaryActionWhenEmpty ) {
+ options = FmSingleTextQuery::DimPrimereActionWhenEmpty;
+ }
+ FmSingleTextQuery *cQuery = new FmSingleTextQuery( options );
+ if( maxLength != -1 ){
+ cQuery->setLineEditMaxLength( maxLength );
+ }
cQuery->setHeadingWidget( new HbLabel( title ) );
- QString sk1 ( tr ( "ok" ) );
- QString sk2 ( tr ( "cancel" ) );
+ QString sk1 ( hbTrId ( "ok" ) );
+ QString sk2 ( hbTrId ( "cancel" ) );
- if(sk1.isEmpty() == false) {
+ if( !sk1.isEmpty() ) {
HbAction *primary = new HbAction( sk1 );
cQuery->setPrimaryAction( primary );
}
- if( sk2.isEmpty() == false ) {
+ if( !sk2.isEmpty() ) {
HbAction *secondary = new HbAction( sk2 );
cQuery->setSecondaryAction( secondary );
}
- cQuery->setLineEditText( driveName );
+ cQuery->setLineEditText( text );
cQuery->checkActions();
- HbAction* action = cQuery->exec();
- if( action == cQuery->secondaryAction() ){
- ok = false;
+ HbAction* action = executeDialog( cQuery, associatedDrives );
+ if( action == cQuery->primaryAction() ){
+ ok = true;
}
else{
- ok = true;
+ ok = false;
}
if( ok ){
QString newName = cQuery->getLineEditText();
- if ( newName != driveName ){
- driveName = newName;
+ if ( newName != text ){
+ text = newName;
ret = true;
}
}
@@ -263,106 +295,77 @@
return ret;
}
-bool FmDlgUtils::showConfirmPasswordQuery(
- const QString &title, const QString &driveName, QString &pwd )
+bool FmDlgUtils::showSinglePasswordQuery( const QString &title, QString &pwd, const QString &associatedDrives )
{
bool ret( false );
- bool ok ( true ); // SK return (out parameter)
- FmSingleTextQuery *cQuery = new FmSingleTextQuery( HbLineEdit::Password );
+ FmSingleTextQuery *cQuery = new FmSingleTextQuery( FmSingleTextQuery::DimPrimereActionWhenEmpty,
+ HbLineEdit::Password );
cQuery->setHeadingWidget( new HbLabel( title ) );
QString sk1 ( tr ("ok" ) );
QString sk2 ( tr ("cancel" ) );
- if(sk1.isEmpty() == false) {
+ if( !sk1.isEmpty() ) {
HbAction *primary = new HbAction( sk1 );
cQuery->setPrimaryAction( primary );
}
- if( sk2.isEmpty() == false ) {
+ if( !sk2.isEmpty() ) {
HbAction *secondary = new HbAction( sk2 );
cQuery->setSecondaryAction( secondary );
}
cQuery->checkActions();
- HbAction* action = 0;
-
- bool pwdOk( false );
-
- while( ok && !pwdOk ){
- action = cQuery->exec();
- if( action == cQuery->secondaryAction() ){
- ok = false;
- }
- else{
- ok = true;
- }
- if( ok ){
- QString inputPwd = cQuery->getLineEditText();
- if ( FmUtils::setDrivePwd( driveName, inputPwd, inputPwd ) == 0 ){
- pwd = inputPwd;
- pwdOk = true;
- ret = true;
- }
- else{
- HbMessageBox::information( tr( "The password is incorrect, try again!" ) );
- }
- }
+ HbAction* action = executeDialog( cQuery, associatedDrives );
+ if( action == cQuery->primaryAction() ){
+ ret = true;
+ pwd = cQuery->getLineEditText();
}
+ else{
+ ret = false;
+ }
+
delete cQuery;
return ret;
}
-bool FmDlgUtils::showChangePasswordQuery(
- const QString &firstLabel, const QString &secondLabel, QString& newPassword )
+bool FmDlgUtils::showMultiPasswordQuery(
+ const QString &firstLabel, const QString &secondLabel, QString &pwd, const QString &associatedDrives )
{
bool ret( false );
- bool ok ( true ); // SK return (out parameter)
FmMultiTextQuery *cQuery = new FmMultiTextQuery( HbLineEdit::Password );
cQuery->setFirstLabelText( firstLabel );
cQuery->setSecondLabelText( secondLabel );
- QString sk1 = ( tr( "ok" ) );
- QString sk2 = ( tr( "cancel" ) );
+ QString sk1 = ( hbTrId( "ok" ) );
+ QString sk2 = ( hbTrId( "cancel" ) );
- if(sk1.isEmpty() == false) {
+ if( !sk1.isEmpty() ) {
HbAction *primary = new HbAction( sk1 );
cQuery->setPrimaryAction( primary );
}
- if( sk2.isEmpty() == false ) {
+ if( !sk2.isEmpty() ) {
HbAction *secondary = new HbAction( sk2 );
cQuery->setSecondaryAction( secondary );
}
cQuery->checkActions();
- HbAction* action = 0;
- bool pwdOk( false );
-
- while( ok && !pwdOk ){
- action = cQuery->exec();
- if( action == cQuery->secondaryAction() ){
- ok = false;
+ HbAction* action = executeDialog( cQuery, associatedDrives );
+ if( action == cQuery->primaryAction() ){
+ QString firstPwd = cQuery->getFirstEditText();
+ QString secondPwd = cQuery->getSecondEditText();
+ if ( firstPwd == secondPwd ){
+ pwd = secondPwd;
+ ret = true;
}
- else{
- ok = true;
- }
+ }
+ else{
+ ret = false;
+ }
- if( ok ){
- QString firstPwd = cQuery->getFirstEditText();
- QString secondPwd = cQuery->getSecondEditText();
- if ( firstPwd == secondPwd ){
- newPassword = secondPwd;
- pwdOk = true;
- ret = true;
- }
- else{
- HbMessageBox::information( tr( "The passwords do not match, try again!" ) );
- }
- }
- }
delete cQuery;
return ret;
}
--- a/filemanager/src/filemanager/src/components/fmdlgutils.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmdlgutils.h Mon May 03 12:24:39 2010 +0300
@@ -25,6 +25,9 @@
#include <QStringList>
#include <QTime>
+class HbDialog;
+class HbAction;
+
class FmDlgUtils : public QObject
{
Q_OBJECT
@@ -41,7 +44,8 @@
static bool showSingleSettingQuery(
const QString &title,
const QStringList &textList,
- int &selectedIndex );
+ int &selectedIndex,
+ const QString &associatedDrives = QString() );
/**
* Shows multi select setting page
@@ -56,7 +60,8 @@
const QString &title,
const QStringList &textList,
quint32 &selection,
- int dominantIndex );
+ int dominantIndex,
+ const QString &associatedDrives = QString() );
/**
* Shows time setting page
@@ -66,20 +71,25 @@
* @return true if selection made, otherwise false
*/
static bool showTimeSettingQuery(
- const QString &title, QTime &time );
+ const QString &title, QTime &time,
+ const QString &associatedDrives = QString() );
static bool showTextQuery(
- const QString &title, QString &driveName );
+ const QString &title, QString &driveName, bool isDimPrimaryActionWhenEmpty, int maxLength = -1,
+ const QString &associatedDrives = QString() );
- static bool showConfirmPasswordQuery(
- const QString &title, const QString &driveName, QString &pwd );
+ static bool showSinglePasswordQuery(
+ const QString &title, QString &pwd,
+ const QString &associatedDrives = QString() );
- static bool showChangePasswordQuery(
- const QString &firstLabel, const QString &secondLabel, QString &newPassword );
+ static bool showMultiPasswordQuery(
+ const QString &firstLabel, const QString &secondLabel, QString &pwd,
+ const QString &associatedDrives = QString() );
~FmDlgUtils(void);
private:
FmDlgUtils(void);
+ static HbAction *executeDialog( HbDialog *dialog, const QString &associatedDrives );
};
--- a/filemanager/src/filemanager/src/components/fmdrivedetailstype.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmdrivedetailstype.cpp Mon May 03 12:24:39 2010 +0300
@@ -179,7 +179,6 @@
numofFolders = 0;
numofFiles = 0;
totalSize = 0;
- totalSize = 0;
int tempNumofFolders = 0;
int tempNumofFiles = 0;
--- a/filemanager/src/filemanager/src/components/fmmultitextquery.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmmultitextquery.cpp Mon May 03 12:24:39 2010 +0300
@@ -25,7 +25,7 @@
#include <hblabel.h>
#include <hbaction.h>
-FmMultiTextQuery::FmMultiTextQuery( HbLineEdit::EchoMode echoMode, QGraphicsItem *parent ) :\
+FmMultiTextQuery::FmMultiTextQuery( HbLineEdit::EchoMode echoMode, QGraphicsItem *parent ) :
HbDialog( parent ), mEchoMode( echoMode )
{
init();
--- a/filemanager/src/filemanager/src/components/fmsingletextquery.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmsingletextquery.cpp Mon May 03 12:24:39 2010 +0300
@@ -24,8 +24,9 @@
#include <hblineedit.h>
#include <hbaction.h>
-FmSingleTextQuery::FmSingleTextQuery( HbLineEdit::EchoMode echoMode, QGraphicsItem *parent ) :
- HbDialog( parent ), mEchoMode( echoMode )
+FmSingleTextQuery::FmSingleTextQuery( Options options,
+ HbLineEdit::EchoMode echoMode, QGraphicsItem *parent ) :
+ HbDialog( parent ), mOptions( options ), mEchoMode( echoMode )
{
init();
}
@@ -68,11 +69,18 @@
return text;
}
+void FmSingleTextQuery::setLineEditMaxLength( int length )
+{
+ mTextEdit->setMaxLength( length );
+}
+
void FmSingleTextQuery::checkActions()
{
- if( !mTextEdit->text().isEmpty() ){
- this->primaryAction()->setEnabled( true );
- } else {
- this->primaryAction()->setEnabled( false );
+ if( mOptions & DimPrimereActionWhenEmpty ) {
+ if( !mTextEdit->text().isEmpty() ){
+ this->primaryAction()->setEnabled( true );
+ } else {
+ this->primaryAction()->setEnabled( false );
+ }
}
}
--- a/filemanager/src/filemanager/src/components/fmsingletextquery.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmsingletextquery.h Mon May 03 12:24:39 2010 +0300
@@ -28,12 +28,20 @@
{
Q_OBJECT
public:
- FmSingleTextQuery( HbLineEdit::EchoMode echoMode = HbLineEdit::Normal, QGraphicsItem *parent = 0 );
+ enum Option
+ {
+ DimPrimereActionWhenEmpty = 0x00000001
+ };
+ Q_DECLARE_FLAGS(Options, Option)
+
+ FmSingleTextQuery( Options options = 0,
+ HbLineEdit::EchoMode echoMode = HbLineEdit::Normal, QGraphicsItem *parent = 0 );
~FmSingleTextQuery();
public:
void setLineEditText( const QString &text );
QString getLineEditText();
+ void setLineEditMaxLength( int length );
public slots:
void checkActions();
@@ -44,7 +52,8 @@
private:
HbWidget *mContentWidget;
HbLineEdit *mTextEdit;
+ Options mOptions;
HbLineEdit::EchoMode mEchoMode;
};
-
+Q_DECLARE_OPERATORS_FOR_FLAGS(FmSingleTextQuery::Options)
#endif
--- a/filemanager/src/filemanager/src/components/fmviewdetailsdialog.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmviewdetailsdialog.cpp Mon May 03 12:24:39 2010 +0300
@@ -21,6 +21,7 @@
#include "fmviewdetailsitem.h"
#include "fmdatalistmodel.h"
#include "fmdrivedetailstype.h"
+#include "fmviewmanager.h"
#include <QDirModel>
#include <QFileInfo>
@@ -83,7 +84,7 @@
void FmViewDetailsDialog::setDriveDetails( const QString &driverName )
{
const QString dataDir = "C:\\data";
- mHeaderLabel->setPlainText( tr( "Memory details: ") );
+ mHeaderLabel->setPlainText( hbTrId( "txt_fmgr_title_memory_details" ) );
quint64 sizeOfOthers = 0;
@@ -93,19 +94,17 @@
mDataListModel->removeRows( 0, mDataListModel->rowCount() );
mDataListModel->insertRows( 0, EDriveDetailEntryEnd );
- detailString.append( tr ( "Memory name:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_memory_name" ) );
QVariant variant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryName ), variant, Qt::DisplayRole );
detailString.clear();
- detailString.append( driverInfo.name() );
- detailString.append( " " );
- detailString.append( driverInfo.volumeName() );
+ detailString.append( FmUtils::fillDriveVolume( driverInfo.name(), true ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryName ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Size:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_size_memory" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemorySize ), variant, Qt::DisplayRole );
@@ -115,7 +114,7 @@
mDataListModel->setData( mDataListModel->index( EMemorySize ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Free:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_free_memory" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryFree ), variant, Qt::DisplayRole );
@@ -129,7 +128,7 @@
// getContentDetails( dataDir );
detailString.clear();
- detailString.append( tr ( "Images:" ) );
+ detailString.append( hbTrId ( "Images:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryImages ), variant, Qt::DisplayRole );
@@ -141,7 +140,7 @@
sizeOfOthers -= mSizeofImage;
detailString.clear();
- detailString.append( tr ( "Sounds:" ) );
+ detailString.append( hbTrId ( "Sounds:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemorySounds ), variant, Qt::DisplayRole );
@@ -153,7 +152,7 @@
sizeOfOthers -= mSizeofSounds;
detailString.clear();
- detailString.append( tr ( "Video:" ) );
+ detailString.append( hbTrId ( "Video:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryVideos ), variant, Qt::DisplayRole );
@@ -165,7 +164,7 @@
sizeOfOthers -= mSizeofVideo;
detailString.clear();
- detailString.append( tr ( "Java Files:" ) );
+ detailString.append( hbTrId ( "Java Files:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryMidpJava ), variant, Qt::DisplayRole );
@@ -177,7 +176,7 @@
sizeOfOthers -= mSizeofJava;
detailString.clear();
- detailString.append( tr ( "Sis files:" ) );
+ detailString.append( hbTrId ( "Sis files:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryNativeApps ), variant, Qt::DisplayRole );
@@ -189,7 +188,7 @@
sizeOfOthers -= mSizeofNativeFiles;
detailString.clear();
- detailString.append( tr ( "Documents:" ) );
+ detailString.append( hbTrId ( "Documents:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryDocuments ), variant, Qt::DisplayRole );
@@ -201,7 +200,7 @@
sizeOfOthers -= mSizeofDocument;
detailString.clear();
- detailString.append( tr ( "Calendars:" ) );
+ detailString.append( hbTrId ( "Calendars:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryCalendar ), variant, Qt::DisplayRole );
@@ -213,7 +212,7 @@
sizeOfOthers -= mSizeofCalendar;
detailString.clear();
- detailString.append( tr ( "Others:" ) );
+ detailString.append( hbTrId ( "Others:" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EMemoryOthers ), variant, Qt::DisplayRole );
@@ -225,7 +224,7 @@
void FmViewDetailsDialog::setFolderDetails( const QString &folderPath )
{
- mHeaderLabel->setPlainText( tr( "Folder details: ") );
+ mHeaderLabel->setPlainText( hbTrId( "txt_fmgr_title_folder_details" ) );
QString detailString( "" );
@@ -234,7 +233,7 @@
mDataListModel->removeRows( 0, mDataListModel->rowCount() );
mDataListModel->insertRows( 0, EFolderDetailEntryEnd );
- detailString.append( tr ( "Name:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_name_folder" ) );
QVariant variant( detailString );
mDataListModel->setData( mDataListModel->index( EFolderName ), variant, Qt::DisplayRole );
@@ -249,7 +248,7 @@
QTime modifiedTime = modifiedDateTime.time();
detailString.clear();
- detailString.append( tr ( "Date:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_date_folder" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EModifiedDate ), variant, Qt::DisplayRole );
@@ -259,7 +258,7 @@
mDataListModel->setData( mDataListModel->index( EModifiedDate ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Time:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_time_folder" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EModifiedTime ), variant, Qt::DisplayRole );
@@ -269,7 +268,7 @@
mDataListModel->setData( mDataListModel->index( EModifiedTime ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Size:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_size_folder" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EFolderSize ), variant, Qt::DisplayRole );
@@ -279,7 +278,7 @@
mDataListModel->setData( mDataListModel->index( EFolderSize ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Subfolders: " ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_subfolders" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( ENumofSubFolders ), variant, Qt::DisplayRole );
@@ -289,7 +288,7 @@
mDataListModel->setData( mDataListModel->index( ENumofSubFolders ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Files: " ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_files" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( ENumofFiles ), variant, Qt::DisplayRole );
@@ -301,7 +300,7 @@
void FmViewDetailsDialog::setFileDetails( const QString &filePath )
{
- mHeaderLabel->setPlainText( tr( "File details: ") );
+ mHeaderLabel->setPlainText( hbTrId( "txt_fmgr_title_file_details") );
QString detailString( "" );
@@ -310,7 +309,7 @@
mDataListModel->removeRows( 0, mDataListModel->rowCount() );
mDataListModel->insertRows( 0, EFileDetailEntryEnd );
- detailString.append( tr ( "Name:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_name_file" ) );
QVariant variant( detailString );
mDataListModel->setData( mDataListModel->index( EFileName ), variant, Qt::DisplayRole );
@@ -320,7 +319,7 @@
mDataListModel->setData( mDataListModel->index( EFileName ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Type:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_type_file" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EFileType ), variant, Qt::DisplayRole );
@@ -340,7 +339,7 @@
QTime modifiedTime = modifiedDateTime.time();
detailString.clear();
- detailString.append( tr ( "Date:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_date_file" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EFileModifiedDate ), variant, Qt::DisplayRole );
@@ -350,7 +349,7 @@
mDataListModel->setData( mDataListModel->index( EFileModifiedDate ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Time:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_time_file" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EFileModifiedTime ), variant, Qt::DisplayRole );
@@ -360,7 +359,7 @@
mDataListModel->setData( mDataListModel->index( EFileModifiedTime ), variant, Qt::UserRole );
detailString.clear();
- detailString.append( tr ( "Size:" ) );
+ detailString.append( hbTrId ( "txt_fmgr_dblist_size_file" ) );
variant = QVariant( detailString );
mDataListModel->setData( mDataListModel->index( EFileSize ), variant, Qt::DisplayRole );
@@ -438,32 +437,57 @@
}
}
+HbAction *FmViewDetailsDialog::executeDialog( HbDialog *dialog, const QString &associatedDrives )
+{
+ for( int i = 0; i < associatedDrives.length(); i++ ) {
+ QString drive( associatedDrives[i] + QString( ":/" ) );
+ if( !FmUtils::isDriveAvailable( drive ) ) {
+ FmLogger::log( "executeDialog return 0_ " + associatedDrives );
+ return 0;
+ }
+ }
+
+ FmDlgCloseUnit dlgCloseUnit( dialog );
+ dlgCloseUnit.addAssociatedDrives( associatedDrives );
+
+ FmViewManager::viewManager()->addDlgCloseUnit( &dlgCloseUnit );
+ FmLogger::log( " Exec Dialog start " );
+ HbAction* action = dialog->exec();
+ FmLogger::log( " Exec Dialog end " );
+ FmViewManager::viewManager()->removeDlgCloseUnit( &dlgCloseUnit );
+ return action;
+}
+
void FmViewDetailsDialog::showDriveViewDetailsDialog( const QString &driverName,
- QList<FmDriveDetailsSize*> detailsSizeList )
+ QList<FmDriveDetailsSize*> detailsSizeList, const QString& associatedDrives )
{
+ FmLogger::log( "showDriveViewDetailsDialog_" + associatedDrives );
FmViewDetailsDialog viewDetailsDialog;
viewDetailsDialog.setSizeofContent( detailsSizeList );
viewDetailsDialog.setDriveDetails( driverName );
- viewDetailsDialog.exec();
+ //viewDetailsDialog.exec();
+ executeDialog( &viewDetailsDialog , associatedDrives );
}
void FmViewDetailsDialog::showFolderViewDetailsDialog( const QString &folderPath,
- int numofSubFolders, int numofFiles, quint64 sizeofFolder )
+ int numofSubFolders, int numofFiles, quint64 sizeofFolder, const QString& associatedDrives )
{
FmViewDetailsDialog viewDetailsDialog;
viewDetailsDialog.setNumofSubfolders( numofSubFolders, numofFiles, sizeofFolder );
viewDetailsDialog.setFolderDetails( folderPath );
- viewDetailsDialog.exec();
+ //viewDetailsDialog.exec();
+ executeDialog( &viewDetailsDialog , associatedDrives );
}
-void FmViewDetailsDialog::showFileViewDetailsDialog( const QString &filePath )
+void FmViewDetailsDialog::showFileViewDetailsDialog( const QString &filePath, const QString& associatedDrives )
{
FmViewDetailsDialog viewDetailsDialog;
viewDetailsDialog.setFileDetails( filePath );
- viewDetailsDialog.exec();
+ //viewDetailsDialog.exec();
+ executeDialog( &viewDetailsDialog , associatedDrives );
}
--- a/filemanager/src/filemanager/src/components/fmviewdetailsdialog.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/components/fmviewdetailsdialog.h Mon May 03 12:24:39 2010 +0300
@@ -73,11 +73,12 @@
virtual ~FmViewDetailsDialog();
static void showDriveViewDetailsDialog( const QString &driverName,
- QList<FmDriveDetailsSize*> detailsSizeList );
+ QList<FmDriveDetailsSize*> detailsSizeList,
+ const QString& associatedDrives = QString() );
static void showFolderViewDetailsDialog( const QString &folderPath,
int numofSubFolders, int numofFiles,
- quint64 sizeofFolder);
- static void showFileViewDetailsDialog( const QString &filePath );
+ quint64 sizeofFolder, const QString& associatedDrives = QString() );
+ static void showFileViewDetailsDialog( const QString &filePath, const QString& associatedDrives = QString() );
private:
FmViewDetailsDialog( QGraphicsItem *parent = 0 );
@@ -89,6 +90,7 @@
void setNumofSubfolders( int numofSubFolders, int numofFiles, quint64 sizeofFolder );
void setSizeofContent( QList<FmDriveDetailsSize*> detailsSizeList );
+ static HbAction *executeDialog( HbDialog *dialog, const QString &associatedDrives );
private:
HbListView *mListView;
HbLabel *mHeaderLabel;
--- a/filemanager/src/filemanager/src/fmdriverlistwidget.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmdriverlistwidget.cpp Mon May 03 12:24:39 2010 +0300
@@ -110,15 +110,16 @@
HbMenu *contextMenu = new HbMenu();
mCurrentItem = item;
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
+
+ FmDriverInfo driverInfo = FmUtils::queryDriverInfo( diskName );
+ FmDriverInfo::DriveState state = driverInfo.driveState();
- quint32 state = FmUtils::getDriverState( diskName );
- FmDriverInfo driverInfo = FmUtils::queryDriverInfo( diskName );
-
- if( !( state & FmDriverInfo::EDriveNotPresent ) ) {
+ if( !( state & FmDriverInfo::EDriveNotPresent ) && !( state & FmDriverInfo::EDriveLocked ) &&
+ !( state & FmDriverInfo::EDriveCorrupted ) ) {
HbAction *viewAction = new HbAction();
viewAction->setObjectName( "viewAction" );
- viewAction->setText( tr( "View details" ) );
+ viewAction->setText( hbTrId( "txt_fmgr_menu_view_details_memory" ) );
contextMenu->addAction( viewAction );
//state = 0x210;
@@ -127,13 +128,12 @@
this, SLOT( on_viewAction_triggered() ) );
}
- HbMenu *subMenu = new HbMenu( "Memory name" );
if( ( state & FmDriverInfo::EDriveRemovable ) && !( state & FmDriverInfo::EDriveMassStorage ) ){
if ( driverInfo.volumeName().length() ){
HbAction *renameAction = new HbAction();
renameAction->setObjectName( "renameAction" );
- renameAction->setText( tr( "Rename" ) );
- subMenu->addAction( renameAction );
+ renameAction->setText( hbTrId( "txt_fmgr_menu_rename" ) );
+ contextMenu->addAction( renameAction );
connect( renameAction, SIGNAL( triggered() ),
this, SLOT( on_renameAction_triggered() ) );
@@ -141,25 +141,23 @@
else{
HbAction *nameAction = new HbAction();
nameAction->setObjectName( "nameAction" );
- nameAction->setText( tr( "Name" ) );
- subMenu->addAction( nameAction );
+ nameAction->setText( hbTrId( "txt_fmgr_menu_name" ) );
+ contextMenu->addAction( nameAction );
connect( nameAction, SIGNAL( triggered() ),
this, SLOT( on_nameAction_triggered() ) );
}
- contextMenu->addMenu( subMenu );
- subMenu = new HbMenu( "Memory password" );
if( state & FmDriverInfo::EDrivePasswordProtected ){
HbAction *changePwdAction = new HbAction();
changePwdAction->setObjectName( "changePwdAction" );
- changePwdAction->setText( tr( "Change Password" ) );
- subMenu->addAction( changePwdAction );
+ changePwdAction->setText( hbTrId( "txt_fmgr_menu_change_password" ) );
+ contextMenu->addAction( changePwdAction );
HbAction *removePwdAction = new HbAction();
removePwdAction->setObjectName( "removePwdAction" );
- removePwdAction->setText( tr( "Remove Password" ) );
- subMenu->addAction( removePwdAction );
+ removePwdAction->setText( hbTrId( "txt_fmgr_menu_remove_password" ) );
+ contextMenu->addAction( removePwdAction );
connect( changePwdAction, SIGNAL( triggered() ),
this, SLOT( on_changePwdAction_triggered() ) );
@@ -169,18 +167,17 @@
else{
HbAction *setPwdAction = new HbAction();
setPwdAction->setObjectName( "setPwdAction" );
- setPwdAction->setText( tr( "Set Password" ) );
- subMenu->addAction( setPwdAction );
+ setPwdAction->setText( hbTrId( "txt_fmgr_menu_set_password" ) );
+ contextMenu->addAction( setPwdAction );
connect( setPwdAction, SIGNAL( triggered() ),
this, SLOT( on_setPwdAction_triggered() ) );
}
- contextMenu->addMenu( subMenu );
if( state & FmDriverInfo::EDriveEjectable ){
HbAction *ejectAction = new HbAction();
ejectAction->setObjectName( "ejectAction" );
- ejectAction->setText( tr( "Eject" ) );
+ ejectAction->setText( hbTrId( "txt_fmgr_menu_eject" ) );
contextMenu->addAction( ejectAction );
connect( ejectAction, SIGNAL( triggered() ),
@@ -188,12 +185,13 @@
}
}
#ifndef _DEBUG_ENABLE_FORMATMENU_
- if ( state & FmDriverInfo::EDriveRemovable ){
- if( state & FmDriverInfo::EDriveFormattable ){
+if ( ( state & FmDriverInfo::EDriveRemovable ) || ( state & FmDriverInfo::EDriveCorrupted )
+ || ( state & FmDriverInfo::EDriveLocked ) ){
+ if( !( state & FmDriverInfo::EDriveNotPresent ) ){
#endif
HbAction *formatAction = new HbAction();
formatAction->setObjectName( "formatAction" );
- formatAction->setText( tr( "Format" ) );
+ formatAction->setText( hbTrId( "txt_fmgr_menu_format" ) );
contextMenu->addAction( formatAction );
connect( formatAction, SIGNAL( triggered() ),
@@ -206,7 +204,7 @@
if( state & FmDriverInfo::EDriveLocked ){
HbAction *unLockedAction = new HbAction();
unLockedAction->setObjectName( "unLockedAction" );
- unLockedAction->setText( tr( "Unlock" ) );
+ unLockedAction->setText( hbTrId( "Unlock" ) );
contextMenu->addAction( unLockedAction );
connect( unLockedAction, SIGNAL( triggered() ),
@@ -218,33 +216,37 @@
void FmDriverListWidget::on_viewAction_triggered()
{
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
mOperationService->asyncViewDriveDetails( diskName );
}
void FmDriverListWidget::on_renameAction_triggered()
{
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
-
- quint32 state = FmUtils::getDriverState( diskName );
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
+
+ FmDriverInfo::DriveState state = FmUtils::queryDriverInfo( diskName ).driveState();
FmDriverInfo driverInfo = FmUtils::queryDriverInfo( diskName );
if ( state & FmDriverInfo::EDriveWriteProtected ){
- HbMessageBox::information( tr( "Unable to perform operation. Memory card is read only." ) );
+ HbMessageBox::information( hbTrId( "Unable to perform operation. Memory card is read only." ) );
return;
}
QString title( tr( "Drive name ") );
QString volumeName = driverInfo.volumeName();
- if( FmDlgUtils::showTextQuery( title, volumeName ) ){
-
- if ( FmUtils::renameDrive( diskName, volumeName ) == 0 ){
- HbMessageBox::information( tr( "The name has been changed!" ) );
- mModel->refresh();
- }
- else{
- HbMessageBox::information( tr( "Error occurred, operation cancelled!" ) );
+ QString associatedDrives( FmUtils::getDriveLetterFromPath( diskName ) );
+ while( FmDlgUtils::showTextQuery( title, volumeName, false, FmMaxLengthofDriveName, associatedDrives ) ){
+ int err = FmUtils::renameDrive( diskName, volumeName );
+ if ( err == FmErrNone ){
+ HbMessageBox::information( hbTrId( "The name has been changed!" ) );
+ mModel->refresh();
+ break;
+ } else if( err == FmErrBadName ) {
+ HbMessageBox::information( hbTrId( "Illegal characters! Use only letters and numbers." ) );
+ } else{
+ HbMessageBox::information( hbTrId( "Error occurred, operation cancelled!" ) );
+ break;
}
}
}
@@ -254,110 +256,134 @@
on_renameAction_triggered();
}
-void FmDriverListWidget::on_changePwdAction_triggered()
+void FmDriverListWidget::on_setPwdAction_triggered()
{
- QString title( tr( "Password: ") );
- QString firstLabel( tr( "New Password: ") );
- QString secondLabel( tr( "Confirm new Password: ") );
+ QString firstLabel( hbTrId( "New Password: ") );
+ QString secondLabel( hbTrId( "Confirm new Password: ") );
QString oldPwd;
QString newPwd;
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
+ FmUtils::emptyPwd( oldPwd );
+
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
+
+ QString associatedDrives( FmUtils::getDriveLetterFromPath( diskName ) );
+ if( FmDlgUtils::showMultiPasswordQuery( firstLabel, secondLabel, newPwd, associatedDrives ) ) {
+ if ( FmUtils::setDrivePwd( diskName, oldPwd, newPwd ) == 0 ){
+ HbMessageBox::information( hbTrId( "The password has been set!" ) );
+ }
+ else{
+ HbMessageBox::information( hbTrId( "Error occurred, operation cancelled!" ) );
+ }
+ }
+}
+
+void FmDriverListWidget::on_changePwdAction_triggered()
+{
+ QString title( hbTrId( "Password: ") );
+ QString firstLabel( hbTrId( "New Password: ") );
+ QString secondLabel( hbTrId( "Confirm new Password: ") );
- if( FmDlgUtils::showConfirmPasswordQuery( title, diskName, oldPwd ) ){
- if( FmDlgUtils::showChangePasswordQuery( firstLabel, secondLabel, newPwd ) ){
- if ( FmUtils::setDrivePwd( diskName, oldPwd, newPwd ) == 0 ){
- HbMessageBox::information( tr( "The password has been changed!" ) );
+ QString oldPwd;
+ QString newPwd;
+
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
+
+ QString associatedDrives( FmUtils::getDriveLetterFromPath( diskName ) );
+ while( FmDlgUtils::showSinglePasswordQuery( title, oldPwd, associatedDrives ) ) {
+ if ( FmUtils::checkDrivePwd( diskName, oldPwd ) == 0 ){
+ if( FmDlgUtils::showMultiPasswordQuery( firstLabel, secondLabel, newPwd ) ){
+ if ( FmUtils::setDrivePwd( diskName, oldPwd, newPwd ) == 0 ){
+ HbMessageBox::information( hbTrId( "The password has been changed!" ) );
+ } else {
+ HbMessageBox::information( hbTrId( "Error occurred, operation cancelled!" ) );
+ }
+ break;
+ } else {
+ //cancel muti password query
+ break;
}
- else{
- HbMessageBox::information( tr( "Error occurred, operation cancelled!" ) );
- }
- }
+ } else {
+ HbMessageBox::information( hbTrId( "The password is incorrect, try again!" ) );
+ }
+
}
}
void FmDriverListWidget::on_removePwdAction_triggered()
{
- QString title( tr( "Password: ") );
+ QString title( hbTrId( "Password: ") );
QString oldPwd;
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
//QString password( tr( "a ") );
if( HbMessageBox::question( tr( "Do you want to remove the password? Memory card becomes unlocked." ) ) ){
- if( FmDlgUtils::showConfirmPasswordQuery( title, diskName, oldPwd ) ){
-
- if ( FmUtils::removeDrivePwd( diskName, oldPwd ) == 0 ){
- HbMessageBox::information( tr( "The password has been removed!" ) );
+ QString associatedDrives( FmUtils::getDriveLetterFromPath( diskName ) );
+ while( FmDlgUtils::showSinglePasswordQuery( title, oldPwd, associatedDrives ) ) {
+ if ( FmUtils::checkDrivePwd( diskName, oldPwd ) == 0 ) {
+ if ( FmUtils::removeDrivePwd( diskName, oldPwd ) == 0 ){
+ HbMessageBox::information( hbTrId( "The password has been removed!" ) );
+ }
+ else{
+ HbMessageBox::information( hbTrId( "Error occurred, operation cancelled!" ) );
+ }
+ break;
}
- else{
- HbMessageBox::information( tr( "Error occurred, operation cancelled!" ) );
+ else {
+ HbMessageBox::information( hbTrId( "The password is incorrect, try again!" ) );
}
+
}
}
}
void FmDriverListWidget::on_unLockedAction_triggered()
{
- QString title( tr( "Password: ") );
+ QString title( hbTrId( "Password: ") );
QString oldPwd;
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
- if( FmDlgUtils::showConfirmPasswordQuery( title, diskName, oldPwd ) ){
-
- if ( FmUtils::unlockDrive( diskName, oldPwd ) == 0 ){
- HbMessageBox::information( tr( "The memory is unlocked!" ) );
- }
- else{
- HbMessageBox::information( tr( "Error occurred, operation cancelled!" ) );
- }
- }
-}
-
-void FmDriverListWidget::on_setPwdAction_triggered()
-{
- QString firstLabel( tr( "New Password: ") );
- QString secondLabel( tr( "Confirm new Password: ") );
-
- QString oldPwd;
- QString newPwd;
-
- FmUtils::emptyPwd( oldPwd );
-
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
-
- if( FmDlgUtils::showChangePasswordQuery( firstLabel, secondLabel, newPwd ) ){
- if ( FmUtils::setDrivePwd( diskName, oldPwd, newPwd ) == 0 ){
- HbMessageBox::information( tr( "The password has been set!" ) );
- }
- else{
- HbMessageBox::information( tr( "Error occurred, operation cancelled!" ) );
+ //Do not add associatedDrives as Locked MMC is not available Drive but only present Drive
+ while( FmDlgUtils::showSinglePasswordQuery( title, oldPwd ) ) {
+ int err = FmUtils::unlockDrive( diskName, oldPwd );
+ if( err == FmErrNone ) {
+ HbMessageBox::information( hbTrId( "The memory is unlocked!" ) );
+ break;
+ } else if ( err == FmErrAccessDenied ) {
+ HbMessageBox::information( hbTrId( "The password is incorrect, try again!" ) );
+ } else if (err == FmErrAlreadyExists ) {
+ HbMessageBox::information( hbTrId( "The disk has already been unlocked!" ) );
+ break;
+ } else if( err == FmErrNotSupported ) {
+ HbMessageBox::information( hbTrId( "The media does not support password locking!" ) );
+ break;
+ } else {
+ HbMessageBox::information( hbTrId( "Error occurred, operation cancelled!" ) );
+ break;
}
}
}
void FmDriverListWidget::on_formatAction_triggered()
{
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
-
- if( HbMessageBox::question( tr( "Format? Data will be deleted during formatting." ) ) ){
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
+
+ if( HbMessageBox::question( hbTrId( "Format? Data will be deleted during formatting." ) ) ){
if( FmErrNone != mOperationService->asyncFormat( diskName ) )
- HbMessageBox::information( tr( "Formatting failed." ) );
+ HbMessageBox::information( hbTrId( "Formatting failed." ) );
}
-
}
void FmDriverListWidget::on_ejectAction_triggered()
{
- QString diskName = mCurrentItem->modelIndex().data( Qt::DisplayRole ).toString();
-
- if( HbMessageBox::question( tr( "Eject memory card? Some applications will be closed." ) ) ){
- if( !FmUtils::ejectDrive( diskName ) ){
- HbMessageBox::information( tr( "Error occurred, operation cancelled!") );
- }
+ QString diskName = mModel->driveName( mCurrentItem->modelIndex() );
+
+ if( HbMessageBox::question( hbTrId( "Eject memory card? Some applications will be closed." ) ) ){
+ FmUtils::ejectDrive( diskName );
}
}
@@ -376,7 +402,7 @@
void FmDriverListWidget::on_searchPanel_searchOptionsClicked()
{
- mFindTargetPath = FmFileDialog::getExistingDirectory( 0, tr( "Look in:" ),
+ mFindTargetPath = FmFileDialog::getExistingDirectory( 0, hbTrId( "Look in:" ),
QString(""), QStringList() );
}
--- a/filemanager/src/filemanager/src/fmdriverview.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmdriverview.cpp Mon May 03 12:24:39 2010 +0300
@@ -35,6 +35,7 @@
initMenu();
initToolBar();
initDiskListWidget();
+
QMetaObject::connectSlotsByName( this );
}
@@ -50,28 +51,28 @@
#ifdef FM_CHANGE_ORIENT_ENABLE
action = new HbAction( this );
action->setObjectName( "rotateAction" );
- action->setText( tr( "Change orientation" ) );
+ action->setText( hbTrId( "Change orientation" ) );
menu()->addAction( action );
#endif
action = new HbAction( this );
action->setObjectName( "findAction" );
- action->setText( tr( "Find" ) );
+ action->setText( hbTrId( "txt_fmgr_opt_find" ) );
menu()->addAction( action );
action = new HbAction( this );
action->setObjectName( "backupAction" );
- action->setText( tr( "Backup" ) );
+ action->setText( hbTrId( "txt_fmgr_opt_backup" ) );
menu()->addAction( action );
action = new HbAction( this );
action->setObjectName( "restoreAction" );
- action->setText( tr( "Restore" ) );
+ action->setText( hbTrId( "txt_fmgr_opt_restore" ) );
menu()->addAction( action );
action = new HbAction( this );
action->setObjectName( "exitAction" );
- action->setText( tr( "Exit" ) );
+ action->setText( hbTrId( "Exit" ) );
menu()->addAction( action );
}
--- a/filemanager/src/filemanager/src/fmdrivewatcher/fmdrivewatcher.cpp Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The source file of drive watcher
-*/
-
-#include "fmdrivewatcher.h"
-
-#include "fmdrivewatcherprivate.h"
-
-FmDriveWatcher::FmDriveWatcher( QObject *parent ) : QObject( parent )
-{
- d = new FmDriveWatcherPrivate( this );
- connect( d, SIGNAL(driveAddedOrChanged()), this, SLOT( onDriveAddedOrChanged() ));
-}
-
-FmDriveWatcher::~FmDriveWatcher()
-{
- delete d;
-}
-
-
-void FmDriveWatcher::startWatch()
-{
- d->startWatch();
-}
-void FmDriveWatcher::cancelWatch()
-{
- d->cancelWatch();
-}
-
-void FmDriveWatcher::onDriveAddedOrChanged()
-{
- emit driveAddedOrChanged();
-}
--- a/filemanager/src/filemanager/src/fmdrivewatcher/fmdrivewatcher.h Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The header file of drive watcher
-*/
-
-#ifndef FMDRIVEWATCHER_H
-#define FMDRIVEWATCHER_H
-
-#include <QObject>
-
-class FmDriveWatcherPrivate;
-
-class FmDriveWatcher : public QObject
-{
-Q_OBJECT
-public:
- FmDriveWatcher( QObject *parent = 0 );
- virtual ~FmDriveWatcher();
- void startWatch();
- void cancelWatch();
-
-signals:
- void driveAddedOrChanged();
-private slots:
- void onDriveAddedOrChanged();
-private:
- FmDriveWatcherPrivate *d;
-};
-
-
-#endif
--- a/filemanager/src/filemanager/src/fmdrivewatcher/private/symbian/fmdriveevent.cpp Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The source file of drive event watcher
-*/
-
-
-// INCLUDE FILES
-#include <e32std.h>
-#include "fmdriveevent.h"
-#include "fmcommon.h"
-
-#include <aknnotewrappers.h>
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CFileManagerFileSystemEvent::CFileManagerFileSystemEvent
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-
-CFmDriveEvent::CFmDriveEvent(
- RFs& aFs,
- MFmDriveEventObserver *aObserver ) :
- CActive( CActive::EPriorityLow ),
- iFs( aFs ),
- iObserver( aObserver )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CFmDriveEvent::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CFmDriveEvent::ConstructL()
- {
- CActiveScheduler::Add( this );
- }
-
-// -----------------------------------------------------------------------------
-// CFmDriveEvent::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CFmDriveEvent* CFmDriveEvent::NewL(
- RFs& aFs,
- MFmDriveEventObserver *aObserver )
- {
- CFmDriveEvent* self =
- new( ELeave ) CFmDriveEvent(
- aFs,
- aObserver );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// ------------------------------------------------------------------------------
-// CFmDriveEvent::~CFmDriveEvent
-//
-// ------------------------------------------------------------------------------
-CFmDriveEvent::~CFmDriveEvent()
- {
- Cancel();
- }
-
-// -----------------------------------------------------------------------------
-// CFmDriveEvent::RunError
-// From CActive. Called when error occurred in asynchronous request
-// Notifies the observer
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CFmDriveEvent::RunError( TInt /*aError*/ )
- {
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CFmDriveEvent::DoCancel
-// From CActive. Called when asynchronous request is canceled
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CFmDriveEvent::DoCancel()
- {
- iFs.NotifyChangeCancel( iStatus );
- }
-
-// ------------------------------------------------------------------------------
-// CFmDriveEvent::Setup
-//
-// ------------------------------------------------------------------------------
-//
-void CFmDriveEvent::Setup()
- {
- FmLogger::log( QString( "CFmDriveEvent::Setup start" ) );
- if( IsActive() )
- {
- return;
- }
-
- iFs.NotifyChange( ENotifyDisk, iStatus );
- SetActive();
- FmLogger::log( QString( "CFmDriveEvent::Setup end" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CFmDriveEvent::RunL
-// From CActive. Called when asynchronous request is completed.
-// Notifies the observer
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CFmDriveEvent::RunL()
- {
- if( iStatus == KErrNone ){
- if( iObserver ){
- iObserver->OnDriveAddedOrChangedL();
- }
-
- Setup();
- }
-
- /*
- CAknInformationNote* informationNote;
- informationNote = new ( ELeave ) CAknInformationNote;
- informationNote->ExecuteLD( _L( "driveChanged!"));
- */
- }
-
-// End of File
--- a/filemanager/src/filemanager/src/fmdrivewatcher/private/symbian/fmdriveevent.h Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The header file of drive event watcher
-*/
-
-#ifndef CFMDRIVEEVENT_H
-#define CFMDRIVEEVENT_H
-
-
-// INCLUDES
-#include <e32base.h>
-#include <f32file.h>
-
-class MFmDriveEventObserver
- {
- public:
- virtual void OnDriveAddedOrChangedL() = 0;
- };
-// CLASS DECLARATION
-
-/**
-* This class listens file system events
-*
-* @lib FileManagerEngine.lib
-* @since 2.0
-*/
-NONSHARABLE_CLASS(CFmDriveEvent) : public CActive
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CFmDriveEvent* NewL( RFs& aFs, MFmDriveEventObserver* aObserver );
-
- /**
- * Destructor.
- */
- virtual ~CFmDriveEvent();
-
- public:
-
- /**
- * Sets file system event
- * @since 2.0
- */
- void Setup();
-
- protected: // Functions from base classes
-
- /**
- * From CActive Called when asynchronous request has completed
- * @since 2.0
- */
- void RunL();
-
- /**
- * From CActive Called when asynchronous request has failed
- * @since 2.0
- */
- TInt RunError( TInt aError );
-
- /**
- * From CActive Called when asynchronous request was cancelled
- * @since 2.0
- */
- void DoCancel();
-
- private:
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * C++ default constructor.
- */
- CFmDriveEvent( RFs& aFs, MFmDriveEventObserver* aObserver );
-
- private: // Data
- // Ref: Reference to opened File System session
- RFs& iFs;
-
- // Ref: This object is called when RunL occurs
- MFmDriveEventObserver *iObserver;
- };
-
-#endif // CFMDRIVEEVENT_H
-
-// End of File
--- a/filemanager/src/filemanager/src/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.cpp Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The source file of drive event watcher private
-*/
-
-#include "fmdrivewatcherprivate.h"
-
-#include "fmdrivewatcher.h"
-#include "fmcommon.h"
-
-FmDriveWatcherPrivate::FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher ) :
- q( driveWatcher )
-{
- fs.Connect();
- mDriveEvent = CFmDriveEvent::NewL( fs, this );
-}
-
-FmDriveWatcherPrivate::~FmDriveWatcherPrivate()
-{
- fs.Close();
- delete mDriveEvent;
-}
-
-
-void FmDriveWatcherPrivate::startWatch()
-{
- mDriveEvent->Setup();
-}
-
-void FmDriveWatcherPrivate::cancelWatch()
-{
- mDriveEvent->Cancel();
-}
-
-void FmDriveWatcherPrivate::OnDriveAddedOrChangedL()
-{
- FmLogger::log( QString( "FmDriveWatcherPrivate::OnDriveAddedOrChangedL start" ) );
- emit driveAddedOrChanged();
- FmLogger::log( QString( "FmDriveWatcherPrivate::OnDriveAddedOrChangedL end" ) );
-}
--- a/filemanager/src/filemanager/src/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.h Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The header file of drive event watcher private
-*/
-
-#ifndef FMDRIVEWATCHERPRIVATE_H
-#define FMDRIVEWATCHERPRIVATE_H
-
-#include <QObject>
-
-#include "fmdriveevent.h"
-
-#include <f32file.h>
-
-class FmDriveWatcher;
-
-class FmDriveWatcherPrivate : public QObject, public MFmDriveEventObserver
-{
-Q_OBJECT
-public:
- FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher );
- virtual ~FmDriveWatcherPrivate();
-
- void startWatch();
- void cancelWatch();
-
- void onDriveAdded();
- void onDriveRemoved();
-
- void OnDriveAddedOrChangedL();
-signals:
- void driveAddedOrChanged();
-
-private:
- FmDriveWatcher *q;
- CFmDriveEvent *mDriveEvent;
- RFs fs;
-};
-
-#endif
--- a/filemanager/src/filemanager/src/fmdrivewatcher/private/win32/fmdrivewatcherprivate.cpp Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The source file of drive event watcher private
-*/
-
-#include "fmdrivewatcherprivate.h"
-
-#include "fmdrivewatcher.h"
-
-FmDriveWatcherPrivate::FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher ) :
- q( driveWatcher )
-{
-}
-
-FmDriveWatcherPrivate::~FmDriveWatcherPrivate()
-{
-}
-
-
-void FmDriveWatcherPrivate::startWatch()
-{
-
-}
-
-void FmDriveWatcherPrivate::cancelWatch()
-{
-
-}
-
-void FmDriveWatcherPrivate::onDriveAdded()
-{
-
-}
-void FmDriveWatcherPrivate::onDriveRemoved()
-{
-
-}
--- a/filemanager/src/filemanager/src/fmdrivewatcher/private/win32/fmdrivewatcherprivate.h Fri Apr 16 14:53:38 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-*
-* Description:
-* The header file of drive event watcher private
-*/
-
-#ifndef FMDRIVEWATCHERPRIVATE_H
-#define FMDRIVEWATCHERPRIVATE_H
-
-#include <QObject>
-
-class FmDriveWatcher;
-
-class FmDriveWatcherPrivate : public QObject
-{
-Q_OBJECT
-public:
- FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher );
- virtual ~FmDriveWatcherPrivate();
-
- void startWatch();
- void cancelWatch();
-
- void onDriveAdded();
- void onDriveRemoved();
-
-signals:
- void driveAddedOrChanged();
-
-private:
- FmDriveWatcher *q;
-};
-
-#endif
--- a/filemanager/src/filemanager/src/fmfilebrowsewidget.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfilebrowsewidget.cpp Mon May 03 12:24:39 2010 +0300
@@ -37,6 +37,7 @@
#include <hbaction.h>
#include <hbsearchpanel.h>
#include <hbmessagebox.h>
+#include <hblabel.h>
FmFileBrowseWidget::FmFileBrowseWidget( HbWidget *parent, FmFileBrowseWidget::Style style )
: HbWidget( parent ),
@@ -46,15 +47,16 @@
mModel( 0 ),
mSelectable( false ),
mStyle( NoStyle ),
+ mFileBrowseStyle( style ),
mCurrentItem( 0 ),
mOperationService( 0 ),
mSearchPanel( 0 )
-
{
initFileModel();
initListView();
initTreeView();
initSearchPanel();
+ initEmptyTipsLabel();
initLayout();
mOperationService = FmViewManager::viewManager()->operationService();
@@ -68,10 +70,14 @@
//since there is a thread running in background
//if the model destroy later, the thread might not quit properly.
- QFileInfo oldFileInfo = mModel->fileInfo( mListView->rootIndex() );
- FmViewManager *viewManager = FmViewManager::viewManager();
- if( viewManager ) {
- viewManager->removeWatchPath( oldFileInfo.absoluteFilePath() );
+ if( mStyle == ListStyle || mStyle == TreeStyle ) {
+ QFileInfo oldFileInfo = mModel->fileInfo( mListView->rootIndex() );
+ if( oldFileInfo.exists() ) {
+ FmViewManager *viewManager = FmViewManager::viewManager();
+ if( viewManager ) {
+ viewManager->removeWatchPath( oldFileInfo.absoluteFilePath() );
+ }
+ }
}
mTreeView->setModel( 0 );
@@ -117,35 +123,19 @@
QString logString = "FmFileBrowseWidget::setRootPath(" + pathName + ')';
FmLogger::log( logString );
- QModelIndex modelIndex = mModel->index( pathName );
- bool i = QFileInfo(pathName).exists();
- QString string2;
- if( i )
- {
- string2 = QString( "true" ) ;
- }
- else
- {
- string2 = QString( "false" ) ;
- }
-
- logString = "FmFileBrowseWidget::setRootPath exists(" + string2 + ')';
- FmLogger::log( logString );
-
- mModel->refresh(modelIndex);
- QString string = mModel->fileName( modelIndex );
- logString = "FmFileBrowseWidget::setRootPath:filename(" + string + ')';
- FmLogger::log( logString );
-
- string = mModel->filePath( modelIndex );
- logString = "FmFileBrowseWidget::setRootPath:filepath(" + string + ')';
- FmLogger::log( logString );
-
-
- FmViewManager::viewManager()->addWatchPath( pathName );
-
- mListView->setRootIndex( mModel->index( pathName ) );
- mTreeView->setRootIndex( mModel->index( pathName ) );
+ if( checkPathAndSetStyle( pathName ) ) {
+ mListView->setModel(0);
+ mTreeView->setModel(0);
+ delete mModel;
+ mModel = new QDirModel(this);
+ mListView->setModel(mModel);
+ mTreeView->setModel(mModel);
+
+ mListView->setRootIndex( mModel->index( pathName ) );
+ mTreeView->setRootIndex( mModel->index( pathName ) );
+ FmViewManager::viewManager()->addWatchPath( pathName );
+ }
+ mCurrentDrive = pathName.left( 3 );
}
void FmFileBrowseWidget::setStyle( FmFileBrowseWidget::Style style )
@@ -160,14 +150,22 @@
} else if ( mStyle == TreeStyle ) {
mLayout->removeItem( mTreeView );
mTreeView->hide();
- }
+ } else if( mStyle == LabelStyle ){
+ mLayout->removeItem( mEmptyTipLabel );
+ mEmptyTipLabel->hide();
+ }
if ( style == ListStyle ) {
mLayout->addItem( mListView );
mListView->show();
+ mFileBrowseStyle = ListStyle;
} else if ( style == TreeStyle ) {
mLayout->addItem( mTreeView );
mTreeView->show();
+ mFileBrowseStyle = TreeStyle;
+ } else if ( style == LabelStyle ){
+ mLayout->addItem( mEmptyTipLabel );
+ mEmptyTipLabel->show();
}
mStyle = style;
@@ -199,7 +197,10 @@
selectionModel = mTreeView->selectionModel();
}
- selectionModel->clear();
+ if( selectionModel ){
+ selectionModel->clear();
+ }
+
}
@@ -262,7 +263,7 @@
HbAction *viewAction = new HbAction();
viewAction->setObjectName( "viewAction" );
- viewAction->setText( tr( "View details" ) );
+ viewAction->setText( hbTrId( "txt_fmgr_menu_view_details_file" ) );
contextMenu->addAction( viewAction );
connect( viewAction, SIGNAL( triggered() ),
@@ -271,47 +272,55 @@
//copy
HbAction *copyAction = new HbAction();
copyAction->setObjectName( "copyAction" );
- copyAction->setText( tr( "Copy" ) );
+ copyAction->setText( hbTrId( "txt_fmgr_menu_copy" ) );
contextMenu->addAction( copyAction );
connect( copyAction, SIGNAL( triggered() ),
this, SLOT( on_copyAction_triggered() ) );
- //Move
- HbAction *moveAction = new HbAction();
- moveAction->setObjectName( "moveAction" );
- moveAction->setText( tr( "Move" ) );
- contextMenu->addAction( moveAction );
-
- connect( moveAction, SIGNAL( triggered() ),
- this, SLOT( on_moveAction_triggered() ) );
-
- //Delete
- HbAction *deleteAction = new HbAction();
- deleteAction->setObjectName( "deleteAction" );
- deleteAction->setText( tr( "Delete" ) );
- contextMenu->addAction( deleteAction );
-
- connect( deleteAction, SIGNAL( triggered() ),
- this, SLOT( on_deleteAction_triggered() ) );
-
- //rename
- HbAction *renameAction = new HbAction();
- renameAction->setObjectName( "renameAction" );
- renameAction->setText( tr( "Rename" ) );
- contextMenu->addAction( renameAction );
-
- connect( renameAction, SIGNAL( triggered() ),
- this, SLOT( on_renameAction_triggered() ) );
+
+ QString filePath( mModel->filePath( item->modelIndex() ) );
+ QString formatFilePath( FmUtils::formatPath( filePath ) );
+ QFileInfo fileInfo( filePath );
+
+ if( ( fileInfo.isFile() ) || ( fileInfo.isDir() && !( FmUtils::isDefaultFolder( formatFilePath ) ) ) ){
+ //Move
+ HbAction *moveAction = new HbAction();
+ moveAction->setObjectName( "moveAction" );
+ moveAction->setText( hbTrId( "txt_fmgr_menu_move" ) );
+ contextMenu->addAction( moveAction );
+
+ connect( moveAction, SIGNAL( triggered() ),
+ this, SLOT( on_moveAction_triggered() ) );
+
+ //Delete
+ HbAction *deleteAction = new HbAction();
+ deleteAction->setObjectName( "deleteAction" );
+ deleteAction->setText( hbTrId( "txt_fmgr_menu_delete" ) );
+ contextMenu->addAction( deleteAction );
-//remove send action as it can not be used
-// HbAction *sendAction = new HbAction();
-// sendAction->setObjectName( "sendAction" );
-// sendAction->setText( tr( "Send" ) );
-// contextMenu->addAction( sendAction );
-//
-// connect( sendAction, SIGNAL( triggered() ),
-// this, SLOT( on_sendAction_triggered() ) );
+ connect( deleteAction, SIGNAL( triggered() ),
+ this, SLOT( on_deleteAction_triggered() ) );
+
+ //rename
+ HbAction *renameAction = new HbAction();
+ renameAction->setObjectName( "renameAction" );
+ renameAction->setText( hbTrId( "txt_fmgr_menu_rename" ) );
+ contextMenu->addAction( renameAction );
+
+ connect( renameAction, SIGNAL( triggered() ),
+ this, SLOT( on_renameAction_triggered() ) );
+ }
+
+// if( fileInfo.isFile() ){
+// HbAction *sendAction = new HbAction();
+// sendAction->setObjectName( "sendAction" );
+// sendAction->setText( hbTrId( "txt_fmgr_menu_send" ) );
+// contextMenu->addAction( sendAction );
+//
+// connect( sendAction, SIGNAL( triggered() ),
+// this, SLOT( on_sendAction_triggered() ) );
+// }
contextMenu->exec( coords );
}
@@ -397,6 +406,13 @@
this, SLOT( on_searchPanel_exitClicked() ) );
}
+void FmFileBrowseWidget::initEmptyTipsLabel()
+{
+ mEmptyTipLabel = new HbLabel( this );
+ mEmptyTipLabel->setObjectName( "searchPanel" );
+ mEmptyTipLabel->hide();
+}
+
void FmFileBrowseWidget::changeRootIndex( const QModelIndex &index )
{
@@ -437,11 +453,59 @@
void FmFileBrowseWidget::refreshModel( const QString& path )
{
- if( !path.isEmpty() ) {
- mModel->refresh( mModel->index( path ) );
+ QString currPath( currentPath().absoluteFilePath() );
+ QString refreshPath( path );
+
+ if( !currPath.isEmpty() ) {
+ if( refreshPath.isEmpty() ) {
+ refreshPath = currPath;
+ }
+ if( !FmUtils::isPathEqual( refreshPath, currPath ) ) {
+ // no need refresh other path
+ return;
+ }
+ if( checkPathAndSetStyle( refreshPath ) ) {
+ mModel->refresh( mModel->index( refreshPath ) );
+ } else {
+ FmViewManager *viewManager = FmViewManager::viewManager();
+ if( viewManager ) {
+ viewManager->removeWatchPath( currentPath().absoluteFilePath() );
+ }
+ }
+ } else {
+ // current path is empty, so change root path to Drive root.
+ refreshPath = mCurrentDrive;
+ setRootPath( refreshPath );
+ emit setTitle( FmUtils::fillDriveVolume( mCurrentDrive, true ) );
}
}
+bool FmFileBrowseWidget::checkPathAndSetStyle( const QString& path )
+{
+ if( !FmUtils::isPathAccessabel( path ) ){
+ QString driveName = FmUtils::getDriveNameFromPath( path );
+ FmDriverInfo::DriveState state = FmUtils::queryDriverInfo( driveName ).driveState();
+
+ if( state & FmDriverInfo::EDriveLocked ) {
+ mEmptyTipLabel->setPlainText( hbTrId( "Memory Card is locked" ) );
+ } else if( state & FmDriverInfo::EDriveNotPresent ) {
+ mEmptyTipLabel->setPlainText( hbTrId( "Memory Card is not present" ) );
+ } else if( state & FmDriverInfo::EDriveCorrupted ) {
+ mEmptyTipLabel->setPlainText( hbTrId( "Drive is Corrupted" ) );
+ } else {
+ mEmptyTipLabel->setPlainText( hbTrId( "Drive can not be opened " ) );
+ }
+ setStyle( LabelStyle );
+ emit setEmptyMenu( true );
+ return false;
+ } else {
+ setStyle( mFileBrowseStyle );
+ emit setEmptyMenu( false );
+ return true;
+ }
+
+}
+
void FmFileBrowseWidget::sortFiles( TSortType sortType )
{
switch( sortType ){
@@ -458,7 +522,7 @@
}
break;
case ESortByType:{
- mModel->setSorting( QDir::Type );
+ mModel->setSorting( QDir::Type | QDir::DirsFirst );
}
break;
default:
@@ -475,7 +539,7 @@
void FmFileBrowseWidget::on_searchPanel_searchOptionsClicked()
{
- mFindTargetPath = FmFileDialog::getExistingDirectory( 0, tr( "Look in:" ), QString(""),
+ mFindTargetPath = FmFileDialog::getExistingDirectory( 0, hbTrId( "Look in:" ), QString(""),
QStringList() );
}
@@ -499,8 +563,8 @@
void FmFileBrowseWidget::on_sendAction_triggered()
{
QString filePath = mModel->filePath( mCurrentItem->modelIndex() );
- QList<QVariant> list;
- list.append( QVariant(filePath ) );
+ QStringList list;
+ list.append( filePath );
FmUtils::sendFiles( list );
}
@@ -513,7 +577,7 @@
mOperationService->asyncViewFolderDetails( filePath );
}
else if( fileInfo.isFile() ){
- FmViewDetailsDialog::showFileViewDetailsDialog( filePath );
+ FmViewDetailsDialog::showFileViewDetailsDialog( filePath, FmUtils::getDriveLetterFromPath( filePath ) );
}
}
@@ -521,7 +585,7 @@
{
QStringList fileList;
fileList.push_back( mModel->filePath( mCurrentItem->modelIndex() ) );
- if ( HbMessageBox::question( tr("Confirm Deletion?" ) )) {
+ if ( HbMessageBox::question( hbTrId("Confirm Deletion?" ) )) {
int ret = mOperationService->asyncRemove( fileList );
switch( ret ) {
case FmErrNone:
@@ -529,13 +593,13 @@
break;
case FmErrAlreadyStarted:
// last operation have not finished
- HbMessageBox::information( tr( "Operatin already started!" ) );
+ HbMessageBox::information( hbTrId( "Operatin already started!" ) );
break;
case FmErrWrongParam:
- HbMessageBox::information( tr( "Wrong parameters!" ) );
+ HbMessageBox::information( hbTrId( "Wrong parameters!" ) );
break;
default:
- HbMessageBox::information( tr( "Operation fail to start!" ) );
+ HbMessageBox::information( hbTrId( "Operation fail to start!" ) );
}
}
}
@@ -545,7 +609,7 @@
QStringList srcFileList;
srcFileList.push_back( mModel->filePath( mCurrentItem->modelIndex() ) );
- QString targetPathName = FmFileDialog::getExistingDirectory( 0, tr( "copy to" ),
+ QString targetPathName = FmFileDialog::getExistingDirectory( 0, hbTrId( "copy to" ),
QString(""), QStringList() );
if( !targetPathName.isEmpty() ) {
targetPathName = FmUtils::fillPathWithSplash( targetPathName );
@@ -558,13 +622,13 @@
break;
case FmErrAlreadyStarted:
// last operation have not finished
- HbMessageBox::information( tr( "Operatin already started!" ) );
+ HbMessageBox::information( hbTrId( "Operatin already started!" ) );
break;
case FmErrWrongParam:
- HbMessageBox::information( tr( "Wrong parameters!" ) );
+ HbMessageBox::information( hbTrId( "Wrong parameters!" ) );
break;
default:
- HbMessageBox::information( tr( "Operation fail to start!" ) );
+ HbMessageBox::information( hbTrId( "Operation fail to start!" ) );
}
}
@@ -588,13 +652,13 @@
break;
case FmErrAlreadyStarted:
// last operation have not finished
- HbMessageBox::information( tr( "Operatin already started!" ) );
+ HbMessageBox::information( hbTrId( "Operatin already started!" ) );
break;
case FmErrWrongParam:
- HbMessageBox::information( tr( "Wrong parameters!" ) );
+ HbMessageBox::information( hbTrId( "Wrong parameters!" ) );
break;
default:
- HbMessageBox::information( tr( "Operation fail to start!" ) );
+ HbMessageBox::information( hbTrId( "Operation fail to start!" ) );
}
}
}
@@ -607,20 +671,18 @@
QString newName( fileInfo.fileName() );
- while( FmDlgUtils::showTextQuery( tr( "Enter new name for %1" ).arg( newName ), newName ) ){
+ while( FmDlgUtils::showTextQuery( hbTrId( "Enter new name for %1" ).arg( newName ), newName, true ) ){
QString newTargetPath = FmUtils::fillPathWithSplash(
fileInfo.absolutePath() ) + newName;
QFileInfo newFileInfo( newTargetPath );
if( newFileInfo.exists() ) {
- HbMessageBox::information( tr( "%1 already exist!" ).arg( newName ) );
+ HbMessageBox::information( hbTrId( "%1 already exist!" ).arg( newName ) );
continue;
}
if( !rename( fileInfo.absoluteFilePath(), newTargetPath ) ) {
- HbMessageBox::information( tr("Rename failed!") );
+ HbMessageBox::information( hbTrId("Rename failed!") );
}
break;
- }
-
-
+ }
}
--- a/filemanager/src/filemanager/src/fmfilebrowsewidget.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfilebrowsewidget.h Mon May 03 12:24:39 2010 +0300
@@ -34,6 +34,7 @@
class HbTreeView;
class HbAbstractViewItem;
class HbSearchPanel;
+class HbLabel;
class FmFileBrowseWidget : public HbWidget
{
@@ -43,7 +44,8 @@
enum Style {
NoStyle,
ListStyle,
- TreeStyle
+ TreeStyle,
+ LabelStyle
};
enum TSortType{
@@ -67,6 +69,7 @@
bool rename( const QString &oldName, const QString &newName );
void setModelFilter( QDir::Filters filters );
+ bool checkPathAndSetStyle( const QString& path );
void refreshModel( const QString& path );
void sortFiles( TSortType sortType );
void activeSearchPanel();
@@ -82,6 +85,8 @@
signals:
void currentPathChanged( QString& );
void startSearch( const QString &targetPath, const QString &criteria );
+ void setEmptyMenu( bool isMenuEmpty );
+ void setTitle( const QString &title );
private slots:
void on_list_activated( const QModelIndex &index );
@@ -102,6 +107,7 @@
void initFileModel();
void initLayout();
void initSearchPanel();
+ void initEmptyTipsLabel();
void changeRootIndex( const QModelIndex &index );
bool isDriver(const QModelIndex &index) const;
@@ -113,13 +119,20 @@
QDirModel *mModel;
bool mSelectable;
+
+ //currentStyle
Style mStyle;
+ //used to store orignal tree/list style
+ Style mFileBrowseStyle;
HbAbstractViewItem* mCurrentItem;
FmOperationService *mOperationService;
QString mFindTargetPath;
- HbSearchPanel* mSearchPanel;
+ HbSearchPanel *mSearchPanel;
+ HbLabel *mEmptyTipLabel;
+
+ QString mCurrentDrive;
};
#endif
--- a/filemanager/src/filemanager/src/fmfileview.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfileview.cpp Mon May 03 12:24:39 2010 +0300
@@ -37,14 +37,10 @@
#include <hbmessagebox.h>
#include <hbpushbutton.h>
#include <hbmainwindow.h>
-#include <hbinputdialog.h>
-#include <hbprogressnote.h>
-
-
FmFileView::FmFileView() : FmViewBase( EFileView ), mWidget( 0 ),
mUpButton( 0 ), mStyleAction( 0 ), mSelectableAction( 0 ),
- mFindAction( 0 ), mOperationService( 0 )
+ mFindAction( 0 ), mOperationService( 0 ), mMenu( 0 )
{
mOperationService = FmViewManager::viewManager()->operationService();
initMenu();
@@ -66,26 +62,28 @@
}
mWidget->setRootPath( pathName );
QString driveName = FmUtils::getDriveNameFromPath( pathName );
+ /*
FmDriverInfo driverInfo = FmUtils::queryDriverInfo( driveName );
- QString volumeName = driverInfo.volumeName();
+ QString volumeName = driverInfo.volumeName();
if( volumeName.isEmpty() ){
- quint32 driveState = FmUtils::getDriverState( driveName );
+ FmDriverInfo::DriveState driveState = FmUtils::queryDriverInfo( driveName ).driveState();
if( !( driveState & FmDriverInfo::EDriveNotPresent ) ){
if( driveState & FmDriverInfo::EDriveRemovable ) {
if( driveState & FmDriverInfo::EDriveMassStorage ) {
- volumeName.append( tr( "Mass Storage" ) );
+ volumeName.append( hbTrId( "Mass Storage" ) );
}
else{
- volumeName.append( tr( "Memory Card" ) );
+ volumeName.append( hbTrId( "Memory Card" ) );
}
}
else{
- volumeName.append( tr( "Phone Memory" ) );
+ volumeName.append( hbTrId( "Phone Memory" ) );
}
}
}
-
- QString titleText = FmUtils::removePathSplash( driverInfo.name() ) + ' ' + volumeName;
+ */
+ //QString titleText = FmUtils::removePathSplash( driverInfo.name() ) + ' ' + volumeName;
+ QString titleText( FmUtils::fillDriveVolume( driveName, true ) );
setTitle( titleText );
}
@@ -107,7 +105,7 @@
#ifdef FM_CHANGE_ORIENT_ENABLE
action = new HbAction( this );
action->setObjectName( "rotateAction" );
- action->setText( tr( "Change orientation" ) );
+ action->setText( hbTrId( "Change orientation" ) );
menu()->addAction( action );
#endif
@@ -121,39 +119,43 @@
action = new HbAction( this );
action->setObjectName( "delete" );
- action->setText( tr( "delete" ) );
+ action->setText( hbTrId( "txt_fmgr_menu_delete" ) );
menu()->addAction( action );
action = new HbAction( this );
action->setObjectName( "copy" );
- action->setText( tr( "copy to" ) );
+ action->setText( hbTrId( "txt_fmgr_menu_copy" ) );
menu()->addAction( action );
action = new HbAction( this );
action->setObjectName( "move" );
- action->setText( tr( "move to" ) );
+ action->setText( hbTrId( "txt_fmgr_menu_move" ) );
menu()->addAction( action );
+ action = new HbAction( this );
+ action->setObjectName( "newFolder" );
+ action->setText( hbTrId( "New Folder" ) );
+ menu()->addAction( action );
- HbMenu *subMenu = new HbMenu( "Sort" );
+ HbMenu *subMenu = new HbMenu( hbTrId( "Sort" ) );
HbAction *sortNameAction = new HbAction( subMenu );
sortNameAction->setObjectName( "sortNameAction" );
- sortNameAction->setText( tr( "Sort by name" ) );
+ sortNameAction->setText( hbTrId( "Sort by name" ) );
subMenu->addAction( sortNameAction );
HbAction *sortTimeAction = new HbAction( subMenu );
sortTimeAction->setObjectName( "sortTimeAction" );
- sortTimeAction->setText( tr( "Sort by time" ) );
+ sortTimeAction->setText( hbTrId( "Sort by time" ) );
subMenu->addAction( sortTimeAction );
HbAction *sortSizeAction = new HbAction( subMenu );
sortSizeAction->setObjectName( "sortSizeAction" );
- sortSizeAction->setText( tr( "Sort by size" ) );
+ sortSizeAction->setText( hbTrId( "Sort by size" ) );
subMenu->addAction( sortSizeAction );
HbAction* sortTypeAction = new HbAction( subMenu );
sortTypeAction->setObjectName( "sortTypeAction" );
- sortTypeAction->setText( tr( "Sort by type" ) );
+ sortTypeAction->setText( hbTrId( "Sort by type" ) );
subMenu->addAction( sortTypeAction );
menu()->addMenu( subMenu );
@@ -166,6 +168,8 @@
this, SLOT( on_sortSizeAction_triggered() ) );
connect( sortTypeAction, SIGNAL( triggered() ),
this, SLOT( on_sortTypeAction_triggered() ) );
+
+ mMenu = takeMenu();
}
void FmFileView::initMainWidget()
@@ -174,6 +178,7 @@
vLayout->setOrientation( Qt::Vertical );
mWidget = new FmFileBrowseWidget( this );
+ mWidget->setObjectName( "mainWidget" );
setStyle( FmFileBrowseWidget::ListStyle );
setSelectable( false );
@@ -185,13 +190,18 @@
connect( mWidget, SIGNAL( startSearch( const QString&, const QString& ) ),
this, SLOT( startSearch( const QString&, const QString& ) ) );
+ connect( mWidget, SIGNAL( setEmptyMenu( bool ) ),
+ this, SLOT( on_mainWidget_setEmptyMenu( bool ) ) );
+ connect( mWidget, SIGNAL( setTitle( const QString & ) ),
+ this, SLOT( on_mainWidget_setTitle( const QString & ) ) );
}
void FmFileView::initToolBar()
{
+ toolBar()->clearActions();
mFindAction = new HbAction( this );
mFindAction->setObjectName( "leftAction" );
- mFindAction->setText( tr("find") );
+ mFindAction->setText( hbTrId("txt_fmgr_opt_find") );
toolBar()->addAction( mFindAction );
mToolBarRightAction = new HbAction( this );
@@ -200,14 +210,21 @@
toolBar()->addAction( mToolBarRightAction );
toolBar()->setOrientation( Qt::Horizontal );
+
+ //mToolBar = takeToolBar();
+ connect( mFindAction, SIGNAL( triggered() ),
+ this, SLOT( on_leftAction_triggered() ) );
+ connect( mToolBarRightAction, SIGNAL( triggered() ),
+ this, SLOT( on_rightAction_triggered() ) );
+
}
void FmFileView::setStyle( FmFileBrowseWidget::Style style )
{
if ( style == FmFileBrowseWidget::ListStyle ) {
- mStyleAction->setText( tr("Tree") );
+ mStyleAction->setText( hbTrId("Tree") );
} else if ( style == FmFileBrowseWidget::TreeStyle ) {
- mStyleAction->setText( tr("List") );
+ mStyleAction->setText( hbTrId("List") );
}
mWidget->setStyle( style );
@@ -216,9 +233,9 @@
void FmFileView::setSelectable( bool enable )
{
if (enable) {
- mSelectableAction->setText( tr("No Select") );
+ mSelectableAction->setText( hbTrId("No Select") );
} else {
- mSelectableAction->setText( tr("Select") );
+ mSelectableAction->setText( hbTrId("Select") );
}
mWidget->setSelectable( enable );
@@ -273,13 +290,13 @@
break;
case FmErrAlreadyStarted:
// last operation have not finished
- HbMessageBox::information( tr( "Operatin already started!" ) );
+ HbMessageBox::information( hbTrId( "Operatin already started!" ) );
break;
case FmErrWrongParam:
- HbMessageBox::information( tr( "Wrong parameters!" ) );
+ HbMessageBox::information( hbTrId( "Wrong parameters!" ) );
break;
default:
- HbMessageBox::information( tr( "Operation fail to start!" ) );
+ HbMessageBox::information( hbTrId( "Operation fail to start!" ) );
}
setSelectable( false );
}
@@ -294,7 +311,7 @@
if (files.size() == 0) {
infoNoFileSelected();
} else {
- QString targetPathName = FmFileDialog::getExistingDirectory( 0, tr( "copy to" ),
+ QString targetPathName = FmFileDialog::getExistingDirectory( 0, hbTrId( "copy to" ),
QString(""), QStringList() );
if( !targetPathName.isEmpty() && files.size() > 0 ) {
targetPathName = FmUtils::fillPathWithSplash( targetPathName );
@@ -311,13 +328,13 @@
break;
case FmErrAlreadyStarted:
// last operation have not finished
- HbMessageBox::information( tr( "Operatin already started!" ) );
+ HbMessageBox::information( hbTrId( "Operatin already started!" ) );
break;
case FmErrWrongParam:
- HbMessageBox::information( tr( "Wrong parameters!" ) );
+ HbMessageBox::information( hbTrId( "Wrong parameters!" ) );
break;
default:
- HbMessageBox::information( tr( "Operation fail to start!" ) );
+ HbMessageBox::information( hbTrId( "Operation fail to start!" ) );
}
setSelectable( false );
}
@@ -362,6 +379,30 @@
}
}
+void FmFileView::on_newFolder_triggered()
+{
+ QString dirName;
+ QString path = FmUtils::fillPathWithSplash( mWidget->currentPath().absoluteFilePath() );
+ QDir dir( path );
+ if( dir.exists() ) {
+ while( FmDlgUtils::showTextQuery( hbTrId( "Enter name for " ), dirName, true ) ){
+ QString newTargetPath = FmUtils::fillPathWithSplash(
+ dir.absolutePath() ) + dirName;
+ QFileInfo newFileInfo( newTargetPath );
+ if( newFileInfo.exists() ) {
+ HbMessageBox::information( hbTrId( "%1 already exist!" ).arg( dirName ) );
+ continue;
+ }
+
+ if( !dir.mkdir( dirName ) ) {
+ HbMessageBox::information( hbTrId("Operation failed!") );
+ }
+ refreshModel( path );
+ break;
+ }
+
+ }
+}
void FmFileView::on_upAction_triggered()
{
mWidget->cdUp();
@@ -426,7 +467,29 @@
void FmFileView::removeToolBarAction()
{
- toolBar()->removeAction( mFindAction );
- toolBar()->removeAction( mToolBarRightAction );
+ toolBar()->clearActions();
}
+void FmFileView::on_mainWidget_setEmptyMenu( bool isMenuEmpty )
+{
+ if( isMenuEmpty ){
+ FmLogger::log( "setEmptyMenu true" );
+ if( !mMenu ) {
+ mMenu = takeMenu();
+ }
+ toolBar()->clearActions();
+ }
+ else {
+ FmLogger::log( "setEmptyMenu false" );
+ if( mMenu ) {
+ setMenu( mMenu );
+ mMenu = 0;
+ }
+ initToolBar();
+ }
+}
+
+void FmFileView::on_mainWidget_setTitle( const QString &title )
+{
+ this->setTitle( title );
+}
--- a/filemanager/src/filemanager/src/fmfileview.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfileview.h Mon May 03 12:24:39 2010 +0300
@@ -27,6 +27,7 @@
class HbLineEdit;
class HbPushButton;
+class HbMenu;
class FmOperationService;
class FmFileView : public FmViewBase
@@ -54,6 +55,7 @@
void on_delete_triggered();
void on_copy_triggered();
void on_move_triggered();
+ void on_newFolder_triggered();
void on_upAction_triggered();
void on_leftAction_triggered();
void on_rightAction_triggered();
@@ -63,6 +65,8 @@
void on_sortTypeAction_triggered();
void startSearch( const QString &targetPath, const QString &criteria );
+ void on_mainWidget_setEmptyMenu( bool isMenuEmpty );
+ void on_mainWidget_setTitle( const QString &title );
#ifdef FM_CHANGE_ORIENT_ENABLE
void on_rotateAction_triggered();
@@ -90,6 +94,7 @@
FmOperationService *mOperationService;
HbAction *mToolBarRightAction;
+ HbMenu *mMenu;
};
#endif
--- a/filemanager/src/filemanager/src/fmfindresultmodel.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfindresultmodel.cpp Mon May 03 12:24:39 2010 +0300
@@ -26,7 +26,8 @@
: QAbstractListModel( parent )
{
init();
- QMetaObject::connectSlotsByName( this );
+ connect( mFindThread, SIGNAL(finished()), this, SIGNAL(finished()) );
+ connect( mFindThread, SIGNAL(found(int)), this, SLOT(on_findThread_found( int) ), Qt::BlockingQueuedConnection );
}
FmFindResultModel::~FmFindResultModel()
@@ -187,6 +188,7 @@
void FmFindResultModel::on_findThread_found( int count )
{
+ int size = mFindResult.size();
insertRows( mFindResult.size() - count, count );
emit modelCountChanged( mFindResult.size() );
}
@@ -201,9 +203,6 @@
{
mFindThread = new FmFindThread( &mFindResult, this );
mFindThread->setObjectName( "findThread" );
-
- connect( mFindThread, SIGNAL(finished()), this, SIGNAL(finished()) );
-
mIconProvider = new QFileIconProvider();
}
@@ -235,29 +234,37 @@
{
QFileInfo info1( s1 );
QFileInfo info2( s2 );
-
- return info1.suffix().toLower() < info2.suffix().toLower();
+
+ if( info1.isDir() != info2.isDir() ){
+ return info1.isDir();
+ }
+ else{
+ return info1.suffix().toLower() < info2.suffix().toLower();
+ }
}
void FmFindResultModel::sort ( int column, Qt::SortOrder order )
{
Q_UNUSED( order );
+
+// emit layoutAboutToBeChanged();
switch( ( SortFlag )column )
{
case Name:
- qSort(mFindResult.begin(), mFindResult.end(), caseNameLessThan);
+ qSort( mFindResult.begin(), mFindResult.end(), caseNameLessThan );
break;
case Time:
- qSort(mFindResult.begin(), mFindResult.end(), caseTimeLessThan);
+ qSort( mFindResult.begin(), mFindResult.end(), caseTimeLessThan );
break;
case Size:
- qSort(mFindResult.begin(), mFindResult.end(), caseSizeLessThan);
+ qSort( mFindResult.begin(), mFindResult.end(), caseSizeLessThan );
break;
case Type:
- qSort(mFindResult.begin(), mFindResult.end(), caseTypeLessThan);
+ qSort( mFindResult.begin(), mFindResult.end(), caseTypeLessThan );
break;
}
- emit layoutChanged();
+// emit layoutChanged();
+ emit refresh();
}
--- a/filemanager/src/filemanager/src/fmfindresultmodel.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfindresultmodel.h Mon May 03 12:24:39 2010 +0300
@@ -79,6 +79,7 @@
// pass modelCountChanged signal to parent widget
// so parent widget could change contentWiget between emptyTipsWidget and listWidget
void modelCountChanged( int count );
+ void refresh();
private slots:
void on_findThread_found( int count );
--- a/filemanager/src/filemanager/src/fmfindview.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfindview.cpp Mon May 03 12:24:39 2010 +0300
@@ -21,12 +21,13 @@
#include "fmfindwidget.h"
#include "fmviewmanager.h"
-#include <hbprogressnote.h>
+#include <hbprogressdialog.h>
#include <hbaction.h>
#include <hbmenu.h>
FmFindView::FmFindView() : FmViewBase( EFindView ),
- mWaitNote( 0 )
+ mWaitNote( 0 ),
+ mMenu( 0 )
{
initMenu();
initMainWidget();
@@ -43,6 +44,7 @@
void FmFindView::activated( const QString& pathName )
{
+ FmLogger::log( QString( "activate path from findview:" ) + pathName );
FmViewManager::viewManager()->createFileView( pathName, true, true );
}
@@ -68,30 +70,37 @@
void FmFindView::initMenu()
{
- HbMenu *subMenu = new HbMenu( "Sort" );
+ HbAction *findAction = new HbAction( this );
+ findAction->setObjectName( "findAction" );
+ findAction->setText( hbTrId( "Find" ) );
+ menu()->addAction( findAction );
+
+ HbMenu *subMenu = new HbMenu( hbTrId( "Sort" ) );
HbAction *sortNameAction = new HbAction( subMenu );
sortNameAction->setObjectName( "sortNameAction" );
- sortNameAction->setText( tr( "Sort by name" ) );
+ sortNameAction->setText( hbTrId( "Sort by name" ) );
subMenu->addAction( sortNameAction );
HbAction *sortTimeAction = new HbAction( subMenu );
sortTimeAction->setObjectName( "sortTimeAction" );
- sortTimeAction->setText( tr( "Sort by time" ) );
+ sortTimeAction->setText( hbTrId( "Sort by time" ) );
subMenu->addAction( sortTimeAction );
HbAction *sortSizeAction = new HbAction( subMenu );
sortSizeAction->setObjectName( "sortSizeAction" );
- sortSizeAction->setText( tr( "Sort by size" ) );
+ sortSizeAction->setText( hbTrId( "Sort by size" ) );
subMenu->addAction( sortSizeAction );
HbAction *sortTypeAction = new HbAction( subMenu );
sortTypeAction->setObjectName( "sortTypeAction" );
- sortTypeAction->setText( tr( "Sort by type" ) );
+ sortTypeAction->setText( hbTrId( "Sort by type" ) );
subMenu->addAction( sortTypeAction );
menu()->addMenu( subMenu );
+ connect( findAction, SIGNAL( triggered() ),
+ this, SLOT( on_findAction_triggered() ) );
connect( sortNameAction, SIGNAL( triggered() ),
this, SLOT( on_sortNameAction_triggered() ) );
connect( sortTimeAction, SIGNAL( triggered() ),
@@ -100,6 +109,8 @@
this, SLOT( on_sortSizeAction_triggered() ) );
connect( sortTypeAction, SIGNAL( triggered() ),
this, SLOT( on_sortTypeAction_triggered() ) );
+
+ mMenu = takeMenu();
}
void FmFindView::initMainWidget()
@@ -109,13 +120,15 @@
setWidget( mFindWidget );
if( !mWaitNote ){
- mWaitNote = new HbProgressNote( HbProgressNote::WaitNote );
- mWaitNote->setText( tr( "Finding..." ) );
+ mWaitNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
+ mWaitNote->setText( hbTrId( "Finding..." ) );
}
connect( mWaitNote, SIGNAL(cancelled()), this, SLOT(stopFind()) );
connect( mFindWidget, SIGNAL(activated( const QString&)), this, SLOT( activated(const QString&)) );
connect( mFindWidget, SIGNAL( startSearch( const QString&, const QString& ) ),
this, SLOT( startSearch( const QString&, const QString& ) ) );
+ connect( mFindWidget, SIGNAL( setEmptyMenu( bool ) ),
+ this, SLOT( on_findWidget_setEmptyMenu( bool ) ) );
}
void FmFindView::initToolBar()
@@ -148,3 +161,23 @@
find( criteria, targetPath );
}
}
+
+void FmFindView::on_findAction_triggered()
+{
+ mFindWidget->activeSearchPanel();
+}
+
+void FmFindView::on_findWidget_setEmptyMenu( bool isMenuEmpty )
+{
+ if( isMenuEmpty ){
+ if( !mMenu ) {
+ mMenu = takeMenu();
+ }
+ }
+ else{
+ if( mMenu ) {
+ setMenu( mMenu );
+ mMenu = 0;
+ }
+ }
+}
--- a/filemanager/src/filemanager/src/fmfindview.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfindview.h Mon May 03 12:24:39 2010 +0300
@@ -23,7 +23,8 @@
#include "fmcommon.h"
#include "fmviewbase.h"
-class HbProgressNote;
+class HbProgressDialog;
+class HbMenu;
class FmFindWidget;
class FmFindView : public FmViewBase
@@ -41,6 +42,7 @@
private slots:
void findFinished();
+ void on_findAction_triggered();
void on_sortNameAction_triggered();
void on_sortTimeAction_triggered();
void on_sortSizeAction_triggered();
@@ -48,13 +50,16 @@
void startSearch( const QString &targetPath, const QString &criteria );
+ void on_findWidget_setEmptyMenu( bool isMenuEmpty );
+
private:
void initMenu();
void initMainWidget();
void initToolBar();
FmFindWidget *mFindWidget;
- HbProgressNote *mWaitNote;
+ HbProgressDialog *mWaitNote;
+ HbMenu *mMenu;
};
#endif
--- a/filemanager/src/filemanager/src/fmfindwidget.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfindwidget.cpp Mon May 03 12:24:39 2010 +0300
@@ -61,6 +61,7 @@
QRegExp regExp( '*' + keyword + '*' );
regExp.setPatternSyntax( QRegExp::Wildcard );
+ regExp.setCaseSensitivity( Qt::CaseInsensitive );
mModel->setPattern( regExp );
mModel->find();
@@ -74,6 +75,8 @@
void FmFindWidget::on_resultModel_finished()
{
emit finished();
+ //Since layout problem is found, refresh it
+ on_resultModel_refresh();
}
void FmFindWidget::on_resultModel_modelCountChanged( int count )
@@ -102,6 +105,7 @@
mListView->hide();
mEmptyTipWidget->show();
deActiveSearchPanel();
+ emit setEmptyMenu( true );
}
break;
case ResultListView:
@@ -117,6 +121,7 @@
mEmptyTipWidget->hide();
mListView->show();
activeSearchPanel();
+ emit setEmptyMenu( false );
}
break;
}
@@ -134,13 +139,16 @@
connect( mModel, SIGNAL( modelCountChanged( int )),
this, SLOT( on_resultModel_modelCountChanged( int )) );
+
+ connect( mModel, SIGNAL( refresh()),
+ this, SLOT( on_resultModel_refresh()) );
mListView = new HbListView( this );
mListView->setModel( mModel );
mEmptyTipWidget = new HbWidget( this );
QGraphicsLinearLayout *emptyTipLayout = new QGraphicsLinearLayout( mEmptyTipWidget );
- HbLabel *emptyTipLable = new HbLabel( tr( "No found files or folders" ), mEmptyTipWidget );
+ HbLabel *emptyTipLable = new HbLabel( hbTrId( "No found files or folders" ), mEmptyTipWidget );
emptyTipLayout->addItem( emptyTipLable );
initSearchPanel();
@@ -196,5 +204,11 @@
}
+void FmFindWidget::on_resultModel_refresh()
+{
+ mListView->setModel( 0 );
+ mListView->setModel( mModel );
+}
+
--- a/filemanager/src/filemanager/src/fmfindwidget.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfindwidget.h Mon May 03 12:24:39 2010 +0300
@@ -55,6 +55,7 @@
void activated( const QString &pathName );
void startSearch( const QString &targetPath, const QString &criteria );
+ void setEmptyMenu( bool isMenuEmpty );
private slots:
void itemActivated(const QModelIndex &index);
@@ -64,6 +65,7 @@
void on_resultModel_finished();
void on_resultModel_modelCountChanged( int count );
+ void on_resultModel_refresh();
private:
void init();
--- a/filemanager/src/filemanager/src/fmsplitview.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmsplitview.cpp Mon May 03 12:24:39 2010 +0300
@@ -59,13 +59,13 @@
#ifdef FM_CHANGE_ORIENT_ENABLE
action = new HbAction( this );
action->setObjectName( "rotateAction" );
- action->setText( tr( "Change orientation" ) );
+ action->setText( hbTrId( "Change orientation" ) );
menu()->addAction( action );
#endif
action = new HbAction( this );
action->setObjectName( "normalViewAction" );
- action->setText( tr( "Switch to normal view" ) );
+ action->setText( hbTrId( "Switch to normal view" ) );
menu()->addAction( action );
}
--- a/filemanager/src/filemanager/src/fmviewmanager.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmviewmanager.cpp Mon May 03 12:24:39 2010 +0300
@@ -33,9 +33,42 @@
#include <hbmessagebox.h>
#include <QFileSystemWatcher>
#include <QFileInfo>
+#include <hbdialog.h>
FmViewManager *FmViewManager::mViewManager = 0;
+
+FmDlgCloseUnit::FmDlgCloseUnit( HbDialog *dialog ) : mDialog( dialog )
+{
+}
+FmDlgCloseUnit::~FmDlgCloseUnit()
+{
+}
+
+void FmDlgCloseUnit::addAssociatedDrives( QString drives )
+{
+ for( int i = 0; i< drives.length(); ++i ) {
+ if( !mAssociatedDrives.contains( drives[i], Qt::CaseInsensitive ) ) {
+ mAssociatedDrives += drives[i];
+ }
+ }
+}
+void FmDlgCloseUnit::removeAssociatedDrives( QString drives )
+{
+ for( int i = 0; i < drives.length(); ++i ){
+ mAssociatedDrives.remove( drives[i], Qt::CaseInsensitive );
+ }
+}
+QString FmDlgCloseUnit::associatedDrives()
+{
+ return mAssociatedDrives;
+}
+
+HbDialog *FmDlgCloseUnit::dialog()
+{
+ return mDialog;
+}
+
FmViewManager::FmViewManager( FmMainWindow* mainWindow )
{
mMainWindow = mainWindow;
@@ -70,6 +103,7 @@
mDriveWatcher->cancelWatch();
delete mDriveWatcher;
mDriveWatcher = 0;
+
}
FmViewManager *FmViewManager::CreateViewManager( FmMainWindow* mainWindow )
@@ -141,12 +175,15 @@
QString absolutePath = fileInfo.absoluteFilePath();
QString checkedPath = FmUtils::checkDriveToFolderFilter( absolutePath );
-
- if( !FmUtils::isPathAccessabel( checkedPath ) ) {
- checkedPath.clear();
+ FmDriverInfo::DriveState driveState = FmUtils::queryDriverInfo( path ).driveState();
+ if( driveState & FmDriverInfo::EDriveAvailable ) {
+ if( !FmUtils::isPathAccessabel( checkedPath ) ) {
+ checkedPath.clear();
+ }
}
+
if( checkedPath.isEmpty() ) {
- HbMessageBox::information( QString( tr("Path: %1 is unavailable!").arg( path )) );
+ HbMessageBox::information( QString( hbTrId("Path: %1 is unavailable!").arg( path )) );
return;
}
@@ -242,7 +279,23 @@
{
FmLogger::log( QString( "FmViewManager::on_driveWatcher_driveAddedOrChanged start" ) );
emit refreshModel( QString("") );
+ checkDlgCloseUnit();
FmLogger::log( QString( "FmViewManager::on_driveWatcher_driveAddedOrChanged end" ) );
}
+
+void FmViewManager::checkDlgCloseUnit()
+{
+ foreach( FmDlgCloseUnit* unit, mDlgCloseUnitList ) {
+ QString drives( unit->associatedDrives() );
+ for( int i = 0; i < drives.length(); i++ ) {
+ QString drive( drives[i] + QString( ":/" ) );
+ if( !FmUtils::isDriveAvailable( drive ) ) {
+ FmLogger::log( " close Dialog start " );
+ unit->dialog()->close();
+ FmLogger::log( " close Dialog end " );
+ }
+ }
+ }
+}
--- a/filemanager/src/filemanager/src/fmviewmanager.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/fmviewmanager.h Mon May 03 12:24:39 2010 +0300
@@ -20,6 +20,8 @@
#define FMVIEWMANAGER_H
#include <QObject>
+#include <QList>
+#include "fmcommon.h"
class FmMainWindow;
class HbView;
@@ -28,6 +30,23 @@
class FmOperationBase;
class QFileSystemWatcher;
class FmDriveWatcher;
+class HbDialog;
+
+class FmDlgCloseUnit
+{
+public:
+ FmDlgCloseUnit( HbDialog *dialog );
+ ~FmDlgCloseUnit();
+
+ void addAssociatedDrives( QString drives );
+ void removeAssociatedDrives( QString drives );
+ QString associatedDrives();
+ HbDialog *dialog();
+
+private:
+ HbDialog *mDialog;
+ QString mAssociatedDrives;
+};
class FmViewManager : public QObject
{
@@ -54,6 +73,18 @@
void addWatchPath( const QString &path );
void removeWatchPath( const QString &path );
+ // dialog close utils:
+ void addDlgCloseUnit( FmDlgCloseUnit* unit )
+ {
+ FmLogger::log( "FmViewManager::addDlgCloseUnit_" + unit->associatedDrives() );
+ mDlgCloseUnitList.append( unit );
+ }
+ void removeDlgCloseUnit( FmDlgCloseUnit* unit )
+ {
+ FmLogger::log( "FmViewManager::removeDlgCloseUnit_" + unit->associatedDrives() );
+ mDlgCloseUnitList.removeOne( unit );
+ }
+
protected:
explicit FmViewManager( FmMainWindow* mainWindow );
~FmViewManager();
@@ -73,6 +104,8 @@
// HbView *createView( FmViewType viewType );
// void adjustSecondarySoftKey();
+
+ void checkDlgCloseUnit();
private:
static FmViewManager *mViewManager;
@@ -82,6 +115,8 @@
FmOperationService *mOperationService;
QFileSystemWatcher *mFsWatcher;
FmDriveWatcher *mDriveWatcher;
+
+ QList<FmDlgCloseUnit*> mDlgCloseUnitList;
};
--- a/filemanager/src/filemanager/src/listviewitems.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/listviewitems.cpp Mon May 03 12:24:39 2010 +0300
@@ -79,8 +79,8 @@
FmDriverInfo driverInfo = FmUtils::queryDriverInfo( diskName );
mDiskNameLabel->setPlainText( displayString );
- mSizeLabel->setPlainText( tr ( "Size: " ) + FmUtils::formatStorageSize( driverInfo.size() ) );
- mFreeLabel->setPlainText( tr ( "Free: " ) + FmUtils::formatStorageSize( driverInfo.freeSize() ) );
+ mSizeLabel->setPlainText( hbTrId ( "Size: " ) + FmUtils::formatStorageSize( driverInfo.size() ) );
+ mFreeLabel->setPlainText( hbTrId ( "Free: " ) + FmUtils::formatStorageSize( driverInfo.freeSize() ) );
// mCheckBox->setCheckState( checkState() );
}
--- a/filemanager/src/filemanager/src/main.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/main.cpp Mon May 03 12:24:39 2010 +0300
@@ -38,11 +38,9 @@
translator.load( path + "filemanager_" + lang );
app.installTranslator(&translator);
-
FmMainWindow mw;
mw.show();
-
return app.exec();
}
--- a/filemanager/src/filemanager/src/operationservice/fmoperationbase.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationbase.cpp Mon May 03 12:24:39 2010 +0300
@@ -35,20 +35,20 @@
//FmOperationFormat
-FmOperationFormat::FmOperationFormat( QObject *parent, QString mDriverName ) : FmOperationBase( parent, FmOperationService::EOperationTypeFormat ),
- mDriverName( mDriverName )
-{
-}
-FmOperationFormat::~FmOperationFormat()
-{
-}
+//FmOperationFormat::FmOperationFormat( QObject *parent, QString mDriverName ) : FmOperationBase( parent, FmOperationService::EOperationTypeFormat ),
+// mDriverName( mDriverName )
+//{
+//}
+//FmOperationFormat::~FmOperationFormat()
+//{
+//}
+//
+//QString FmOperationFormat::driverName()
+//{
+// return mDriverName;
+//}
-QString FmOperationFormat::driverName()
-{
- return mDriverName;
-}
-
-//FmOperationFormat
+//FmOperationDriveDetails
FmOperationDriveDetails::FmOperationDriveDetails( QObject *parent, QString driverName ) :
FmOperationBase( parent, FmOperationService::EOperationTypeDriveDetails ),
mDriverName( driverName )
--- a/filemanager/src/filemanager/src/operationservice/fmoperationbase.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationbase.h Mon May 03 12:24:39 2010 +0300
@@ -37,15 +37,15 @@
};
-class FmOperationFormat : public FmOperationBase
-{
-public:
- explicit FmOperationFormat( QObject *parent, QString mDriverName );
- virtual ~FmOperationFormat();
- QString driverName();
-private:
- QString mDriverName;
-};
+//class FmOperationFormat : public FmOperationBase
+//{
+//public:
+// explicit FmOperationFormat( QObject *parent, QString mDriverName );
+// virtual ~FmOperationFormat();
+// QString driverName();
+//private:
+// QString mDriverName;
+//};
class FmOperationDriveDetails : public FmOperationBase
{
--- a/filemanager/src/filemanager/src/operationservice/fmoperationcopy.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationcopy.cpp Mon May 03 12:24:39 2010 +0300
@@ -80,15 +80,40 @@
return ret;
}
QString newName;
+ bool isAcceptReplace = false;
QFileInfo destFi( mTargetPath + fi.fileName() );
+
+ // while for duplicated file/dir
while( destFi.exists() ) {
- emit askForRename( destFi.absoluteFilePath(), &newName );
- if( newName.isEmpty() ) {
- ret = FmErrCancel;
- break;
+ if( destFi.isFile() && destFi.absoluteFilePath().compare( fi.absoluteFilePath(), Qt::CaseInsensitive ) != 0 ) {
+ emit askForReplace( destFi.absoluteFilePath(), fi.absoluteFilePath(), &isAcceptReplace );
+ if( isAcceptReplace ) {
+ //delete src file
+ if( !QFile::remove( destFi.absoluteFilePath() ) ) {
+ *mErrString = destFi.absoluteFilePath();
+ ret = FmErrCannotRemove;
+ break;
+ }
+ destFi.setFile( destFi.absoluteFilePath() );
+ } else {
+ emit askForRename( destFi.absoluteFilePath(), &newName );
+ if( newName.isEmpty() ) {
+ ret = FmErrCancel;
+ break;
+ }
+ QString targetName = mTargetPath + newName;
+ destFi.setFile( targetName );
+ }
+ } else{
+ // destination is dir
+ emit askForRename( destFi.absoluteFilePath(), &newName );
+ if( newName.isEmpty() ) {
+ ret = FmErrCancel;
+ break;
+ }
+ QString targetName = mTargetPath + newName;
+ destFi.setFile( targetName );
}
- QString targetName = mTargetPath + newName;
- destFi.setFile( targetName );
}
if( ret != FmErrNone ) {
return ret;
@@ -212,6 +237,9 @@
void FmOperationCopy::IncreaseProgress( quint64 size )
{
+ if( mTotalSize <=0 ) {
+ return;
+ }
mCopiedSize += size;
int step = ( mCopiedSize * 100 ) / mTotalSize;
if( step > mCurrentStep ) {
--- a/filemanager/src/filemanager/src/operationservice/fmoperationcopy.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationcopy.h Mon May 03 12:24:39 2010 +0300
@@ -35,6 +35,7 @@
signals:
void askForRename( const QString &srcFile, QString *destFile );
+ void askForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted );
void notifyPreparing( bool cancelable );
void notifyStart( bool cancelable, int maxSteps );
void notifyProgress( int currentStep );
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationformat.h Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* The header file of the operation param of file manager
+*
+*/
+
+#ifndef FMOPERATIONFORMAT_H
+#define FMOPERATIONFORMAT_H
+
+#include "fmoperationbase.h"
+
+#include <QObject>
+#include <QString>
+
+class FmOperationFormat : public FmOperationBase
+{
+ Q_OBJECT
+public:
+ explicit FmOperationFormat( QObject *parent, QString mDriverName );
+ virtual ~FmOperationFormat();
+ QString driverName();
+
+ int start();
+
+signals:
+ void notifyStart( bool cancelable, int maxSteps );
+ void notifyProgress( int currentStep );
+ void notifyPreparing( bool cancelable );
+
+private:
+ QString mDriverName;
+
+ int mTotalSteps;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationformat_s60.cpp Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,185 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "fmoperationformat.h"
+#include "fmcommon.h"
+#include "fmoperationbase.h"
+#include "fmutils.h"
+
+#include <QString>
+
+#include <f32file.h>
+#include <e32property.h>
+#include <coreapplicationuisdomainpskeys.h>
+
+FmOperationFormat::FmOperationFormat( QObject *parent, QString mDriverName ) : FmOperationBase( parent, FmOperationService::EOperationTypeFormat ),
+ mDriverName( mDriverName )
+{
+}
+FmOperationFormat::~FmOperationFormat()
+{
+}
+
+QString FmOperationFormat::driverName()
+{
+ return mDriverName;
+}
+
+int FmOperationFormat::start()
+{
+ QString logString = "FmOperationFormat::start";
+ FmLogger::log( logString );
+
+ emit notifyPreparing( false );
+
+ if( mDriverName.isEmpty() ) {
+ return FmErrWrongParam;
+ }
+
+ RFormat format;
+
+ RFs fs;
+ int err = fs.Connect();
+
+ if( err != KErrNone ){
+ return FmErrTypeFormatFailed;
+ }
+
+ TInt drive = 0;
+ drive = mDriverName[0].toUpper().toAscii() - 'A' + EDriveA;
+
+ TDriveName formatDriveName( TDriveUnit( drive ).Name() );
+
+ int finalValue = 0;
+
+ format.Close();
+
+ err = format.Open(
+ fs, formatDriveName, EFullFormat | ESpecialFormat, finalValue );
+
+ if( err == KErrNone ){
+ logString = "emit notifyStart";
+ FmLogger::log( logString );
+ mTotalSteps = finalValue;
+ emit notifyStart( false, finalValue );
+ }
+
+ logString = "Format open error:" + QString::number( err );
+ FmLogger::log( logString );
+
+ if( err == KErrLocked ){
+ err = fs.ErasePassword( drive );
+
+ logString = "ErasePassword error:" + QString::number( err );
+ FmLogger::log( logString );
+
+ if( err == KErrNone ){
+ err = format.Open(
+ fs, formatDriveName, EFullFormat, finalValue );
+
+ if( err == KErrNone ){
+ logString = "emit notifyStart";
+ FmLogger::log( logString );
+ mTotalSteps = finalValue;
+ emit notifyStart( false, finalValue );
+ }
+ logString = "Second format open error:" + QString::number( err );
+ FmLogger::log( logString );
+ }
+ }
+
+ if (err == KErrInUse){
+ TBool reallyFormat = ETrue;
+ if (reallyFormat){
+ err = format.Open(
+ fs, formatDriveName, EFullFormat | EForceFormat, finalValue );
+
+ if( err == KErrNone ){
+ logString = "emit notifyStart";
+ FmLogger::log( logString );
+ mTotalSteps = finalValue;
+ emit notifyStart( false, finalValue );
+ }
+
+ logString = "Reallyformat open error:" + QString::number( err );
+ FmLogger::log( logString );
+ }
+ }
+
+ TFullName fsName;
+ if ( err == KErrNone )
+ {
+ err = fs.FileSystemName( fsName, drive );
+
+ logString = "FileSystemName error:" + QString::number( err );
+ FmLogger::log( logString );
+
+ if ( err == KErrNone && fsName.Length() > 0 )
+ {
+ // Prevent SysAp shutting down applications
+ RProperty::Set(
+ KPSUidCoreApplicationUIs,
+ KCoreAppUIsMmcRemovedWithoutEject,
+ ECoreAppUIsEjectCommandUsed );
+
+ logString = "Prevent SysAp shutting down applications" ;
+ FmLogger::log( logString );
+ }
+ else
+ {
+ // Don't continue with format if there is no file system name
+ // or file system name could not be obtained.
+ err = KErrCancel;
+
+ logString = QString( "Format cancel" );
+ FmLogger::log( logString );
+ }
+ }
+
+ if( err == KErrNone && finalValue ){
+
+ while ( finalValue ){
+ logString = "Format tracks:" + QString::number( finalValue );
+ FmLogger::log( logString );
+ err = format.Next( finalValue );
+
+ if( err != KErrNone ){
+ logString = "Format error:" + QString::number( err );
+ FmLogger::log( logString );
+ break;
+ }
+
+ logString = "emit notifyProgress";
+ FmLogger::log( logString );
+ emit notifyProgress( mTotalSteps - finalValue );
+ }
+ }
+
+ if( !finalValue || err != KErrNone ){
+ format.Close();
+ fs.Close();
+
+ FmUtils::createDefaultFolders( mDriverName );
+ }
+
+ if( err == KErrNone ){
+ return FmErrNone;
+ }
+ else{
+ return FmErrTypeFormatFailed;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationformat_win.cpp Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "fmoperationformat.h"
+#include "fmcommon.h"
+#include "fmoperationbase.h"
+#include "fmutils.h"
+
+#include <QString>
+
+FmOperationFormat::FmOperationFormat( QObject *parent, QString mDriverName ) : FmOperationBase( parent, FmOperationService::EOperationTypeFormat ),
+ mDriverName( mDriverName )
+{
+}
+FmOperationFormat::~FmOperationFormat()
+{
+}
+
+QString FmOperationFormat::driverName()
+{
+ return mDriverName;
+}
+
+int FmOperationFormat::start()
+{
+ QString logString = "FmOperationFormat::start";
+ FmLogger::log( logString );
+
+ if( mDriverName.isEmpty() ) {
+ return FmErrWrongParam;
+ }
+ int totalCount( 100 );
+ emit notifyStart( totalCount, false );
+ for( int i = 0; i < totalCount; i++ ) {
+ emit notifyProgress( i );
+ }
+
+ return FmErrNone;
+
+}
--- a/filemanager/src/filemanager/src/operationservice/fmoperationmove.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationmove.cpp Mon May 03 12:24:39 2010 +0300
@@ -19,6 +19,7 @@
#include "fmcommon.h"
#include "fmoperationbase.h"
#include "fmdrivedetailstype.h"
+#include "fmutils.h"
#include <QDir>
#include <QFileInfo>
@@ -79,15 +80,39 @@
return ret;
}
QString newName;
+ bool isAcceptReplace = false;
QFileInfo destFi( mTargetPath + fi.fileName() );
+ // while for duplicated file/dir
while( destFi.exists() ) {
- emit askForRename( destFi.absoluteFilePath(), &newName );
- if( newName.isEmpty() ) {
- ret = FmErrCancel;
- break;
+ if( destFi.isFile() && destFi.absoluteFilePath().compare( fi.absoluteFilePath(), Qt::CaseInsensitive ) != 0 ) {
+ emit askForReplace( destFi.absoluteFilePath(), fi.absoluteFilePath(), &isAcceptReplace );
+ if( isAcceptReplace ) {
+ //delete src file
+ if( !QFile::remove( destFi.absoluteFilePath() ) ) {
+ *mErrString = destFi.absoluteFilePath();
+ ret = FmErrCannotRemove;
+ break;
+ }
+ destFi.setFile( destFi.absoluteFilePath() );
+ } else {
+ emit askForRename( destFi.absoluteFilePath(), &newName );
+ if( newName.isEmpty() ) {
+ ret = FmErrCancel;
+ break;
+ }
+ QString targetName = mTargetPath + newName;
+ destFi.setFile( targetName );
+ }
+ } else{
+ // destination is dir
+ emit askForRename( destFi.absoluteFilePath(), &newName );
+ if( newName.isEmpty() ) {
+ ret = FmErrCancel;
+ break;
+ }
+ QString targetName = mTargetPath + newName;
+ destFi.setFile( targetName );
}
- QString targetName = mTargetPath + newName;
- destFi.setFile( targetName );
}
if( ret != FmErrNone ) {
return ret;
@@ -132,7 +157,13 @@
}
IncreaseProgress( fileSize );
} else if (fi.isDir()) {
- ret = moveDirInsideContent( source, newName );
+ if( FmUtils::isDefaultFolder( source ) ){
+ ret = FmErrRemoveDefaultFolder;
+ }
+ else{
+ ret = moveDirInsideContent( source, newName );
+ }
+
if( ret!= FmErrNone ) {
return ret;
}
@@ -227,6 +258,9 @@
void FmOperationMove::IncreaseProgress( quint64 size )
{
+ if( mTotalSize <=0 ) {
+ return;
+ }
mMovedSize += size;
int step = ( mMovedSize * 100 ) / mTotalSize;
if( step > mCurrentStep ) {
--- a/filemanager/src/filemanager/src/operationservice/fmoperationmove.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationmove.h Mon May 03 12:24:39 2010 +0300
@@ -34,7 +34,7 @@
signals:
void askForRename( const QString &srcFile, QString *destFile );
-
+ void askForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted );
void notifyPreparing( bool cancelable );
void notifyStart( bool cancelable, int maxSteps );
void notifyProgress( int currentStep );
--- a/filemanager/src/filemanager/src/operationservice/fmoperationremove.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationremove.cpp Mon May 03 12:24:39 2010 +0300
@@ -19,6 +19,7 @@
#include "fmcommon.h"
#include "fmoperationbase.h"
#include "fmdrivedetailstype.h"
+#include "fmutils.h"
#include <QDir>
#include <QFileInfo>
@@ -93,7 +94,14 @@
}
IncreaseProgressOnce();
} else if (fi.isDir()) {
- ret = recursiveRemoveDir( fileName );
+ if( FmUtils::isDefaultFolder( fileName ) ){
+ ret = FmErrRemoveDefaultFolder;
+ }
+ else{
+ ret = recursiveRemoveDir( fileName );
+ }
+
+
} else {
qWarning( "Things other than file and directory are not copied" );
ret = FmErrIsNotFileOrFolder;
@@ -147,6 +155,8 @@
void FmOperationRemove::IncreaseProgressOnce()
{
+ if( mTotalCount <= 0 )
+ return;
mRemovedCount++;
int step = ( mRemovedCount * 100 ) / mTotalCount;
if( step > mCurrentStep ) {
--- a/filemanager/src/filemanager/src/operationservice/fmoperationresultprocesser.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationresultprocesser.cpp Mon May 03 12:24:39 2010 +0300
@@ -17,10 +17,12 @@
#include "fmoperationresultprocesser.h"
#include "fmoperationbase.h"
#include "fmoperationservice.h"
+#include "fmoperationformat.h"
#include "fmviewdetailsdialog.h"
#include "fmdlgutils.h"
+#include "fmutils.h"
-#include <hbprogressnote.h>
+#include <hbprogressdialog.h>
#include <hbaction.h>
#include <hbmessagebox.h>
@@ -41,27 +43,42 @@
QString questionText = QString( "file " ) +
srcFile + QString( " already exist, please rename:" );
QString value;
- FmDlgUtils::showTextQuery( questionText, value );
+ FmDlgUtils::showTextQuery( questionText, value, true );
*destFile = value;
}
+void FmOperationResultProcesser::onAskForReplace(
+ FmOperationBase* operationBase, const QString &srcFile, const QString &destFile, bool *isAccepted )
+{
+ Q_UNUSED( operationBase );
+ Q_UNUSED( destFile );
+
+ QString questionText = QString( "file " ) +
+ srcFile + QString( " already exist, replace it?" );
+ if( HbMessageBox::question( questionText ) ) {
+ *isAccepted = true;
+ } else {
+ *isAccepted = false;
+ }
+}
+
void FmOperationResultProcesser::onNotifyWaiting( FmOperationBase* operationBase, bool cancelable )
{
QString title = tr("Operation");
switch( operationBase->operationType() )
{
case FmOperationService::EOperationTypeBackup:
- title = tr("backuping");
+ title = hbTrId("backuping");
break;
case FmOperationService::EOperationTypeRestore:
- title = tr("restoring");
+ title = hbTrId("restoring");
break;
case FmOperationService::EOperationTypeDriveDetails:
- title = tr( "Scaning memory..." );
+ title = hbTrId( "Scaning memory..." );
break;
case FmOperationService::EOperationTypeFolderDetails:
- title = tr( "Scaning folder..." );
+ title = hbTrId( "Scaning folder..." );
break;
default:
break;
@@ -72,23 +89,26 @@
void FmOperationResultProcesser::onNotifyPreparing( FmOperationBase* operationBase, bool cancelable )
{
- QString title = tr("Operation");
+ QString title = hbTrId("Operation");
switch( operationBase->operationType() )
{
case FmOperationService::EOperationTypeBackup:
- title = tr("backup preparing");
+ title = hbTrId("backup preparing");
break;
case FmOperationService::EOperationTypeRestore:
- title = tr("restore preparing");
+ title = hbTrId("restore preparing");
break;
case FmOperationService::EOperationTypeCopy:
- title = tr("copy preparing");
+ title = hbTrId("copy preparing");
break;
case FmOperationService::EOperationTypeMove:
- title = tr("move preparing");
+ title = hbTrId("move preparing");
break;
case FmOperationService::EOperationTypeRemove:
- title = tr("delete preparing");
+ title = hbTrId("delete preparing");
+ break;
+ case FmOperationService::EOperationTypeFormat:
+ title = hbTrId("format preparing");
break;
default:
break;
@@ -103,19 +123,22 @@
switch( operationBase->operationType() )
{
case FmOperationService::EOperationTypeBackup:
- title = tr("backup...");
+ title = hbTrId("backup...");
break;
case FmOperationService::EOperationTypeRestore:
- title = tr("restore...");
+ title = hbTrId("restore...");
break;
case FmOperationService::EOperationTypeCopy:
- title = tr("copy...");
+ title = hbTrId("copy...");
break;
case FmOperationService::EOperationTypeMove:
- title = tr("move...");
+ title = hbTrId("move...");
break;
case FmOperationService::EOperationTypeRemove:
- title = tr("delete...");
+ title = hbTrId("delete...");
+ break;
+ case FmOperationService::EOperationTypeFormat:
+ title = hbTrId("formating...");
break;
default:
break;
@@ -140,7 +163,8 @@
{
FmOperationDriveDetails *paramDriveDetails = static_cast<FmOperationDriveDetails*>( operationBase );
QString diskName = paramDriveDetails->driverName();
- FmViewDetailsDialog::showDriveViewDetailsDialog( diskName, paramDriveDetails->detailsSizeList() );
+ FmViewDetailsDialog::showDriveViewDetailsDialog( diskName, paramDriveDetails->detailsSizeList(),
+ FmUtils::getDriveLetterFromPath( diskName ) );
break;
}
case FmOperationService::EOperationTypeFolderDetails:
@@ -149,26 +173,44 @@
FmViewDetailsDialog::showFolderViewDetailsDialog( paramFolderDetails->folderPath(),
paramFolderDetails->numofSubFolders(),
paramFolderDetails->numofFiles(),
- paramFolderDetails->sizeofFolder() );
+ paramFolderDetails->sizeofFolder(),
+ FmUtils::getDriveLetterFromPath( paramFolderDetails->folderPath() ) );
break;
}
case FmOperationService::EOperationTypeFormat:
{
- HbMessageBox::information( QString( tr("Format succeed!")) );
+ HbMessageBox::information( QString( hbTrId("Format succeed!")) );
+ FmOperationFormat *paramFormat = static_cast<FmOperationFormat*>( operationBase );
+ QString title( tr( "Drive name ") );
+ QString driveName( paramFormat->driverName() );
+ QString volumeName;
+ while( FmDlgUtils::showTextQuery( title, volumeName, false, FmMaxLengthofDriveName ) ){
+ int err = FmUtils::renameDrive( driveName, volumeName );
+ if ( err == FmErrNone ){
+ HbMessageBox::information( hbTrId( "The name has been changed!" ) );
+ mOperationService->on_operationThread_refreshModel( driveName );
+ break;
+ } else if( err == FmErrBadName ) {
+ HbMessageBox::information( hbTrId( "Illegal characters! Use only letters and numbers." ) );
+ } else{
+ HbMessageBox::information( hbTrId( "Error occurred, operation cancelled!" ) );
+ break;
+ }
+ }
break;
}
case FmOperationService::EOperationTypeBackup:
{
- HbMessageBox::information( QString( tr("Backup succeed!")) );
+ HbMessageBox::information( QString( hbTrId("Backup succeed!")) );
break;
}
case FmOperationService::EOperationTypeRestore:
{
- HbMessageBox::information( QString( tr("Restore succeed!")) );
+ HbMessageBox::information( QString( hbTrId("Restore succeed!")) );
break;
}
default:
- HbMessageBox::information( QString( tr("Operation finished")) );
+ HbMessageBox::information( QString( hbTrId("Operation finished")) );
}
}
@@ -178,28 +220,54 @@
failAndCloseProgress();
switch( error )
{
- case FmErrAlreadyStarted:
- HbMessageBox::information( QString( tr("Operation already started!")) );
- return;
- case FmErrDiskFull:
- HbMessageBox::information( QString( tr("Not enough space. Operation cancelled.!")) );
- return;
- case FmErrCopyDestToSubFolderInSrc:
- HbMessageBox::information( QString( tr("Can not copy to sub folder!")) );
- return;
- case FmErrMoveDestToSubFolderInSrc:
- HbMessageBox::information( QString( tr("Can not move to sub folder!")) );
- return;
+ case FmErrAlreadyStarted:
+ HbMessageBox::information( QString( hbTrId("Operation already started!")) );
+ return;
+ case FmErrDiskFull:
+ HbMessageBox::information( QString( hbTrId("Not enough space. Operation cancelled.!")) );
+ return;
+ case FmErrCopyDestToSubFolderInSrc:
+ HbMessageBox::information( QString( hbTrId("Can not copy to sub folder!")) );
+ return;
+ case FmErrMoveDestToSubFolderInSrc:
+ HbMessageBox::information( QString( hbTrId("Can not move to sub folder!")) );
+ return;
+ case FmErrCannotRemove:{
+ if( operationBase->operationType() == FmOperationService::EOperationTypeCopy ) {
+ // when copy a file/dir to same name destination, and delete dest fail, this error will occur
+ HbMessageBox::information( QString( hbTrId( "Can not copy because %1 can not be deleted!" ).arg( errString ) ) );
+ return;
+ }
+ else if( operationBase->operationType() == FmOperationService::EOperationTypeMove ) {
+ // when move a file/dir to same name destination, and delete dest fail, this error will occur
+ HbMessageBox::information( QString( hbTrId( "Can not move because %1 can not be deleted!" ).arg( errString ) ) );
+ return;
+ }
+ // when delete file/dir fail, this error will occur
+ HbMessageBox::information( QString( hbTrId( "Can not delete %1!" ).arg( errString ) ) );
+ return;
+ }
+ case FmErrRemoveDefaultFolder:{
+ if( operationBase->operationType() == FmOperationService::EOperationTypeMove ) {
+ // when move a default folder
+ HbMessageBox::information( QString( hbTrId( "Could not move because the default folder %1 can not be deleted!" ).arg( errString ) ) );
+ return;
+ }
+ else {
+ // when delete the default folder
+ HbMessageBox::information( QString( hbTrId( "Could not remove the default folder %1 " ).arg( errString ) ) );
+ return;
+ }
+ }
}
-
switch( operationBase->operationType() )
{
case FmOperationService::EOperationTypeFormat:
- HbMessageBox::information( QString( tr("Format failed!")) );
+ HbMessageBox::information( QString( hbTrId("Format failed!")) );
break;
default:
- HbMessageBox::information( QString( tr("Operation failed")) );
+ HbMessageBox::information( QString( hbTrId("Operation failed")) );
}
}
@@ -208,7 +276,7 @@
{
Q_UNUSED( operationBase );
cancelProgress();
- HbMessageBox::information( QString( tr("Operation Canceled!") ) );
+ HbMessageBox::information( QString( hbTrId("Operation Canceled!") ) );
}
@@ -227,13 +295,13 @@
delete mNote;
}
- mNote = new HbProgressNote( HbProgressNote::WaitNote );
+ mNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
connect( mNote, SIGNAL( cancelled() ), this, SLOT(onProgressCancelled() ) );
// if( !mNote ) {
-// mNote = new HbProgressNote( HbProgressNote::WaitNote );
+// mNote = new HbProgressDialog( HbProgressDialog::WaitNote );
// connect( mNote, SIGNAL( cancelled() ), this, SLOT(onProgressCancelled() ) );
// } else {
-// mNote->setProgressNoteType( HbProgressNote::WaitNote );
+// mNote->setProgressDialogType( HbProgressDialog::WaitNote );
// }
mNote->setText( title );
if( !cancelable )
@@ -253,22 +321,24 @@
delete mNote;
}
- mNote = new HbProgressNote( HbProgressNote::ProgressNote );
+ mNote = new HbProgressDialog( HbProgressDialog::ProgressDialog );
connect( mNote, SIGNAL( cancelled() ), this, SLOT(onProgressCancelled() ) );
// if( !mNote ) {
-// mNote = new HbProgressNote( HbProgressNote::ProgressNote );
+// mNote = new HbProgressDialog( HbProgressDialog::ProgressDialog );
// connect( mNote, SIGNAL( cancelled() ), this, SLOT(onProgressCancelled() ) );
// } else {
-// mNote->setProgressNoteType( HbProgressNote::ProgressNote );
+// mNote->setProgressDialogType( HbProgressDialog::ProgressDialog );
// }
mNote->setMinimum(0);
mNote->setMaximum( 65535 );
mNote->setProgressValue( 0 );
mNote->setText( title );
- if( !cancelable )
- mNote->primaryAction()->setDisabled( true );
- else
- mNote->primaryAction()->setDisabled( false );
+ if( !cancelable ){
+ mNote->primaryAction()->setDisabled( true );
+ }
+ else{
+ mNote->primaryAction()->setDisabled( false );
+ }
mNote->exec();
}
@@ -281,13 +351,13 @@
delete mNote;
}
- mNote = new HbProgressNote( HbProgressNote::ProgressNote );
+ mNote = new HbProgressDialog( HbProgressDialog::ProgressDialog );
connect( mNote, SIGNAL( cancelled() ), this, SLOT(onProgressCancelled() ) );
// if( !mNote ) {
-// mNote = new HbProgressNote( HbProgressNote::ProgressNote );
+// mNote = new HbProgressDialog( HbProgressDialog::ProgressDialog );
// connect( mNote, SIGNAL( cancelled() ), this, SLOT(onProgressCancelled() ) );
// } else {
-// mNote->setProgressNoteType( HbProgressNote::ProgressNote );
+// mNote->setProgressDialogType( HbProgressDialog::ProgressDialog );
// }
mNote->setText( title );
@@ -296,10 +366,12 @@
mNote->setProgressValue( 0 );
- if( !cancelable )
+ if( !cancelable ){
mNote->primaryAction()->setDisabled( true );
- else
+ }
+ else{
mNote->primaryAction()->setDisabled( false );
+ }
mNote->exec();
}
--- a/filemanager/src/filemanager/src/operationservice/fmoperationresultprocesser.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationresultprocesser.h Mon May 03 12:24:39 2010 +0300
@@ -21,7 +21,7 @@
class FmOperationBase;
class FmOperationService;
-class HbProgressNote;
+class HbProgressDialog;
class FmOperationResultProcesser :
public QObject
@@ -32,6 +32,7 @@
~FmOperationResultProcesser(void);
void onAskForRename( FmOperationBase* operationBase, const QString &srcFile, QString *destFile );
+ void onAskForReplace( FmOperationBase* operationBase, const QString &srcFile, const QString &destFile, bool *isAccepted );
void onNotifyWaiting( FmOperationBase* operationBase, bool cancelable );
void onNotifyPreparing( FmOperationBase* operationBase, bool cancelable );
void onNotifyStart( FmOperationBase* operationBase, bool cancelable, int maxSteps );
@@ -53,7 +54,7 @@
void failAndCloseProgress();
private:
FmOperationService *mOperationService;
- HbProgressNote *mNote;
+ HbProgressDialog *mNote;
};
#endif
--- a/filemanager/src/filemanager/src/operationservice/fmoperationservice.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationservice.cpp Mon May 03 12:24:39 2010 +0300
@@ -26,8 +26,8 @@
#include "fmoperationcopy.h"
#include "fmoperationmove.h"
#include "fmoperationremove.h"
+#include "fmoperationformat.h"
-#include <hbprogressnote.h>
#include <hbaction.h>
#include <hbmessagebox.h>
@@ -282,6 +282,13 @@
mOperationResultProcesser->onAskForRename(
mCurrentOperation, srcFile, destFile );
}
+
+void FmOperationService::on_operationThread_askForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted )
+{
+ mOperationResultProcesser->onAskForReplace(
+ mCurrentOperation, srcFile, destFile, isAccepted );
+}
+
void FmOperationService::on_operationThread_refreshModel( const QString &path )
{
emit refreshModel( mCurrentOperation, path );
--- a/filemanager/src/filemanager/src/operationservice/fmoperationservice.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationservice.h Mon May 03 12:24:39 2010 +0300
@@ -33,8 +33,6 @@
class FmDriveDetailsSize;
class FmOperationResultProcesser;
-class HbProgressNote;
-
class FmOperationService : public QObject
{
Q_OBJECT
@@ -95,6 +93,7 @@
void on_backupRestore_notifyCanceled();
void on_operationThread_askForRename( const QString &srcFile, QString *destFile );
+ void on_operationThread_askForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted );
void on_operationThread_refreshModel( const QString &path );
void on_operationThread_notifyWaiting( bool cancelable );
void on_operationThread_notifyPreparing( bool cancelable );
--- a/filemanager/src/filemanager/src/operationservice/fmoperationthread.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationthread.cpp Mon May 03 12:24:39 2010 +0300
@@ -23,7 +23,7 @@
#include "fmoperationcopy.h"
#include "fmoperationmove.h"
#include "fmoperationremove.h"
-
+#include "fmoperationformat.h"
#include <QDir>
#include <QStack>
@@ -49,6 +49,8 @@
QMetaObject::connectSlotsByName( this );
connect( mOperationBase, SIGNAL( askForRename( QString, QString* ) ),
this, SLOT( onAskForRename( QString, QString* )), Qt::BlockingQueuedConnection );
+ connect( mOperationBase, SIGNAL( askForReplace( QString, QString, bool* ) ),
+ this, SLOT( onAskForReplace( QString, QString, bool* )), Qt::BlockingQueuedConnection );
start();
return FmErrNone;
@@ -65,6 +67,9 @@
QMetaObject::connectSlotsByName( this );
connect( mOperationBase, SIGNAL( askForRename( QString, QString* ) ),
this, SLOT( onAskForRename( QString, QString* )), Qt::BlockingQueuedConnection );
+ connect( mOperationBase, SIGNAL( askForReplace( QString, QString, bool* ) ),
+ this, SLOT( onAskForReplace( QString, QString, bool* )), Qt::BlockingQueuedConnection );
+
start();
return FmErrNone;
@@ -135,6 +140,10 @@
{
emit askForRename( srcFile, destFile );
}
+void FmOperationThread::onAskForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted )
+{
+ emit askForReplace( srcFile, destFile, isAccepted );
+}
void FmOperationThread::on_operationElement_notifyPreparing( bool cancelable )
{
emit notifyPreparing( cancelable );
@@ -226,13 +235,14 @@
}
case FmOperationService::EOperationTypeFormat:
{
- emit notifyWaiting( false );
+// emit notifyWaiting( false );
FmLogger::log(QString("start format"));
FmOperationFormat *operationFormat = static_cast<FmOperationFormat*>( mOperationBase );
FmLogger::log(QString("get param and start format"));
QString refreshSrcPath = operationFormat->driverName();
- if ( FmErrNone != FmUtils::formatDrive( operationFormat->driverName() ) ) {
+// if ( FmErrNone != FmUtils::formatDrive( operationFormat->driverName() ) ) {
+ if ( FmErrNone != operationFormat->start() ) {
emit notifyError( FmErrTypeFormatFailed, operationFormat->driverName() );
return;
}
--- a/filemanager/src/filemanager/src/operationservice/fmoperationthread.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationthread.h Mon May 03 12:24:39 2010 +0300
@@ -52,6 +52,7 @@
signals:
void askForRename( const QString &srcFile, QString *destFile );
+ void askForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted );
void refreshModel( const QString &path );
void notifyWaiting( bool cancelable );
@@ -65,6 +66,7 @@
private slots:
void onAskForRename( const QString &srcFile, QString *destFile );
+ void onAskForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted );
void on_operationElement_notifyPreparing( bool cancelable );
void on_operationElement_notifyStart( bool cancelable, int maxSteps );
void on_operationElement_notifyProgress( int currentStep );
--- a/filemanager/src/fmbkupenginewrapper/fmbkupenginewrapper.pro Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/fmbkupenginewrapper.pro Mon May 03 12:24:39 2010 +0300
@@ -35,5 +35,6 @@
LIBS += -leikcore
LIBS += -lcone
LIBS += -lsysutil
+ LIBS += -lplatformenv
}
--- a/filemanager/src/fmbkupenginewrapper/inc/fmbackupsettings.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/inc/fmbackupsettings.h Mon May 03 12:24:39 2010 +0300
@@ -29,6 +29,7 @@
const QString constFileManagerBackupWeekdayWednesday = "Wednesday";
const QString constFileManagerBackupWeekdayThursday = "Thursday";
const QString constFileManagerBackupWeekdayFirday = "Friday";
+const QString constFileManagerBackupWeekdaySaturday = "Saturday";
const QString constFileManagerBackupWeekdaySunday = "Sunday";
const QString constFileManagerBackupScheduleNever = "Never";
@@ -49,6 +50,8 @@
const QString constFileManagerBackupSettingsContentBookmarks = "Bookmarks";
const QString constFileManagerBackupSettingsContentUserFiles = "Files";
+class FmBkupEngine;
+
// CLASS DECLARATION
/**
* This class is used for storing backup entry which used in backup view
@@ -167,11 +170,12 @@
EFileManagerBackupWeekdayWednesday,
EFileManagerBackupWeekdayThursday,
EFileManagerBackupWeekdayFriday,
+ EFileManagerBackupWeekdaySaturday,
EFileManagerBackupWeekdaySunday,
};
public:
- FmBackupSettings( void );
+ explicit FmBackupSettings( FmBkupEngine *aFmBkupEngine );
~FmBackupSettings( void );
@@ -347,6 +351,8 @@
* Backup setting list items
*/
QList< FmBackupEntry* > mBackupEntryList;
+
+ FmBkupEngine *mBkupEngine;
};
#endif //FMBACKUPSETTINGS_H
--- a/filemanager/src/fmbkupenginewrapper/inc/fmbkupengine.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/inc/fmbkupengine.h Mon May 03 12:24:39 2010 +0300
@@ -86,12 +86,15 @@
QList< FmRestoreInfo > &restoreInfoList,
const int aDrive = FmErrNotFound );
+ void getBackupDriveList( QStringList &driveList );
+
signals:
void notifyPreparing( bool cancelable );
void notifyStart( bool cancelable, int totalCount );
void notifyUpdate( int count );
void notifyFinish( int err );
void notifyMemoryLow( int memoryValue, int &userError );
+ void notifyBackupFilesExist( bool &isContinue );
private:
friend class FmBkupEnginePrivate;
--- a/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.cpp Mon May 03 12:24:39 2010 +0300
@@ -19,12 +19,6 @@
#include "fmbkupengine_p.h"
// INCLUDE FILES
-/*#include <filemanagerengine.rsg>
-#include "cfilemanagerremovabledrivehandler.h"
-#include "mfilemanagerprocessobserver.h"
-#include "cfilemanagerutils.h"
-#include "cfilemanagerengine.h"
-*/
#include <coreapplicationuisdomainpskeys.h>
#include <coemain.h>
#include <apgwgnam.h>
@@ -49,6 +43,8 @@
#include "fmcommon.h"
+#include <f32file.h>
+
/*
#include "cfilemanageritemproperties.h"
#include "cfilemanagerbackupsettings.h"
@@ -102,6 +98,10 @@
QList<FmBkupBackupCategory*> backupCategoryList,
QString drive, quint32 content)
{
+ if( drive.isEmpty() ) {
+ iError = KErrPathNotFound;
+ return false;
+ }
QString logString;
logString = "startBackup";
FmLogger::log( logString );
@@ -182,6 +182,31 @@
logString = "startBackup_StartOperationL";
FmLogger::log( logString );
+ QList< FmRestoreInfo > restoreInfoList;
+ TInt driveNumber = DriverNameToNumber( drive );
+ GetRestoreInfoArray( drivesAndOperationList, restoreInfoList, driveNumber );
+
+ for ( TInt i( 0 ); i < restoreInfoList.count(); i++ )
+ {
+ bool toContinue = false;
+ FmRestoreInfo &info = restoreInfoList[ i ];
+ TUint32 existContent( FmgrToBkupMask( info.content() ) );
+ if ( bkupContent & existContent )
+ {
+ notifyBackupFilesExistInternal( toContinue );
+ if (!toContinue)
+ {
+ iError = KErrAlreadyExists;
+ return false;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+
TRAPD( err, iBkupEngine->StartOperationL(
EMMCScBkupOperationTypeFullBackup, *this, params ) );
@@ -277,6 +302,11 @@
emit notifyMemoryLow( memoryValue, userError );
}
+void FmBkupEnginePrivate::notifyBackupFilesExistInternal( bool &isContinue )
+ {
+ emit notifyBackupFilesExist( isContinue );
+ }
+
TInt FmBkupEnginePrivate::HandleBkupEngineEventL(
MMMCScBkupEngineObserver::TEvent aEvent, TInt aAssociatedData )
{
@@ -332,7 +362,7 @@
}
case MMMCScBkupEngineObserver::ECommonOperationError:
{
- logString = "ECommonOperationError:" + QString::number(aAssociatedData);
+ logString = "ECommonOperationError";
iError = aAssociatedData;
break;
}
@@ -387,6 +417,8 @@
return FmErrAlreadyExists;
case KErrCancel:
return FmErrCancel;
+ case KErrPathNotFound:
+ return FmErrPathNotFound;
default:
return FmErrUnKnown;
}
@@ -713,7 +745,7 @@
TUint32 FmBkupEnginePrivate::AllowedDriveAttMatchMask() const
{
- return KDriveAttRemovable | KDriveAttInternal;//KDriveAttRemovable;
+ return KDriveAttRemovable;//KDriveAttRemovable;
}
TInt FmBkupEnginePrivate::DriverNameToNumber( QString driverName )
@@ -729,6 +761,33 @@
return driverName;
}
+void FmBkupEnginePrivate::getBackupDriveList( QStringList &driveList )
+ {
+ TUint32 driveAttMask( AllowedDriveAttMatchMask() );
+ RFs fs;
+ fs.Connect();
+ for ( TInt i( 0 ); i < KMaxDrives; ++i )
+ {
+ TDriveInfo driveInfo;
+ if ( fs.Drive( driveInfo, i ) == KErrNone )
+ {
+ // Do not allow backup for internal drives
+ TUint driveStatus( 0 );
+ DriveInfo::GetDriveStatus( fs, i, driveStatus );
+ if ( driveStatus & DriveInfo::EDriveInternal )
+ {
+ continue;
+ }
+ if ( driveInfo.iDriveAtt & driveAttMask )
+ {
+ driveList.append( NumberToDriverName( i ) );
+ }
+ }
+ }
+
+ fs.Close();
+ }
+
// -----------------------------------------------------------------------------
// CFileManagerEngine::PublishBurStatus()
//
--- a/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.h Mon May 03 12:24:39 2010 +0300
@@ -31,9 +31,11 @@
#include "MMMCScBkupEngineObserver.h"
#include <f32file.h>
+#include <QObject>
+#include <QStringList>
+
class CMMCScBkupEngine;
-#include <QObject>
NONSHARABLE_CLASS(TMaskLookup)
{
public:
@@ -76,6 +78,8 @@
void GetRestoreInfoArray( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
QList< FmRestoreInfo > &restoreInfoList,
const TInt aDrive = KErrNotFound );
+
+ void getBackupDriveList( QStringList &driveList );
signals:
void notifyPreparing( bool cancelable );
@@ -83,13 +87,14 @@
void notifyUpdate( int totalCount );
void notifyFinish( int err );
void notifyMemoryLow( int memoryValue, int &userError );
-
+ void notifyBackupFilesExist( bool &isContinue );
private:
void notifyPreparingInternal();
void notifyStartInternal( int aTotalCount );
void notifyUpdateInternal( int aCount );
void notifyFinishInternal();
void notifyMemoryLowInternal( int memoryValue, int &userError );
+ void notifyBackupFilesExistInternal( bool &isContinue );
private: // From MMMCScBkupEngineObserver
TInt HandleBkupEngineEventL(
--- a/filemanager/src/fmbkupenginewrapper/private/win32/fmbkupengine_p.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/private/win32/fmbkupengine_p.h Mon May 03 12:24:39 2010 +0300
@@ -60,6 +60,8 @@
private:
int DriverNameToNumber( QString driverName );
QString NumberToDriverName( int driver );
+
+ TBool HasMultipleBackupTargets();
signals:
void notifyPreparing( bool cancelable );
--- a/filemanager/src/fmbkupenginewrapper/src/fmbackupsettings.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/src/fmbackupsettings.cpp Mon May 03 12:24:39 2010 +0300
@@ -17,13 +17,17 @@
*/
#include "fmbackupsettings.h"
+#include "fmbkupengine.h"
+#include "fmcommon.h"
#include <QString>
+#include <QStringList>
#include <QTime>
#include <QSettings>
-FmBackupSettings::FmBackupSettings( void )
+FmBackupSettings::FmBackupSettings( FmBkupEngine *aFmBkupEngine ) : mBkupEngine( aFmBkupEngine )
{
+
}
FmBackupSettings::~FmBackupSettings( void )
@@ -219,6 +223,9 @@
case EFileManagerBackupWeekdayFriday:
ret = constFileManagerBackupWeekdayFirday;
break;
+ case EFileManagerBackupWeekdaySaturday:
+ ret = constFileManagerBackupWeekdaySaturday;
+ break;
case EFileManagerBackupWeekdaySunday:
ret = constFileManagerBackupWeekdaySunday;
break;
@@ -280,8 +287,13 @@
mBackupEntryList.push_back( entry );
}
- entry = createTargetDriveEntry();
- mBackupEntryList.push_back( entry );
+ QStringList driveList;
+ mBkupEngine->getBackupDriveList( driveList );
+
+ if( driveList.count() > 1 ) {
+ entry = createTargetDriveEntry();
+ mBackupEntryList.push_back( entry );
+ }
}
void FmBackupSettings::resetAndDestoryBackupEntry()
@@ -299,6 +311,12 @@
void FmBackupSettings::load()
{
+
+ QStringList driveList;
+ mBkupEngine->getBackupDriveList( driveList );
+ QString defaultDrive( driveList.first() );
+
+
QSettings settings("Nokia", "FileManager");
settings.beginGroup("BackupConfigure");
@@ -307,7 +325,7 @@
mScheduling = (TFileManagerBackupSchedule)(settings.value("scheduling", EFileManagerBackupScheduleNever ).toInt()); // Never schedule for default value
mWeekday = (TFileManagerBackupWeekday)(settings.value("weekday", EFileManagerBackupWeekdayMonday ).toInt()); // monday for default value
mTime = (settings.value("time", QTime::currentTime() ).toTime()); // empty for default
- mTargetDrive = (settings.value("targetDrive", "c:") ).toString(); // C for default
+ mTargetDrive = (settings.value("targetDrive", defaultDrive ) ).toString(); // C for default
settings.endGroup();
refreshList();
--- a/filemanager/src/fmbkupenginewrapper/src/fmbkupengine.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmbkupenginewrapper/src/fmbkupengine.cpp Mon May 03 12:24:39 2010 +0300
@@ -32,6 +32,7 @@
connect( d, SIGNAL( notifyFinish(int) ),
this, SIGNAL( notifyFinish(int) ) );
connect( d, SIGNAL( notifyMemoryLow(int, int& ) ), this, SIGNAL( notifyMemoryLow(int, int&) ) );
+ connect( d, SIGNAL( notifyBackupFilesExist( bool& )), this, SIGNAL( notifyBackupFilesExist( bool&) ) );
}
@@ -71,7 +72,7 @@
{
if ( !iBackupSettings )
{
- iBackupSettings = new FmBackupSettings();
+ iBackupSettings = new FmBackupSettings( this );
}
return iBackupSettings;
}
@@ -88,13 +89,18 @@
void FmBkupEngine::GetRestoreInfoArray( QList<FmBkupDrivesAndOperation* > &drivesAndOperationList,
QList< FmRestoreInfo > &restoreInfoList,
const int aDrive )
- {
+{
d->GetRestoreInfoArray( drivesAndOperationList, restoreInfoList, aDrive );
- }
+}
int FmBkupEngine::deleteBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
- {
+{
return d->deleteBackup( drivesAndOperationList );
- }
+}
+void FmBkupEngine::getBackupDriveList( QStringList &driveList )
+{
+ d->getBackupDriveList( driveList );
+}
+
--- a/filemanager/src/fmfiledialog/fmfiledialog.pro Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmfiledialog/fmfiledialog.pro Mon May 03 12:24:39 2010 +0300
@@ -14,6 +14,7 @@
CONFIG += hb
TEMPLATE = lib
DEFINES += FMFILEDIALOG_LIBRARY
+RESOURCES += fmfiledialog.qrc
include ( ../common.pri )
include ( ../inc/commoninc.pri )
include ( ../inc/commonutils.pri )
@@ -24,7 +25,12 @@
-lapmime \
-lxqservice \
-lxqutils \
- -lshareui
+ -lshareui \
+ -lefsrv \
+ -lapgrfx \
+ -lcone \
+ -ldirectorylocalizer
+
TARGET.UID3 = 0x2002BCC2
# export headers to app
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/fmfiledialog.qrc Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,11 @@
+<RCC>
+ <qresource prefix="/">
+ <file>image/qtg_indi_status_back.svg</file>
+ <file>image/qgn_prop_mmc_locked.svg</file>
+ <file>image/qgn_prop_mmc_memc.svg</file>
+ <file>image/qgn_prop_fmgr_mmc_no_sub.svg</file>
+ <file>image/qgn_prop_phone_memc.svg</file>
+ <file>image/qgn_prop_usb_memc.svg</file>
+ <file>image/qgn_prop_fmgr_ms.svg</file>
+ </qresource>
+</RCC>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/image/qgn_prop_fmgr_mmc_no_sub.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="57px" version="1.1" viewBox="0 0 67 57" width="67px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M49.375,9.715c-0.012,0-0.029-0.002-0.041-0.002l-38.13,0.004h38.027 C49.231,9.717,49.289,9.713,49.375,9.715z M60.67,19.506l-8.727-8.727c-0.896-0.896-1.979-1.046-2.498-1.063 c0.371,0.018,1.154,0.133,1.791,0.77l8.728,8.728c0,0,0.366,0.316,0.637,0.97C60.6,20.182,60.6,20.18,60.6,20.179 c0.314,0.412,0.783,1.231,0.783,2.49v23.125c0,2.044-1.662,3.706-3.706,3.706H11.204c-2.042,0-3.704-1.662-3.704-3.706V13.922 c0-0.823,0.279-1.577,0.735-2.193c-0.002,0.004-0.002,0.01-0.004,0.014c0.394-0.99,1.262-1.742,2.328-1.961 C8.547,10.096,7,11.824,7,13.922v31.872C7,48.113,8.886,50,11.204,50h46.473c2.319,0,4.206-1.887,4.206-4.206V22.669 C61.883,20.556,60.694,19.524,60.67,19.506z" fill-opacity="0.08" stroke-opacity="0.08"/>
+<path d="M60.6,20.179c0.157,0.38,0.283,0.874,0.283,1.49v24.125c0,1.771-1.436,3.206-3.206,3.206H11.204 C9.436,49,8,47.564,8,45.794V12.922c0-0.422,0.086-0.824,0.235-1.193C7.779,12.345,7.5,13.099,7.5,13.922v31.872 c0,2.044,1.662,3.706,3.704,3.706h46.473c2.044,0,3.706-1.662,3.706-3.706V22.669C61.383,21.41,60.914,20.591,60.6,20.179z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M57.677,48H11.204C9.436,48,8,46.564,8,44.794v1C8,47.564,9.436,49,11.204,49h46.473 c1.771,0,3.206-1.436,3.206-3.206v-1C60.883,46.564,59.447,48,57.677,48z" fill-opacity="0.3" stroke-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="34.4414" x2="34.4414" y1="-6.5947" y2="62.0571">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M59.257,19.921l-8.728-8.728c-0.446-0.445-1.028-0.48-1.195-0.48l-38.13,0.004 C9.988,10.717,9,11.706,9,12.922v31.872C9,46.01,9.988,47,11.204,47h46.473c1.217,0,2.206-0.99,2.206-2.206V21.669 C59.883,20.521,59.321,19.982,59.257,19.921z M58.065,45H47.78v-5.144h10.285V45z M58.065,38.743H47.78V33.6h10.285V38.743z M58.065,32.48H47.78v-5.143h10.285V32.48z M58.065,26.219H47.78v-5.143h10.285V26.219z" fill="url(#SVGID_1_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="34.4414" x2="34.4414" y1="-0.6313" y2="58.201">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M59.964,19.214l-8.728-8.728c-0.865-0.865-2.005-0.77-2.005-0.77H11.204 C9.436,9.717,8,11.151,8,12.922v31.872C8,46.564,9.436,48,11.204,48h46.473c1.771,0,3.206-1.436,3.206-3.206V21.669 C60.883,20,59.964,19.214,59.964,19.214z M59.883,44.794c0,1.216-0.989,2.206-2.206,2.206H11.204C9.988,47,9,46.01,9,44.794V12.922 c0-1.216,0.988-2.205,2.204-2.205l38.13-0.004c0.167,0,0.749,0.035,1.195,0.48l8.728,8.728c0.064,0.062,0.626,0.601,0.626,1.748 V44.794z" fill="url(#SVGID_2_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="33.27" x2="33.27" y1="35.7666" y2="7.9984">
+<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M9,12.922v26.053c7.021-11.342,26.082-20.758,48.54-20.771l-7.011-7.01 c-0.446-0.445-1.028-0.48-1.195-0.48l-38.13,0.004C9.988,10.717,9,11.706,9,12.922z" fill="url(#SVGID_3_)" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M59.065,21.076c0-0.553-0.447-1-1-1H47.78c-0.553,0-1,0.447-1,1v5.143c0,0.207,0.063,0.4,0.171,0.56 c-0.107,0.159-0.171,0.353-0.171,0.56v5.143c0,0.208,0.063,0.4,0.171,0.561C46.844,33.2,46.78,33.393,46.78,33.6v5.144 c0,0.206,0.063,0.397,0.169,0.557c-0.106,0.159-0.169,0.351-0.169,0.557V45c0,0.552,0.447,1,1,1h10.285c0.553,0,1-0.448,1-1v-5.144 c0-0.206-0.063-0.397-0.169-0.557c0.106-0.159,0.169-0.351,0.169-0.557V33.6c0-0.207-0.063-0.399-0.171-0.559 c0.107-0.16,0.171-0.353,0.171-0.561v-5.143c0-0.207-0.063-0.4-0.171-0.56c0.107-0.159,0.171-0.353,0.171-0.56V21.076z M58.065,45 H47.78v-5.144h10.285V45z M58.065,38.743H47.78V33.6h10.285V38.743z M58.065,32.48H47.78v-5.143h10.285V32.48z M58.065,26.219H47.78 v-5.143h10.285V26.219z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="52.9229" x2="52.9229" y1="49.0088" y2="25.5829">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_4_)" fill-opacity="0.5" height="5.144" stroke-opacity="0.5" width="10.285" x="47.78" y="39.856"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="52.9229" x2="52.9229" y1="42.752" y2="19.3261">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_5_)" fill-opacity="0.5" height="5.144" stroke-opacity="0.5" width="10.285" x="47.78" y="33.6"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_6_" x1="52.9229" x2="52.9229" y1="36.4883" y2="13.0691">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_6_)" fill-opacity="0.5" height="5.143" stroke-opacity="0.5" width="10.285" x="47.78" y="27.338"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_7_" x1="52.9229" x2="52.9229" y1="30.2275" y2="6.8061">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<rect fill="url(#SVGID_7_)" fill-opacity="0.5" height="5.143" stroke-opacity="0.5" width="10.285" x="47.78" y="21.076"/>
+<path d="M47.78,44.99l1-0.99v-3.144h8.285l1-1H47.78V44.99z M47.78,38.724l1-0.991V34.59h8.285l1-1H47.78V38.724z M47.78,32.461l1-0.99v-3.144h8.285l1-1H47.78V32.461z M48.78,22.065h8.285l1-1H47.78v5.134l1-0.99V22.065z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M57.065,44H48.78l-0.99,1h10.275v-5.132l-1,0.988V44z M57.065,37.732H48.78l-0.99,1h10.275 v-5.131l-1,0.988V37.732z M57.065,31.471H48.78l-0.99,1h10.275v-5.132l-1,0.988V31.471z M57.065,22.065v3.144H48.78l-0.99,1h10.275 v-5.132L57.065,22.065z" fill="#FFFFFF" fill-opacity="0.25" stroke-opacity="0.25"/>
+<rect fill="none" height="57" width="67"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/image/qgn_prop_fmgr_ms.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="57px" version="1.1" viewBox="0 0 67 57" width="67px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M63.977,26.966c0.079-1.848-0.215-3.706-0.903-5.479c-1.959-5.042-6.597-8.367-11.943-8.646 c-0.548-1.742-2.165-3.016-4.086-3.016H9.106c-2.369,0-4.296,1.927-4.296,4.296V40.49c0,2.369,1.927,4.296,4.296,4.296h2.296V44.9 c0,1.158,0.941,2.1,2.099,2.1h29.665c1.157,0,2.099-0.941,2.099-2.1v-0.114h1.779c2.208,0,4.031-1.674,4.27-3.819 c1.369-0.092,2.717-0.392,4.012-0.895c3.379-1.313,6.046-3.865,7.512-7.191C63.672,30.986,64.042,28.973,63.977,26.966z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M62.606,22.666c-1.911-4.92-6.472-8.151-11.767-8.341v-0.204c0-2.093-1.703-3.796-3.796-3.796H9.106 c-2.093,0-3.796,1.703-3.796,3.796V40.49c0,2.094,1.703,3.796,3.796,3.796h2.796V44.9c0,0.883,0.717,1.6,1.599,1.6h29.665 c0.882,0,1.599-0.717,1.599-1.6v-0.614h2.279c2.093,0,3.796-1.702,3.796-3.796c1.471-0.049,2.917-0.346,4.305-0.884 c3.254-1.264,5.823-3.724,7.234-6.927S63.871,25.921,62.606,22.666z M50.874,28.611c-0.012,0.005-0.022,0.01-0.034,0.014v-2.439 c0.349,0.122,0.632,0.391,0.772,0.752C51.87,27.602,51.538,28.354,50.874,28.611z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M62.141,22.848c-1.896-4.881-56.33,16.535-56.33,16.535v1.107c0,1.82,1.475,3.296,3.296,3.296h3.296V44.9 c0,0.604,0.495,1.1,1.099,1.1h29.665c0.604,0,1.099-0.495,1.099-1.1v-1.114h2.779c1.819,0,3.296-1.476,3.296-3.296v-0.495 c0.023,0,0.045,0.003,0.068,0.003c0.001,0,0.001,0,0.001,0c1.558,0,3.09-0.289,4.555-0.857 C61.434,36.627,64.654,29.318,62.141,22.848z M50.406,29.2c-0.023,0-0.044-0.009-0.066-0.01v-3.573c0.022,0,0.044-0.006,0.066-0.006 c0.745,0,1.402,0.449,1.672,1.145c0.357,0.922-0.102,1.964-1.023,2.322C50.846,29.159,50.628,29.2,50.406,29.2z" fill-opacity="0.4" stroke-opacity="0.4"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="51.7969" x2="58.3651" y1="25.7554" y2="22.6821">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.5401" style="stop-color:#B3B3B3"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M61.544,22.079c-2.391-6.15-9.313-9.199-15.464-6.81c-6.151,2.389-9.2,9.312-6.812,15.462 c2.389,6.151,9.313,9.2,15.463,6.812C60.883,35.154,63.933,28.23,61.544,22.079z M51.567,29.395c-1.65,0.642-3.51-0.178-4.15-1.828 c-0.642-1.65,0.178-3.508,1.828-4.149c1.651-0.642,3.509,0.178,4.149,1.827C54.037,26.895,53.218,28.754,51.567,29.395z" fill="url(#SVGID_1_)"/>
+<path d="M49.551,13.843c0.283-0.02,0.568-0.029,0.854-0.029c5.233,0,9.841,3.153,11.736,8.034 c2.514,6.471-0.707,13.779-7.177,16.293c-1.465,0.568-2.997,0.857-4.555,0.857c0,0,0,0-0.001,0c-0.373,0-0.742-0.017-1.108-0.049 L49.551,13.843z M50.404,24.295c-0.26,0-2.387,1.791-1.966,2.875c0.318,0.818,1.091,1.347,1.968,1.347 c0.261,0,0.518-0.048,0.764-0.144c0.526-0.205,0.94-0.602,1.168-1.117c0.227-0.516,0.239-1.088,0.035-1.614 C52.055,24.823,51.282,24.295,50.404,24.295L50.404,24.295z" fill="#F2F2F2"/>
+<path d="M49.883,38.176c1.586,0.07,3.212-0.18,4.787-0.791c6.063-2.355,9.07-9.181,6.716-15.243 c-1.888-4.86-6.646-7.756-11.581-7.503L49.883,38.176z M51.551,29.352c-1.628,0.633-3.459-0.174-4.092-1.801 c-0.632-1.627,0.176-3.459,1.803-4.092c1.627-0.631,3.458,0.176,4.091,1.802C53.985,26.889,53.179,28.721,51.551,29.352z" fill="url(#SVGID_2_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="45.5869" x2="54.5387" y1="20.1924" y2="31.7645">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.546" style="stop-color:#B2B2B2"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M50.402,15.176c-6.208,0-11.24,5.033-11.24,11.241s5.032,11.241,11.24,11.241 s11.24-5.033,11.24-11.241S56.61,15.176,50.402,15.176z M51.135,28.282c-1.035,0.402-2.201-0.112-2.604-1.147 c-0.403-1.036,0.111-2.202,1.147-2.605c1.035-0.402,2.202,0.112,2.604,1.148C52.686,26.713,52.171,27.879,51.135,28.282z" fill="url(#SVGID_3_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="57.3125" x2="57.6039" y1="29.4717" y2="26.0613">
+<stop offset="0" style="stop-color:#EEE3B1;stop-opacity:0.5918"/>
+<stop offset="1" style="stop-color:#D8A9A9;stop-opacity:0.57"/>
+</linearGradient>
+<path d="M61.643,26.417c0-0.136-0.005-0.269-0.011-0.401l-8.021,0.289c0.027,0.516-0.106,0.985-0.253,1.334 l7.539,2.805C61.377,29.193,61.643,27.836,61.643,26.417z" fill="url(#SVGID_4_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="55.5752" x2="58.5098" y1="31.2334" y2="28.1805">
+<stop offset="0" style="stop-color:#B7B4E6;stop-opacity:0"/>
+<stop offset="0.1879" style="stop-color:#B7B4E6;stop-opacity:0.5"/>
+<stop offset="0.4036" style="stop-color:#BAEABA;stop-opacity:0.75"/>
+<stop offset="0.9036" style="stop-color:#BAEABA;stop-opacity:0.247"/>
+<stop offset="1" style="stop-color:#BAEABA;stop-opacity:0"/>
+</linearGradient>
+<path d="M61.069,29.961l-7.635-2.525c-0.135,0.378-0.302,0.658-0.37,0.763l5.303,6.149 C59.582,33.129,60.515,31.632,61.069,29.961z" fill="url(#SVGID_5_)"/>
+<path d="M53.827,25.077c-0.734-1.89-2.86-2.827-4.75-2.093s-2.826,2.86-2.093,4.75s2.861,2.827,4.75,2.093 C53.625,29.094,54.562,26.967,53.827,25.077z M51.485,29.182c-1.533,0.596-3.259-0.166-3.854-1.697 c-0.596-1.533,0.166-3.26,1.697-3.855c1.534-0.595,3.259,0.166,3.854,1.699C53.778,26.859,53.018,28.586,51.485,29.182z" fill="url(#SVGID_6_)"/>
+<path d="M53.282,25.289c-0.617-1.59-2.405-2.377-3.993-1.76c-1.589,0.617-2.377,2.405-1.76,3.994 c0.617,1.588,2.405,2.376,3.994,1.759S53.899,26.877,53.282,25.289z M51.055,28.078c-0.209,0.081-0.427,0.122-0.648,0.122 c-0.746,0-1.402-0.449-1.672-1.145c-0.174-0.446,0.575-2.148,1.021-2.321c0.21-0.082,0.429-0.123,0.65-0.123 c0.745,0,1.402,0.449,1.672,1.145C52.436,26.678,51.977,27.72,51.055,28.078z" fill="url(#SVGID_7_)"/>
+<linearGradient gradientTransform="matrix(-0.0913 -0.2351 0.2351 -0.0913 -494.9365 2956.155)" gradientUnits="userSpaceOnUse" id="SVGID_8_" x1="10037.0195" x2="10053.5957" y1="6220.8838" y2="6220.8838">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.5401" style="stop-color:#B3B3B3"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M53.527,25.193c-0.67-1.724-2.61-2.578-4.334-1.908c-1.724,0.669-2.577,2.609-1.909,4.332 c0.67,1.725,2.61,2.578,4.334,1.91C53.342,28.857,54.196,26.917,53.527,25.193z M51.417,29.01c-1.438,0.559-3.057-0.154-3.615-1.592 c-0.559-1.439,0.154-3.059,1.593-3.616c1.438-0.56,3.058,0.154,3.616,1.593C53.568,26.833,52.855,28.451,51.417,29.01z" fill="url(#SVGID_8_)"/>
+<path d="M49.756,24.734c0.21-0.082,0.429-0.123,0.65-0.123c0.581,0,1.102,0.279,1.434,0.729V13.902 c-0.473-0.053-2.006-0.079-2.289-0.06l0.08,25.132c0.258,0.016,1.734-0.014,2.209-0.068V27.475 c-0.194,0.262-0.459,0.477-0.785,0.604c-0.209,0.081-0.427,0.122-0.648,0.122c-0.187,0-0.367-0.028-0.539-0.081L49.756,24.734z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M49.756,24.734c0.21-0.082,0.429-0.123,0.65-0.123c0.341,0,0.658,0.104,0.934,0.272V13.849 c-0.31-0.022-1.282-0.032-1.455-0.024l-0.254,25.15c0.258,0.016,1.399,0.003,1.709-0.021V27.933 c-0.09,0.056-0.184,0.106-0.285,0.146c-0.209,0.081-0.427,0.122-0.648,0.122c-0.186,0-0.365-0.028-0.534-0.08L49.756,24.734z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M49.799,38.982c0.202,0.01,0.897,0,1.041-0.005V28.14c-0.143,0.036-0.286,0.061-0.434,0.061 c-0.186,0-0.365-0.028-0.534-0.08c-0.514-0.157-0.935-0.542-1.138-1.064c-0.174-0.446-0.163-0.935,0.03-1.373 c0.192-0.438,0.545-0.775,0.991-0.948c0.099-0.039,0.199-0.068,0.302-0.089c0.114-0.022,0.231-0.034,0.349-0.034 c0.15,0,0.293,0.03,0.434,0.065V13.83c-0.146-0.005-0.782-0.014-0.955-0.006L49.799,38.982z" fill-opacity="0.3" stroke-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_9_" x1="28.0747" x2="28.0747" y1="1.3354" y2="49.4483">
+<stop offset="0" style="stop-color:#E6E6E6"/>
+<stop offset="1" style="stop-color:#808080"/>
+</linearGradient>
+<path d="M50.34,39.49c0,1.82-1.477,3.296-3.296,3.296H9.106c-1.821,0-3.296-1.476-3.296-3.296V13.121 c0-1.821,1.475-3.296,3.296-3.296h37.938c1.819,0,3.296,1.475,3.296,3.296V39.49z" fill="url(#SVGID_9_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_10_" x1="5.7827" x2="7.8687" y1="26.3057" y2="26.3057">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M9.106,9.825c-1.821,0-3.296,1.475-3.296,3.296V39.49c0,1.82,1.475,3.296,3.296,3.296 V9.825z" fill="url(#SVGID_10_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_11_" x1="48.4219" x2="50.5078" y1="26.3057" y2="26.3057">
+<stop offset="0" style="stop-color:#000000;stop-opacity:0"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M47.044,9.825v32.961c1.819,0,3.296-1.476,3.296-3.296V13.121 C50.34,11.3,48.863,9.825,47.044,9.825z" fill="url(#SVGID_11_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientTransform="matrix(0 1 -1 0 709.498 -875.5039)" gradientUnits="userSpaceOnUse" id="SVGID_12_" x1="885.5039" x2="887.4564" y1="681.4229" y2="681.4229">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M50.34,13.121c0-1.821-1.475-3.296-3.296-3.296H9.106 c-1.819,0-3.296,1.475-3.296,3.296H50.34z" fill="url(#SVGID_12_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_13_" x1="28.0747" x2="28.0747" y1="8.6724" y2="28.815">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M49.34,21.205v-8.084c0-1.266-1.03-2.296-2.296-2.296H9.106 c-1.266,0-2.296,1.03-2.296,2.296v17.393C13.689,26.037,36.434,22.624,49.34,21.205z" fill="url(#SVGID_13_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_14_" x1="28.0435" x2="28.0435" y1="42.6533" y2="39.7841">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M48.11,40.039c0,0.91-0.738,1.648-1.648,1.648H9.624 c-0.912,0-1.648-0.738-1.648-1.648l0,0c0-0.909,0.736-1.647,1.648-1.647h36.838C47.372,38.392,48.11,39.13,48.11,40.039 L48.11,40.039z" fill="url(#SVGID_14_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<path d="M43.166,35.809H13.501c-1.433,0-2.599,1.166-2.599,2.6v4.378h34.862v-4.378 C45.765,36.975,44.599,35.809,43.166,35.809z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M43.166,36.309H13.501c-1.157,0-2.099,0.941-2.099,2.1v4.378h33.862v-4.378 C45.265,37.25,44.323,36.309,43.166,36.309z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M43.166,36.809H13.501c-0.882,0-1.599,0.718-1.599,1.6v4.378h32.862v-4.378 C44.765,37.526,44.048,36.809,43.166,36.809z" fill-opacity="0.3" stroke-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_15_" x1="28.3335" x2="28.3335" y1="26.687" y2="52.4374">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.6688" style="stop-color:#565656"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M44.265,43.9c0,0.604-0.494,1.1-1.099,1.1H13.501c-0.604,0-1.099-0.495-1.099-1.1v-5.492 c0-0.604,0.495-1.1,1.099-1.1h29.665c0.604,0,1.099,0.495,1.099,1.1V43.9z" fill="url(#SVGID_15_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_16_" x1="12.3906" x2="13.2769" y1="41.1543" y2="41.1543">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M13.501,45h0.302v-7.691h-0.302c-0.604,0-1.099,0.495-1.099,1.1V43.9 C12.402,44.505,12.897,45,13.501,45z" fill="url(#SVGID_16_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_17_" x1="43.4502" x2="44.3365" y1="41.1543" y2="41.1543">
+<stop offset="0" style="stop-color:#000000;stop-opacity:0"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M43.166,37.309h-0.302V45h0.302c0.604,0,1.099-0.495,1.099-1.1v-5.492 C44.265,37.804,43.771,37.309,43.166,37.309z" fill="url(#SVGID_17_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_18_" x1="28.3335" x2="28.3335" y1="37.3086" y2="38.466">
+<stop offset="0" style="stop-color:#000000"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</linearGradient>
+<path d="M43.166,37.309H13.501c-0.604,0-1.099,0.495-1.099,1.1h31.862 C44.265,37.804,43.771,37.309,43.166,37.309z" fill="url(#SVGID_18_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_19_" x1="28.3335" x2="28.3335" y1="37.793" y2="42.6174">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M43.166,38.309H13.501c-0.052,0-0.099,0.047-0.099,0.1v4.616 c5.909-1.655,20.551-2.927,29.862-3.53v-1.086C43.265,38.355,43.218,38.309,43.166,38.309z" fill="url(#SVGID_19_)" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_20_" x1="28.1343" x2="28.1343" y1="44.5771" y2="43.2538">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M42.963,43.468c0,0.386-0.177,0.699-0.865,0.699H14.173 c-0.69,0-0.868-0.313-0.868-0.699l0,0c0-0.388,0.178-0.7,0.868-0.7h27.925C42.786,42.768,42.963,43.08,42.963,43.468L42.963,43.468z " fill="url(#SVGID_20_)" fill-opacity="0.5" stroke-opacity="0.5"/>
+<rect fill="none" height="57" width="67"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/image/qgn_prop_mmc_locked.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect fill="none" height="16" width="16"/>
+<path d="M15.713,4.934L12.87,2.043c-0.185-0.208-0.452-0.34-0.751-0.34c0,0,0,0-0.002,0 H1.824C0.819,1.703,0,2.521,0,3.524v8.648c0,1.008,0.819,1.826,1.824,1.826h3.673v1C5.497,15.553,5.945,16,6.498,16h7.501 c0.553,0,1-0.447,1-1.001v-1.205C15.59,13.491,16,12.882,16,12.173V5.634C16,5.37,15.896,5.12,15.713,4.934z" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(-1 0 0 -1 -1181.5664 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="-1189.5679" x2="-1189.5679" y1="9.6611" y2="0.1906">
+<stop offset="0" style="stop-color:#B2B2B2"/>
+<stop offset="1" style="stop-color:#666666"/>
+</linearGradient>
+<path d="M12.119,2.704L12.119,2.704H1.824c-0.452,0-0.823,0.37-0.823,0.822v8.648 c0,0.452,0.371,0.823,0.823,0.823h12.354c0.452,0,0.823-0.371,0.823-0.823V5.635L12.119,2.704z" fill="url(#SVGID_1_)"/>
+<path d="M14.001,7.57h-0.073V5.891c0-1.229-0.974-1.892-1.892-1.892H8.463 c-0.917,0-1.892,0.663-1.892,1.892V7.57H6.499c-0.553,0-1.001,0.448-1.001,1v4.427h8.68c0.452,0,0.823-0.371,0.823-0.823V8.57 C15.001,8.018,14.555,7.57,14.001,7.57z M10.857,7.57H9.643V7.072h1.215V7.57L10.857,7.57z" fill-opacity="0.4" stroke-opacity="0.4"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="10.1123" x2="10.1123" y1="10.6953" y2="2.1215">
+<stop offset="0" style="stop-color:#E3E3E3"/>
+<stop offset="1" style="stop-color:#404040"/>
+</linearGradient>
+<path d="M12.928,9.643h-1.07V6.07H8.643v3.573H7.572v-3.75c0-0.707,0.585-0.893,0.893-0.893h3.572 c0.309,0,0.893,0.186,0.893,0.893v3.75H12.928z" fill="url(#SVGID_2_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="10.1113" x2="10.1113" y1="7.2837" y2="0.3186">
+<stop offset="0" style="stop-color:#E6E6E6"/>
+<stop offset="1" style="stop-color:#B2B2B2"/>
+</linearGradient>
+<rect fill="url(#SVGID_3_)" height="6.429" width="7.5" x="6.5" y="8.57"/>
+<path d="M11.32,10.893c0-0.593-0.479-1.072-1.07-1.072S9.18,10.3,9.18,10.893c0,0.396,0.215,0.735,0.534,0.922v1.936h1.072v-1.936 C11.104,11.628,11.32,11.287,11.32,10.893z"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/image/qgn_prop_mmc_memc.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect fill="none" height="16" width="16"/>
+<path d="M15.713,4.934l-2.843-2.89c-0.185-0.208-0.452-0.34-0.751-0.34c0,0,0,0-0.002,0 H1.824C0.819,1.703,0,2.522,0,3.525v8.648C0,13.182,0.819,14,1.824,14h12.352C15.182,14,16,13.182,16,12.174V5.635 C16,5.371,15.896,5.121,15.713,4.934z" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(-1 0 0 -1 -1181.5664 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="-1189.5679" x2="-1189.5679" y1="9.6611" y2="0.1897">
+<stop offset="0" style="stop-color:#B2B2B2"/>
+<stop offset="1" style="stop-color:#666666"/>
+</linearGradient>
+<path d="M12.119,2.704L12.119,2.704H1.824c-0.452,0-0.823,0.37-0.823,0.822v8.648 c0,0.453,0.371,0.824,0.823,0.824h12.354c0.452,0,0.823-0.371,0.823-0.824V5.635L12.119,2.704z" fill="url(#SVGID_1_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="12.2109" x2="12.2109" y1="8.7246" y2="0.6938">
+<stop offset="0" style="stop-color:#FFE23D"/>
+<stop offset="0.2239" style="stop-color:#FAD337"/>
+<stop offset="0.6537" style="stop-color:#EFAB26"/>
+<stop offset="1" style="stop-color:#E48717"/>
+</linearGradient>
+<path d="M11.32,11.762h2.06v-1.234h-2.06V11.762z M11.32,9.703h2.06V8.469h-2.06V9.703z M11.32,6.408v1.236 h2.06V6.408H11.32z" fill="url(#SVGID_2_)"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/image/qgn_prop_phone_memc.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<polygon fill="none" points="16,16 0.008,16 0,0 15.992,0 "/>
+<path d="M5,0C3.897,0,3,0.896,3,2v11c0,1.104,0.897,2,2,2h6 c1.104,0,2-0.896,2-2V2c0-1.104-0.896-2-2-2H5z" fill="#030303" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="7.8623" x2="7.8623" y1="15.2266" y2="-1.9516">
+<stop offset="0" style="stop-color:#3687FF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
+</linearGradient>
+<path d="M5,1C4.448,1,4,1.447,4,2v11c0,0.553,0.448,1,1,1h6c0.553,0,1-0.447,1-1V2c0-0.553-0.447-1-1-1H5z" fill="url(#SVGID_1_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="7.8623" x2="7.8623" y1="15.9453" y2="-0.4995">
+<stop offset="0" style="stop-color:#F2F2F2"/>
+<stop offset="0.1364" style="stop-color:#E4EDF0"/>
+<stop offset="0.3929" style="stop-color:#C0DFEB"/>
+<stop offset="0.7391" style="stop-color:#86C8E3"/>
+<stop offset="0.9945" style="stop-color:#57B6DD"/>
+<stop offset="1" style="stop-color:#57B6DD"/>
+</linearGradient>
+<rect fill="url(#SVGID_2_)" height="8" width="6" x="5" y="2"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="7.8623" x2="7.8623" y1="3.8335" y2="1.8335">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2B2"/>
+</linearGradient>
+<rect fill="url(#SVGID_3_)" height="2" width="2" x="7" y="11"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/image/qgn_prop_usb_memc.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M16,4h-4V3H2.769C1.24,3,0,5.239,0,8c0,2.762,1.24,5,2.769,5H12 v-1h4V4z" fill="#030303" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="13.8613" x2="13.8613" y1="9.834" y2="5.9063">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2C9"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" height="2" width="2" x="13" y="5"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="13.8613" x2="13.8613" y1="5.8335" y2="1.9049">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2C9"/>
+</linearGradient>
+<rect fill="url(#SVGID_2_)" height="2" width="2" x="13" y="9"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="5.8623" x2="5.8623" y1="10.834" y2="-4.8804">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#B2B2C9"/>
+</linearGradient>
+<path d="M2.818,4C1.959,4,1,5.71,1,8c0,2.289,0.959,4,1.818,4H11V4H2.818z" fill="url(#SVGID_3_)"/>
+<linearGradient gradientTransform="matrix(1 0 0 -1 0.1377 14.834)" gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="5.7031" x2="5.7031" y1="9.6699" y2="3.834">
+<stop offset="0" style="stop-color:#5487E3"/>
+<stop offset="1" style="stop-color:#051F7D"/>
+</linearGradient>
+<path d="M8.445,8.869V8.376H5.513l1.219,1.836h0.517V9.854H8.45V11H7.249v-0.252h-0.65L4.856,8.376h-1.33 c-0.097,0.369-0.396,0.64-0.747,0.64C2.348,9.016,2,8.616,2,8.122C2,7.63,2.348,7.229,2.777,7.229c0.347,0,0.638,0.256,0.741,0.609 h0.599l1.582-2.275l0.96-0.015C6.757,5.32,6.961,5.165,7.194,5.165c0.501,0,0.702,0.309,0.702,0.688 c0,0.381-0.189,0.688-0.702,0.689c-0.26,0-0.48-0.194-0.564-0.459H6.027l-1.25,1.754h3.667V7.226l1.238,0.823L8.445,8.869z" fill="url(#SVGID_4_)"/>
+<rect fill="none" height="16" width="16"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/fmfiledialog/image/qtg_indi_status_back.svg Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="36px" height="36px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve">
+<defs>
+</defs>
+<path fill="#FFFFFF" d="M2.631,9.923l9.245-7.078c0.286-0.164,0.637-0.164,0.923,0c0.285,0.166,0.461,0.471,0.461,0.801v4.633h7.069
+ c7.455,0.001,13.498,5.043,13.501,12.498c-0.003,7.459-6.046,12.498-13.501,12.502c0,0-0.604,0-1.207,0s-1-0.473-1-1.129
+ c0-0.654,0-2.432,0-2.871s0.493-1.002,1-1.002s2.207,0,2.207,0c4.137-0.008,7.492-3.361,7.499-7.5
+ c-0.007-4.139-3.362-7.493-7.499-7.5H13.26V17.8c0,0.33-0.176,0.635-0.461,0.799c-0.286,0.164-0.637,0.166-0.923,0l-9.245-7.078
+ c-0.285-0.164-0.461-0.469-0.461-0.799C2.17,10.394,2.346,10.089,2.631,9.923z"/>
+<rect fill-rule="evenodd" clip-rule="evenodd" fill="none" width="36" height="36"/>
+</svg>
--- a/filemanager/src/fmfiledialog/src/fmfiledialog_p.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmfiledialog/src/fmfiledialog_p.cpp Mon May 03 12:24:39 2010 +0300
@@ -28,7 +28,7 @@
#include <hblineedit.h>
#include <QGraphicsLinearLayout>
-const char *backButtonIcon = "qtg_indi_status_back.png";
+#define backButtonIcon ":image/qtg_indi_status_back.svg"
/*!
constructor
@@ -251,7 +251,9 @@
case GetDirMode:
break;
case GetFileMode:
- mFileNameLineEdit->setReadOnly( true );
+ if( mFileNameLineEdit ){
+ mFileNameLineEdit->setReadOnly( true );
+ }
break;
case SaveFileMode:
if( mFileWidget->currentPath().absoluteFilePath().isEmpty() ) {
@@ -277,7 +279,7 @@
case GetFileMode:
case SaveFileMode:
if( mFileWidget->currentPath().absoluteFilePath().isEmpty() ||
- mFileNameLineEdit->text().isEmpty() ) {
+ ( mFileNameLineEdit && mFileNameLineEdit->text().isEmpty() ) ) {
mOkAction->setDisabled( true );
} else {
mOkAction->setDisabled( false );
--- a/filemanager/src/fmfiledialog/src/fmfilewidget.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmfiledialog/src/fmfilewidget.cpp Mon May 03 12:24:39 2010 +0300
@@ -19,9 +19,10 @@
#include "fmfilewidget.h"
#include "fmutils.h"
#include "fmdrivemodel.h"
+#include "fmdrivewatcher.h"
-#include <hbstyle.h>
-#include <hbabstractitemview.h>
+#include "hbstyle.h"
+#include "hbabstractitemview.h"
#include <hblistview.h>
#include <QModelIndex>
@@ -43,6 +44,10 @@
setModel( 0 );
delete mDirModel;
delete mDriveModel;
+
+ mDriveWatcher->cancelWatch();
+ delete mDriveWatcher;
+ mDriveWatcher = 0;
}
QFileInfo FmFileWidget::currentPath() const
@@ -142,9 +147,18 @@
qDebug("setmodel");
qDebug( QTime::currentTime().toString().toUtf8().data() );
+ mDriveWatcher = new FmDriveWatcher( this );
+ mDriveWatcher->setObjectName( "driveWatcher" );
+ mDriveWatcher->startWatch();
+
// QMetaObject::connectSlotsByName( this );
connect( mListView, SIGNAL( activated( QModelIndex ) ),
this, SLOT( on_list_activated( QModelIndex ) ) );
+
+ connect( mDriveWatcher, SIGNAL( driveAddedOrChanged() ),
+ this, SLOT( on_driveWatcher_driveAddedOrChanged() ) );
+
+
}
void FmFileWidget::setModel( QAbstractItemModel *model )
@@ -178,3 +192,23 @@
setRootPath( FmUtils::fillPathWithSplash( cdUpPath ) );
return true;
}
+
+void FmFileWidget::on_driveWatcher_driveAddedOrChanged()
+{
+ FmLogger::log( QString( "FmFileDialog_FmFileWidget::on_driveWatcher_driveAddedOrChanged start" ) );
+ mDriveModel->refresh();
+ if( currentViewType() == DriveView ) {
+ setModel( 0 );
+ setModel( mDriveModel );
+ emit pathChanged( QString() );
+ } else if( currentViewType() == DirView ) {
+ if( !FmUtils::isPathAccessabel( currentPath().absoluteFilePath() ) ) {
+ // path not available, set model to drive
+ FmLogger::log( QString( "FmFileDialog_FmFileWidget::on_driveWatcher_driveAddedOrChanged path not availeable, set drivemodel:"
+ + currentPath().absoluteFilePath() ) );
+ setModel( mDriveModel );
+ emit pathChanged( QString() );
+ }
+ }
+ FmLogger::log( QString( "FmFileDialog_FmFileWidget::on_driveWatcher_driveAddedOrChanged end" ) );
+}
--- a/filemanager/src/fmfiledialog/src/fmfilewidget.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/fmfiledialog/src/fmfilewidget.h Mon May 03 12:24:39 2010 +0300
@@ -26,6 +26,7 @@
class QDirModel;
class FmDriveModel;
+class FmDriveWatcher;
class HbListView;
class QGraphicsLinearLayout;
@@ -55,6 +56,7 @@
private slots:
void on_list_activated( const QModelIndex &index );
+ void on_driveWatcher_driveAddedOrChanged();
private:
void init();
@@ -68,6 +70,7 @@
FmDriveModel *mDriveModel;
QAbstractItemModel *mCurrentModel;
+ FmDriveWatcher *mDriveWatcher;
};
--- a/filemanager/src/inc/commonutils.pri Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/inc/commonutils.pri Mon May 03 12:24:39 2010 +0300
@@ -15,18 +15,30 @@
#
INTERNAL_HEADERS += $$PWD/fmutils.h \
- $$PWD/fmdrivemodel.h
+ $$PWD/fmdrivemodel.h \
+ $$PWD/fmfileiconprovider.h \
+ $$PWD/fmdrivewatcher/fmdrivewatcher.h
-INTERNAL_SOURCES += $$PWD/fmdrivemodel.cpp
+INTERNAL_SOURCES += $$PWD/fmdrivemodel.cpp \
+ $$PWD/fmfileiconprovider.cpp \
+ $$PWD/fmdrivewatcher/fmdrivewatcher.cpp
symbian {
- INTERNAL_HEADERS += $$PWD/fms60utils.h
+ INTERNAL_HEADERS += $$PWD/fms60utils.h \
+ $$PWD/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.h \
+ $$PWD/fmdrivewatcher/private/symbian/fmdriveevent.h
INTERNAL_SOURCES += $$PWD/fmutils_s60.cpp \
- $$PWD/fms60utils.cpp
+ $$PWD/fms60utils.cpp \
+ $$PWD/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.cpp \
+ $$PWD/fmdrivewatcher/private/symbian/fmdriveevent.cpp
}
win32 {
- INTERNAL_SOURCES += $$PWD/fmutils_win.cpp
+ INTERNAL_HEADERS += $$PWD/fmdrivewatcher/private/win32/fmdrivewatcherprivate.h
+
+ INTERNAL_SOURCES += $$PWD/fmutils_win.cpp \
+ $$PWD/fmdrivewatcher/private/win32/fmdrivewatcherprivate.cpp
+
}
HEADERS += $$INTERNAL_HEADERS
--- a/filemanager/src/inc/fmcommon.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/inc/fmcommon.h Mon May 03 12:24:39 2010 +0300
@@ -10,10 +10,10 @@
* Nokia Corporation - initial contribution.
*
* Contributors:
-* Zhiqiang Yang <zhiqiang.yang@nokia.com>
+*
*
* Description:
-* The common header file of filemanager
+* The header file of the file manager
*/
#ifndef FMCOMMON_H
--- a/filemanager/src/inc/fmdefine.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/inc/fmdefine.h Mon May 03 12:24:39 2010 +0300
@@ -1,4 +1,4 @@
-#/*
+/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
@@ -40,7 +40,13 @@
#define FmErrDestPathDoNotExist -19
#define FmErrCopyDestToSubFolderInSrc -20
#define FmErrMoveDestToSubFolderInSrc -21
-
+#define FmErrNotSupported -22
+#define FmErrNotReady -23
+#define FmErrInUse -24
+#define FmErrPermissionDenied -25
+#define FmErrBadName -26
+#define FmErrPathNotFound -27
+#define FmErrRemoveDefaultFolder -28
#define FmEstimateUpperLimit 90 // available mem/backup size*100%=90%, User selectable continuation
#define FmEstimateLowerLimit 10 // available mem/backup size*100%=10%, Backup will be interrupted
@@ -52,4 +58,6 @@
#define Drive_Z "Z:/"
#define Folder_C_Data "C:/Data"
-#endif
+#define FmMaxLengthofDriveName 11
+
+#endif
--- a/filemanager/src/inc/fmdrivemodel.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/inc/fmdrivemodel.cpp Mon May 03 12:24:39 2010 +0300
@@ -16,6 +16,7 @@
*/
#include "fmdrivemodel.h"
+#include "fmfileiconprovider.h"
#include "fmutils.h"
#include <QDir>
@@ -24,11 +25,11 @@
FmDriveModel::FmDriveModel( QObject *parent, Options options ) :
QAbstractListModel( parent ), mOptions( options )
{
- mIconProvider = new QFileIconProvider();
+ mIconProvider = new FmFileIconProvider();
refresh();
}
-FmDriveModel::~FmDriveModel(void)
+FmDriveModel::~FmDriveModel()
{
delete mIconProvider;
}
@@ -39,8 +40,10 @@
mDriveList.clear();
if( mOptions & HideUnAvailableDrive ) {
+ FmLogger::log( QString( "FmDriveModel::refresh HideUnAvailableDrive_true" ) );
FmUtils::getDriveList( mDriveList, true );
} else {
+ FmLogger::log( QString( "FmDriveModel::refresh HideUnAvailableDrive_false" ) );
FmUtils::getDriveList( mDriveList, false );
}
emit layoutChanged();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/fmdrivewatcher.cpp Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The source file of drive watcher
+*/
+
+#include "fmdrivewatcher.h"
+
+#include "fmdrivewatcherprivate.h"
+
+FmDriveWatcher::FmDriveWatcher( QObject *parent ) : QObject( parent )
+{
+ d = new FmDriveWatcherPrivate( this );
+ connect( d, SIGNAL(driveAddedOrChanged()), this, SLOT( onDriveAddedOrChanged() ));
+}
+
+FmDriveWatcher::~FmDriveWatcher()
+{
+ delete d;
+}
+
+
+void FmDriveWatcher::startWatch()
+{
+ d->startWatch();
+}
+void FmDriveWatcher::cancelWatch()
+{
+ d->cancelWatch();
+}
+
+void FmDriveWatcher::onDriveAddedOrChanged()
+{
+ emit driveAddedOrChanged();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/fmdrivewatcher.h Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The header file of drive watcher
+*/
+
+#ifndef FMDRIVEWATCHER_H
+#define FMDRIVEWATCHER_H
+
+#include <QObject>
+
+class FmDriveWatcherPrivate;
+
+class FmDriveWatcher : public QObject
+{
+Q_OBJECT
+public:
+ FmDriveWatcher( QObject *parent = 0 );
+ virtual ~FmDriveWatcher();
+ void startWatch();
+ void cancelWatch();
+
+signals:
+ void driveAddedOrChanged();
+private slots:
+ void onDriveAddedOrChanged();
+private:
+ FmDriveWatcherPrivate *d;
+};
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/private/symbian/fmdriveevent.cpp Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The source file of drive event watcher
+*/
+
+
+// INCLUDE FILES
+#include <e32std.h>
+#include "fmdriveevent.h"
+#include "fmcommon.h"
+
+#include <aknnotewrappers.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CFileManagerFileSystemEvent::CFileManagerFileSystemEvent
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+
+CFmDriveEvent::CFmDriveEvent(
+ RFs& aFs,
+ MFmDriveEventObserver *aObserver ) :
+ CActive( CActive::EPriorityLow ),
+ iFs( aFs ),
+ iObserver( aObserver )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CFmDriveEvent::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CFmDriveEvent::ConstructL()
+ {
+ CActiveScheduler::Add( this );
+ }
+
+// -----------------------------------------------------------------------------
+// CFmDriveEvent::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CFmDriveEvent* CFmDriveEvent::NewL(
+ RFs& aFs,
+ MFmDriveEventObserver *aObserver )
+ {
+ CFmDriveEvent* self =
+ new( ELeave ) CFmDriveEvent(
+ aFs,
+ aObserver );
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
+
+// ------------------------------------------------------------------------------
+// CFmDriveEvent::~CFmDriveEvent
+//
+// ------------------------------------------------------------------------------
+CFmDriveEvent::~CFmDriveEvent()
+ {
+ Cancel();
+ }
+
+// -----------------------------------------------------------------------------
+// CFmDriveEvent::RunError
+// From CActive. Called when error occurred in asynchronous request
+// Notifies the observer
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CFmDriveEvent::RunError( TInt /*aError*/ )
+ {
+ return KErrNone;
+ }
+
+// -----------------------------------------------------------------------------
+// CFmDriveEvent::DoCancel
+// From CActive. Called when asynchronous request is canceled
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CFmDriveEvent::DoCancel()
+ {
+ iFs.NotifyChangeCancel( iStatus );
+ }
+
+// ------------------------------------------------------------------------------
+// CFmDriveEvent::Setup
+//
+// ------------------------------------------------------------------------------
+//
+void CFmDriveEvent::Setup()
+ {
+ FmLogger::log( QString( "CFmDriveEvent::Setup start" ) );
+ if( IsActive() )
+ {
+ return;
+ }
+
+ iFs.NotifyChange( ENotifyDisk, iStatus );
+ SetActive();
+ FmLogger::log( QString( "CFmDriveEvent::Setup end" ) );
+ }
+
+// -----------------------------------------------------------------------------
+// CFmDriveEvent::RunL
+// From CActive. Called when asynchronous request is completed.
+// Notifies the observer
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CFmDriveEvent::RunL()
+ {
+ if( iStatus == KErrNone ){
+ if( iObserver ){
+ iObserver->OnDriveAddedOrChangedL();
+ }
+
+ Setup();
+ }
+
+ /*
+ CAknInformationNote* informationNote;
+ informationNote = new ( ELeave ) CAknInformationNote;
+ informationNote->ExecuteLD( _L( "driveChanged!"));
+ */
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/private/symbian/fmdriveevent.h Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The header file of drive event watcher
+*/
+
+#ifndef CFMDRIVEEVENT_H
+#define CFMDRIVEEVENT_H
+
+
+// INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+
+class MFmDriveEventObserver
+ {
+ public:
+ virtual void OnDriveAddedOrChangedL() = 0;
+ };
+// CLASS DECLARATION
+
+/**
+* This class listens file system events
+*
+* @lib FileManagerEngine.lib
+* @since 2.0
+*/
+NONSHARABLE_CLASS(CFmDriveEvent) : public CActive
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CFmDriveEvent* NewL( RFs& aFs, MFmDriveEventObserver* aObserver );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CFmDriveEvent();
+
+ public:
+
+ /**
+ * Sets file system event
+ * @since 2.0
+ */
+ void Setup();
+
+ protected: // Functions from base classes
+
+ /**
+ * From CActive Called when asynchronous request has completed
+ * @since 2.0
+ */
+ void RunL();
+
+ /**
+ * From CActive Called when asynchronous request has failed
+ * @since 2.0
+ */
+ TInt RunError( TInt aError );
+
+ /**
+ * From CActive Called when asynchronous request was cancelled
+ * @since 2.0
+ */
+ void DoCancel();
+
+ private:
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+ /**
+ * C++ default constructor.
+ */
+ CFmDriveEvent( RFs& aFs, MFmDriveEventObserver* aObserver );
+
+ private: // Data
+ // Ref: Reference to opened File System session
+ RFs& iFs;
+
+ // Ref: This object is called when RunL occurs
+ MFmDriveEventObserver *iObserver;
+ };
+
+#endif // CFMDRIVEEVENT_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.cpp Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The source file of drive event watcher private
+*/
+
+#include "fmdrivewatcherprivate.h"
+
+#include "fmdrivewatcher.h"
+#include "fmcommon.h"
+
+FmDriveWatcherPrivate::FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher ) :
+ q( driveWatcher )
+{
+ fs.Connect();
+ mDriveEvent = CFmDriveEvent::NewL( fs, this );
+}
+
+FmDriveWatcherPrivate::~FmDriveWatcherPrivate()
+{
+ fs.Close();
+ delete mDriveEvent;
+}
+
+
+void FmDriveWatcherPrivate::startWatch()
+{
+ mDriveEvent->Setup();
+}
+
+void FmDriveWatcherPrivate::cancelWatch()
+{
+ mDriveEvent->Cancel();
+}
+
+void FmDriveWatcherPrivate::OnDriveAddedOrChangedL()
+{
+ FmLogger::log( QString( "FmDriveWatcherPrivate::OnDriveAddedOrChangedL start" ) );
+ emit driveAddedOrChanged();
+ FmLogger::log( QString( "FmDriveWatcherPrivate::OnDriveAddedOrChangedL end" ) );
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.h Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The header file of drive event watcher private
+*/
+
+#ifndef FMDRIVEWATCHERPRIVATE_H
+#define FMDRIVEWATCHERPRIVATE_H
+
+#include <QObject>
+
+#include "fmdriveevent.h"
+
+#include <f32file.h>
+
+class FmDriveWatcher;
+
+class FmDriveWatcherPrivate : public QObject, public MFmDriveEventObserver
+{
+Q_OBJECT
+public:
+ FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher );
+ virtual ~FmDriveWatcherPrivate();
+
+ void startWatch();
+ void cancelWatch();
+
+ void onDriveAdded();
+ void onDriveRemoved();
+
+ void OnDriveAddedOrChangedL();
+signals:
+ void driveAddedOrChanged();
+
+private:
+ FmDriveWatcher *q;
+ CFmDriveEvent *mDriveEvent;
+ RFs fs;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/private/win32/fmdrivewatcherprivate.cpp Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The source file of drive event watcher private
+*/
+
+#include "fmdrivewatcherprivate.h"
+
+#include "fmdrivewatcher.h"
+
+FmDriveWatcherPrivate::FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher ) :
+ q( driveWatcher )
+{
+}
+
+FmDriveWatcherPrivate::~FmDriveWatcherPrivate()
+{
+}
+
+
+void FmDriveWatcherPrivate::startWatch()
+{
+
+}
+
+void FmDriveWatcherPrivate::cancelWatch()
+{
+
+}
+
+void FmDriveWatcherPrivate::onDriveAdded()
+{
+
+}
+void FmDriveWatcherPrivate::onDriveRemoved()
+{
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmdrivewatcher/private/win32/fmdrivewatcherprivate.h Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*
+* Description:
+* The header file of drive event watcher private
+*/
+
+#ifndef FMDRIVEWATCHERPRIVATE_H
+#define FMDRIVEWATCHERPRIVATE_H
+
+#include <QObject>
+
+class FmDriveWatcher;
+
+class FmDriveWatcherPrivate : public QObject
+{
+Q_OBJECT
+public:
+ FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher );
+ virtual ~FmDriveWatcherPrivate();
+
+ void startWatch();
+ void cancelWatch();
+
+ void onDriveAdded();
+ void onDriveRemoved();
+
+signals:
+ void driveAddedOrChanged();
+
+private:
+ FmDriveWatcher *q;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmfileiconprovider.cpp Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: filemanager file icon provider source file
+*
+*/
+
+#include "fmfileiconprovider.h"
+#include "fmutils.h"
+
+#include <QDir>
+#include <QFileInfo>
+
+#define mmcIcon ":image/qgn_prop_mmc_memc.svg"
+#define mmcNoneIcon ":image/qgn_prop_fmgr_mmc_no_sub.svg"
+#define mmcLockedIcon ":image/qgn_prop_mmc_locked.svg"
+#define phoneMemoryIcon ":image/qgn_prop_phone_memc.svg"
+#define usbMemoryIcon ":image/qgn_prop_usb_memc.svg"
+#define massMemoryIcon ":image/qgn_prop_fmgr_ms.svg"
+
+FmFileIconProvider::FmFileIconProvider()
+{
+
+}
+
+FmFileIconProvider::~FmFileIconProvider()
+{
+}
+
+QIcon FmFileIconProvider::icon(const QFileInfo &info) const
+{
+ QString filePath( info.path() );
+ if( FmUtils::isDrive( filePath ) ) {
+ FmDriverInfo::DriveState driveState = FmUtils::queryDriverInfo( filePath ).driveState();
+ if( driveState & FmDriverInfo::EDriveAvailable ){
+ if( driveState & FmDriverInfo::EDriveRemovable ) {
+ if( driveState & FmDriverInfo::EDriveMassStorage ) {
+ // Mass Storage
+ return QIcon( massMemoryIcon );
+ }
+ else{
+ //Memory Card
+ return QIcon( mmcIcon );
+ }
+ } else{
+ //Phone Memory
+ return QIcon( phoneMemoryIcon );
+ }
+ } else if( driveState & FmDriverInfo::EDriveLocked ) {
+ return QIcon( mmcLockedIcon );
+ } else if( driveState & FmDriverInfo::EDriveCorrupted ) {
+ return QIcon( mmcNoneIcon );
+ } else if( driveState & FmDriverInfo::EDriveNotPresent ){
+ return QIcon( mmcNoneIcon );
+ } else {
+ return QIcon( mmcNoneIcon );
+ }
+ } else {
+ return QFileIconProvider::icon( info );
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/inc/fmfileiconprovider.h Mon May 03 12:24:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* The header file of file icon provider of filemanager
+*/
+
+#ifndef FMFILEICONPROVIDER_H
+#define FMFILEICONPROVIDER_H
+
+#include <QFileIconProvider>
+
+class FmFileIconProvider : public QFileIconProvider
+{
+public:
+ FmFileIconProvider();
+ virtual ~FmFileIconProvider();
+
+ virtual QIcon icon(const QFileInfo &info) const;
+
+private:
+
+};
+
+#endif
--- a/filemanager/src/inc/fmutils.h Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/inc/fmutils.h Mon May 03 12:24:39 2010 +0300
@@ -26,26 +26,6 @@
class FmDriverInfo
{
public:
- FmDriverInfo( quint64 s, quint64 f, const QString &n, const QString &vN ) : mSize( s ), mFreeSize( f ), mName( n ), mVolumeName( vN ) {}
- FmDriverInfo( const FmDriverInfo &other )
- {
- *this = other;
- }
-
- FmDriverInfo &operator= ( const FmDriverInfo &rhs )
- {
- this->mSize = rhs.mSize;
- this->mFreeSize = rhs.mFreeSize;
- this->mName = rhs.mName;
- this->mVolumeName = rhs.mVolumeName;
- return *this;
- }
-
- quint64 size() const { return mSize; }
- quint64 freeSize() const { return mFreeSize; }
- QString name() const { return mName; }
- QString volumeName() const { return mVolumeName; }
-
enum driveState
{
EDriveNotPresent = 0x1,
@@ -63,48 +43,82 @@
EDriveEjectable = 0x1000,
EDriveInUse = 0x2000,
EDriveMassStorage = 0x4000,
- EDriveRam = 0x8000
+ EDriveRam = 0x8000,
+ EDriveAvailable = 0x10000
};
+ Q_DECLARE_FLAGS( DriveState, driveState )
+
+ FmDriverInfo( quint64 s, quint64 f, const QString &n, const QString &vN, const quint32 driveState ) :
+ mSize( s ), mFreeSize( f ), mName( n ), mVolumeName( vN ), mDriveState( driveState ) {}
+ FmDriverInfo( const FmDriverInfo &other )
+ {
+ *this = other;
+ }
+
+ FmDriverInfo &operator= ( const FmDriverInfo &rhs )
+ {
+ this->mSize = rhs.mSize;
+ this->mFreeSize = rhs.mFreeSize;
+ this->mName = rhs.mName;
+ this->mVolumeName = rhs.mVolumeName;
+ this->mDriveState = rhs.mDriveState;
+ return *this;
+ }
+
+ quint64 size() const { return mSize; }
+ quint64 freeSize() const { return mFreeSize; }
+ QString name() const { return mName; }
+ QString volumeName() const { return mVolumeName; }
+ DriveState driveState() const { return mDriveState; }
+
private:
quint64 mSize;
quint64 mFreeSize;
QString mName;
QString mVolumeName;
+ DriveState mDriveState;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS( FmDriverInfo::DriveState )
class FmUtils
{
public:
static QString getDriveNameFromPath( const QString &path );
+ static QString getDriveLetterFromPath( const QString &path );
static FmDriverInfo queryDriverInfo( const QString &driverName );
static QString formatStorageSize( quint64 size );
- static quint32 getDriverState( const QString &driverName );
+ //static quint32 getDriverState( const QString &driverName );
static int removeDrivePwd( const QString &driverName, const QString &Pwd );
static int unlockDrive( const QString &driverName, const QString &Pwd );
+ static int checkDrivePwd( const QString &driverName, const QString &pwd);
static int setDrivePwd( const QString &driverName, const QString &oldPwd, const QString &newPwd);
static void emptyPwd( QString &pwd );
static int renameDrive( const QString &driverName, const QString &newVolumeName);
- static int ejectDrive( const QString &driverName );
- static int formatDrive( const QString &driverName );
+ static void ejectDrive( const QString &driverName );
static QString getFileType( const QString &filePath );
static quint64 getDriveDetailsResult( const QString &folderPath, const QString &extension );
static bool isDriveC( const QString &driverName );
+ static bool isDrive( const QString &path );
static void createDefaultFolders( const QString &driverName );
static QString fillPathWithSplash( const QString &filePath );
static QString removePathSplash( const QString &filePath );
+ static QString formatPath( const QString &path );
static bool checkDriveFilter( const QString &driveName );
static QString checkDriveToFolderFilter( const QString &path );
static QString checkFolderToDriveFilter( const QString &path );
static bool isPathAccessabel( const QString &path );
static bool isDriveAvailable( const QString &path );
+ static bool isPathEqual( const QString &pathFst, const QString &pathLast );
/// fill driveList of drives can be shown in driveListView
static void getDriveList( QStringList &driveList, bool isHideUnAvailableDrive );
static QString fillDriveVolume( QString driveName, bool isFillWithDefaultVolume );
static int launchFile( const QString &filePath );
- static void sendFiles( QList<QVariant> filePathList );
+ static void sendFiles( QStringList &filePathList );
static QString getBurConfigPath( QString appPath );
+ static bool isDefaultFolder( const QString &folderPath );
+ static QString Localize( const QString &path );
};
--- a/filemanager/src/inc/fmutils_s60.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/inc/fmutils_s60.cpp Mon May 03 12:24:39 2010 +0300
@@ -30,6 +30,7 @@
#include <f32file.h>
#include <apgcli.h>
#include <pathinfo.h>
+#include <CDirectoryLocalizer.h>
#include <XQConversions>
#include <QStringList>
#include <QFileInfoList>
@@ -51,19 +52,95 @@
return path.left( 3 );
}
+QString FmUtils::getDriveLetterFromPath( const QString &path )
+{
+ if( path.length() <2 ) {
+ return QString();
+ }
+ return path.left( 1 );
+}
+
FmDriverInfo FmUtils::queryDriverInfo( const QString &driverName )
{
- CCoeEnv *env = CCoeEnv::Static();
- RFs& fs = env->FsSession();
+ CCoeEnv *env = CCoeEnv::Static();
+ RFs& fs = env->FsSession();
+
+ TVolumeInfo volumeInfo;
+ TInt drive = 0;
+ drive = driverName[0].toUpper().toAscii() - 'A' + EDriveA;
+
+ quint32 state( 0 );
+ int err = fs.Volume( volumeInfo, drive );
+ QString volumeName( (QChar*)( volumeInfo.iName.Des().Ptr() ), volumeInfo.iName.Length() );
- TVolumeInfo volumeInfo;
- TInt drive = 0;
- drive = driverName[0].toUpper().toAscii() - 'A' + EDriveA;
-
- fs.Volume( volumeInfo, drive );
- QString volumeName( (QChar*)( volumeInfo.iName.Des().Ptr() ), volumeInfo.iName.Length() );
-
- return FmDriverInfo( volumeInfo.iSize, volumeInfo.iFree, driverName, volumeName );
+ if( err == KErrNone ) {
+ TDriveInfo driveInfo = volumeInfo.iDrive;
+
+ quint32 drvStatus( 0 );
+ err = DriveInfo::GetDriveStatus( fs, drive, drvStatus );
+ if( err == KErrNone ) {
+ QString logString = driverName +':'+ QString::number( drvStatus);
+ FmLogger::log(logString);
+
+ if ( ( drvStatus & DriveInfo::EDriveInternal ) &&
+ ( drvStatus & DriveInfo::EDriveExternallyMountable ) ){
+ // Handle mass storage bits here
+
+ state |= FmDriverInfo::EDriveMassStorage | FmDriverInfo::EDriveRemovable;
+ }
+
+
+ if ( drvStatus & DriveInfo::EDriveRom ){
+ state |= FmDriverInfo::EDriveRom;
+ }
+
+ if ( drvStatus & DriveInfo::EDriveRam ){
+ state |= FmDriverInfo::EDriveRam;
+ }
+
+ if ( driveInfo.iMediaAtt & KMediaAttFormattable ){
+ state |= FmDriverInfo::EDriveFormattable;
+ }
+ if ( driveInfo.iMediaAtt & KMediaAttWriteProtected ){
+ state |= FmDriverInfo::EDriveWriteProtected;
+ }
+ if ( driveInfo.iMediaAtt & KMediaAttHasPassword ){
+ state |= FmDriverInfo::EDrivePasswordProtected;
+ }
+ if ( driveInfo.iMediaAtt & KMediaAttLocked ){
+ state |= FmDriverInfo::EDriveLocked;
+ }
+
+ if ( driveInfo.iDriveAtt & KDriveAttRemovable ){
+ state |= FmDriverInfo::EDriveRemovable;
+
+ if ( drvStatus & DriveInfo::EDriveSwEjectable ){
+ state |= FmDriverInfo::EDriveEjectable;
+ }
+ }
+
+ if( driveInfo.iType == EMediaNotPresent ){
+ state |= FmDriverInfo::EDriveNotPresent;
+ }
+ }
+ }
+ //handle error code
+ switch( err )
+ {
+ case KErrNone:
+ state |= FmDriverInfo::EDriveAvailable;
+ break;
+ case KErrLocked:
+ state |= FmDriverInfo::EDriveLocked;
+ break;
+ case KErrCorrupt:
+ state |= FmDriverInfo::EDriveCorrupted;
+ break;
+ default: // other errors
+ state |= FmDriverInfo::EDriveNotPresent;
+ break;
+ }
+ return FmDriverInfo( volumeInfo.iSize, volumeInfo.iFree, driverName, volumeName, state );
}
QString FmUtils::formatStorageSize( quint64 size )
@@ -78,19 +155,21 @@
return QString::number( size / ( 1024.0 * 1024.0 * 1024.0 ), 'f', 1 ) + " GB";
}
}
+/*
quint32 FmUtils::getDriverState( const QString &driverName )
{
- quint32 state( 0 );
CCoeEnv *env = CCoeEnv::Static();
- RFs& fs = env->FsSession();
+ RFs& fs = env->FsSession();
- TVolumeInfo volumeInfo;
- TInt drive = 0;
- drive = driverName[0].toUpper().toAscii() - 'A' + EDriveA;
+ TVolumeInfo volumeInfo;
+ TInt drive = 0;
+ drive = driverName[0].toUpper().toAscii() - 'A' + EDriveA;
- int err = fs.Volume( volumeInfo, drive );
+ quint32 state( 0 );
+ int err = fs.Volume( volumeInfo, drive );
+ QString volumeName( (QChar*)( volumeInfo.iName.Des().Ptr() ), volumeInfo.iName.Length() );
- //handle error code
+ //handle error code
if( err != KErrNone ) {
state |= FmDriverInfo::EDriveNotPresent;
}
@@ -150,6 +229,7 @@
return state;
}
+*/
int FmUtils::removeDrivePwd( const QString &driverName, const QString &Pwd )
{
@@ -178,7 +258,15 @@
logString = "Clear password error:" + QString::number( err );
FmLogger::log( logString );
- return err;
+ if( err == KErrNone ){
+ return FmErrNone;
+ }
+ else if( err == KErrAccessDenied ){
+ return FmErrAccessDenied;
+ }
+ else{
+ return FmErrUnKnown;
+ }
}
int FmUtils::unlockDrive( const QString &driverName, const QString &Pwd )
@@ -206,16 +294,37 @@
logString = "Unlock drive error:" + QString::number( err );
FmLogger::log( logString );
- return err;
+ if( err == KErrNone ){
+ return FmErrNone;
+ }
+ else if( err == KErrAccessDenied ){
+ return FmErrAccessDenied;
+ }
+ else if( err == KErrAlreadyExists ){
+ return FmErrAlreadyExists;
+ }
+ else if( err == KErrNotSupported ){
+ return FmErrNotSupported;
+ }
+ else{
+ return FmErrUnKnown;
+ }
+}
+
+int FmUtils::checkDrivePwd( const QString &driverName, const QString &pwd )
+{
+ QString logString = "checkDrivePwd Drive name:" + driverName;
+ logString += " password:" + pwd;
+ FmLogger::log( logString );
+
+ return setDrivePwd( driverName, pwd, pwd );
}
int FmUtils::setDrivePwd( const QString &driverName, const QString &oldPwd, const QString &newPwd)
{
- QString logString = "Drive name:" + driverName;
- FmLogger::log( logString );
- logString = "Old password:" + oldPwd;
- FmLogger::log( logString );
- logString = "New password:" + newPwd;
+ QString logString = "setDrivePwd Drive name:" + driverName ;
+ logString += " Old password:" + oldPwd;
+ logString += " New password:" + newPwd;
FmLogger::log( logString );
CCoeEnv *env = CCoeEnv::Static();
@@ -236,10 +345,6 @@
FmS60Utils::ConvertCharsToPwd( ptrNewPassword16, newPassword );
FmS60Utils::ConvertCharsToPwd( ptrOldPassword16, oldPassword );
- //oldPassword.FillZ(oldPassword.MaxLength());
- //oldPassword.Zero();
- //newPassword.Copy(_L8("A"));
-
int err( fs.LockDrive( drive, oldPassword, newPassword, ETrue ) );
logString = "Drive:" + QString::number( drive );
@@ -247,7 +352,15 @@
logString = "Password set error:" + QString::number( err );
FmLogger::log( logString );
- return err;
+ if( err == KErrNone ){
+ return FmErrNone;
+ }
+ else if( err == KErrNotSupported ){
+ return FmErrNotSupported;
+ }
+ else{
+ return FmErrUnKnown;
+ }
}
void FmUtils::emptyPwd( QString &pwd )
@@ -260,6 +373,17 @@
int FmUtils::renameDrive( const QString &driverName, const QString &newVolumeName)
{
+ foreach( QChar ch, newVolumeName )
+ {
+ bool a = ch.isSpace();
+ bool b = ch.isLetterOrNumber();
+ // If not alphadigit or space, return error
+ if( !ch.isLetterOrNumber() && !ch.isSpace() )
+ {
+ return FmErrBadName;
+ }
+ }
+
CCoeEnv *env = CCoeEnv::Static();
RFs& fs = env->FsSession();
@@ -273,154 +397,33 @@
QString logString = "Rename error:" + QString::number( err );
FmLogger::log( logString );
- return err;
+ if( err == KErrNone ){
+ return FmErrNone;
+ }
+ else if( err == KErrNotReady ){
+ return FmErrNotReady;
+ }
+ else{
+ return FmErrUnKnown;
+ }
}
-int FmUtils::ejectDrive( const QString &driverName )
+void FmUtils::ejectDrive( const QString &driverName )
{
- CCoeEnv *env = CCoeEnv::Static();
- RFs& fs = env->FsSession();
+ QString logString = "FmUtils::ejectDrive start";
+ FmLogger::log( logString );
TInt drive = 0;
drive = driverName[0].toUpper().toAscii() - 'A' + EDriveA;
const int KDriveShift = 16;
-
- TFileName fileSystemName;
- TInt err = fs.FileSystemName( fileSystemName, drive );
+ // Let SysAp handle eject
RProperty::Set(
KPSUidCoreApplicationUIs,
KCoreAppUIsMmcRemovedWithoutEject,
ECoreAppUIsEjectCommandUsedToDrive | ( drive << KDriveShift )
);
-
- err = fs.DismountFileSystem( fileSystemName, drive );
-
- if (err == KErrNone){
- // remount the file system
- err = fs.MountFileSystem( fileSystemName, drive );
-
- if (err == KErrInUse){
- // try to remount after a while if locked
- User::After(1000000);
- err = fs.MountFileSystem( fileSystemName, drive );
- }
- }
-
- return err;
-}
-
-int FmUtils::formatDrive( const QString &driverName )
-{
- RFormat format;
-
-// CCoeEnv *env = CCoeEnv::Static();
-// RFs& fs = env->FsSession();
-
- RFs fs;
- int err = fs.Connect();
-
- if( err != KErrNone ){
- return FmErrTypeFormatFailed;
- }
-
- TInt drive = 0;
- drive = driverName[0].toUpper().toAscii() - 'A' + EDriveA;
-
- TDriveName formatDriveName( TDriveUnit( drive ).Name() );
-
- int finalValue = 0;
-
- format.Close();
-
- err = format.Open(
- fs, formatDriveName, EFullFormat | ESpecialFormat, finalValue );
-
- QString logString = "Format open error:" + QString::number( err );
- FmLogger::log( logString );
-
- if( err == KErrLocked ){
- err = fs.ErasePassword( drive );
-
- logString = "ErasePassword error:" + QString::number( err );
- FmLogger::log( logString );
-
- if( err == KErrNone ){
- err = format.Open(
- fs, formatDriveName, EFullFormat, finalValue );
-
- logString = "Second format open error:" + QString::number( err );
- FmLogger::log( logString );
- }
- }
-
- if (err == KErrInUse){
- TBool reallyFormat = ETrue;
- if (reallyFormat)
- {
- err = format.Open(
- fs, formatDriveName, EFullFormat | EForceFormat, finalValue );
-
- logString = "Reallyformat open error:" + QString::number( err );
- FmLogger::log( logString );
- }
- }
-
- TFullName fsName;
- if ( err == KErrNone )
- {
- err = fs.FileSystemName( fsName, drive );
-
- logString = "FileSystemName error:" + QString::number( err );
- FmLogger::log( logString );
-
- if ( err == KErrNone && fsName.Length() > 0 )
- {
- // Prevent SysAp shutting down applications
- RProperty::Set(
- KPSUidCoreApplicationUIs,
- KCoreAppUIsMmcRemovedWithoutEject,
- ECoreAppUIsEjectCommandUsed );
-
- logString = "Prevent SysAp shutting down applications" ;
- FmLogger::log( logString );
- }
- else
- {
- // Don't continue with format if there is no file system name
- // or file system name could not be obtained.
- err = KErrCancel;
-
- logString = "Format cancel:" + QString::number( err );
- FmLogger::log( logString );
- }
- }
-
- if( err == KErrNone && finalValue ){
-
- while ( finalValue ){
- logString = "Format tracks:" + QString::number( finalValue );
- FmLogger::log( logString );
-
- err = format.Next( finalValue );
-
- if( err != KErrNone ){
- logString = "Format error:" + QString::number( err );
- FmLogger::log( logString );
- break;
- }
- }
- }
-
- if( !finalValue || err != KErrNone ){
- format.Close();
- fs.Close();
-
- createDefaultFolders( driverName );
- }
-
- return FmErrNone;
}
QString FmUtils::getFileType( const QString &filePath )
@@ -449,20 +452,11 @@
quint64 FmUtils::getDriveDetailsResult( const QString &folderPath, const QString &extension )
{
int err;
-// CCoeEnv *env = CCoeEnv::Static();
-// RFs& fs = env->FsSession();
RFs fs;
err = fs.Connect();
- QString string( folderPath );
-
- QRegExp regExp( "/" );
- string.replace( regExp, "\\" );
-
- if( string.right( 1 )!= "\\"){
- string.append( "\\" );
- }
+ QString string( formatPath( folderPath ) );
TPtrC desFolderPath( XQConversions::qStringToS60Desc( string )->Des() );
TPtrC ptrExtension( XQConversions::qStringToS60Desc( extension )->Des() );
@@ -523,6 +517,16 @@
}
+bool FmUtils::isDrive( const QString &path )
+{
+ bool ret( false );
+ if( path.length() <= 3 && path.length() >=2 ) {
+ ret = true;
+ }
+
+ return ret;
+}
+
void FmUtils::createDefaultFolders( const QString &driverName )
{
int err;
@@ -613,6 +617,7 @@
return newFilePath;
}
+// used to filter drive which need be hide.
bool FmUtils::checkDriveFilter( const QString &driveName )
{
if( driveName.contains( "D:" ) || driveName.contains( "Z:" ) ) {
@@ -623,11 +628,12 @@
QString FmUtils::checkDriveToFolderFilter( const QString &path )
{
+ /*
QFileInfo fileInfo( path );
if( !fileInfo.exists() ) {
return QString();
}
-
+ */
QString checkedPath = fillPathWithSplash( path );
if( checkedPath.compare( QString( "C:/"), Qt::CaseInsensitive ) == 0 ) {
checkedPath += QString( "data/" );
@@ -657,34 +663,53 @@
bool FmUtils::isPathAccessabel( const QString &path )
{
+ FmLogger::log( QString( "isPathAccessabel:" ) + path );
+ if( path.length() <= 3 && !isDriveAvailable( path ) ) { //used to filter locked drive
+ FmLogger::log( QString( "isPathAccessabel false: path is drive and not available" ) );
+ return false;
+ }
QFileInfo fileInfo( path );
if( fileInfo.absoluteFilePath().contains( QString( Drive_C ), Qt::CaseInsensitive ) &&
!fileInfo.absoluteFilePath().contains( QString( Folder_C_Data ), Qt::CaseInsensitive ) ) {
+ FmLogger::log( QString( "isPathAccessabel false: path contain C and not in data folder" ) );
return false;
}
if( fileInfo.absoluteFilePath().contains( QString( Drive_D ), Qt::CaseInsensitive ) ) {
+ FmLogger::log( QString( "isPathAccessabel false: path contain D" ) );
return false;
}
if( fileInfo.absoluteFilePath().contains( QString( Drive_Z ), Qt::CaseInsensitive ) ) {
+ FmLogger::log( QString( "isPathAccessabel false: path contain Z" ) );
return false;
}
if( !fileInfo.exists() ) {
+ FmLogger::log( QString( "isPathAccessabel false: path not exist" ) );
return false;
}
+ FmLogger::log( QString( "isPathAccessabel true" ) );
return true;
}
+// only used to check drive, when MMC is not inserted, also return false
bool FmUtils::isDriveAvailable( const QString &path )
{
- QFileInfo fileInfo( path );
- if( !fileInfo.exists() ) {
- return false;
+ FmLogger::log( QString( "isDriveAvailable:" ) + path );
+ FmDriverInfo::DriveState driveState = queryDriverInfo( path ).driveState();
+ if( ( driveState & FmDriverInfo::EDriveAvailable ) ) {
+ FmLogger::log( QString( "isDriveAvailable true" ) );
+ return true;
}
- return true;
+ FmLogger::log( QString( "isDriveAvailable false" ) );
+ return false;
}
void FmUtils::getDriveList( QStringList &driveList, bool isHideUnAvailableDrive )
{
+ if( isHideUnAvailableDrive ) {
+ FmLogger::log( QString( "getDriveList HideUnAvailableDrive_true" ) );
+ } else {
+ FmLogger::log( QString( "getDriveList HideUnAvailableDrive_false" ) );
+ }
QFileInfoList infoList = QDir::drives();
foreach( QFileInfo fileInfo, infoList ) {
@@ -712,8 +737,8 @@
QString volumeName = driverInfo.volumeName();
if( volumeName.isEmpty() && isFillWithDefaultVolume ){
- quint32 driveState = FmUtils::getDriverState( tempDriveName );
- if( !( driveState & FmDriverInfo::EDriveNotPresent ) ){
+ FmDriverInfo::DriveState driveState = queryDriverInfo( tempDriveName ).driveState();
+ if( driveState & FmDriverInfo::EDriveAvailable ){
if( driveState & FmDriverInfo::EDriveRemovable ) {
if( driveState & FmDriverInfo::EDriveMassStorage ) {
volumeName.append( QObject::tr( "Mass Storage" ) );
@@ -762,10 +787,10 @@
return FmErrNone;
}
-void FmUtils::sendFiles( QList<QVariant> filePathList )
+void FmUtils::sendFiles( QStringList &filePathList )
{
ShareUi shareui;
- shareui.init( filePathList, false );
+ shareui.send( filePathList, false );
}
QString FmUtils::getBurConfigPath( QString appPath )
@@ -774,3 +799,65 @@
QString path( BURCONFIGFILE );
return path;
}
+
+bool FmUtils::isPathEqual( const QString &pathFst, const QString &pathLast )
+{
+ QString fst( fillPathWithSplash( pathFst ) );
+ QString last( fillPathWithSplash( pathLast ) );
+ if( fst.compare( last, Qt::CaseInsensitive ) == 0 ) {
+ return true;
+ }
+ return false;
+}
+
+bool FmUtils::isDefaultFolder( const QString &folderPath )
+{
+ TPtrC desFolderPath( XQConversions::qStringToS60Desc( folderPath )->Des() );
+
+ TInt pathType( PathInfo::PathType( desFolderPath ) );
+ switch( pathType ){
+ case PathInfo::ENotSystemPath:{
+ QString locString( Localize( folderPath ) );
+ if ( locString.isEmpty() ){
+ return false;
+ }
+ return true;
+ }
+ case PathInfo::EPhoneMemoryRootPath: // FALL THROUGH
+ case PathInfo::EMemoryCardRootPath: // FALL THROUGH
+ case PathInfo::ERomRootPath:{
+ return false;
+ }
+ // Accept other folders
+ default:{
+ return true;
+ }
+ }
+}
+
+QString FmUtils::Localize( const QString &path )
+{
+ QString locPath = formatPath( path );
+
+ TPtrC desPath( XQConversions::qStringToS60Desc( locPath )->Des() );
+ CDirectoryLocalizer *localizer = CDirectoryLocalizer::NewL();
+
+ localizer->SetFullPath( desPath );
+ if( localizer->IsLocalized() ){
+ return XQConversions::s60DescToQString( localizer->LocalizedName() );
+ }
+
+ return QString();
+}
+
+QString FmUtils::formatPath( const QString &path )
+{
+ QString formatPath = path;
+ QRegExp regExp( "/" );
+ formatPath.replace( regExp, "\\" );
+
+ if( path.right( 1 )!= "\\"){
+ formatPath.append( "\\" );
+ }
+ return formatPath;
+}
--- a/filemanager/src/inc/fmutils_win.cpp Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/inc/fmutils_win.cpp Mon May 03 12:24:39 2010 +0300
@@ -35,6 +35,14 @@
return path.left( 3 );
}
+QString FmUtils::getDriveLetterFromPath( const QString &path )
+{
+ if( path.length() <3 ) {
+ return QString();
+ }
+ return path.left( 1 );
+}
+
FmDriverInfo FmUtils::queryDriverInfo( const QString &driverName )
{
quint64 size = 0;
@@ -60,7 +68,12 @@
0,
0 );
- return FmDriverInfo( size, freeSize, driverName, QString::fromWCharArray( &volumeName[0] ) );
+ quint32 state( 0 );
+ quint32 drvStatus = GetDriveType( (LPCWSTR)driver.constData() );
+ if ( drvStatus == DRIVE_REMOVABLE ) {
+ state |= FmDriverInfo::EDriveRemovable;
+ }
+ return FmDriverInfo( size, freeSize, driverName, QString::fromWCharArray( &volumeName[0] ), state );
}
QString FmUtils::formatStorageSize( quint64 size )
@@ -75,7 +88,7 @@
return QString::number( size / ( 1024.0 * 1024.0 * 1024.0 ), 'f', 1 ) + " GB";
}
}
-
+/*
quint32 FmUtils::getDriverState( const QString &driverName )
{
quint32 state( 0 );
@@ -96,7 +109,7 @@
return state;
}
-
+*/
int FmUtils::removeDrivePwd( const QString &driverName, const QString &Pwd )
{
Q_UNUSED( driverName );
@@ -111,6 +124,13 @@
return 0;
}
+int FmUtils::checkDrivePwd( const QString &driverName, const QString &pwd)
+{
+ Q_UNUSED( driverName );
+ Q_UNUSED( pwd );
+ return 0;
+}
+
int FmUtils::setDrivePwd( const QString &driverName, const QString &oldPwd, const QString &newPwd)
{
Q_UNUSED( driverName );
@@ -127,19 +147,20 @@
int FmUtils::renameDrive( const QString &driverName, const QString &newVolumeName)
{
Q_UNUSED( driverName );
- Q_UNUSED( newVolumeName );
+ foreach( QChar ch, newVolumeName )
+ {
+ // If not alphadigit or space, return error
+ if( !ch.isLetterOrNumber() && !ch.isSpace() )
+ {
+ return FmErrBadName;
+ }
+ }
return 0;
}
-int FmUtils::ejectDrive( const QString &driverName )
+void FmUtils::ejectDrive( const QString &driverName )
{
Q_UNUSED( driverName );
- return 0;
-}
-int FmUtils::formatDrive( const QString &driverName )
-{
- Q_UNUSED( driverName );
- return 0;
}
QString FmUtils::getFileType( const QString &filePath )
@@ -161,6 +182,16 @@
return false;
}
+bool FmUtils::isDrive( const QString &path )
+{
+ bool ret( false );
+ if( path.length() <= 3 && path.length() >=2 ) {
+ ret = true;
+ }
+
+ return ret;
+}
+
void FmUtils::createDefaultFolders( const QString &driverName )
{
Q_UNUSED( driverName );
@@ -304,7 +335,7 @@
QString volumeName = driverInfo.volumeName();
if( volumeName.isEmpty() && isFillWithDefaultVolume ){
- quint32 driveState = FmUtils::getDriverState( tempDriveName );
+ FmDriverInfo::DriveState driveState = FmUtils::queryDriverInfo( tempDriveName ).FmDriverInfo::driveState();
if( !( driveState & FmDriverInfo::EDriveNotPresent ) ){
if( driveState & FmDriverInfo::EDriveRemovable ) {
if( driveState & FmDriverInfo::EDriveMassStorage ) {
@@ -333,9 +364,9 @@
}
}
-void FmUtils::sendFiles( QList<QVariant> filePathList )
+void FmUtils::sendFiles( QStringList &filePathList )
{
- Q_UNUSED( filePathList );
+
}
QString FmUtils::getBurConfigPath( QString appPath )
@@ -347,3 +378,25 @@
path = path + QString( BURCONFIGFILE );
return path;
}
+
+bool FmUtils::isPathEqual( const QString &pathFst, const QString &pathLast )
+{
+ QString fst( fillPathWithSplash( pathFst ) );
+ QString last( fillPathWithSplash( pathLast ) );
+ if( fst.compare( last, Qt::CaseInsensitive ) == 0 ) {
+ return true;
+ }
+ return false;
+}
+
+bool FmUtils::isDefaultFolder( const QString &folderPath )
+{
+ Q_UNUSED( folderPath );
+ return false;
+}
+
+QString FmUtils::formatPath( const QString &path )
+{
+ Q_UNUSED( path );
+ return false;
+}