Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver <bitbucket@assarbad.net>2017-03-15 23:31:34 +0300
committerOliver <bitbucket@assarbad.net>2017-03-15 23:31:34 +0300
commit5b0c1da8e52115d9344c63374df2392bfc9340c0 (patch)
tree7f7efe52353ba562f653ddf60aaa5109d3ca4fad
parent7ec44caad3fdc9fa92312e82b3d2a7200615a39a (diff)
parentad5274e0bf7f41753ece156ecac9fd31c6465e6f (diff)
Merged in neopi21/windirstat (pull request #5)
Partially answer to ticket #110 Approved-by: Oliver
-rw-r--r--windirstat/PageGeneral.cpp10
-rw-r--r--windirstat/PageGeneral.h5
-rw-r--r--windirstat/item.cpp4
-rw-r--r--windirstat/options.cpp30
-rw-r--r--windirstat/options.h5
-rw-r--r--windirstat/resource.h3
-rw-r--r--windirstat/windirstat.rc21
7 files changed, 60 insertions, 18 deletions
diff --git a/windirstat/PageGeneral.cpp b/windirstat/PageGeneral.cpp
index 4fd72a4..b0879cf 100644
--- a/windirstat/PageGeneral.cpp
+++ b/windirstat/PageGeneral.cpp
@@ -59,6 +59,7 @@ void CPageGeneral::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_SHOWGRID, m_listGrid);
DDX_Check(pDX, IDC_SHOWSTRIPES, m_listStripes);
DDX_Check(pDX, IDC_FULLROWSELECTION, m_listFullRowSelection);
+ DDX_Check(pDX, IDC_SKIPHIDDEN, m_skipHidden);
}
@@ -71,6 +72,7 @@ BEGIN_MESSAGE_MAP(CPageGeneral, CPropertyPage)
ON_BN_CLICKED(IDC_SHOWGRID, OnBnClickedListGrid)
ON_BN_CLICKED(IDC_SHOWSTRIPES, OnBnClickedListStripes)
ON_BN_CLICKED(IDC_FULLROWSELECTION, OnBnClickedListFullRowSelection)
+ ON_BN_CLICKED(IDC_SKIPHIDDEN, OnBnClickedSkipHidden)
END_MESSAGE_MAP()
@@ -87,6 +89,7 @@ BOOL CPageGeneral::OnInitDialog()
m_followMountPoints = GetOptions()->IsFollowMountPoints();
m_followJunctionPoints = GetOptions()->IsFollowJunctionPoints();
m_useWdsLocale = GetOptions()->IsUseWdsLocale();
+ m_skipHidden = GetOptions()->IsSkipHidden();
m_followMountPoints = false; // Otherwise we would see pacman only.
m_ctlFollowMountPoints.ShowWindow(SW_HIDE); // Ignorance is bliss.
@@ -131,6 +134,7 @@ void CPageGeneral::OnOK()
GetOptions()->SetListGrid(FALSE != m_listGrid);
GetOptions()->SetListStripes(FALSE != m_listStripes);
GetOptions()->SetListFullRowSelection(FALSE != m_listFullRowSelection);
+ GetOptions()->SetSkipHidden(FALSE != m_skipHidden);
LANGID id = (LANGID)m_combo.GetItemData(m_combo.GetCurSel());
CLanguageOptions::SetLanguage(id);
@@ -179,3 +183,9 @@ void CPageGeneral::OnCbnSelendokCombo()
GetSheet()->SetLanguageChanged(i != m_originalLanguage);
SetModified();
}
+
+
+void CPageGeneral::OnBnClickedSkipHidden()
+{
+ SetModified();
+}
diff --git a/windirstat/PageGeneral.h b/windirstat/PageGeneral.h
index e451f2c..7f1b8dd 100644
--- a/windirstat/PageGeneral.h
+++ b/windirstat/PageGeneral.h
@@ -51,10 +51,12 @@ protected:
BOOL m_listGrid;
BOOL m_listStripes;
BOOL m_listFullRowSelection;
+ BOOL m_skipHidden;
CComboBox m_combo;
CButton m_ctlFollowMountPoints;
CButton m_ctlFollowJunctionPoints;
+ CButton m_ctlSkipHidden;
int m_originalLanguage;
@@ -66,7 +68,8 @@ protected:
afx_msg void OnCbnSelendokCombo();
afx_msg void OnBnClickedListGrid();
afx_msg void OnBnClickedListStripes();
- afx_msg void OnBnClickedListFullRowSelection();
+ afx_msg void OnBnClickedListFullRowSelection();
+ afx_msg void OnBnClickedSkipHidden();
};
#endif // __WDS_PAGEGENERAL_H__
diff --git a/windirstat/item.cpp b/windirstat/item.cpp
index 4063811..789cb04 100644
--- a/windirstat/item.cpp
+++ b/windirstat/item.cpp
@@ -1078,6 +1078,10 @@ void CItem::DoSomeWork(CWorkLimiter* limiter)
{
continue;
}
+ if(GetOptions()->IsSkipHidden() && finder.IsHidden())
+ {
+ continue;
+ }
if(finder.IsDirectory())
{
dirCount++;
diff --git a/windirstat/options.cpp b/windirstat/options.cpp
index 6bec487..3a677fa 100644
--- a/windirstat/options.cpp
+++ b/windirstat/options.cpp
@@ -78,6 +78,7 @@ namespace
const LPCTSTR entryLightSourceY = _T("lightSourceY");
const LPCTSTR entryFollowMountPoints = _T("followMountPoints");
const LPCTSTR entryFollowJunctionPoints = _T("followJunctionPoints");
+ const LPCTSTR entrySkipHidden = _T("skipHidden");
const LPCTSTR entryUseWdsLocale = _T("useWdsLocale");
const LPCTSTR sectionUserDefinedCleanupD= _T("options\\userDefinedCleanup%02d");
@@ -813,6 +814,19 @@ void COptions::SetUseWdsLocale(bool use)
}
}
+bool COptions::IsSkipHidden()
+{
+ return m_skipHidden;
+}
+
+void COptions::SetSkipHidden(bool skip)
+{
+ if(m_skipHidden != skip)
+ {
+ m_skipHidden = skip;
+ }
+}
+
CString COptions::GetReportSubject()
{
return m_reportSubject;
@@ -865,9 +879,9 @@ void COptions::SetReportSuffix(LPCTSTR suffix)
void COptions::SaveToRegistry()
{
int i = 0;
- getProfileBool(sectionOptions, entryListGrid, m_listGrid);
- getProfileBool(sectionOptions, entryListStripes, m_listStripes);
- getProfileBool(sectionOptions, entryListFullRowSelection, m_listFullRowSelection);
+ setProfileBool(sectionOptions, entryListGrid, m_listGrid);
+ setProfileBool(sectionOptions, entryListStripes, m_listStripes);
+ setProfileBool(sectionOptions, entryListFullRowSelection, m_listFullRowSelection);
setProfileInt(sectionOptions, entryTreelistColorCount, m_treelistColorCount);
for(i = 0; i < TREELISTCOLORCOUNT; i++)
@@ -876,16 +890,17 @@ void COptions::SaveToRegistry()
entry.Format(entryTreelistColorN, i);
setProfileInt(sectionOptions, entry, m_treelistColor[i]);
}
- getProfileBool(sectionOptions, entryHumanFormat, m_humanFormat);
- getProfileBool(sectionOptions, entryPacmanAnimation, m_pacmanAnimation);
- getProfileBool(sectionOptions, entryShowTimeSpent, m_showTimeSpent);
+ setProfileBool(sectionOptions, entryHumanFormat, m_humanFormat);
+ setProfileBool(sectionOptions, entrySkipHidden, m_skipHidden);
+ setProfileBool(sectionOptions, entryPacmanAnimation, m_pacmanAnimation);
+ setProfileBool(sectionOptions, entryShowTimeSpent, m_showTimeSpent);
setProfileInt(sectionOptions, entryTreemapHighlightColor, m_treemapHighlightColor);
SaveTreemapOptions();
getProfileBool(sectionOptions, entryFollowMountPoints, m_followMountPoints);
getProfileBool(sectionOptions, entryFollowJunctionPoints, m_followJunctionPoints);
- getProfileBool(sectionOptions, entryUseWdsLocale, m_useWdsLocale);
+ setProfileBool(sectionOptions, entryUseWdsLocale, m_useWdsLocale);
for(i = 0; i < USERDEFINEDCLEANUPCOUNT; i++)
{
@@ -950,6 +965,7 @@ void COptions::LoadFromRegistry()
m_treelistColor[i]= getProfileInt(sectionOptions, entry, treelistColorDefault[i]);
}
m_humanFormat = getProfileBool(sectionOptions, entryHumanFormat, true);
+ m_skipHidden = getProfileBool(sectionOptions, entrySkipHidden, false);
m_pacmanAnimation = getProfileBool(sectionOptions, entryPacmanAnimation, false);
m_showTimeSpent = getProfileBool(sectionOptions, entryShowTimeSpent, false);
m_treemapHighlightColor = getProfileInt(sectionOptions, entryTreemapHighlightColor, RGB(255,255,255));
diff --git a/windirstat/options.h b/windirstat/options.h
index fb07371..2cc1eb2 100644
--- a/windirstat/options.h
+++ b/windirstat/options.h
@@ -351,6 +351,10 @@ public:
bool IsUseWdsLocale();
void SetUseWdsLocale(bool use);
+ // Option to ignore hidden files and folders
+ bool IsSkipHidden();
+ void SetSkipHidden(bool skip);
+
void GetUserDefinedCleanups(USERDEFINEDCLEANUP udc[USERDEFINEDCLEANUPCOUNT]);
void SetUserDefinedCleanups(const USERDEFINEDCLEANUP udc[USERDEFINEDCLEANUPCOUNT]);
@@ -391,6 +395,7 @@ private:
bool m_followMountPoints;
bool m_followJunctionPoints;
bool m_useWdsLocale;
+ bool m_skipHidden;
USERDEFINEDCLEANUP m_userDefinedCleanup[USERDEFINEDCLEANUPCOUNT];
diff --git a/windirstat/resource.h b/windirstat/resource.h
index a411aed..cb0ffa3 100644
--- a/windirstat/resource.h
+++ b/windirstat/resource.h
@@ -109,6 +109,7 @@
#define IDR_TEXT1 900
#define IDR_AUTHORS 900
#define IDR_TEXT2 901
+
#define IDB_JUNCTIONPOINT 902
#define IDD_CHECKFORUPDATE 903
#define IDC_ALLDRIVES 1000
@@ -142,6 +143,8 @@
#define IDC_SHOWSTRIPES 1030
#define IDC_SHOWGRID3 1031
#define IDC_FULLROWSELECTION 1031
+#define IDC_HUMANFORMAT2 1032
+#define IDC_SKIPHIDDEN 1032
#define IDC_RESET 1034
#define IDC_LIST 1036
#define IDC_TITLE 1037
diff --git a/windirstat/windirstat.rc b/windirstat/windirstat.rc
index f9ec224..465a530 100644
--- a/windirstat/windirstat.rc
+++ b/windirstat/windirstat.rc
@@ -391,7 +391,7 @@ BEGIN
LTEXT "Static",IDC_PREVIEW,7,7,211,124
END
-IDD_PAGE_GENERAL DIALOGEX 0, 0, 380, 202
+IDD_PAGE_GENERAL DIALOGEX 0, 0, 381, 218
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION | WS_SYSMENU
CAPTION "General"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -402,14 +402,15 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,27,229,10
CONTROL "&Show Sizes in GB/MB/kB/Bytes Format",IDC_HUMANFORMAT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,41,229,10
- GROUPBOX "&List Style",IDC_STATIC,30,61,90,65
- CONTROL "&Full Row Selection",IDC_FULLROWSELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,76,75,10
- CONTROL "Show &Grid",IDC_SHOWGRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,93,68,10
- CONTROL "Show S&tripes",IDC_SHOWSTRIPES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,110,68,10
- LTEXT "&Language",IDC_STATIC,32,139,166,8
- COMBOBOX IDC_COMBO,32,152,156,140,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "&List Style",IDC_STATIC,30,71,90,65
+ CONTROL "&Full Row Selection",IDC_FULLROWSELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,86,75,10
+ CONTROL "Show &Grid",IDC_SHOWGRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,103,68,10
+ CONTROL "Show S&tripes",IDC_SHOWSTRIPES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,120,68,10
+ LTEXT "&Language",IDC_STATIC,32,149,166,8
+ COMBOBOX IDC_COMBO,32,162,156,140,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "&Use this language for date/time and number formatting",IDC_USEWDSLOCALE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,172,298,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,182,298,10
+ CONTROL "&Skip Hidden",IDC_SKIPHIDDEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,55,229,10
END
/////////////////////////////////////////////////////////////////////////////
@@ -479,9 +480,9 @@ BEGIN
IDD_PAGE_GENERAL, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 373
+ RIGHTMARGIN, 374
TOPMARGIN, 7
- BOTTOMMARGIN, 195
+ BOTTOMMARGIN, 211
END
END
#endif // APSTUDIO_INVOKED