Author: mkupfer
Date: Sun Jun 22 05:01:59 2008
New Revision: 34045
URL:
http://svn.reactos.org/svn/reactos?rev=34045&view=rev
Log:
- Seungju Kim <admin AT manateeshome DOT com>
- Korean translation of explorer-new added
- See issue #3368 for more details.
- Alexander Wurzinger <<Lohnegrim At gmx DOT net>
- Patch for the "CreateEnergyList failed"-Error added.
- See issue #2469 for more details.
Added:
trunk/reactos/base/shell/explorer-new/lang/ko-KO.rc (with props)
Modified:
trunk/reactos/base/shell/explorer-new/explorer.rc
trunk/reactos/dll/win32/powrprof/powrprof.c
Modified: trunk/reactos/base/shell/explorer-new/explorer.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/ex…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/explorer.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/explorer.rc [iso-8859-1] Sun Jun 22 05:01:59
2008
@@ -22,3 +22,4 @@
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
#include "lang/uk-UA.rc"
+#include "lang/ko-KO.rc"
Added: trunk/reactos/base/shell/explorer-new/lang/ko-KO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/la…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/lang/ko-KO.rc (added)
+++ trunk/reactos/base/shell/explorer-new/lang/ko-KO.rc [iso-8859-1] Sun Jun 22 05:01:59
2008
@@ -1,0 +1,63 @@
+/*
+ *Korean translation by manatails007(www.manatails007.org)
+ *Seungju Kim
+ */
+LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
+
+IDM_TRAYWND MENU DISCARDABLE
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "ÀÛ¾÷ Ç¥½ÃÁÙ Àá±×±â(&L)", ID_LOCKTASKBAR
+ MENUITEM "¼Ó¼º(&R)", ID_SHELL_CMD_PROPERTIES
+ END
+END
+
+IDM_STARTMENU MENUEX DISCARDABLE
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "", -1, MFT_SEPARATOR
+ POPUP "ÇÁ·Î±×·¥(&P)", IDM_PROGRAMS
+ BEGIN
+ MENUITEM "(ºñ¾î ÀÖÀ½)", -1, MFT_STRING, MFS_GRAYED
+ END
+ POPUP "Áñ°Üã±â(&A)", IDM_FAVORITES
+ BEGIN
+ MENUITEM "(ºñ¾î ÀÖÀ½)", -1, MFT_STRING, MFS_GRAYED
+ END
+ POPUP "¹®¼(&D)", IDM_DOCUMENTS
+ BEGIN
+ MENUITEM "(ºñ¾î ÀÖÀ½)", -1, MFT_STRING, MFS_GRAYED
+ END
+ POPUP "¼³Á¤(&S)", IDM_SETTINGS
+ BEGIN
+ MENUITEM "Á¦¾îÆÇ(&C)", IDM_CONTROLPANEL, MFT_STRING,
MFS_GRAYED
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "º¸¾È(&S)...", IDM_SECURITY, MFT_STRING, MFS_ENABLED
+ MENUITEM "³×Æ®¿öÅ© ¿¬°á(&N)", IDM_NETWORKCONNECTIONS,
MFT_STRING, MFS_ENABLED
+ MENUITEM "ÇÁ¸°ÅÍ¿Í Æѽº(&P)", IDM_PRINTERSANDFAXES, MFT_STRING,
MFS_ENABLED
+ MENUITEM "ÀÛ¾÷ Ç¥½ÃÁÙ°ú ½ÃÀÛ ¸Þ´º(&T)",
IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED
+ END
+ POPUP "°Ë»ö(&C)", IDM_SEARCH
+ BEGIN
+ MENUITEM "", -1, MFT_SEPARATOR
+ END
+ MENUITEM "µµ¿ò¸»(&H)", IDM_HELPANDSUPPORT, MFT_STRING, MFS_ENABLED
+ MENUITEM "½ÇÇà(&R)...", IDM_RUN, MFT_STRING, MFS_ENABLED
+ MENUITEM "", 450, MFT_SEPARATOR, MFS_ENABLED
+ MENUITEM "½ÌÅ©·Î³ªÀÌÁî(&Y)", IDM_SYNCHRONIZE, MFT_STRING,
MFS_ENABLED
+ MENUITEM "%s ·Î±× ¿ÀÇÁ(&L)...", IDM_LOGOFF, MFT_STRING,
MFS_ENABLED
+ MENUITEM "¿¬°á ²÷±â(&I)...", IDM_DISCONNECT, MFT_STRING,
MFS_ENABLED
+ MENUITEM "ÄÄÇ»ÅÍ µµÅ· ÇØÁ¦(&E)", IDM_UNDOCKCOMPUTER, MFT_STRING,
MFS_ENABLED
+ MENUITEM "ÄÔÇ»ÅÍ ²ô±â(&U)...", IDM_SHUTDOWN, MFT_STRING,
MFS_ENABLED
+ END
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_START "½ÃÀÛ"
+ IDS_PROPERTIES "¼Ó¼º(&R)"
+ IDS_OPEN_ALL_USERS "¿±â - All Users(&P)"
+ IDS_EXPLORE_ALL_USERS "Ž»ö - All Users(&X)"
+END
Propchange: trunk/reactos/base/shell/explorer-new/lang/ko-KO.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/powrprof/powrprof.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/powrprof/powrpro…
==============================================================================
--- trunk/reactos/dll/win32/powrprof/powrprof.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/powrprof/powrprof.c [iso-8859-1] Sun Jun 22 05:01:59 2008
@@ -35,6 +35,7 @@
static const WCHAR szPowerCfgSubKey[] =
L"Software\\Microsoft\\Windows\\CurrentVersion\\Controls
Folder\\PowerCfg";
+static const WCHAR szPolicies[] = L"Policies";
static const WCHAR szSemaphoreName[] = L"PowerProfileRegistrySemaphore";
static const WCHAR szDiskMax[] = L"DiskSpindownMax";
static const WCHAR szDiskMin[] = L"DiskSpindownMin";
@@ -119,7 +120,7 @@
static BOOLEAN
POWRPROF_GetUserPowerPolicy(LPWSTR szNum,
- USER_POWER_POLICY userPwrPolicy,
+ PUSER_POWER_POLICY puserPwrPolicy,
DWORD dwName, LPWSTR szName,
DWORD dwDesc, LPWSTR szDesc)
{
@@ -156,8 +157,8 @@
return FALSE;
}
- dwSize = sizeof(userPwrPolicy);
- Err = RegQueryValueExW(hSubKey, L"Policies", NULL, NULL,
(LPBYTE)&userPwrPolicy, &dwSize);
+ dwSize = sizeof(USER_POWER_POLICY);
+ Err = RegQueryValueExW(hSubKey, L"Policies", NULL, NULL,
(LPBYTE)puserPwrPolicy, &dwSize);
if (Err != ERROR_SUCCESS)
{
ERR("RegQueryValueExW failed: %d\n", Err);
@@ -169,7 +170,7 @@
}
static BOOLEAN
-POWRPROF_GetMachinePowerPolicy(LPWSTR szNum, MACHINE_POWER_POLICY machinePwrPolicy)
+POWRPROF_GetMachinePowerPolicy(LPWSTR szNum, PMACHINE_POWER_POLICY pmachinePwrPolicy)
{
HKEY hKey;
LONG Err;
@@ -186,8 +187,8 @@
return FALSE;
}
- dwSize = sizeof(machinePwrPolicy);
- Err = RegQueryValueExW(hKey, L"Policies", NULL, NULL,
(LPBYTE)&machinePwrPolicy, &dwSize);
+ dwSize = sizeof(MACHINE_POWER_POLICY);
+ Err = RegQueryValueExW(hKey, L"Policies", NULL, NULL,
(LPBYTE)pmachinePwrPolicy, &dwSize);
if (Err != ERROR_SUCCESS)
{
ERR("RegQueryValueExW failed: %d\n", Err);
@@ -204,11 +205,12 @@
{
HKEY hKey;
LONG Err;
- DWORD dwSize, dwNameSize = 0, dwDescSize = 0, dwIndex = 0;
+ DWORD dwSize, dwNameSize = MAX_PATH, dwDescSize = MAX_PATH, dwIndex = 0;
WCHAR szNum[3 + 1], szName[MAX_PATH], szDesc[MAX_PATH];
- PPOWER_POLICY pPwrPolicy = NULL;
+ POWER_POLICY PwrPolicy;
USER_POWER_POLICY userPwrPolicy;
MACHINE_POWER_POLICY machinePwrPolicy;
+ BOOLEAN ret = FALSE;
if (!lpfnPwrSchemesEnumProc)
{
@@ -230,7 +232,7 @@
while (RegEnumKeyExW(hKey, dwIndex, szNum, &dwSize, NULL, NULL, NULL, NULL) ==
ERROR_SUCCESS)
{
- if (!POWRPROF_GetUserPowerPolicy(szNum, userPwrPolicy,
+ if (!POWRPROF_GetUserPowerPolicy(szNum, &userPwrPolicy,
dwNameSize, szName,
dwDescSize, szDesc))
{
@@ -239,18 +241,26 @@
return FALSE;
}
- if (!POWRPROF_GetMachinePowerPolicy(szNum, machinePwrPolicy))
+ if (!POWRPROF_GetMachinePowerPolicy(szNum, &machinePwrPolicy))
{
RegCloseKey(hKey);
ReleaseSemaphore(PPRegSemaphore, 1, NULL);
return FALSE;
}
- memcpy(&pPwrPolicy->user, &userPwrPolicy, sizeof(USER_POWER_POLICY));
- memcpy(&pPwrPolicy->mach, &machinePwrPolicy,
sizeof(MACHINE_POWER_POLICY));
-
- if (!lpfnPwrSchemesEnumProc(_wtoi(szNum), dwNameSize, szName, dwDescSize, szDesc,
pPwrPolicy, lParam))
- break;
+ memcpy(&PwrPolicy.user, &userPwrPolicy, sizeof(USER_POWER_POLICY));
+ memcpy(&PwrPolicy.mach, &machinePwrPolicy,
sizeof(MACHINE_POWER_POLICY));
+
+ if (!lpfnPwrSchemesEnumProc(_wtoi(szNum), dwNameSize, szName, dwDescSize, szDesc,
&PwrPolicy, lParam))
+ {
+ RegCloseKey(hKey);
+ ReleaseSemaphore(PPRegSemaphore, 1, NULL);
+ return ret;
+ }
+ else
+ {
+ ret=TRUE;
+ }
dwSize = sizeof(szNum) / sizeof(WCHAR);
dwIndex++;
@@ -306,6 +316,7 @@
GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY pGlobalPowerPolicy,
PPOWER_POLICY pPowerPolicy)
{
+ /*
SYSTEM_POWER_POLICY ACPower, DCPower;
FIXME("(%p, %p) stub!\n", pGlobalPowerPolicy, pPowerPolicy);
@@ -314,6 +325,36 @@
NtPowerInformation(SystemPowerPolicyDc, 0, 0, &DCPower,
sizeof(SYSTEM_POWER_POLICY));
return FALSE;
+ */
+/*
+ Lohnegrim: I dont know why this Function shoud call NtPowerInformation, becouse as far
as i know,
+ it simply returns the GlobalPowerPolicy and the AktivPowerScheme!
+ */
+ BOOLEAN ret;
+ UINT uiID;
+
+ if (pGlobalPowerPolicy != NULL)
+ {
+ ret = ReadGlobalPwrPolicy(pGlobalPowerPolicy);
+ if (!ret)
+ {
+ return FALSE;
+ }
+ }
+ if (pPowerPolicy != NULL)
+ {
+ ret = GetActivePwrScheme(&uiID);
+ if (!ret)
+ {
+ return FALSE;
+ }
+ ret = ReadPwrScheme(uiID,pPowerPolicy);
+ if (!ret)
+ {
+ return FALSE;
+ }
+ }
+ return TRUE;
}
@@ -532,13 +573,13 @@
swprintf(szNum, L"%d", uiID);
- if (!POWRPROF_GetUserPowerPolicy(szNum, userPwrPolicy, 0, NULL, 0, NULL))
+ if (!POWRPROF_GetUserPowerPolicy(szNum, &userPwrPolicy, 0, NULL, 0, NULL))
{
ReleaseSemaphore(PPRegSemaphore, 1, NULL);
return FALSE;
}
- if (!POWRPROF_GetMachinePowerPolicy(szNum, machinePwrPolicy))
+ if (!POWRPROF_GetMachinePowerPolicy(szNum, &machinePwrPolicy))
{
ReleaseSemaphore(PPRegSemaphore, 1, NULL);
return FALSE;
@@ -578,9 +619,46 @@
BOOLEAN WINAPI
WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY pGlobalPowerPolicy)
{
- FIXME("(%p) stub!\n", pGlobalPowerPolicy);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ HKEY hKey;
+ GLOBAL_USER_POWER_POLICY gupp;
+ GLOBAL_MACHINE_POWER_POLICY gmpp;
+
+ gupp = pGlobalPowerPolicy->user;
+ gmpp = pGlobalPowerPolicy->mach;
+
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,
+ L"Control Panel\\PowerCfg\\GlobalPowerPolicy",
+ 0,
+ KEY_ALL_ACCESS,
+ &hKey))
+ return FALSE;
+
+ if (RegSetValueExW(hKey,szPolicies,(DWORD)NULL,REG_BINARY,(const unsigned char
*)&gupp,sizeof(GLOBAL_USER_POWER_POLICY)) == ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Controls
Folder\\PowerCfg\\GlobalPowerPolicy",
+ 0,
+ KEY_ALL_ACCESS,
+ &hKey))
+ return FALSE;
+
+ if (RegSetValueExW(hKey,szPolicies,(DWORD)NULL,REG_BINARY,(const unsigned char
*)&gmpp,sizeof(GLOBAL_MACHINE_POWER_POLICY)) == ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ RegCloseKey(hKey);
+ return FALSE;
+ }
}
@@ -620,20 +698,19 @@
return FALSE;
}
- if (!pGPP)
- {
- memcpy(&pGPP, &pGlobalPowerPolicy, sizeof(GLOBAL_POWER_POLICY));
- }
-
- if (!pPP)
- {
- memcpy(&pPP, &pPowerPolicy, sizeof(POWER_POLICY));
+ if (pGPP)
+ {
+ //memcpy(&pGPP, &pGlobalPowerPolicy, sizeof(GLOBAL_POWER_POLICY));
+ }
+
+ if (pPP)
+ {
+ //memcpy(&pPP, &pPowerPolicy, sizeof(POWER_POLICY));
}
SetLastError(ERROR_SUCCESS);
return TRUE;
}
-
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)