[ros-diffs] [cfinck] 27786: - Get rid of an unneeded variable in GetSystemInformation - Minor changes to the GetProcNameString function - Fix unselecting the license text. EM_SETSEL only works after the edit control has been drawn, so we cannot send this message in the WM_INITDIALOG message handler. Instead we use PostMessage now. See KB96674 for more details. - Downloaded the latest GPL 2.0 text from the GNU website and use that as the "gpl.txt" now. Now we don't have these annoying "box" characters in the license dialog box anymore.

cfinck at svn.reactos.org cfinck at svn.reactos.org
Mon Jul 23 13:48:55 CEST 2007


Author: cfinck
Date: Mon Jul 23 15:48:55 2007
New Revision: 27786

URL: http://svn.reactos.org/svn/reactos?rev=27786&view=rev
Log:
- Get rid of an unneeded variable in GetSystemInformation
- Minor changes to the GetProcNameString function
- Fix unselecting the license text. EM_SETSEL only works after the edit control has been drawn, so we cannot send this message in the WM_INITDIALOG message handler.
  Instead we use PostMessage now. See KB96674 for more details.
- Downloaded the latest GPL 2.0 text from the GNU website and use that as the "gpl.txt" now.
  Now we don't have these annoying "box" characters in the license dialog box anymore.

Modified:
    trunk/reactos/dll/cpl/sysdm/general.c
    trunk/reactos/dll/cpl/sysdm/licence.c
    trunk/reactos/dll/cpl/sysdm/resources/gpl.txt

Modified: trunk/reactos/dll/cpl/sysdm/general.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/general.c?rev=27786&r1=27785&r2=27786&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/general.c (original)
+++ trunk/reactos/dll/cpl/sysdm/general.c Mon Jul 23 15:48:55 2007
@@ -193,11 +193,9 @@
 		HeapFree(GetProcessHeap(),
 				 0,
 				 lpBuf);
-		
-		return Ret;
-	}
-
-	return 0;
+	}
+
+	return Ret;
 }
 
 static  VOID
@@ -251,7 +249,6 @@
 	TCHAR ProcKey[] = _T("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
 	MEMORYSTATUSEX MemStat;
 	TCHAR Buf[32];
-	INT Ret = 0;
 	INT CurMachineLine = IDC_MACHINELINE1;
 
 
@@ -266,22 +263,21 @@
 					 KEY_READ,
 					 &hKey) == ERROR_SUCCESS)
 	{
-		SetRegTextData(hwnd, 
-					   hKey, 
-					   _T("VendorIdentifier"), 
+		SetRegTextData(hwnd,
+					   hKey,
+					   _T("VendorIdentifier"),
 					   CurMachineLine);
 		CurMachineLine++;
 	    
-		Ret = SetProcNameString(hwnd, 
-								hKey, 
-								_T("ProcessorNameString"), 
-								CurMachineLine,
-								CurMachineLine+1);
-		CurMachineLine += Ret;
+		CurMachineLine += SetProcNameString(hwnd,
+											hKey,
+											_T("ProcessorNameString"),
+											CurMachineLine,
+											CurMachineLine + 1);
 	    
-		SetProcSpeed(hwnd, 
-					 hKey, 
-					 _T("~MHz"), 
+		SetProcSpeed(hwnd,
+					 hKey,
+					 _T("~MHz"),
 					 CurMachineLine);
 		CurMachineLine++;
 	}
@@ -316,7 +312,6 @@
 				if (MemStat.ullTotalPhys > 1024 * 1024)
 				{
 					/* We're dealing with PBs or more */
-
 					MemStat.ullTotalPhys /= 1024;
 					i++;
 
@@ -336,15 +331,13 @@
 
 		if (LoadString(hApplet, uStrId[i], szStr, sizeof(szStr) / sizeof(szStr[0])))
 		{
-			Ret = _stprintf(Buf, _T("%.2f %s"), dTotalPhys, szStr);
-		}
-	}
-
-	if (Ret)
-	{
-		SetDlgItemText(hwnd,
-					   CurMachineLine,
-					   Buf);
+			if( _stprintf(Buf, _T("%.2f %s"), dTotalPhys, szStr) )
+			{
+				SetDlgItemText(hwnd,
+							   CurMachineLine,
+							   Buf);
+			}
+		}
 	}
 }
 

Modified: trunk/reactos/dll/cpl/sysdm/licence.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/licence.c?rev=27786&r1=27785&r2=27786&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/licence.c (original)
+++ trunk/reactos/dll/cpl/sysdm/licence.c Mon Jul 23 15:48:55 2007
@@ -55,11 +55,10 @@
 						   IDC_LICENCEEDIT,
 						   LicenseText);
 
-			SendDlgItemMessage(hDlg,
-							   IDC_LICENCEEDIT,
-							   EM_SETSEL,
-							   -1,
-							   0);
+			PostMessage(GetDlgItem(hDlg, IDC_LICENCEEDIT),
+						EM_SETSEL,
+						-1,
+						0);
 
 			return TRUE;
 		}

Modified: trunk/reactos/dll/cpl/sysdm/resources/gpl.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/resources/gpl.txt?rev=27786&r1=27785&r2=27786&view=diff
==============================================================================
Binary files - no diff available.




More information about the Ros-diffs mailing list