diff options
author | assarbad <none@none> | 2004-11-26 00:13:38 +0300 |
---|---|---|
committer | assarbad <none@none> | 2004-11-26 00:13:38 +0300 |
commit | 76efed582797c7c4d41056f4909dad4d8fe5cd6f (patch) | |
tree | 7f37a305556bbc5acd2e4194dfc7fe78738452be | |
parent | 054a73ec1a666ed882cb88f2825702b5329a157d (diff) |
- Implemented "attributes" column in the treelist
- Adopted width in German dialog
- Provided German, Russian and English version of IDS_TREECOL_ATTRIBUTES
-rw-r--r-- | CHANGELOG.txt | 1 | ||||
-rw-r--r-- | TODO.txt | 7 | ||||
-rw-r--r-- | wdsr0407/resource.h | 1 | ||||
-rw-r--r-- | wdsr0407/windirstat.rc | 5 | ||||
-rw-r--r-- | wdsr040c/resource.h | 1 | ||||
-rw-r--r-- | wdsr040c/windirstat.rc | 1 | ||||
-rwxr-xr-x | wdsr0415/resource.h | 1 | ||||
-rwxr-xr-x | wdsr0415/windirstat.rc | 1 | ||||
-rw-r--r-- | wdsr0419/resource.h | 1 | ||||
-rw-r--r-- | wdsr0419/windirstat.rc | 2 | ||||
-rw-r--r-- | windirstat/dirstatview.cpp | 6 | ||||
-rw-r--r-- | windirstat/globalhelpers.cpp | 33 | ||||
-rw-r--r-- | windirstat/globalhelpers.h | 6 | ||||
-rw-r--r-- | windirstat/item.cpp | 12 | ||||
-rw-r--r-- | windirstat/resource.h | 1 | ||||
-rw-r--r-- | windirstat/windirstat.rc | 1 |
16 files changed, 73 insertions, 7 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8418c7e..6e5ef56 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,7 @@ Last modified: $Date$ * Fixed coloring bug upon error codes #2 and #123 which happens using the ANSI version on files with Unicode names which cannot be mapped to ANSI names. + * Implemented the column to show file attributes. 2004-11-24 bseifert * Eliminated hidden option "ExplorerStyle". The directory @@ -2,7 +2,8 @@ TODO.txt - What still has to been done to WinDirStat Last modified: $Date$ ============================================================= -- Setup: Translate IDS_CREATEINGSENDTOSHORTCUT and IDC_SHORTCUTSENDTO. +- Setup: Translate IDS_CREATEINGSENDTOSHORTCUT, IDC_SHORTCUTSENDTO and + IDS_TREECOL_ATTRIBUTES. - Credit Sam (UltraSam (sam.fd@wanadoo.fr)) for his efforts to translate the missing parts to French. Credit assarbad as co-developer since Oct/2004, @@ -10,10 +11,6 @@ Last modified: $Date$ Credit Dariusz 'Darek' Malachowski for Polish translation Credit Sergiy 'Polet' Polyetayev for Russian translation => bseifert - -- Add a column for file attributes to the directory list. Same design - as in Windows Explorer "RHSAEC" etc. - => assarbad - Multiple selection (and deletion). Concept first! Which cleanup actions will still be enabled diff --git a/wdsr0407/resource.h b/wdsr0407/resource.h index f92744b..0b591fb 100644 --- a/wdsr0407/resource.h +++ b/wdsr0407/resource.h @@ -9,6 +9,7 @@ #define IDS_QUERYING 129 #define IDS_NOTACCESSIBLE 130 #define IDB_NODES 131 +#define IDS_TREECOL_ATTRIBUTES 131 #define IDD_SELECTDRIVES 133 #define IDR_POPUPLIST 134 #define IDB_IMAGELIST 135 diff --git a/wdsr0407/windirstat.rc b/wdsr0407/windirstat.rc index 8ebaaaf..6a96e6d 100644 --- a/wdsr0407/windirstat.rc +++ b/wdsr0407/windirstat.rc @@ -450,9 +450,9 @@ BEGIN CONTROL "&Größen im GB/MB/kB/Bytes-Format anzeigen", IDC_HUMANFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,32, 41,229,10 - GROUPBOX "&Listenstil",IDC_STATIC,30,61,90,65 + GROUPBOX "&Listenstil",IDC_STATIC,30,61,96,65 CONTROL "Ganze &Zeile markieren",IDC_FULLROWSELECTION,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,38,76,75,10 + BS_AUTOCHECKBOX | WS_TABSTOP,38,76,81,10 CONTROL "&Raster",IDC_SHOWGRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,93,68,10 CONTROL "S&treifen",IDC_SHOWSTRIPES,"Button",BS_AUTOCHECKBOX | @@ -625,6 +625,7 @@ BEGIN IDR_MAINFRAME "WinDirStat\n\nWinDirStat\n\n\n\n" IDS_QUERYING "(Abfrage läuft...)" IDS_NOTACCESSIBLE "(nicht verfügbar)" + IDS_TREECOL_ATTRIBUTES "Attribute" END STRINGTABLE diff --git a/wdsr040c/resource.h b/wdsr040c/resource.h index f92744b..0b591fb 100644 --- a/wdsr040c/resource.h +++ b/wdsr040c/resource.h @@ -9,6 +9,7 @@ #define IDS_QUERYING 129 #define IDS_NOTACCESSIBLE 130 #define IDB_NODES 131 +#define IDS_TREECOL_ATTRIBUTES 131 #define IDD_SELECTDRIVES 133 #define IDR_POPUPLIST 134 #define IDB_IMAGELIST 135 diff --git a/wdsr040c/windirstat.rc b/wdsr040c/windirstat.rc index bac4060..635a04f 100644 --- a/wdsr040c/windirstat.rc +++ b/wdsr040c/windirstat.rc @@ -642,6 +642,7 @@ BEGIN IDR_MAINFRAME "WinDirStat\n\nWinDirStat\n\n\n\n" IDS_QUERYING "(accès en cours...)" IDS_NOTACCESSIBLE "(indisponible)" + IDS_TREECOL_ATTRIBUTES "Attributes" END STRINGTABLE diff --git a/wdsr0415/resource.h b/wdsr0415/resource.h index f92744b..0b591fb 100755 --- a/wdsr0415/resource.h +++ b/wdsr0415/resource.h @@ -9,6 +9,7 @@ #define IDS_QUERYING 129 #define IDS_NOTACCESSIBLE 130 #define IDB_NODES 131 +#define IDS_TREECOL_ATTRIBUTES 131 #define IDD_SELECTDRIVES 133 #define IDR_POPUPLIST 134 #define IDB_IMAGELIST 135 diff --git a/wdsr0415/windirstat.rc b/wdsr0415/windirstat.rc index 49ee06a..dd167ee 100755 --- a/wdsr0415/windirstat.rc +++ b/wdsr0415/windirstat.rc @@ -637,6 +637,7 @@ BEGIN IDR_MAINFRAME "WinDirStat\n\nWinDirStat\n\n\n\n" IDS_QUERYING "(skanowanie...)" IDS_NOTACCESSIBLE "(niedostêpne)" + IDS_TREECOL_ATTRIBUTES "Attributes" END STRINGTABLE diff --git a/wdsr0419/resource.h b/wdsr0419/resource.h index f92744b..0b591fb 100644 --- a/wdsr0419/resource.h +++ b/wdsr0419/resource.h @@ -9,6 +9,7 @@ #define IDS_QUERYING 129 #define IDS_NOTACCESSIBLE 130 #define IDB_NODES 131 +#define IDS_TREECOL_ATTRIBUTES 131 #define IDD_SELECTDRIVES 133 #define IDR_POPUPLIST 134 #define IDB_IMAGELIST 135 diff --git a/wdsr0419/windirstat.rc b/wdsr0419/windirstat.rc index f835fcd..ea9ffdd 100644 --- a/wdsr0419/windirstat.rc +++ b/wdsr0419/windirstat.rc @@ -642,6 +642,7 @@ BEGIN IDR_MAINFRAME "WinDirStat\n\nWinDirStat\n\n\n\n" IDS_QUERYING "(çàïðàøèâàåòñÿ...)" IDS_NOTACCESSIBLE "(íåäîñòóïíî)" + IDS_TREECOL_ATTRIBUTES "Àòðèáóòû" END STRINGTABLE @@ -870,6 +871,7 @@ END ///////////////////////////////////////////////////////////////////////////// + #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // diff --git a/windirstat/dirstatview.cpp b/windirstat/dirstatview.cpp index 0e67eb0..7612053 100644 --- a/windirstat/dirstatview.cpp +++ b/windirstat/dirstatview.cpp @@ -272,6 +272,7 @@ int CDirstatView::OnCreate(LPCREATESTRUCT lpCreateStruct) m_treeListControl.InsertColumn(COL_FILES, LoadString(IDS_TREECOL_FILES), LVCFMT_RIGHT, 55, COL_FILES); m_treeListControl.InsertColumn(COL_SUBDIRS, LoadString(IDS_TREECOL_SUBDIRS), LVCFMT_RIGHT, 55, COL_SUBDIRS); m_treeListControl.InsertColumn(COL_LASTCHANGE, LoadString(IDS_TREECOL_LASTCHANGE), LVCFMT_LEFT, 120, COL_LASTCHANGE); + m_treeListControl.InsertColumn(COL_ATTRIBUTES, LoadString(IDS_TREECOL_ATTRIBUTES), LVCFMT_LEFT, 50, COL_ATTRIBUTES); m_treeListControl.OnColumnsInserted(); @@ -413,6 +414,11 @@ void CDirstatView::Dump(CDumpContext& dc) const // $Log$ +// Revision 1.13 2004/11/25 21:13:38 assarbad +// - Implemented "attributes" column in the treelist +// - Adopted width in German dialog +// - Provided German, Russian and English version of IDS_TREECOL_ATTRIBUTES +// // Revision 1.12 2004/11/24 20:28:12 bseifert // Implemented context menu compromise. // diff --git a/windirstat/globalhelpers.cpp b/windirstat/globalhelpers.cpp index e9213db..8cee798 100644 --- a/windirstat/globalhelpers.cpp +++ b/windirstat/globalhelpers.cpp @@ -211,6 +211,34 @@ CString FormatFileTime(const FILETIME& t) return date + _T(" ") + time; } +CString FormatAttributes(const DWORD& attr) +{ + if(attr == INVALID_FILE_ATTRIBUTES) + return _T("?????"); + + CString attributes; + + if(attr & FILE_ATTRIBUTE_READONLY) + attributes.Append(_T("R")); + + if(attr & FILE_ATTRIBUTE_HIDDEN) + attributes.Append(_T("H")); + + if(attr & FILE_ATTRIBUTE_SYSTEM) + attributes.Append(_T("S")); + + if(attr & FILE_ATTRIBUTE_ARCHIVE) + attributes.Append(_T("A")); + + if(attr & FILE_ATTRIBUTE_COMPRESSED) + attributes.Append(_T("C")); + + if(attr & FILE_ATTRIBUTE_ENCRYPTED) + attributes.Append(_T("E")); + + return attributes; +} + CString FormatMilliseconds(DWORD ms) { CString ret; @@ -609,6 +637,11 @@ LPCITEMIDLIST SHGetPIDLFromPath(CString path) */ // $Log$ +// Revision 1.19 2004/11/25 21:13:38 assarbad +// - Implemented "attributes" column in the treelist +// - Adopted width in German dialog +// - Provided German, Russian and English version of IDS_TREECOL_ATTRIBUTES +// // Revision 1.18 2004/11/25 11:58:52 assarbad // - Minor fixes (odd behavior of coloring in ANSI version, caching of the GetCompressedFileSize API) // for details see the changelog.txt diff --git a/windirstat/globalhelpers.h b/windirstat/globalhelpers.h index 5e527d3..acc5c95 100644 --- a/windirstat/globalhelpers.h +++ b/windirstat/globalhelpers.h @@ -34,6 +34,7 @@ CString FormatCount(LONGLONG n); CString FormatDouble(double d); CString PadWidthBlanks(CString n, int width); CString FormatFileTime(const FILETIME& t); +CString FormatAttributes(const DWORD& attr); CString FormatMilliseconds(DWORD ms); CString GetParseNameOfMyComputer() throw (CException *); void GetPidlOfMyComputer(LPITEMIDLIST *ppidl) throw (CException *); @@ -59,6 +60,11 @@ CString GetSpec_GB(); CString GetSpec_TB(); // $Log$ +// Revision 1.14 2004/11/25 21:13:38 assarbad +// - Implemented "attributes" column in the treelist +// - Adopted width in German dialog +// - Provided German, Russian and English version of IDS_TREECOL_ATTRIBUTES +// // Revision 1.13 2004/11/25 11:58:52 assarbad // - Minor fixes (odd behavior of coloring in ANSI version, caching of the GetCompressedFileSize API) // for details see the changelog.txt diff --git a/windirstat/item.cpp b/windirstat/item.cpp index e26476b..c30c7db 100644 --- a/windirstat/item.cpp +++ b/windirstat/item.cpp @@ -176,6 +176,13 @@ CString CItem::GetText(int subitem) const } break; + case COL_ATTRIBUTES: + if (GetType() != IT_FREESPACE && GetType() != IT_UNKNOWN && GetType() != IT_MYCOMPUTER && GetType() != IT_FILESFOLDER) + { + s = FormatAttributes(GetFileAttributes(GetPath())); + } + break; + default: ASSERT(0); break; @@ -1533,6 +1540,11 @@ void CItem::DrivePacman() // $Log$ +// Revision 1.19 2004/11/25 21:13:38 assarbad +// - Implemented "attributes" column in the treelist +// - Adopted width in German dialog +// - Provided German, Russian and English version of IDS_TREECOL_ATTRIBUTES +// // Revision 1.18 2004/11/25 11:58:52 assarbad // - Minor fixes (odd behavior of coloring in ANSI version, caching of the GetCompressedFileSize API) // for details see the changelog.txt diff --git a/windirstat/resource.h b/windirstat/resource.h index f92744b..0b591fb 100644 --- a/windirstat/resource.h +++ b/windirstat/resource.h @@ -9,6 +9,7 @@ #define IDS_QUERYING 129 #define IDS_NOTACCESSIBLE 130 #define IDB_NODES 131 +#define IDS_TREECOL_ATTRIBUTES 131 #define IDD_SELECTDRIVES 133 #define IDR_POPUPLIST 134 #define IDB_IMAGELIST 135 diff --git a/windirstat/windirstat.rc b/windirstat/windirstat.rc index a04ee6d..8a11d2a 100644 --- a/windirstat/windirstat.rc +++ b/windirstat/windirstat.rc @@ -643,6 +643,7 @@ BEGIN IDR_MAINFRAME "WinDirStat\n\nWinDirStat\n\n\n\n" IDS_QUERYING "(querying...)" IDS_NOTACCESSIBLE "(unavailable)" + IDS_TREECOL_ATTRIBUTES "Attributes" END STRINGTABLE |