diff --git a/reactos/base/shell/explorer/shell/filechild.cpp b/reactos/base/shell/explorer/shell/filechild.cpp index f23d271600e..f7e838029dc 100644 --- a/reactos/base/shell/explorer/shell/filechild.cpp +++ b/reactos/base/shell/explorer/shell/filechild.cpp @@ -299,10 +299,12 @@ void FileChildWindow::set_curdir(Entry* entry) SetWindowText(_hwnd, _path); if (_path[0]) + { if (SetCurrentDirectory(_path)) set_url(_path); //set_url(FmtString(TEXT("file://%s"), _path)); else _path[0] = TEXT('\0'); + } } @@ -508,8 +510,9 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) case WM_CONTEXTMENU: { // first select the current item in the listbox HWND hpanel = (HWND) wparam; - const POINTS& pos = MAKEPOINTS(lparam); - POINT pt; POINTSTOPOINT(pt, pos); + POINT pt; + pt.x = LOWORD(lparam); + pt.y = HIWORD(lparam); POINT pt_screen = pt; ScreenToClient(hpanel, &pt); SendMessage(hpanel, WM_LBUTTONDOWN, 0, MAKELONG(pt.x, pt.y)); diff --git a/reactos/base/shell/explorer/shell/pane.cpp b/reactos/base/shell/explorer/shell/pane.cpp index a3fe36f4fde..a5fde1c6184 100644 --- a/reactos/base/shell/explorer/shell/pane.cpp +++ b/reactos/base/shell/explorer/shell/pane.cpp @@ -377,12 +377,13 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) bool following_child = (up->_next->_data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)!=0; // a directory? if (!following_child) + { for(Entry*n=up->_next; n; n=n->_next) if (n->_down) { // any file with NTFS sub-streams? following_child = true; break; } - + } if (following_child) #endif { @@ -403,12 +404,13 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) bool following_child = (entry->_next->_data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)!=0; // a directory? if (!following_child) + { for(Entry*n=entry->_next; n; n=n->_next) if (n->_down) { // any file with NTFS sub-streams? following_child = true; break; } - + } if (following_child) #endif LineTo(dis->hDC, x, dis->rcItem.bottom); diff --git a/reactos/base/shell/explorer/shell/shellfs.cpp b/reactos/base/shell/explorer/shell/shellfs.cpp index 39519089337..bc0ac028957 100644 --- a/reactos/base/shell/explorer/shell/shellfs.cpp +++ b/reactos/base/shell/explorer/shell/shellfs.cpp @@ -122,6 +122,7 @@ ShellPath ShellEntry::create_absolute_pidl() const CONTEXT("ShellEntry::create_absolute_pidl()"); if (_up) + { if (_up->_etype == ET_SHELL) { ShellDirectory* dir = static_cast(_up); @@ -129,7 +130,7 @@ ShellPath ShellEntry::create_absolute_pidl() const return _pidl.create_absolute_pidl(dir->create_absolute_pidl()); } else return _pidl.create_absolute_pidl(_up->create_absolute_pidl()); - + } return _pidl; } diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.cpp b/reactos/base/shell/explorer/taskbar/desktopbar.cpp index eba76bde95a..ad28aa3200d 100644 --- a/reactos/base/shell/explorer/taskbar/desktopbar.cpp +++ b/reactos/base/shell/explorer/taskbar/desktopbar.cpp @@ -314,9 +314,12 @@ LRESULT DesktopBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) return ProcessCopyData((COPYDATASTRUCT*)lparam); case WM_CONTEXTMENU: { + POINTS p; + p.x = LOWORD(lparam); + p.y = HIWORD(lparam); PopupMenu menu(IDM_DESKTOPBAR); SetMenuDefaultItem(menu, 0, MF_BYPOSITION); - menu.TrackPopupMenu(_hwnd, MAKEPOINTS(lparam)); + menu.TrackPopupMenu(_hwnd, p); break;} case PM_GET_LAST_ACTIVE: diff --git a/reactos/base/shell/explorer/taskbar/startmenu.cpp b/reactos/base/shell/explorer/taskbar/startmenu.cpp index c2b4350faad..024c73667cb 100644 --- a/reactos/base/shell/explorer/taskbar/startmenu.cpp +++ b/reactos/base/shell/explorer/taskbar/startmenu.cpp @@ -311,7 +311,9 @@ LRESULT StartMenu::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) break; case WM_MOVE: { - const POINTS& pos = MAKEPOINTS(lparam); + POINTS pos; + pos.x = LOWORD(lparam); + pos.y = HIWORD(lparam); // move open submenus of floating menus if (_submenu) { @@ -699,10 +701,12 @@ bool StartMenu::Navigate(int step) int idx = GetSelectionIndex(); if (idx == -1) + { if (step > 0) idx = 0 - step; else idx = _buttons.size() - step; + } for(;;) { idx += step; @@ -1067,10 +1071,12 @@ ShellEntryMap::iterator StartMenu::AddEntry(const String& title, ICON_ID icon_id { // search for an already existing subdirectory entry with the same name if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { for(ShellEntryMap::iterator it=_entries.begin(); it!=_entries.end(); ++it) { StartMenuEntry& sme = it->second; if (!_tcsicmp(sme._title, title)) ///@todo speed up by using a map indexed by name + { for(ShellEntrySet::iterator it2=sme._entries.begin(); it2!=sme._entries.end(); ++it2) { if ((*it2)->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { // merge the new shell entry with the existing of the same name @@ -1079,7 +1085,9 @@ ShellEntryMap::iterator StartMenu::AddEntry(const String& title, ICON_ID icon_id return it; } } + } } + } ShellEntryMap::iterator sme = AddEntry(title, icon_id); diff --git a/reactos/base/shell/explorer/taskbar/traynotify.cpp b/reactos/base/shell/explorer/taskbar/traynotify.cpp index d8878cf6e0b..4d596f8a5e5 100644 --- a/reactos/base/shell/explorer/taskbar/traynotify.cpp +++ b/reactos/base/shell/explorer/taskbar/traynotify.cpp @@ -419,6 +419,9 @@ LRESULT NotifyArea::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) case WM_CONTEXTMENU: { Point pt(lparam); + POINTS p; + p.x = pt.x; + p.y = pt.y; ScreenToClient(_hwnd, &pt); if (IconHitTest(pt) == _sorted_icons.end()) { // display menu only when no icon clicked @@ -426,7 +429,7 @@ LRESULT NotifyArea::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) SetMenuDefaultItem(menu, 0, MF_BYPOSITION); CheckMenuItem(menu, ID_SHOW_HIDDEN_ICONS, MF_BYCOMMAND|(_show_hidden?MF_CHECKED:MF_UNCHECKED)); CheckMenuItem(menu, ID_SHOW_ICON_BUTTON, MF_BYCOMMAND|(_show_button?MF_CHECKED:MF_UNCHECKED)); - menu.TrackPopupMenu(_hwnd, MAKEPOINTS(lparam)); + menu.TrackPopupMenu(_hwnd, p); } break;} diff --git a/reactos/base/shell/explorer/utility/xmlstorage.cpp b/reactos/base/shell/explorer/utility/xmlstorage.cpp index 75d33440fcb..f82dffb5815 100644 --- a/reactos/base/shell/explorer/utility/xmlstorage.cpp +++ b/reactos/base/shell/explorer/utility/xmlstorage.cpp @@ -705,6 +705,7 @@ void XMLReaderBase::StartElementHandler(const XS_String& name, const XMLNode::At break; if (p != s) + { if (_pos->_children.empty()) { // no children in last node? if (_last_tag == TAG_START) _pos->_content.append(s, p-s); @@ -714,7 +715,7 @@ void XMLReaderBase::StartElementHandler(const XS_String& name, const XMLNode::At p = s; } else _pos->_children.back()->_trailing.append(s, p-s); - + } std::string leading; if (p != e) @@ -752,12 +753,14 @@ void XMLReaderBase::EndElementHandler() } if (p != s) + { if (_pos->_children.empty()) // no children in current node? _pos->_content.append(s, p-s); else if (_last_tag == TAG_START) _pos->_content.append(s, p-s); else _pos->_children.back()->_trailing.append(s, p-s); + } if (p != e) _pos->_end_leading.assign(p, e-p); diff --git a/reactos/base/shell/explorer/utility/xs-native.cpp b/reactos/base/shell/explorer/utility/xs-native.cpp index c5bb891cec3..06971aa6564 100644 --- a/reactos/base/shell/explorer/utility/xs-native.cpp +++ b/reactos/base/shell/explorer/utility/xs-native.cpp @@ -361,6 +361,7 @@ bool XMLReaderBase::parse() for(;;) { // check for the encoding of the first line end if (!_endl_defined) + { if (c == '\n') { _format._endl = "\n"; _endl_defined = true; @@ -368,7 +369,7 @@ bool XMLReaderBase::parse() _format._endl = "\r\n"; _endl_defined = true; } - + } c = get(); if (c == EOF)