Author: hbelusca
Date: Sun Jan 29 13:48:39 2017
New Revision: 73619
URL: http://svn.reactos.org/svn/reactos?rev=73619&view=rev
Log:
[SHELL32]: Fix build on *sane* compilers (wth, is that an assignment without the equal sign, or a called constructor, missing its parentheses?!).
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sun Jan 29 13:48:39 2017
@@ -2828,7 +2828,7 @@
/* Map from global to client coordinates and query the index of the listview-item, which is
* currently under the mouse cursor. */
- LVHITTESTINFO htinfo { {pt.x, pt.y}, LVHT_ONITEM};
+ LVHITTESTINFO htinfo = {{pt.x, pt.y}, LVHT_ONITEM};
ScreenToClient(&htinfo.pt);
lResult = m_ListView.HitTest(&htinfo);
Author: mjansen
Date: Sat Jan 28 23:05:04 2017
New Revision: 73615
URL: http://svn.reactos.org/svn/reactos?rev=73615&view=rev
Log:
[EXPLORER] Re-save the start menu banner so that we can display it again (and touch the .rc so it will be used).
Modified:
trunk/reactos/base/shell/explorer/explorer.rc
trunk/reactos/base/shell/explorer/res/bmp/158.bmp
Modified: trunk/reactos/base/shell/explorer/explorer.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explor…
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer.rc [iso-8859-1] Sat Jan 28 23:05:04 2017
@@ -160,3 +160,4 @@
#ifdef LANGUAGE_ZH_TW
#include "lang/zh-TW.rc"
#endif
+
Modified: trunk/reactos/base/shell/explorer/res/bmp/158.bmp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/res/bm…
==============================================================================
Binary files - no diff available.
Author: gadamopoulos
Date: Sat Jan 28 21:43:53 2017
New Revision: 73614
URL: http://svn.reactos.org/svn/reactos?rev=73614&view=rev
Log:
[SHELL32] - CDefView: When dragging an item it shouldn't interact with itself. So you can move a folder in itself. Highlight the item that we are dragging over if it can accept the item that is being dragged.
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sat Jan 28 21:43:53 2017
@@ -2419,7 +2419,7 @@
m_ListView.SetItemState(iItem, lvItem.state, lvItem.stateMask);
- if (dwFlags & SVSI_EDIT)
+ if ((dwFlags & SVSI_EDIT) == SVSI_EDIT)
m_ListView.EditLabel(iItem);
return S_OK;
@@ -2822,17 +2822,14 @@
HRESULT CDefView::drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
{
- LVHITTESTINFO htinfo;
LONG lResult;
HRESULT hr;
RECT clientRect;
/* Map from global to client coordinates and query the index of the listview-item, which is
* currently under the mouse cursor. */
- htinfo.pt.x = pt.x;
- htinfo.pt.y = pt.y;
- htinfo.flags = LVHT_ONITEM;
- ::ScreenToClient(m_ListView, &htinfo.pt);
+ LVHITTESTINFO htinfo { {pt.x, pt.y}, LVHT_ONITEM};
+ ScreenToClient(&htinfo.pt);
lResult = m_ListView.HitTest(&htinfo);
/* Send WM_*SCROLL messages every 250 ms during drag-scrolling */
@@ -2865,6 +2862,22 @@
m_ptLastMousePos = htinfo.pt;
+ /* We need to check if we drag the selection over itself */
+ if (lResult != -1 && m_pSourceDataObject.p != NULL)
+ {
+ PCUITEMID_CHILD pidl = _PidlByItem(lResult);
+
+ for (UINT i = 0; i < m_cidl; i++)
+ {
+ if (pidl == m_apidl[i])
+ {
+ /* The item that is being draged is hovering itself. */
+ lResult = -1;
+ break;
+ }
+ }
+ }
+
/* If we are still over the previous sub-item, notify it via DragOver and return. */
if (m_pCurDropTarget && lResult == m_iDragOverItem)
return m_pCurDropTarget->DragOver(grfKeyState, pt, pdwEffect);
@@ -2872,11 +2885,16 @@
/* We've left the previous sub-item, notify it via DragLeave and Release it. */
if (m_pCurDropTarget)
{
+ PCUITEMID_CHILD pidl = _PidlByItem(m_iDragOverItem);
+ if (pidl)
+ SelectItem(pidl, 0);
+
m_pCurDropTarget->DragLeave();
m_pCurDropTarget.Release();
}
m_iDragOverItem = lResult;
+
if (lResult == -1)
{
/* We are not above one of the listview's subitems. Bind to the parent folder's
@@ -2898,7 +2916,14 @@
return hr;
/* Notify the item just entered via DragEnter. */
- return m_pCurDropTarget->DragEnter(m_pCurDataObject, grfKeyState, pt, pdwEffect);
+ hr = m_pCurDropTarget->DragEnter(m_pCurDataObject, grfKeyState, pt, pdwEffect);
+
+ if (m_iDragOverItem != -1 && pdwEffect != DROPEFFECT_NONE)
+ {
+ SelectItem(m_iDragOverItem, SVSI_SELECT);
+ }
+
+ return hr;
}
HRESULT WINAPI CDefView::DragEnter(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
@@ -2936,12 +2961,23 @@
{
ERR("GetKeyState(VK_LBUTTON): %d\n", GetKeyState(VK_LBUTTON));
- if ((m_iDragOverItem == -1) &&
+ if ((m_iDragOverItem == -1 || m_pCurDropTarget == NULL) &&
(*pdwEffect & DROPEFFECT_MOVE) &&
/*(GetKeyState(VK_LBUTTON) != 0) &&*/
(m_pSourceDataObject.p) &&
(SHIsSameObject(pDataObject, m_pSourceDataObject)))
{
+ if (m_pCurDropTarget)
+ {
+ m_pCurDropTarget->DragLeave();
+ m_pCurDropTarget.Release();
+ }
+
+ /* Restore the selection */
+ m_ListView.SetItemState(-1, 0, LVIS_SELECTED);
+ for (UINT i = 0 ; i < m_cidl; i++)
+ SelectItem(m_apidl[i], SVSI_SELECT);
+
/* Reposition the items */
int lvIndex = -1;
while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1)
@@ -2954,12 +2990,6 @@
m_ListView.SetItemPosition(lvIndex, &ptItem);
}
}
-
- if (m_pCurDropTarget)
- {
- m_pCurDropTarget->DragLeave();
- m_pCurDropTarget.Release();
- }
}
else if (m_pCurDropTarget)
{