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:
authorbseifert <none@none>2003-12-13 13:57:35 +0300
committerbseifert <none@none>2003-12-13 13:57:35 +0300
commit1b476af083be6a3751b5e7ff4d33a6683af51441 (patch)
tree6867b0e00c31c7314e73f9e94dc5d70a81cf058b
parentdf114f86a52ee22a4da9d51474f722bb41156692 (diff)
Added size grippers to the resizable dialogs. Localized KB/MB etc.
-rw-r--r--CHANGELOG.txt8
-rw-r--r--TESTPLAN.txt2
-rw-r--r--wdsr0407/resource.h8
-rw-r--r--wdsr0407/windirstat.rc5
-rw-r--r--wdsr040c/resource.h8
-rw-r--r--wdsr040c/windirstat.rc47
-rw-r--r--windirstat/aboutdlg.cpp2
-rw-r--r--windirstat/globalhelpers.cpp69
-rw-r--r--windirstat/globalhelpers.h6
-rw-r--r--windirstat/layout.cpp127
-rw-r--r--windirstat/layout.h19
-rw-r--r--windirstat/mainframe.cpp4
-rw-r--r--windirstat/resource.h8
-rw-r--r--windirstat/windirstat.rc5
14 files changed, 275 insertions, 43 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 3176b06..ee84e33 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,14 @@
changelog.txt - What has been done to WinDirStat (newest top)
=============================================================
+2003-12-13 bseifert
+ * Added size grippers to the resizable dialogs.
+ * Corrections in French windirstat.rc
+ * Made "Bytes", "KB", "MB, "GB", "TB" localizable.
+
+2003-12-08 bseifert
+ * Release 1.0.1
+
2003-12-07 bseifert
* User defined cleanups are now by default disabled for UNC paths.
New option to enable udcs for UNC paths.
diff --git a/TESTPLAN.txt b/TESTPLAN.txt
index 94c1188..077932a 100644
--- a/TESTPLAN.txt
+++ b/TESTPLAN.txt
@@ -274,6 +274,8 @@ path (like .) into the filename field. Press OK.
--> The root item has its path expanded.
Enter a folder name with trailing backslash, like C:\temp\. Press OK.
--> The trailing backslash is removed.
+In a network enter an UNC path to the filename field via keyboard.
+--> OK button is enabled, no validation-delay.
Start Windirstat an cancel the drive selection dialog.
Empty Recycle Bin
diff --git a/wdsr0407/resource.h b/wdsr0407/resource.h
index 6ca548f..d23fd85 100644
--- a/wdsr0407/resource.h
+++ b/wdsr0407/resource.h
@@ -89,6 +89,11 @@
#define IDS_HELPFILEsCOULDNOTBEFOUND 262
#define IDS_SUSPENDED_ 263
#define IDS_SUSPEND 264
+#define IDS_SPEC_BYTES 265
+#define IDS_SPEC_KB 266
+#define IDS_SPEC_MB 267
+#define IDS_SPEC_GB 268
+#define IDS_SPEC_TB 269
#define IDC_ALLDRIVES 1000
#define IDC_GROUPS 1000
#define IDC_ALLLOCALDRIVES 1000
@@ -170,6 +175,7 @@
#define IDC_STATIC_PLATFORM 1205
#define IDC_STATIC_SEVERITY 1206
#define IDC_STATIC_OKHINT 1207
+#define IDC_SIZEGRIPPER 1208
#define ID_FILE_OPENURL 32771
#define ID_FILE_OPENRECENT 32772
#define ID_FILE_REFRESHALL 32773
@@ -240,7 +246,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 900
#define _APS_NEXT_COMMAND_VALUE 33022
-#define _APS_NEXT_CONTROL_VALUE 1208
+#define _APS_NEXT_CONTROL_VALUE 1209
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif
diff --git a/wdsr0407/windirstat.rc b/wdsr0407/windirstat.rc
index a9a3e5a..73da661 100644
--- a/wdsr0407/windirstat.rc
+++ b/wdsr0407/windirstat.rc
@@ -798,6 +798,11 @@ BEGIN
"Die Hilfedatei %1!s! ist nicht da.\r\nSie wird im selben Verzeichnis erwartet, in dem windirstat.exe liegt.\r\nSie sollten sie zusammen mit windirstat.exe erhalten haben.\r\nSie können eine Hilfedatei downloaden von der WinDirStat Homepage (siehe Aboutbox)."
IDS_SUSPENDED_ "(angehalten) "
IDS_SUSPEND "Anhalten"
+ IDS_SPEC_BYTES "Bytes"
+ IDS_SPEC_KB "KB"
+ IDS_SPEC_MB "MB"
+ IDS_SPEC_GB "GB"
+ IDS_SPEC_TB "TB"
END
#endif // German (Germany) resources
diff --git a/wdsr040c/resource.h b/wdsr040c/resource.h
index 6ca548f..d23fd85 100644
--- a/wdsr040c/resource.h
+++ b/wdsr040c/resource.h
@@ -89,6 +89,11 @@
#define IDS_HELPFILEsCOULDNOTBEFOUND 262
#define IDS_SUSPENDED_ 263
#define IDS_SUSPEND 264
+#define IDS_SPEC_BYTES 265
+#define IDS_SPEC_KB 266
+#define IDS_SPEC_MB 267
+#define IDS_SPEC_GB 268
+#define IDS_SPEC_TB 269
#define IDC_ALLDRIVES 1000
#define IDC_GROUPS 1000
#define IDC_ALLLOCALDRIVES 1000
@@ -170,6 +175,7 @@
#define IDC_STATIC_PLATFORM 1205
#define IDC_STATIC_SEVERITY 1206
#define IDC_STATIC_OKHINT 1207
+#define IDC_SIZEGRIPPER 1208
#define ID_FILE_OPENURL 32771
#define ID_FILE_OPENRECENT 32772
#define ID_FILE_REFRESHALL 32773
@@ -240,7 +246,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 900
#define _APS_NEXT_COMMAND_VALUE 33022
-#define _APS_NEXT_CONTROL_VALUE 1208
+#define _APS_NEXT_CONTROL_VALUE 1209
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif
diff --git a/wdsr040c/windirstat.rc b/wdsr040c/windirstat.rc
index b2263b0..f900886 100644
--- a/wdsr040c/windirstat.rc
+++ b/wdsr040c/windirstat.rc
@@ -338,11 +338,11 @@ BEGIN
EDITTEXT IDC_COMMANDLINE,129,35,244,14,ES_AUTOHSCROLL
LTEXT "%p Chemin complet",IDC_STATIC,128,54,93,8
LTEXT "%n Nom de fichier ou dossier sans le chemin",IDC_STATIC,
- 225,54,138,8
- LTEXT "%sp Chemin complet du sous répertoire",IDC_HINTSP,128,
- 63,94,8
+ 225,54,148,8
+ LTEXT "%sp Chemin complet du\r\n sous répertoire",
+ IDC_HINTSP,128,63,94,17
LTEXT "%sn Nom du sous dossier sans le chemin",IDC_HINTSN,225,
- 63,138,8
+ 63,148,8
CONTROL "&Lecteurs",IDC_WORKSFORDRIVES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,138,92,49,10
CONTROL "&Répertoires",IDC_WORKSFORDIRECTORIES,"Button",
@@ -365,11 +365,11 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,250,160,100,10
COMBOBOX IDC_REFRESHPOLICY,128,183,245,93,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "&Monter",IDC_UP,21,181,37,14
- PUSHBUTTON "&Descendre",IDC_DOWN,66,181,37,14
+ PUSHBUTTON "&Monter",IDC_UP,19,181,39,14
+ PUSHBUTTON "&Descendre",IDC_DOWN,66,181,39,14
LTEXT "&Règles de rafraichissement",IDC_STATIC,128,174,108,8
LTEXT "&Titre",IDC_STATIC,186,7,24,8
- LTEXT "Invite de &commande",IDC_STATIC,129,25,83,8
+ LTEXT "Ligne de &commande",IDC_STATIC,129,25,83,8
GROUPBOX "Travail sur",IDC_STATIC,129,81,244,40
END
@@ -412,21 +412,21 @@ BEGIN
CONTROL "&Utiliser un ombrage en coussin",IDC_CUSHIONSHADING,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,15,122,10
LTEXT "&Hauteur",IDC_STATIC,31,32,54,8
- EDITTEXT IDC_HEIGHTFACTOR,88,30,35,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_HEIGHTFACTOR,88,30,37,14,ES_AUTOHSCROLL
CONTROL "",IDC_HEIGHTFACTORSPIN,"msctls_updown32",
- UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS,125,30,
+ UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS,128,30,
11,14
LTEXT "&Facteur d'agrandissement",IDC_STATIC,31,53,54,8
- EDITTEXT IDC_SCALEFACTOR,88,51,35,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_SCALEFACTOR,88,51,37,14,ES_AUTOHSCROLL
CONTROL "",IDC_SCALEFACTORSPIN,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_AUTOBUDDY | UDS_ARROWKEYS,125,51,11,14
+ UDS_AUTOBUDDY | UDS_ARROWKEYS,128,51,11,14
LTEXT "Lumière &ambiante",IDC_STATIC,31,74,53,8
- EDITTEXT IDC_AMBIENTLIGHT,88,73,35,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_AMBIENTLIGHT,88,73,37,14,ES_AUTOHSCROLL
CONTROL "",IDC_AMBIENTLIGHTSPIN,"msctls_updown32",
- UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS,125,73,
+ UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS,128,73,
11,14
PUSHBUTTON "&Remettre les valeurs par défaut",IDC_RESETTODEFAULTS,
- 31,94,105,14
+ 31,94,108,14
CONTROL "Montrer la &grille",IDC_TREEMAPGRID,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,18,144,62,10
PUSHBUTTON "&Couleur de grille",IDC_TREEMAPGRIDCOLOR,89,143,98,14,0,
@@ -496,7 +496,7 @@ BEGIN
IDC_STATIC,7,79,346,16
LTEXT "Application:",IDC_STATIC,7,18,38,8
LTEXT "<application>",IDC_APPLICATION,51,18,123,8
- LTEXT "Platteforme:",IDC_STATIC_PLATFORM,185,18,30,8
+ LTEXT "Platteforme:",IDC_STATIC_PLATFORM,185,18,42,8
LTEXT "<platform>",IDC_PLATFORM,230,18,123,8
LTEXT "Pour signaler une erreur, il est mieux de décrire le symptome, en donner le message d'erreur exact, et si possible les étapes ayant donné l'erreur (ou pour la reproduire).",
IDC_HINT,7,99,346,19
@@ -728,7 +728,7 @@ STRINGTABLE
BEGIN
IDS_RESOURCEVERSION "Resource Version 2"
IDS_ABOUT_ABOUTTEXTss "\r\nWinDirStat - Statistiques sur les systèmes de fichiers\r\n\r\n""Montre où est passé tout votre espace dique\r\net vous aide à faire le nettoyage.""\r\n\r\nRe-programmé pour MS Windows par\r\nBernhard Seifert (mailto:%1!s!),\r\n\r\nà partir du travail de Stefan Hundhammer sous KDE (Linux) KDirStat\r\n(http://kdirstat.sourceforge.net/).\r\n\r\nLa page Internet de WinDirStat est http://%2!s!/\r\n\r\nFrench translation: Pascal Delrot (mailto:tigroo@users.sourceforge.net)\r\n\r\nCopyright (c) 2003 Bernhard Seifert"
- IDS_ABOUT_THANKSTOTEXT "\r\nStefan Hundhammer pour son superbe outil Linux ""KDirStat"".\r\nUtiliser KDirStat (2.3.7) comme spécification m'a permis de gagner beaucoup de temps.\r\nhttp://kdirstat.sourceforge.net/\r\n\r\nLes auteurs de ""SequoiaView"" pour m'avoir montré à quel point les arbres sont utiles.\r\nhttp://www.win.tue.nl/sequoiaview/\r\n\r\nJarke J. van Wijk, Huub van de Wetering, Mark Bruls and Kees Huizing\r\npour leurs articles sur les arbres en coussins et rectangulaires.\r\nhttp://www.win.tue.nl/~vanwijk/\r\n\r\nBen Shneiderman pour son idée ingénieuse des arbres -\r\nune manière vraiment intuitive de visualiser le contenu des répertoires.\r\nhttp://www.cs.umd.edu/hcil/treemap-history/\r\n\r\nMes collègues pour leurs remarques sur les toutes premières versions de WinDirStat.\r\nhttp://www.daccord.net/\r\n\r\nBeatrix Lödige and Nick Lines for beta testing.\r\n"
+ IDS_ABOUT_THANKSTOTEXT "\r\nStefan Hundhammer pour son superbe outil Linux ""KDirStat"".\r\nUtiliser KDirStat (2.3.7) comme spécification m'a permis de gagner beaucoup de temps.\r\nhttp://kdirstat.sourceforge.net/\r\n\r\nLes auteurs de ""SequoiaView"" pour m'avoir montré à quel point les arbres sont utiles.\r\nhttp://www.win.tue.nl/sequoiaview/\r\n\r\nJarke J. van Wijk, Huub van de Wetering, Mark Bruls and Kees Huizing\r\npour leurs articles sur les arbres en coussins et rectangulaires.\r\nhttp://www.win.tue.nl/~vanwijk/\r\n\r\nBen Shneiderman pour son idée ingénieuse des arbres -\r\nune manière vraiment intuitive de visualiser le contenu des répertoires.\r\nhttp://www.cs.umd.edu/hcil/treemap-history/\r\n\r\nMes collègues pour leurs remarques sur les toutes premières versions de WinDirStat.\r\nhttp://www.daccord.net/\r\n\r\nBeatrix Lödige et Nick Lines pour les tests de la version beta.\r\n"
IDS_ABOUT_ABOUT "A propos de"
IDS_ABOUT_THANKSTO "Merci à"
IDS_ABOUT_LICENSEAGREEMENT "Accord de license"
@@ -744,7 +744,7 @@ BEGIN
IDS_COULDNOTCREATEPROCESSssss
"Impossible de créer un processus.\r\n\r\nApplication: '%1!s!',\r\nLigne de commande: '%2!s!',\r\nRépertoire de travail: '%3!s!'\r\nMessage d'erreur:\r\n%4!s!\r\n(Le rafraichissement n'aura pas lieu.)"
IDS_TREECOL_NAME "Nom"
- IDS_TREECOL_SUBTREEPERCENTAGE "Pourcentage sur la branche"
+ IDS_TREECOL_SUBTREEPERCENTAGE "Pourcentage (graphique)"
IDS_TREECOL_PERCENTAGE "Pourcentage"
IDS_TREECOL_SIZE "Taille"
IDS_TREECOL_ITEMS "Eléments"
@@ -771,8 +771,8 @@ BEGIN
IDS_WINDIRSTAT_SETTINGS "WinDirStat - Paramètres"
IDS_SCANNING_ "Parcours "
IDS_EMPTYRECYCLEBIN "&Vider la corbeille"
- IDS__ONEITEMss " (1 élément, %1!s!%2!s!)"
- IDS__sITEMSss " (%1!s! éléments, %2!s!%3!s!)"
+ IDS__ONEITEMss " (1 élément; %1!s!%2!s!)"
+ IDS__sITEMSss " (%1!s! éléments; %2!s!%3!s!)"
IDS_UDCsCTRLd "%1!s!\tCtrl+%2!d!"
IDS_USERDEFINEDCLEANUP0 "Nettoyage personnalisé #0"
IDS_REPORT_DISKUSAGE "Utilisation du disque"
@@ -784,7 +784,7 @@ STRINGTABLE
BEGIN
IDS_POLICY_REFRESHTHISENTRY "Rafraichir cette entrée"
IDS_POLICY_REFRESHPARENT "Rafraichir le dossier parent de cette entrée"
- IDS_BUGREPORTHINT "For signaler une erreur, il est mieux de décrire les symptômes, en donnant le message d'erreur complet, et si possible, la manière de provoquer l'erreur en question."
+ IDS_BUGREPORTHINT "Pour signaler une erreur, il est mieux de décrire les symptômes, en donnant le message d'erreur complet, et si possible, la manière de provoquer l'erreur en question."
IDS_FEEDBACKHINT "Les commentaires sont toujours les bienvenus."
IDS_FROMsPLATFORMs "De : %1!s!. Platte-forme : %2!s!.\r\n\r\n"
IDS_SEV_CRITICAL "Erreur critique"
@@ -809,9 +809,14 @@ BEGIN
IDS_EXTCOL_DESCRIPTION "Description"
IDS_RAMUSAGEs "Utilisation de la mémoire RAM: %1!s!"
IDS_HELPFILEsCOULDNOTBEFOUND
- "Le fichier d'aide %1!s! ne peut pas être trouvé.\r\nIt is expected to be in the same folder where windirstat.exe is.\r\nYou should have received it along with windirstat.exe.\r\nVous pouvez le télécharger depuis le site Internet de WinDirStat (voir la boite de dialogue ""A propos de"")."
+ "Le fichier d'aide %1!s! ne peut pas être trouvé.\r\nIl est supposé se trouver dans le même répertoire que windirstat.exe is.\r\nVous auriez du recevoir ce fichier d'aide avec windirstat.exe.\r\nVous pouvez le télécharger depuis le site Internet de WinDirStat (voir la boite de dialogue ""A propos de"")."
IDS_SUSPENDED_ "(suspendu) "
IDS_SUSPEND "Suspendre"
+ IDS_SPEC_BYTES "octets"
+ IDS_SPEC_KB "Ko"
+ IDS_SPEC_MB "Mo"
+ IDS_SPEC_GB "Go"
+ IDS_SPEC_TB "To"
END
#endif // French (France) resources
diff --git a/windirstat/aboutdlg.cpp b/windirstat/aboutdlg.cpp
index b6865f6..0398ef6 100644
--- a/windirstat/aboutdlg.cpp
+++ b/windirstat/aboutdlg.cpp
@@ -208,7 +208,7 @@ CAboutDlg::CAboutDlg()
CString CAboutDlg::GetAppVersion()
{
CString s;
- s.Format(_T("WinDirStat 1.0.1"));
+ s.Format(_T("WinDirStat devel"));
return s;
}
diff --git a/windirstat/globalhelpers.cpp b/windirstat/globalhelpers.cpp
index 667be0f..620ae7d 100644
--- a/windirstat/globalhelpers.cpp
+++ b/windirstat/globalhelpers.cpp
@@ -73,6 +73,19 @@ namespace
}
}
+ void CacheString(CString& s, UINT resId, LPCTSTR defaultVal)
+ {
+ ASSERT(lstrlen(defaultVal) > 0);
+
+ if (s.IsEmpty())
+ {
+ s= LoadString(resId);
+
+ if (s.IsEmpty())
+ s= defaultVal;
+ }
+ }
+
}
CString GetLocaleString(LCTYPE lctype, LANGID langid)
@@ -90,7 +103,15 @@ CString GetLocaleString(LCTYPE lctype, LANGID langid)
CString GetLocaleLanguage(LANGID langid)
{
- return GetLocaleString(LOCALE_SNATIVELANGNAME, langid) + _T(" - ") + GetLocaleString(LOCALE_SNATIVECTRYNAME, langid);
+ CString s= GetLocaleString(LOCALE_SNATIVELANGNAME, langid);
+
+ // In the French case, the system returns "francais",
+ // but we want "Francais".
+
+ if (s.GetLength() > 0)
+ s.SetAt(0, toupper(s[0]));
+
+ return s + _T(" - ") + GetLocaleString(LOCALE_SNATIVECTRYNAME, langid);
}
CString GetLocaleThousandSeparator()
@@ -135,15 +156,15 @@ CString FormatLongLongHuman(LONGLONG n)
double TB = (int)(n);
if (TB != 0 || GB == base - 1 && MB >= half)
- s= FormatDouble(TB + GB/base) + _T(" TB");
+ s.Format(_T("%s %s"), FormatDouble(TB + GB/base), GetSpec_TB());
else if (GB != 0 || MB == base - 1 && KB >= half)
- s= FormatDouble(GB + MB/base) + _T(" GB");
+ s.Format(_T("%s %s"), FormatDouble(GB + MB/base), GetSpec_GB());
else if (MB != 0 || KB == base - 1 && B >= half)
- s= FormatDouble(MB + KB/base) + _T(" MB");
+ s.Format(_T("%s %s"), FormatDouble(MB + KB/base), GetSpec_MB());
else if (KB != 0)
- s= FormatDouble(KB + B/base) + _T(" KB");
+ s.Format(_T("%s %s"), FormatDouble(KB + B/base), GetSpec_KB());
else if (B != 0)
- s.Format(_T("%d Bytes"), (int)B);
+ s.Format(_T("%d %s"), (int)B, GetSpec_Bytes());
else
s= _T("0");
@@ -537,3 +558,39 @@ CString MyGetFullPathName(LPCTSTR relativePath)
return buffer;
}
+
+CString GetSpec_Bytes()
+{
+ static CString s;
+ CacheString(s, IDS_SPEC_BYTES, _T("Bytes"));
+ return s;
+}
+
+CString GetSpec_KB()
+{
+ static CString s;
+ CacheString(s, IDS_SPEC_KB, _T("KB"));
+ return s;
+}
+
+CString GetSpec_MB()
+{
+ static CString s;
+ CacheString(s, IDS_SPEC_MB, _T("MB"));
+ return s;
+}
+
+CString GetSpec_GB()
+{
+ static CString s;
+ CacheString(s, IDS_SPEC_GB, _T("GB"));
+ return s;
+}
+
+CString GetSpec_TB()
+{
+ static CString s;
+ CacheString(s, IDS_SPEC_TB, _T("TB"));
+ return s;
+}
+
diff --git a/windirstat/globalhelpers.h b/windirstat/globalhelpers.h
index cdba61e..b2511b8 100644
--- a/windirstat/globalhelpers.h
+++ b/windirstat/globalhelpers.h
@@ -51,3 +51,9 @@ bool DriveExists(const CString& path);
CString GetUserName();
bool IsHexDigit(int c);
CString MyGetFullPathName(LPCTSTR relativePath);
+CString GetSpec_Bytes();
+CString GetSpec_KB();
+CString GetSpec_MB();
+CString GetSpec_GB();
+CString GetSpec_TB();
+
diff --git a/windirstat/layout.cpp b/windirstat/layout.cpp
index 6824630..f8cbd0a 100644
--- a/windirstat/layout.cpp
+++ b/windirstat/layout.cpp
@@ -22,7 +22,7 @@
#include "stdafx.h"
#include "windirstat.h"
#include "options.h"
-#include "layout.h"
+#include ".\layout.h"
CLayout::CLayout(CWnd *dialog, LPCTSTR name)
@@ -30,14 +30,14 @@ CLayout::CLayout(CWnd *dialog, LPCTSTR name)
ASSERT(dialog != NULL);
m_dialog= dialog;
m_name= name;
-
+
// This is necessary because OnGetMinMaxInfo() will be called
// before OnInitDialog!
m_originalDialogSize.cx= 0;
m_originalDialogSize.cy= 0;
}
-void CLayout::AddControl(CWnd *control, double movex, double movey, double stretchx, double stretchy)
+int CLayout::AddControl(CWnd *control, double movex, double movey, double stretchx, double stretchy)
{
SControlInfo info;
@@ -47,7 +47,7 @@ void CLayout::AddControl(CWnd *control, double movex, double movey, double stret
info.stretchx= stretchx;
info.stretchy= stretchy;
- m_control.Add(info);
+ return m_control.Add(info);
}
void CLayout::AddControl(UINT id, double movex, double movey, double stretchx, double stretchy)
@@ -59,9 +59,9 @@ void CLayout::OnInitDialog(bool centerWindow)
{
m_dialog->SetIcon(GetApp()->LoadIcon(IDR_MAINFRAME), false);
- CRect rc;
- m_dialog->GetWindowRect(rc);
- m_originalDialogSize= rc.Size();
+ CRect rcDialog;
+ m_dialog->GetWindowRect(rcDialog);
+ m_originalDialogSize= rcDialog.Size();
for (int i=0; i < m_control.GetSize(); i++)
{
@@ -70,9 +70,18 @@ void CLayout::OnInitDialog(bool centerWindow)
m_dialog->ScreenToClient(rc);
m_control[i].originalRectangle= rc;
}
+
+ CRect sg;
+ m_dialog->GetClientRect(sg);
+ sg.left= sg.right - m_sizeGripper._width;
+ sg.top= sg.bottom - m_sizeGripper._width;
+ m_sizeGripper.Create(m_dialog, sg);
+
+ i= AddControl(&m_sizeGripper, 1, 1, 0, 0);
+ m_control[i].originalRectangle= sg;
- CPersistence::GetDialogRectangle(m_name, rc);
- m_dialog->MoveWindow(rc);
+ CPersistence::GetDialogRectangle(m_name, rcDialog);
+ m_dialog->MoveWindow(rcDialog);
if (centerWindow)
m_dialog->CenterWindow();
}
@@ -113,3 +122,103 @@ void CLayout::OnGetMinMaxInfo(MINMAXINFO *mmi)
}
+/////////////////////////////////////////////////////////////////////////////
+
+const int CLayout::CSizeGripper::_width = 14;
+
+CLayout::CSizeGripper::CSizeGripper()
+{
+}
+
+void CLayout::CSizeGripper::Create(CWnd *parent, CRect rc)
+{
+ VERIFY(CWnd::Create(
+ AfxRegisterWndClass(
+ 0,
+ AfxGetApp()->LoadStandardCursor(IDC_ARROW),
+ (HBRUSH)(COLOR_BTNFACE + 1),
+ 0
+ ),
+ _T(""),
+ WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS,
+ rc,
+ parent,
+ IDC_SIZEGRIPPER
+ ));
+}
+
+BEGIN_MESSAGE_MAP(CLayout::CSizeGripper, CWnd)
+ ON_WM_PAINT()
+ ON_WM_NCHITTEST()
+END_MESSAGE_MAP()
+
+void CLayout::CSizeGripper::OnPaint()
+{
+ CPaintDC dc(this);
+
+ CRect rc;
+ GetClientRect(rc);
+
+ ASSERT(rc.Width() == _width);
+ ASSERT(rc.Height() == _width);
+
+ CPoint start;
+ CPoint end;
+
+ start.x= 1;
+ start.y= _width;
+ end.x= _width;
+ end.y= 1;
+
+ DrawShadowLine(&dc, start, end);
+
+ start.x+= 4;
+ end.y+= 4;
+
+ DrawShadowLine(&dc, start, end);
+
+ start.x+= 4;
+ end.y+= 4;
+
+ DrawShadowLine(&dc, start, end);
+
+ // Do not call CWnd::OnPaint() for painting messages
+}
+
+void CLayout::CSizeGripper::DrawShadowLine(CDC *pdc, CPoint start, CPoint end)
+{
+ {
+ CPen lightPen(PS_SOLID, 1, GetSysColor(COLOR_3DHIGHLIGHT));
+ CSelectObject sopen(pdc, &lightPen);
+
+ pdc->MoveTo(start);
+ pdc->LineTo(end);
+ }
+
+ start.x++;
+ end.y++;
+
+ {
+ CPen darkPen(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
+ CSelectObject sopen(pdc, &darkPen);
+
+ pdc->MoveTo(start);
+ pdc->LineTo(end);
+
+ start.x++;
+ end.y++;
+
+ pdc->MoveTo(start);
+ pdc->LineTo(end);
+ }
+}
+
+UINT CLayout::CSizeGripper::OnNcHitTest(CPoint point)
+{
+ ScreenToClient(&point);
+
+ if (point.x + point.y >= _width)
+ return HTBOTTOMRIGHT;
+ else
+ return 0;
+}
diff --git a/windirstat/layout.h b/windirstat/layout.h
index 3b50a96..1190e1d 100644
--- a/windirstat/layout.h
+++ b/windirstat/layout.h
@@ -38,9 +38,25 @@ class CLayout
CRect originalRectangle;
};
+ class CSizeGripper: public CWnd
+ {
+ public:
+ static const int _width;
+
+ CSizeGripper();
+ void Create(CWnd *parent, CRect rc);
+
+ private:
+ void DrawShadowLine(CDC *pdc, CPoint start, CPoint end);
+
+ DECLARE_MESSAGE_MAP()
+ afx_msg void OnPaint();
+ afx_msg UINT OnNcHitTest(CPoint point);
+ };
+
public:
CLayout(CWnd *dialog, LPCTSTR name);
- void AddControl(CWnd *control, double movex, double movey, double stretchx, double stretchy);
+ int AddControl(CWnd *control, double movex, double movey, double stretchx, double stretchy);
void AddControl(UINT id, double movex, double movey, double stretchx, double stretchy);
void OnInitDialog(bool centerWindow);
@@ -53,4 +69,5 @@ protected:
CString m_name;
CSize m_originalDialogSize;
CArray<SControlInfo, SControlInfo&> m_control;
+ CSizeGripper m_sizeGripper;
};
diff --git a/windirstat/mainframe.cpp b/windirstat/mainframe.cpp
index 0f9cc3c..d3a1402 100644
--- a/windirstat/mainframe.cpp
+++ b/windirstat/mainframe.cpp
@@ -765,9 +765,9 @@ void CMainFrame::UpdateCleanupMenu(CMenu *menu)
CString info;
if (items == 1)
- info.FormatMessage(IDS__ONEITEMss, FormatBytes(bytes), GetOptions()->IsHumanFormat() && bytes != 0 ? "" : " Bytes");
+ info.FormatMessage(IDS__ONEITEMss, FormatBytes(bytes), GetOptions()->IsHumanFormat() && bytes != 0 ? _T("") : _T(" ") + GetSpec_Bytes());
else
- info.FormatMessage(IDS__sITEMSss, FormatCount(items), FormatBytes(bytes), GetOptions()->IsHumanFormat() && bytes != 0 ? "" : " Bytes");
+ info.FormatMessage(IDS__sITEMSss, FormatCount(items), FormatBytes(bytes), GetOptions()->IsHumanFormat() && bytes != 0 ? _T("") : _T(" ") + GetSpec_Bytes());
s+= info;
VERIFY(menu->ModifyMenu(ID_CLEANUP_EMPTYRECYCLEBIN, MF_BYCOMMAND|MF_STRING, ID_CLEANUP_EMPTYRECYCLEBIN, s));
diff --git a/windirstat/resource.h b/windirstat/resource.h
index 6ca548f..d23fd85 100644
--- a/windirstat/resource.h
+++ b/windirstat/resource.h
@@ -89,6 +89,11 @@
#define IDS_HELPFILEsCOULDNOTBEFOUND 262
#define IDS_SUSPENDED_ 263
#define IDS_SUSPEND 264
+#define IDS_SPEC_BYTES 265
+#define IDS_SPEC_KB 266
+#define IDS_SPEC_MB 267
+#define IDS_SPEC_GB 268
+#define IDS_SPEC_TB 269
#define IDC_ALLDRIVES 1000
#define IDC_GROUPS 1000
#define IDC_ALLLOCALDRIVES 1000
@@ -170,6 +175,7 @@
#define IDC_STATIC_PLATFORM 1205
#define IDC_STATIC_SEVERITY 1206
#define IDC_STATIC_OKHINT 1207
+#define IDC_SIZEGRIPPER 1208
#define ID_FILE_OPENURL 32771
#define ID_FILE_OPENRECENT 32772
#define ID_FILE_REFRESHALL 32773
@@ -240,7 +246,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 900
#define _APS_NEXT_COMMAND_VALUE 33022
-#define _APS_NEXT_CONTROL_VALUE 1208
+#define _APS_NEXT_CONTROL_VALUE 1209
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif
diff --git a/windirstat/windirstat.rc b/windirstat/windirstat.rc
index f679d47..d68a3ec 100644
--- a/windirstat/windirstat.rc
+++ b/windirstat/windirstat.rc
@@ -843,6 +843,11 @@ BEGIN
"The help file %1!s! could not be found.\r\nIt is expected to be in the same folder where windirstat.exe is.\r\nYou should have received it along with windirstat.exe.\r\nYou can download one from WinDirStat's home site (see About box)."
IDS_SUSPENDED_ "(suspended) "
IDS_SUSPEND "Suspend"
+ IDS_SPEC_BYTES "Bytes"
+ IDS_SPEC_KB "KB"
+ IDS_SPEC_MB "MB"
+ IDS_SPEC_GB "GB"
+ IDS_SPEC_TB "TB"
END
#endif // English (U.S.) resources