mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
Autosyncing with Wine HEAD
svn path=/trunk/; revision=24203
This commit is contained in:
parent
d88a99e18e
commit
d3cd32d90d
7 changed files with 66 additions and 24 deletions
|
@ -1,18 +1,8 @@
|
||||||
Index: comctl32.rbuild
|
|
||||||
===================================================================
|
|
||||||
--- comctl32.rbuild (revision 23123)
|
|
||||||
+++ comctl32.rbuild (working copy)
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
<module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" allowwarnings="true">
|
|
||||||
+ <autoregister infsection="OleControlDlls" type="DllInstall" />
|
|
||||||
<importlibrary definition="comctl32.spec.def" />
|
|
||||||
<include base="comctl32">.</include>
|
|
||||||
<include base="ReactOS">include/reactos/wine</include>
|
|
||||||
Index: listview.c
|
Index: listview.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- listview.c (revision 23123)
|
--- listview.c (revision 23123)
|
||||||
+++ listview.c (working copy)
|
+++ listview.c (working copy)
|
||||||
@@ -3770,9 +3770,8 @@
|
@@ -3777,9 +3777,8 @@
|
||||||
if (himl && lvItem.iImage >= 0 && !IsRectEmpty(&rcIcon))
|
if (himl && lvItem.iImage >= 0 && !IsRectEmpty(&rcIcon))
|
||||||
{
|
{
|
||||||
TRACE("iImage=%d\n", lvItem.iImage);
|
TRACE("iImage=%d\n", lvItem.iImage);
|
||||||
|
|
|
@ -240,6 +240,12 @@ typedef struct tagITERATOR
|
||||||
INT index;
|
INT index;
|
||||||
} ITERATOR;
|
} ITERATOR;
|
||||||
|
|
||||||
|
typedef struct tagDELAYED_ITEM_EDIT
|
||||||
|
{
|
||||||
|
BOOL fEnabled;
|
||||||
|
INT iItem;
|
||||||
|
} DELAYED_ITEM_EDIT;
|
||||||
|
|
||||||
typedef struct tagLISTVIEW_INFO
|
typedef struct tagLISTVIEW_INFO
|
||||||
{
|
{
|
||||||
HWND hwndSelf;
|
HWND hwndSelf;
|
||||||
|
@ -310,6 +316,7 @@ typedef struct tagLISTVIEW_INFO
|
||||||
BOOL bIsDrawing;
|
BOOL bIsDrawing;
|
||||||
INT nMeasureItemHeight;
|
INT nMeasureItemHeight;
|
||||||
INT xTrackLine; /* The x coefficient of the track line or -1 if none */
|
INT xTrackLine; /* The x coefficient of the track line or -1 if none */
|
||||||
|
DELAYED_ITEM_EDIT itemEdit; /* Pointer to this structure will be the timer ID */
|
||||||
} LISTVIEW_INFO;
|
} LISTVIEW_INFO;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -7614,7 +7621,32 @@ static BOOL LISTVIEW_DrawTrackLine(LISTVIEW_INFO *infoPtr)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* DESCRIPTION:
|
||||||
|
* Called when an edit control should be displayed. This function is called after
|
||||||
|
* we are sure that there was a single click - not a double click (this is a TIMERPROC).
|
||||||
|
*
|
||||||
|
* PARAMETER(S):
|
||||||
|
* [I] hwnd : Handle to the listview
|
||||||
|
* [I] uMsg : WM_TIMER (ignored)
|
||||||
|
* [I] idEvent : The timer ID interpreted as a pointer to a DELAYED_EDIT_ITEM struct
|
||||||
|
* [I] dwTimer : The elapsed time (ignored)
|
||||||
|
*
|
||||||
|
* RETURN:
|
||||||
|
* None.
|
||||||
|
*/
|
||||||
|
static CALLBACK VOID LISTVIEW_DelayedEditItem(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
|
||||||
|
{
|
||||||
|
DELAYED_ITEM_EDIT *editItem = (DELAYED_ITEM_EDIT *)idEvent;
|
||||||
|
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
|
||||||
|
|
||||||
|
KillTimer(hwnd, idEvent);
|
||||||
|
editItem->fEnabled = FALSE;
|
||||||
|
/* check if the item is still selected */
|
||||||
|
if (infoPtr->bFocus && LISTVIEW_GetItemState(infoPtr, editItem->iItem, LVIS_SELECTED))
|
||||||
|
LISTVIEW_EditLabelT(infoPtr, editItem->iItem, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* DESCRIPTION:
|
* DESCRIPTION:
|
||||||
* Creates the listview control.
|
* Creates the listview control.
|
||||||
|
@ -7667,6 +7699,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||||
infoPtr->dwHoverTime = -1; /* default system hover time */
|
infoPtr->dwHoverTime = -1; /* default system hover time */
|
||||||
infoPtr->nMeasureItemHeight = 0;
|
infoPtr->nMeasureItemHeight = 0;
|
||||||
infoPtr->xTrackLine = -1; /* no track line */
|
infoPtr->xTrackLine = -1; /* no track line */
|
||||||
|
infoPtr->itemEdit.fEnabled = FALSE;
|
||||||
|
|
||||||
/* get default font (icon title) */
|
/* get default font (icon title) */
|
||||||
SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||||
|
@ -8219,6 +8252,13 @@ static LRESULT LISTVIEW_LButtonDblClk(LISTVIEW_INFO *infoPtr, WORD wKey, INT x,
|
||||||
LVHITTESTINFO htInfo;
|
LVHITTESTINFO htInfo;
|
||||||
|
|
||||||
TRACE("(key=%hu, X=%hu, Y=%hu)\n", wKey, x, y);
|
TRACE("(key=%hu, X=%hu, Y=%hu)\n", wKey, x, y);
|
||||||
|
|
||||||
|
/* Cancel the item edition if any */
|
||||||
|
if (infoPtr->itemEdit.fEnabled)
|
||||||
|
{
|
||||||
|
KillTimer(infoPtr->hwndSelf, (UINT_PTR)&infoPtr->itemEdit);
|
||||||
|
infoPtr->itemEdit.fEnabled = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* send NM_RELEASEDCAPTURE notification */
|
/* send NM_RELEASEDCAPTURE notification */
|
||||||
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
|
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
|
||||||
|
@ -8252,6 +8292,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
|
||||||
{
|
{
|
||||||
LVHITTESTINFO lvHitTestInfo;
|
LVHITTESTINFO lvHitTestInfo;
|
||||||
static BOOL bGroupSelect = TRUE;
|
static BOOL bGroupSelect = TRUE;
|
||||||
|
BOOL bReceivedFocus = FALSE;
|
||||||
POINT pt = { x, y };
|
POINT pt = { x, y };
|
||||||
INT nItem;
|
INT nItem;
|
||||||
|
|
||||||
|
@ -8260,7 +8301,11 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
|
||||||
/* send NM_RELEASEDCAPTURE notification */
|
/* send NM_RELEASEDCAPTURE notification */
|
||||||
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
|
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
|
||||||
|
|
||||||
if (!infoPtr->bFocus) SetFocus(infoPtr->hwndSelf);
|
if (!infoPtr->bFocus)
|
||||||
|
{
|
||||||
|
bReceivedFocus = TRUE;
|
||||||
|
SetFocus(infoPtr->hwndSelf);
|
||||||
|
}
|
||||||
|
|
||||||
/* set left button down flag and record the click position */
|
/* set left button down flag and record the click position */
|
||||||
infoPtr->bLButtonDown = TRUE;
|
infoPtr->bLButtonDown = TRUE;
|
||||||
|
@ -8347,6 +8392,9 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
|
||||||
LISTVIEW_DeselectAll(infoPtr);
|
LISTVIEW_DeselectAll(infoPtr);
|
||||||
ReleaseCapture();
|
ReleaseCapture();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bReceivedFocus)
|
||||||
|
infoPtr->nEditLabelItem = -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -8383,7 +8431,17 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
|
||||||
|
|
||||||
/* if we clicked on a selected item, edit the label */
|
/* if we clicked on a selected item, edit the label */
|
||||||
if(lvHitTestInfo.iItem == infoPtr->nEditLabelItem && (lvHitTestInfo.flags & LVHT_ONITEMLABEL))
|
if(lvHitTestInfo.iItem == infoPtr->nEditLabelItem && (lvHitTestInfo.flags & LVHT_ONITEMLABEL))
|
||||||
LISTVIEW_EditLabelT(infoPtr, lvHitTestInfo.iItem, TRUE);
|
{
|
||||||
|
/* we want to make sure the user doesn't want to do a double click. So we will
|
||||||
|
* delay the edit. WM_LBUTTONDBLCLICK will cancel the timer
|
||||||
|
*/
|
||||||
|
infoPtr->itemEdit.fEnabled = TRUE;
|
||||||
|
infoPtr->itemEdit.iItem = lvHitTestInfo.iItem;
|
||||||
|
SetTimer(infoPtr->hwndSelf,
|
||||||
|
(UINT_PTR)&infoPtr->itemEdit,
|
||||||
|
GetDoubleClickTime(),
|
||||||
|
LISTVIEW_DelayedEditItem);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,7 +448,7 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HRSRC hResource = FindResourceA(lppsp->hInstance,
|
HRSRC hResource = FindResourceA(lppsp->hInstance,
|
||||||
(LPSTR)lppsp->u.pszTemplate,
|
(LPCSTR)lppsp->u.pszTemplate,
|
||||||
(LPSTR)RT_DIALOG);
|
(LPSTR)RT_DIALOG);
|
||||||
HGLOBAL hTemplate = LoadResource(lppsp->hInstance,
|
HGLOBAL hTemplate = LoadResource(lppsp->hInstance,
|
||||||
hResource);
|
hResource);
|
||||||
|
@ -1424,7 +1424,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
|
||||||
HANDLE hTemplate;
|
HANDLE hTemplate;
|
||||||
|
|
||||||
hResource = FindResourceA(ppshpage->hInstance,
|
hResource = FindResourceA(ppshpage->hInstance,
|
||||||
(LPSTR)ppshpage->u.pszTemplate,
|
(LPCSTR)ppshpage->u.pszTemplate,
|
||||||
(LPSTR)RT_DIALOG);
|
(LPSTR)RT_DIALOG);
|
||||||
if(!hResource)
|
if(!hResource)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include "comctl32.h"
|
#include "comctl32.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(themingdialog);
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* The dialog subclass window proc.
|
* The dialog subclass window proc.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include "comctl32.h"
|
#include "comctl32.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(themingedit);
|
|
||||||
|
|
||||||
/* Draw themed border */
|
/* Draw themed border */
|
||||||
static void nc_paint (HTHEME theme, HWND hwnd, HRGN region)
|
static void nc_paint (HTHEME theme, HWND hwnd, HRGN region)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include "comctl32.h"
|
#include "comctl32.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(theminglistbox);
|
|
||||||
|
|
||||||
/* Draw themed border */
|
/* Draw themed border */
|
||||||
static void nc_paint (HTHEME theme, HWND hwnd, HRGN region)
|
static void nc_paint (HTHEME theme, HWND hwnd, HRGN region)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1048,8 +1048,8 @@ TRACKBAR_GetNumTics (TRACKBAR_INFO *infoPtr)
|
||||||
|
|
||||||
static int comp_tics(const void *ap, const void *bp)
|
static int comp_tics(const void *ap, const void *bp)
|
||||||
{
|
{
|
||||||
DWORD a = *((DWORD *)ap);
|
const DWORD a = *(const DWORD *)ap;
|
||||||
DWORD b = *((DWORD *)bp);
|
const DWORD b = *(const DWORD *)bp;
|
||||||
|
|
||||||
TRACE("(a=%ld, b=%ld)\n", a, b);
|
TRACE("(a=%ld, b=%ld)\n", a, b);
|
||||||
if (a < b) return -1;
|
if (a < b) return -1;
|
||||||
|
|
Loading…
Reference in a new issue