Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
88a08f91
Commit
88a08f91
authored
Jun 21, 2009
by
Aurimas Fišeras
Committed by
Alexandre Julliard
Jun 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Make status bar text translatable.
parent
7490f922
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
9 deletions
+25
-9
En.rc
programs/taskmgr/En.rc
+3
-0
perfpage.c
programs/taskmgr/perfpage.c
+3
-2
procpage.c
programs/taskmgr/procpage.c
+11
-5
resource.h
programs/taskmgr/resource.h
+3
-0
taskmgr.c
programs/taskmgr/taskmgr.c
+5
-2
No files found.
programs/taskmgr/En.rc
View file @
88a08f91
...
...
@@ -500,4 +500,7 @@ BEGIN
IDS_APPLICATIONS "Applications"
IDS_PROCESSES "Processes"
IDS_PERFORMANCE "Performance"
IDS_STATUS_BAR_CPU_USAGE "CPU Usage: %3d%%"
IDS_STATUS_BAR_PROCESSES "Processes: %d"
IDS_STATUS_BAR_MEMORY_USAGE "Mem Usage: %dK / %dK"
END
programs/taskmgr/perfpage.c
View file @
88a08f91
...
...
@@ -141,8 +141,9 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
WCHAR
Text
[
256
];
static
const
WCHAR
wszFormatDigit
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
wszMemUsage
[]
=
{
'M'
,
'e'
,
'm'
,
' '
,
'U'
,
's'
,
'a'
,
'g'
,
'e'
,
':'
,
' '
,
'%'
,
'd'
,
'K'
,
' '
,
'/'
,
' '
,
'%'
,
'd'
,
'K'
,
0
};
WCHAR
wszMemUsage
[
255
];
LoadStringW
(
hInst
,
IDS_STATUS_BAR_MEMORY_USAGE
,
wszMemUsage
,
sizeof
(
wszMemUsage
)
/
sizeof
(
WCHAR
));
/* Create the event */
hPerformancePageEvent
=
CreateEvent
(
NULL
,
TRUE
,
TRUE
,
NULL
);
...
...
programs/taskmgr/procpage.c
View file @
88a08f91
...
...
@@ -386,6 +386,12 @@ static DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
ULONG
OldProcessorUsage
=
0
;
ULONG
OldProcessCount
=
0
;
WCHAR
wszCPU_Usage
[
255
];
WCHAR
wszProcesses
[
255
];
LoadStringW
(
hInst
,
IDS_STATUS_BAR_CPU_USAGE
,
wszCPU_Usage
,
sizeof
(
wszCPU_Usage
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInst
,
IDS_STATUS_BAR_PROCESSES
,
wszProcesses
,
sizeof
(
wszProcesses
)
/
sizeof
(
WCHAR
));
/* Create the event */
hProcessPageEvent
=
CreateEvent
(
NULL
,
TRUE
,
TRUE
,
NULL
);
...
...
@@ -405,7 +411,7 @@ static DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
return
0
;
if
(
dwWaitVal
==
WAIT_OBJECT_0
)
{
TCHAR
text
[
260
];
WCHAR
text
[
256
];
/* Reset our event */
ResetEvent
(
hProcessPageEvent
);
...
...
@@ -418,13 +424,13 @@ static DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
if
(
OldProcessorUsage
!=
PerfDataGetProcessorUsage
())
{
OldProcessorUsage
=
PerfDataGetProcessorUsage
();
wsprintf
(
text
,
_T
(
"CPU Usage: %3d%%"
)
,
OldProcessorUsage
);
SendMessage
(
hStatusWnd
,
SB_SETTEXT
,
1
,
(
LPARAM
)
text
);
wsprintf
W
(
text
,
wszCPU_Usage
,
OldProcessorUsage
);
SendMessage
W
(
hStatusWnd
,
SB_SETTEXTW
,
1
,
(
LPARAM
)
text
);
}
if
(
OldProcessCount
!=
PerfDataGetProcessCount
())
{
OldProcessCount
=
PerfDataGetProcessCount
();
wsprintf
(
text
,
_T
(
"Processes: %d"
)
,
OldProcessCount
);
SendMessage
(
hStatusWnd
,
SB_SETTEXT
,
0
,
(
LPARAM
)
text
);
wsprintf
W
(
text
,
wszProcesses
,
OldProcessCount
);
SendMessage
W
(
hStatusWnd
,
SB_SETTEXTW
,
0
,
(
LPARAM
)
text
);
}
}
}
...
...
programs/taskmgr/resource.h
View file @
88a08f91
...
...
@@ -195,6 +195,9 @@
#define IDS_APPLICATIONS 32826
#define IDS_PROCESSES 32827
#define IDS_PERFORMANCE 32828
#define IDS_STATUS_BAR_CPU_USAGE 32829
#define IDS_STATUS_BAR_PROCESSES 32830
#define IDS_STATUS_BAR_MEMORY_USAGE 32831
#define IDC_STATIC -1
/*
...
...
programs/taskmgr/taskmgr.c
View file @
88a08f91
...
...
@@ -527,8 +527,11 @@ static void TaskManager_OnExitMenuLoop(HWND hWnd)
int
nParts
[
3
];
WCHAR
text
[
256
];
static
const
WCHAR
wszCPU_Usage
[]
=
{
'C'
,
'P'
,
'U'
,
' '
,
'U'
,
's'
,
'a'
,
'g'
,
'e'
,
':'
,
' '
,
'%'
,
'3'
,
'd'
,
'%'
,
'%'
,
0
};
static
const
WCHAR
wszProcesses
[]
=
{
'P'
,
'r'
,
'o'
,
'c'
,
'e'
,
's'
,
's'
,
'e'
,
's'
,
':'
,
' '
,
'%'
,
'd'
,
0
};
WCHAR
wszCPU_Usage
[
255
];
WCHAR
wszProcesses
[
255
];
LoadStringW
(
hInst
,
IDS_STATUS_BAR_CPU_USAGE
,
wszCPU_Usage
,
sizeof
(
wszCPU_Usage
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInst
,
IDS_STATUS_BAR_PROCESSES
,
wszProcesses
,
sizeof
(
wszProcesses
)
/
sizeof
(
WCHAR
));
bInMenuLoop
=
FALSE
;
/* Update the status bar pane sizes */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment