taskmgr: Make column headers in processes tab translatable.

This commit is contained in:
Aurimas Fišeras 2009-06-22 19:50:51 +03:00 committed by Alexandre Julliard
parent 9c989a99a0
commit 9714f4c66e
3 changed files with 110 additions and 25 deletions

View File

@ -504,3 +504,32 @@ BEGIN
IDS_STATUS_BAR_PROCESSES "Processes: %d"
IDS_STATUS_BAR_MEMORY_USAGE "Mem Usage: %dK / %dK"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_IMAGENAME "Image Name"
IDS_PID "PID"
IDS_CPUUSAGE "CPU"
IDS_CPUTIME "CPU Time"
IDS_MEMORYUSAGE "Mem Usage"
IDS_MEMORYUSAGEDELTA "Mem Delta"
IDS_PEAKMEMORYUSAGE "Peak Mem Usage"
IDS_PAGEFAULTS "Page Faults"
IDS_USEROBJECTS "USER Objects"
IDS_IOREADS "I/O Reads"
IDS_IOREADBYTES "I/O Read Bytes"
IDS_SESSIONID "Session ID"
IDS_USERNAME "Username"
IDS_PAGEFAULTSDELTA "PF Delta"
IDS_VIRTUALMEMORYSIZE "VM Size"
IDS_PAGEDPOOL "Paged Pool"
IDS_NONPAGEDPOOL "NP Pool"
IDS_BASEPRIORITY "Base Pri"
IDS_HANDLECOUNT "Handles"
IDS_THREADCOUNT "Threads"
IDS_GDIOBJECTS "GDI Objects"
IDS_IOWRITES "I/O Writes"
IDS_IOWRITEBYTES "I/O Write Bytes"
IDS_IOOTHER "I/O Other"
IDS_IOOTHERBYTES "I/O Other Bytes"
END

View File

@ -35,33 +35,62 @@
UINT ColumnDataHints[25];
/* Column Headers; Begin */
static const WCHAR wszImageName[] = {'I','m','a','g','e',' ','N','a','m','e',0};
static const WCHAR wszPID[] = {'P','I','D',0};
static const WCHAR wszUserName[] = {'U','s','e','r','n','a','m','e',0};
static const WCHAR wszSessionID[] = {'S','e','s','s','i','o','n',' ','I','D',0};
static const WCHAR wszCPU[] = {'C','P','U',0};
static const WCHAR wszCPUTime[] = {'C','P','U',' ','T','i','m','e',0};
static const WCHAR wszMemUsage[] = {'M','e','m',' ','U','s','a','g','e',0};
static const WCHAR wszPeakMemUsage[] = {'P','e','a','k',' ','M','e','m',' ','U','s','a','g','e',0};
static const WCHAR wszMemDelta[] = {'M','e','m',' ','D','e','l','t','a',0};
static const WCHAR wszPageFaults[] = {'P','a','g','e',' ','F','a','u','l','t','s',0};
static const WCHAR wszPFDelta[] = {'P','F',' ','D','e','l','t','a',0};
static const WCHAR wszVMSize[] = {'V','M',' ','S','i','z','e',0};
static const WCHAR wszPagedPool[] = {'P','a','g','e','d',' ','P','o','o','l',0};
static const WCHAR wszNPPool[] = {'N','P',' ','P','o','o','l',0};
static const WCHAR wszBasePri[] = {'B','a','s','e',' ','P','r','i',0};
static const WCHAR wszHandles[] = {'H','a','n','d','l','e','s',0};
static const WCHAR wszThreads[] = {'T','h','r','e','a','d','s',0};
static const WCHAR wszUSERObjects[] = {'U','S','E','R',' ','O','b','j','e','c','t','s',0};
static const WCHAR wszGDIObjects[] = {'G','D','I',' ','O','b','j','e','c','t','s',0};
static const WCHAR wszIOReads[] = {'I','/','O',' ','R','e','a','d','s',0};
static const WCHAR wszIOWrites[] = {'I','/','O',' ','W','r','i','t','e','s',0};
static const WCHAR wszIOOther[] = {'I','/','O',' ','O','t','h','e','r',0};
static const WCHAR wszIOReadBytes[] = {'I','/','O',' ','R','e','a','d',' ','B','y','t','e','s',0};
static const WCHAR wszIOWriteBytes[] = {'I','/','O',' ','W','r','i','t','e',' ','B','y','t','e','s',0};
static const WCHAR wszIOOtherBytes[] = {'I','/','O',' ','O','t','h','e','r',' ','B','y','t','e','s',0};
WCHAR wszImageName[255];
WCHAR wszPID[255];
WCHAR wszUserName[255];
WCHAR wszSessionID[255];
WCHAR wszCPU[255];
WCHAR wszCPUTime[255];
WCHAR wszMemUsage[255];
WCHAR wszPeakMemUsage[255];
WCHAR wszMemDelta[255];
WCHAR wszPageFaults[255];
WCHAR wszPFDelta[255];
WCHAR wszVMSize[255];
WCHAR wszPagedPool[255];
WCHAR wszNPPool[255];
WCHAR wszBasePri[255];
WCHAR wszHandles[255];
WCHAR wszThreads[255];
WCHAR wszUSERObjects[255];
WCHAR wszGDIObjects[255];
WCHAR wszIOReads[255];
WCHAR wszIOWrites[255];
WCHAR wszIOOther[255];
WCHAR wszIOReadBytes[255];
WCHAR wszIOWriteBytes[255];
WCHAR wszIOOtherBytes[255];
/* Column Headers; End */
static void load_column_headers(void)
{
LoadStringW(hInst, IDS_IMAGENAME, wszImageName, sizeof(wszImageName)/sizeof(WCHAR));
LoadStringW(hInst, IDS_PID, wszPID, sizeof(wszPID)/sizeof(WCHAR));
LoadStringW(hInst, IDS_USERNAME, wszUserName, sizeof(wszUserName)/sizeof(WCHAR));
LoadStringW(hInst, IDS_SESSIONID, wszSessionID, sizeof(wszSessionID)/sizeof(WCHAR));
LoadStringW(hInst, IDS_CPUUSAGE, wszCPU, sizeof(wszCPU)/sizeof(WCHAR));
LoadStringW(hInst, IDS_CPUTIME, wszCPUTime, sizeof(wszCPUTime)/sizeof(WCHAR));
LoadStringW(hInst, IDS_MEMORYUSAGE, wszMemUsage, sizeof(wszMemUsage)/sizeof(WCHAR));
LoadStringW(hInst, IDS_PEAKMEMORYUSAGE, wszPeakMemUsage, sizeof(wszPeakMemUsage)/sizeof(WCHAR));
LoadStringW(hInst, IDS_MEMORYUSAGEDELTA, wszMemDelta, sizeof(wszMemDelta)/sizeof(WCHAR));
LoadStringW(hInst, IDS_PAGEFAULTS, wszPageFaults, sizeof(wszPageFaults)/sizeof(WCHAR));
LoadStringW(hInst, IDS_PAGEFAULTSDELTA, wszPFDelta, sizeof(wszPFDelta)/sizeof(WCHAR));
LoadStringW(hInst, IDS_VIRTUALMEMORYSIZE, wszVMSize, sizeof(wszVMSize)/sizeof(WCHAR));
LoadStringW(hInst, IDS_PAGEDPOOL, wszPagedPool, sizeof(wszPagedPool)/sizeof(WCHAR));
LoadStringW(hInst, IDS_NONPAGEDPOOL, wszNPPool, sizeof(wszNPPool)/sizeof(WCHAR));
LoadStringW(hInst, IDS_BASEPRIORITY, wszBasePri, sizeof(wszBasePri)/sizeof(WCHAR));
LoadStringW(hInst, IDS_HANDLECOUNT, wszHandles, sizeof(wszHandles)/sizeof(WCHAR));
LoadStringW(hInst, IDS_THREADCOUNT, wszThreads, sizeof(wszThreads)/sizeof(WCHAR));
LoadStringW(hInst, IDS_USEROBJECTS, wszUSERObjects, sizeof(wszUSERObjects)/sizeof(WCHAR));
LoadStringW(hInst, IDS_GDIOBJECTS, wszGDIObjects, sizeof(wszGDIObjects)/sizeof(WCHAR));
LoadStringW(hInst, IDS_IOREADS, wszIOReads, sizeof(wszIOReads)/sizeof(WCHAR));
LoadStringW(hInst, IDS_IOWRITES, wszIOWrites, sizeof(wszIOWrites)/sizeof(WCHAR));
LoadStringW(hInst, IDS_IOOTHER, wszIOOther, sizeof(wszIOOther)/sizeof(WCHAR));
LoadStringW(hInst, IDS_IOREADBYTES, wszIOReadBytes, sizeof(wszIOReadBytes)/sizeof(WCHAR));
LoadStringW(hInst, IDS_IOWRITEBYTES, wszIOWriteBytes, sizeof(wszIOWriteBytes)/sizeof(WCHAR));
LoadStringW(hInst, IDS_IOOTHERBYTES, wszIOOtherBytes, sizeof(wszIOOtherBytes)/sizeof(WCHAR));
}
static int InsertColumn(int nCol, LPCWSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem)
{
LVCOLUMNW column;
@ -89,6 +118,8 @@ void AddColumns(void)
{
int size;
load_column_headers();
if (TaskManagerSettings.Column_ImageName)
InsertColumn(0, wszImageName, LVCFMT_LEFT, TaskManagerSettings.ColumnSizeArray[0], -1);
if (TaskManagerSettings.Column_PID)

View File

@ -198,6 +198,31 @@
#define IDS_STATUS_BAR_CPU_USAGE 32829
#define IDS_STATUS_BAR_PROCESSES 32830
#define IDS_STATUS_BAR_MEMORY_USAGE 32831
#define IDS_IMAGENAME 32832
#define IDS_PID 32833
#define IDS_CPUUSAGE 32834
#define IDS_CPUTIME 32835
#define IDS_MEMORYUSAGE 32836
#define IDS_MEMORYUSAGEDELTA 32837
#define IDS_PEAKMEMORYUSAGE 32838
#define IDS_PAGEFAULTS 32839
#define IDS_USEROBJECTS 32840
#define IDS_IOREADS 32841
#define IDS_IOREADBYTES 32842
#define IDS_SESSIONID 32843
#define IDS_USERNAME 32844
#define IDS_PAGEFAULTSDELTA 32845
#define IDS_VIRTUALMEMORYSIZE 32846
#define IDS_PAGEDPOOL 32847
#define IDS_NONPAGEDPOOL 32848
#define IDS_BASEPRIORITY 32849
#define IDS_HANDLECOUNT 32850
#define IDS_THREADCOUNT 32851
#define IDS_GDIOBJECTS 32852
#define IDS_IOWRITES 32853
#define IDS_IOWRITEBYTES 32854
#define IDS_IOOTHER 32855
#define IDS_IOOTHERBYTES 32856
#define IDC_STATIC -1
/*