Author: tfaber
Date: Wed Dec 26 15:48:49 2012
New Revision: 58013
URL:
http://svn.reactos.org/svn/reactos?rev=58013&view=rev
Log:
[EXPLORER_NEW]
- Fix some formatting and GetWindowLong[Ptr] confusion
Modified:
trunk/reactos/base/shell/explorer-new/explorer.c
trunk/reactos/base/shell/explorer-new/lang/bg-BG.rc
trunk/reactos/base/shell/explorer-new/taskswnd.c
trunk/reactos/base/shell/explorer-new/trayntfy.c
trunk/reactos/base/shell/explorer-new/trayprop.c
trunk/reactos/base/shell/explorer-new/traywnd.c
Modified: trunk/reactos/base/shell/explorer-new/explorer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/ex…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/explorer.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/explorer.c [iso-8859-1] Wed Dec 26 15:48:49
2012
@@ -41,17 +41,17 @@
ASSERT((~dwStyleMask & dwStyle) == 0);
- PrevStyle = GetWindowLongPtr(hWnd,
- GWL_STYLE);
+ PrevStyle = GetWindowLong(hWnd,
+ GWL_STYLE);
if (PrevStyle != 0 &&
(PrevStyle & dwStyleMask) != dwStyle)
{
Style = PrevStyle & ~dwStyleMask;
Style |= dwStyle;
- PrevStyle = SetWindowLongPtr(hWnd,
- GWL_STYLE,
- Style);
+ PrevStyle = SetWindowLong(hWnd,
+ GWL_STYLE,
+ Style);
}
return PrevStyle;
@@ -66,17 +66,17 @@
ASSERT((~dwStyleMask & dwStyle) == 0);
- PrevStyle = GetWindowLongPtr(hWnd,
- GWL_EXSTYLE);
+ PrevStyle = GetWindowLong(hWnd,
+ GWL_EXSTYLE);
if (PrevStyle != 0 &&
(PrevStyle & dwStyleMask) != dwStyle)
{
Style = PrevStyle & ~dwStyleMask;
Style |= dwStyle;
- PrevStyle = SetWindowLongPtr(hWnd,
- GWL_EXSTYLE,
- Style);
+ PrevStyle = SetWindowLong(hWnd,
+ GWL_EXSTYLE,
+ Style);
}
return PrevStyle;
@@ -291,11 +291,11 @@
BOOL bRet = FALSE;
unsigned int i;
- dwLen = GetFileVersionInfoSize(szFileName,&dwHandle);
+ dwLen = GetFileVersionInfoSize(szFileName, &dwHandle);
if (dwLen > 0)
{
- lpData = HeapAlloc(hProcessHeap,0,dwLen);
+ lpData = HeapAlloc(hProcessHeap, 0, dwLen);
if (lpData != NULL)
{
@@ -324,14 +324,15 @@
sizeof(szSubBlock) / sizeof(szSubBlock[0]),
TEXT("\\StringFileInfo\\%04X%04X\\%s"),
lpTranslate[i].wLanguage,
- lpTranslate[i].wCodePage,szVersionInfo);
+ lpTranslate[i].wCodePage,
+ szVersionInfo);
if (VerQueryValue(lpData,
szSubBlock,
(LPVOID *)&lpszLocalBuf,
&cbLen) != 0)
{
- wcsncpy(szBuffer,lpszLocalBuf,cbBufLen);
+ wcsncpy(szBuffer, lpszLocalBuf, cbBufLen);
bRet = TRUE;
break;
@@ -339,7 +340,7 @@
}
}
}
- HeapFree(hProcessHeap,0,lpData);
+ HeapFree(hProcessHeap, 0, lpData);
lpData = NULL;
}
}
Modified: trunk/reactos/base/shell/explorer-new/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/la…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/lang/bg-BG.rc [iso-8859-1] Wed Dec 26 15:48:49
2012
@@ -15,7 +15,7 @@
MENUITEM "&Undo", ID_SHELL_CMD_UNDO_ACTION
MENUITEM SEPARATOR
MENUITEM "ÐадаÑен ÑпÑавиÑел",
ID_SHELL_CMD_OPEN_TASKMGR
- MENUITEM SEPARATOR
+ MENUITEM SEPARATOR
MENUITEM "&ÐаклÑÑване на задаÑнаÑа
ленÑа", ID_LOCKTASKBAR
MENUITEM "С&войÑÑва", ID_SHELL_CMD_PROPERTIES
END
Modified: trunk/reactos/base/shell/explorer-new/taskswnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/ta…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/taskswnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/taskswnd.c [iso-8859-1] Wed Dec 26 15:48:49
2012
@@ -431,7 +431,9 @@
TaskItem);
icon = TaskSwitchWnd_GetWndIcon(TaskItem->hWnd);
- TaskItem->IconIndex =
ImageList_ReplaceIcon(This->TaskIcons,TaskItem->IconIndex,icon);
+ TaskItem->IconIndex = ImageList_ReplaceIcon(This->TaskIcons,
+ TaskItem->IconIndex,
+ icon);
tbbi.iImage = TaskItem->IconIndex;
if (!SendMessage(This->hWndToolbar,
@@ -452,9 +454,9 @@
IN PTASK_ITEM TaskItem)
{
TBBUTTONINFO tbbi;
- PTASK_ITEM currentTaskItem,LastItem;
-
- if (TaskItem->IconIndex==-1)
+ PTASK_ITEM currentTaskItem, LastItem;
+
+ if (TaskItem->IconIndex == -1)
return;
tbbi.cbSize = sizeof(tbbi);
@@ -1377,8 +1379,8 @@
/* Don't list popup windows and also no tool windows */
if (GetWindow(hWnd,
GW_OWNER) == NULL &&
- !(GetWindowLongPtr(hWnd,
- GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
+ !(GetWindowLong(hWnd,
+ GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
{
TaskSwitchWnd_AddTask(This,
hWnd);
@@ -2126,7 +2128,7 @@
#if DUMP_TASKS != 0
case WM_TIMER:
- switch(wParam)
+ switch (wParam)
{
case 1:
TaskSwitchWnd_DumpTasks(This);
Modified: trunk/reactos/base/shell/explorer-new/trayntfy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tr…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/trayntfy.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/trayntfy.c [iso-8859-1] Wed Dec 26 15:48:49
2012
@@ -187,7 +187,7 @@
tbBtn.dwData = notifyItem->Index;
tbBtn.iString = (INT_PTR)text;
- tbBtn.idCommand=notifyItem->Index;
+ tbBtn.idCommand = notifyItem->Index;
if (iconData->uFlags & NIF_MESSAGE)
{
@@ -237,7 +237,7 @@
{
PNOTIFY_ITEM deleteItem;
PNOTIFY_ITEM updateItem;
- deleteItem=*NotifyPointer;
+ deleteItem = *NotifyPointer;
SendMessage(This->hWndToolbar,
@@ -245,7 +245,7 @@
deleteItem->Index,
0);
- *NotifyPointer=updateItem=deleteItem->next;
+ *NotifyPointer = updateItem = deleteItem->next;
if (!(deleteItem->iconData.dwState & NIS_HIDDEN))
This->VisibleButtonCount--;
@@ -382,13 +382,10 @@
SendMessage(This->hWndToolbar, TB_SETIMAGELIST, 0,
(LPARAM)This->SysIcons);
BtnSize.cx = BtnSize.cy = 18;
- //BtnSize.cx = GetSystemMetrics(SM_CXMINIMIZED);
- //This->ButtonSize.cy = BtnSize.cy = GetSystemMetrics(SM_CYSIZE) + (2 *
GetSystemMetrics(SM_CYEDGE));
SendMessage(This->hWndToolbar,
TB_SETBUTTONSIZE,
0,
MAKELONG(BtnSize.cx, BtnSize.cy));
- /*SysPagerWnd_AddButton(This);*/
SetWindowSubclass(This->hWndToolbar,
SysPagerWnd_ToolbarSubclassedProc,
@@ -427,6 +424,7 @@
parentHWND = GetParent(parentHWND);
GetClientRect(parentHWND, &windowRect);
+ /* FIXME: ever heard of "struct"? */
trayCommand = *(DWORD *) (((BYTE *)cpData->lpData) + 4);
iconData = (NOTIFYICONDATA *) (((BYTE *)cpData->lpData) + 8);
@@ -448,7 +446,7 @@
PPNOTIFY_ITEM NotifyPointer;
NotifyPointer = SysPagerWnd_FindPPNotifyItemByIconData(This,
iconData);
- if(!NotifyPointer)
+ if (!NotifyPointer)
{
SysPagerWnd_AddButton(This, iconData);
}
@@ -697,10 +695,10 @@
BOOL IsTime;
DWORD dwFormatFlags;
LPCTSTR lpFormat;
-}ClockWndFormats[]= {
-{TRUE, 0, NULL},
-{FALSE, 0, TEXT("dddd")},
-{FALSE, DATE_SHORTDATE, NULL}
+} ClockWndFormats[] = {
+ { TRUE, 0, NULL },
+ { FALSE, 0, TEXT("dddd") },
+ { FALSE, DATE_SHORTDATE, NULL }
};
HRESULT RegGetDWord(HKEY hKey, LPCTSTR szValueName, DWORD * lpdwResult)
@@ -997,7 +995,7 @@
nmh.hwndFrom = This->hWnd;
nmh.idFrom = GetWindowLongPtr(This->hWnd,
- GWL_ID);
+ GWLP_ID);
nmh.code = NTNWM_REALIGN;
SendMessage(This->hWndNotify,
@@ -1491,9 +1489,9 @@
if (This->TrayTheme)
{
- style = GetWindowLongPtr(This->hWnd, GWL_EXSTYLE);
+ style = GetWindowLong(This->hWnd, GWL_EXSTYLE);
style = style & ~WS_EX_STATICEDGE;
- SetWindowLongPtr(This->hWnd, GWL_EXSTYLE, style);
+ SetWindowLong(This->hWnd, GWL_EXSTYLE, style);
GetThemeMargins(This->TrayTheme,
NULL,
@@ -1505,9 +1503,9 @@
}
else
{
- style = GetWindowLongPtr(This->hWnd, GWL_EXSTYLE);
+ style = GetWindowLong(This->hWnd, GWL_EXSTYLE);
style = style | WS_EX_STATICEDGE;
- SetWindowLongPtr(This->hWnd, GWL_EXSTYLE, style);
+ SetWindowLong(This->hWnd, GWL_EXSTYLE, style);
This->ContentMargin.cxLeftWidth = 0;
This->ContentMargin.cxRightWidth = 0;
Modified: trunk/reactos/base/shell/explorer-new/trayprop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tr…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/trayprop.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/trayprop.c [iso-8859-1] Wed Dec 26 15:48:49
2012
@@ -142,7 +142,7 @@
break;
case WM_COMMAND:
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_TASKBARPROP_LOCK:
case IDC_TASKBARPROP_HIDE:
@@ -163,7 +163,7 @@
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
@@ -259,7 +259,7 @@
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
@@ -294,7 +294,7 @@
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
@@ -329,7 +329,7 @@
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
Modified: trunk/reactos/base/shell/explorer-new/traywnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tr…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/traywnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/traywnd.c [iso-8859-1] Wed Dec 26 15:48:49 2012
@@ -372,11 +372,11 @@
RECT rcMin = {0};
AdjustWindowRectEx(&rcMin,
- GetWindowLongPtr(This->hWnd,
- GWL_STYLE),
+ GetWindowLong(This->hWnd,
+ GWL_STYLE),
FALSE,
- GetWindowLongPtr(This->hWnd,
- GWL_EXSTYLE));
+ GetWindowLong(This->hWnd,
+ GWL_EXSTYLE));
*pRect = rcMin;
}
@@ -655,7 +655,7 @@
RECT rcTray,rcWorkArea;
/* If monitor has changed then fix the previous monitors work area */
- if(This->PreviousMonitor!=This->Monitor)
+ if (This->PreviousMonitor != This->Monitor)
{
ITrayWindowImpl_GetScreenRect(This,
This->PreviousMonitor,
@@ -671,25 +671,25 @@
ITrayWindowImpl_GetScreenRect(This,
This->Monitor,
&rcWorkArea);
- This->PreviousMonitor=This->Monitor;
+ This->PreviousMonitor = This->Monitor;
/* If AutoHide is false then change the workarea to exclude the area that
the taskbar covers. */
- if(!This->AutoHide)
- {
- switch(This->Position)
+ if (!This->AutoHide)
+ {
+ switch (This->Position)
{
case ABE_TOP:
- rcWorkArea.top=rcTray.bottom;
+ rcWorkArea.top = rcTray.bottom;
break;
case ABE_LEFT:
- rcWorkArea.left=rcTray.right;
+ rcWorkArea.left = rcTray.right;
break;
case ABE_RIGHT:
- rcWorkArea.right=rcTray.left;
+ rcWorkArea.right = rcTray.left;
break;
case ABE_BOTTOM:
- rcWorkArea.bottom=rcTray.top;
+ rcWorkArea.bottom = rcTray.top;
break;
}
}
@@ -1978,7 +1978,7 @@
static DWORD WINAPI
RunFileDlgThread(IN OUT PVOID pParam)
-{
+{
ITrayWindowImpl *This = pParam;
HANDLE hShell32;
RUNFILEDLG RunFileDlg;
@@ -2007,7 +2007,7 @@
DestroyWindow(hwnd);
- return 0;
+ return 0;
}
static LRESULT CALLBACK
@@ -2519,7 +2519,7 @@
lParam,
&Ret)))
{
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
/* FIXME: Handle these commands as well */
case IDM_TASKBARANDSTARTMENU: