Author: ekohl
Date: Sun Nov 23 07:34:15 2008
New Revision: 37586
URL:
http://svn.reactos.org/svn/reactos?rev=37586&view=rev
Log:
- Replace the check-marks in the protocol menu by radio-bullets because the user can only
select one of three protocols.
- Mark a protocol in the menu only if it was read correctly. Otherwise the security
protocol gets selected although the user is not able to see this protocol.
- Minor clean-up of the resource id mess.
Modified:
trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c
trunk/reactos/base/applications/mscutils/eventvwr/lang/bg-BG.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/de-DE.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/el-GR.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/en-US.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/es-ES.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/it-IT.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/ko-KR.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/no-NO.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/pl-PL.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/ru-RU.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc
trunk/reactos/base/applications/mscutils/eventvwr/lang/uk-UA.rc
trunk/reactos/base/applications/mscutils/eventvwr/resource.h
Modified: trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] Sun Nov 23
07:34:15 2008
@@ -486,7 +486,7 @@
}
-VOID
+BOOL
QueryEventMessages(LPTSTR lpMachineName,
LPTSTR lpLogName)
{
@@ -529,7 +529,7 @@
_TEXT("Could not open the event log."),
_TEXT("Event Log"),
MB_OK | MB_ICONINFORMATION);
- return;
+ return FALSE;
}
// Disable listview redraw
@@ -686,6 +686,8 @@
// Close the event log.
CloseEventLog(hEventLog);
+
+ return TRUE;
}
@@ -870,13 +872,19 @@
LRESULT CALLBACK
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- int wmId, wmEvent;
RECT rect;
NMHDR *hdr;
- HMENU hMenu;
switch (message)
{
+ case WM_CREATE:
+ CheckMenuRadioItem(GetMenu(hWnd),
+ ID_LOG_APPLICATION,
+ ID_LOG_SYSTEM,
+ ID_LOG_APPLICATION,
+ MF_BYCOMMAND);
+ break;
+
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code)
{
@@ -888,7 +896,10 @@
if (lpnmitem->iItem != -1)
{
- DialogBox(hInst, MAKEINTRESOURCE(IDD_EVENTDETAILDIALOG),
hWnd, EventDetails);
+ DialogBox(hInst,
+ MAKEINTRESOURCE(IDD_EVENTDETAILDIALOG),
+ hWnd,
+ EventDetails);
}
}
break;
@@ -896,41 +907,43 @@
break;
case WM_COMMAND:
- wmId = LOWORD(wParam);
- wmEvent = HIWORD(wParam);
-
- if ((wmId == ID_LOG_APPLICATION) ||
- (wmId == ID_LOG_SYSTEM) ||
- (wmId == ID_LOG_SECURITY))
- {
- hMenu = GetMenu(hWnd); // get the menu handle. Use it below
-
- CheckMenuItem(hMenu, ID_LOG_APPLICATION, MF_UNCHECKED);
- CheckMenuItem(hMenu, ID_LOG_SYSTEM, MF_UNCHECKED);
- CheckMenuItem (hMenu, ID_LOG_SECURITY, MF_UNCHECKED);
-
- if (hMenu)
- {
- CheckMenuItem(hMenu, wmId, MF_CHECKED);
- }
- }
-
// Parse the menu selections:
- switch (wmId)
+ switch (LOWORD(wParam))
{
case ID_LOG_APPLICATION:
- QueryEventMessages(lpComputerName, // Use the local
computer.
- EVENT_SOURCE_APPLICATION); // The event log
category
+ if (QueryEventMessages(lpComputerName, // Use the local
computer.
+ EVENT_SOURCE_APPLICATION)) // The event log
category
+ {
+ CheckMenuRadioItem(GetMenu(hWnd),
+ ID_LOG_APPLICATION,
+ ID_LOG_SYSTEM,
+ ID_LOG_APPLICATION,
+ MF_BYCOMMAND);
+ }
+ break;
+
+ case ID_LOG_SECURITY:
+ if (QueryEventMessages(lpComputerName, // Use the local
computer.
+ EVENT_SOURCE_SECURITY)) // The event log
category
+ {
+ CheckMenuRadioItem(GetMenu(hWnd),
+ ID_LOG_APPLICATION,
+ ID_LOG_SYSTEM,
+ ID_LOG_SECURITY,
+ MF_BYCOMMAND);
+ }
break;
case ID_LOG_SYSTEM:
- QueryEventMessages(lpComputerName, // Use the local computer.
- EVENT_SOURCE_SYSTEM); // The event log category
- break;
-
- case ID_LOG_SECURITY:
- QueryEventMessages(lpComputerName, // Use the local
computer.
- EVENT_SOURCE_SECURITY); // The event log category
+ if (QueryEventMessages(lpComputerName, // Use the local
computer.
+ EVENT_SOURCE_SYSTEM)) // The event log
category
+ {
+ CheckMenuRadioItem(GetMenu(hWnd),
+ ID_LOG_APPLICATION,
+ ID_LOG_SYSTEM,
+ ID_LOG_SYSTEM,
+ MF_BYCOMMAND);
+ }
break;
case IDM_REFRESH:
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/bg-BG.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/bg-BG.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -4,7 +4,7 @@
BEGIN
POPUP "&Äíåâíèê"
BEGIN
- MENUITEM "&Ïðèëîæåíèå", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Ïðèëîæåíèå", ID_LOG_APPLICATION
MENUITEM "&Ñèãóðíîñò", ID_LOG_SECURITY
MENUITEM "&Óðåäáà", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/de-DE.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/de-DE.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Protokoll"
BEGIN
- MENUITEM "&Anwendung", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Anwendung", ID_LOG_APPLICATION
MENUITEM "&Sicherheit", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/el-GR.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/el-GR.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Log"
BEGIN
- MENUITEM "&ÅöáñìïãÞ", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&ÅöáñìïãÞ", ID_LOG_APPLICATION
MENUITEM "&ÁóöÜëåéá", ID_LOG_SECURITY
MENUITEM "&Óýóôçìá", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/en-US.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/en-US.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Log"
BEGIN
- MENUITEM "&Application", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Application", ID_LOG_APPLICATION
MENUITEM "&Security", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/es-ES.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/es-ES.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Log"
BEGIN
- MENUITEM "&Aplicación", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Aplicación", ID_LOG_APPLICATION
MENUITEM "&Seguridad", ID_LOG_SECURITY
MENUITEM "&Sistema", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "Journa&l"
BEGIN
- MENUITEM "&Application", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Application", ID_LOG_APPLICATION
MENUITEM "&Sécurité", ID_LOG_SECURITY
MENUITEM "&Système", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/it-IT.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/it-IT.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Log"
BEGIN
- MENUITEM "&Applicazioni", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Applicazioni", ID_LOG_APPLICATION
MENUITEM "&Sicurezza", ID_LOG_SECURITY
MENUITEM "&Sistema", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/ko-KR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/ko-KR.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/ko-KR.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -8,7 +8,7 @@
BEGIN
POPUP "·Î±×(&L)"
BEGIN
- MENUITEM "¾ÖÇø®ÄÉÀ̼Ç(&A)", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "¾ÖÇø®ÄÉÀ̼Ç(&A)", ID_LOG_APPLICATION
MENUITEM "º¸¾È(&S)", ID_LOG_SECURITY
MENUITEM "½Ã½ºÅÛ(&S)", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/no-NO.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/no-NO.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Logg"
BEGIN
- MENUITEM "&Applikasjon", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Applikasjon", ID_LOG_APPLICATION
MENUITEM "&Sikkerhet", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/pl-PL.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/pl-PL.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -16,7 +16,7 @@
BEGIN
POPUP "&Logi"
BEGIN
- MENUITEM "&Aplikacja", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Aplikacja", ID_LOG_APPLICATION
MENUITEM "&Zabezpieczenia", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/ru-RU.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/ru-RU.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Ëîãè"
BEGIN
- MENUITEM "&Ïðèëîæåíèé", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Ïðèëîæåíèé", ID_LOG_APPLICATION
MENUITEM "&Áåçîïàñíîñòè", ID_LOG_SECURITY
MENUITEM "&Ñèñòåìû", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -9,7 +9,7 @@
BEGIN
POPUP "&Záznam"
BEGIN
- MENUITEM "&Application", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Application", ID_LOG_APPLICATION
MENUITEM "&Security", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/lang/uk-UA.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/lang/uk-UA.rc [iso-8859-1] Sun Nov
23 07:34:15 2008
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Çâ³ò"
BEGIN
- MENUITEM "&Ïðîãðàìà", ID_LOG_APPLICATION, CHECKED
+ MENUITEM "&Ïðîãðàìà", ID_LOG_APPLICATION
MENUITEM "&Çàõèñò", ID_LOG_SECURITY
MENUITEM "&Ñèñòåìà", ID_LOG_SYSTEM
MENUITEM SEPARATOR
Modified: trunk/reactos/base/applications/mscutils/eventvwr/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/resource.h [iso-8859-1] Sun Nov 23
07:34:15 2008
@@ -15,13 +15,13 @@
#define IDC_EVENTVWR 109
#define IDC_EVENTSTRINGIDNOTFOUND 209
#define IDC_PROCESSPROGRESS 250
-#define IDC_EVENTLOG_ERROR_TYPE 251
-#define IDC_EVENTLOG_WARNING_TYPE 252
-#define IDC_EVENTLOG_INFORMATION_TYPE 253
-#define IDC_EVENTLOG_AUDIT_SUCCESS 254
-#define IDC_EVENTLOG_AUDIT_FAILURE 255
-#define IDC_EVENTLOG_SUCCESS 256
-#define IDC_EVENTLOG_UNKNOWN_TYPE 257
+#define IDC_EVENTLOG_ERROR_TYPE 251
+#define IDC_EVENTLOG_WARNING_TYPE 252
+#define IDC_EVENTLOG_INFORMATION_TYPE 253
+#define IDC_EVENTLOG_AUDIT_SUCCESS 254
+#define IDC_EVENTLOG_AUDIT_FAILURE 255
+#define IDC_EVENTLOG_SUCCESS 256
+#define IDC_EVENTLOG_UNKNOWN_TYPE 257
#define IDR_MAINFRAME 128
#define IDI_WARNINGICON 129
#define IDI_INFORMATIONICON 130
@@ -41,10 +41,9 @@
#define IDC_BYTESRADIO 1011
#define IDC_WORDRADIO 1013
#define IDC_EVENTDATAEDIT 1014
-#define ID_LOG_APLICATION 32771
+#define ID_LOG_APPLICATION 32771
#define ID_LOG_SECURITY 32772
#define ID_LOG_SYSTEM 32773
-#define ID_LOG_APPLICATION 32774
#define ID_HELP_HELP 32775
#define ID_HELP 32776
#define ID_OPTIONS 32777