Skip to content

Commit

Permalink
Merge pull request #46 from malxau/aboutdialog
Browse files Browse the repository at this point in the history
Remove memory size and free disk space from about dialog
  • Loading branch information
mbert authored Jul 9, 2021
2 parents 080c1a4 + b62b365 commit 96648ae
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
9 changes: 2 additions & 7 deletions guiwin32/WinElvis.rc
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,17 @@ BEGIN
WS_VISIBLE | WS_GROUP | WS_TABSTOP,103,68,50,12
END

IDD_ABOUT DIALOG DISCARDABLE 0, 0, 199, 109
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 199, 68
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About WinElvis"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,74,88,50,14
DEFPUSHBUTTON "OK",IDOK,74,48,50,14
ICON IDI_ELVIS,IDC_STATIC,7,7,18,20
CTEXT "WinElvis Version ",IDAB_VERSION,41,7,151,8
CTEXT "Copyright 2003, Steve Kirkendall",IDC_STATIC,41,19,151,
8
CTEXT "Windows Port by Serge Pirotte",IDC_STATIC,41,31,151,8
LTEXT "Physical Memory :",IDC_STATIC,41,56,62,8
LTEXT "Disk Space :",IDC_STATIC,41,68,59,8
LTEXT "",IDAB_PHYS_MEM,103,56,89,8
LTEXT "",IDAB_DISK_SPACE,103,68,89,8
CONTROL "",IDC_STATIC,"Static",SS_BLACKRECT,41,48,151,1
END

IDD_GOTO DIALOG DISCARDABLE 0, 0, 118, 68
Expand Down
2 changes: 0 additions & 2 deletions guiwin32/elvisres.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#define IDD_OPT_GLOBAL 121
#define IDD_OPT_GUI 122
#define IDI_ICON2 126
#define IDAB_PHYS_MEM 1000
#define IDAB_DISK_SPACE 1001
#define IDBL_BUFFERS 1002
#define IDGT_LINE 1003
#define IDSR_IGNORECASE 1004
Expand Down
18 changes: 0 additions & 18 deletions guiwin32/gwdlgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,13 +1256,6 @@ BOOL CALLBACK DlgOptUser (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
BOOL CALLBACK DlgAbout (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)

{
MEMORYSTATUS memstat;
int drive;
int disk_size;
DWORD spc;
DWORD bps;
DWORD nfc;
DWORD tfc;
char str[80];

switch (msg) {
Expand All @@ -1272,17 +1265,6 @@ BOOL CALLBACK DlgAbout (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
sprintf(str, "WinElvis Version %s", VERSION);
SetDlgItemText (hwnd, IDAB_VERSION, str);

memstat.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus (&memstat);
sprintf (str, "%d Kbytes", memstat.dwTotalPhys / 1024L);
SetDlgItemText (hwnd, IDAB_PHYS_MEM, str);

drive = _getdrive ();
GetDiskFreeSpace (NULL, &spc, &bps, &nfc, &tfc);
disk_size = (spc * bps * nfc) / 1024L;
sprintf (str, "%d Kbytes free on %c:", disk_size, drive - 1 + 'A');
SetDlgItemText (hwnd, IDAB_DISK_SPACE, str);

return TRUE;

case WM_COMMAND:
Expand Down

0 comments on commit 96648ae

Please sign in to comment.