diff options
author | George Hazan <ghazan@miranda.im> | 2018-08-01 22:06:18 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-08-01 22:06:18 +0300 |
commit | 648fba0f4258b3fc8351a307b2eb75d2f1b898b5 (patch) | |
tree | f261e2e94cc59dc3748e5fdee030046392b0cdee /src | |
parent | 3f58bf0b059e58cd1aa9d4cc1ab50f6c01d21654 (diff) |
fixes #1463 (Miranda asks to create database if already opened)
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/profilemanager.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp index 9bdc5bb863..c1d4b7e47c 100644 --- a/src/mir_app/src/profilemanager.cpp +++ b/src/mir_app/src/profilemanager.cpp @@ -279,13 +279,17 @@ class CChooseProfileDlg : public CDlgBase DATABASELINK *dblink; switch (touchDatabase(tszFullPath, &dblink)) { case ERROR_SUCCESS: - item.iImage = bFileLocked; + item.iImage = 0; break; case EGROKPRF_OBSOLETE: item.iImage = 2; break; + case EGROKPRF_CANTREAD: + item.iImage = (bFileLocked) ? 1 : 3; + break; + default: item.iImage = 3; } @@ -298,13 +302,12 @@ class CChooseProfileDlg : public CDlgBase list.SetItemText(iItem, 2, sizeBuf); - if (dblink != nullptr) { - if (bFileLocked) // file locked - list.SetItemText(iItem, 1, TranslateT("<In use>")); - else - list.SetItemText(iItem, 1, TranslateW(dblink->szFullName)); - } - else list.SetItemText(iItem, 1, TranslateT("<Unknown format>")); + if (dblink != nullptr) + list.SetItemText(iItem, 1, TranslateW(dblink->szFullName)); + else if (bFileLocked) // file locked + list.SetItemText(iItem, 1, TranslateT("<In use>")); + else + list.SetItemText(iItem, 1, TranslateT("<Unknown format>")); return TRUE; } |