fixed warnings about pointer to integer cast
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,6 +40,9 @@
|
|||||||
#include "wx/radiobut.h"
|
#include "wx/radiobut.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// trace mask for focus messages
|
||||||
|
#define TRACE_FOCUS _T("focus")
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -129,13 +132,13 @@ void wxControlContainer::SetLastFocus(wxWindow *win)
|
|||||||
|
|
||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
wxLogTrace(_T("focus"), _T("Set last focus to %s(%s)"),
|
wxLogTrace(TRACE_FOCUS, _T("Set last focus to %s(%s)"),
|
||||||
win->GetClassInfo()->GetClassName(),
|
win->GetClassInfo()->GetClassName(),
|
||||||
win->GetLabel().c_str());
|
win->GetLabel().c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogTrace(_T("focus"), _T("No more last focus"));
|
wxLogTrace(TRACE_FOCUS, _T("No more last focus"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,8 +499,8 @@ void wxControlContainer::HandleOnWindowDestroy(wxWindowBase *child)
|
|||||||
|
|
||||||
bool wxControlContainer::DoSetFocus()
|
bool wxControlContainer::DoSetFocus()
|
||||||
{
|
{
|
||||||
wxLogTrace(_T("focus"), _T("SetFocus on wxPanel 0x%08lx."),
|
wxLogTrace(TRACE_FOCUS, _T("SetFocus on wxPanel 0x%p."),
|
||||||
(unsigned long)m_winParent->GetHandle());
|
m_winParent->GetHandle());
|
||||||
|
|
||||||
if (m_inSetFocus)
|
if (m_inSetFocus)
|
||||||
return true;
|
return true;
|
||||||
@@ -537,8 +540,8 @@ bool wxControlContainer::DoSetFocus()
|
|||||||
|
|
||||||
void wxControlContainer::HandleOnFocus(wxFocusEvent& event)
|
void wxControlContainer::HandleOnFocus(wxFocusEvent& event)
|
||||||
{
|
{
|
||||||
wxLogTrace(_T("focus"), _T("OnFocus on wxPanel 0x%08lx, name: %s"),
|
wxLogTrace(TRACE_FOCUS, _T("OnFocus on wxPanel 0x%p, name: %s"),
|
||||||
(unsigned long)m_winParent->GetHandle(),
|
m_winParent->GetHandle(),
|
||||||
m_winParent->GetName().c_str() );
|
m_winParent->GetName().c_str() );
|
||||||
|
|
||||||
DoSetFocus();
|
DoSetFocus();
|
||||||
@@ -567,9 +570,9 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
|
|||||||
// It might happen that the window got reparented
|
// It might happen that the window got reparented
|
||||||
if ( (*childLastFocused)->GetParent() == win )
|
if ( (*childLastFocused)->GetParent() == win )
|
||||||
{
|
{
|
||||||
wxLogTrace(_T("focus"),
|
wxLogTrace(TRACE_FOCUS,
|
||||||
_T("SetFocusToChild() => last child (0x%08lx)."),
|
_T("SetFocusToChild() => last child (0x%p)."),
|
||||||
(unsigned long)(*childLastFocused)->GetHandle());
|
(*childLastFocused)->GetHandle());
|
||||||
|
|
||||||
// not SetFocusFromKbd(): we're restoring focus back to the old
|
// not SetFocusFromKbd(): we're restoring focus back to the old
|
||||||
// window and not setting it as the result of a kbd action
|
// window and not setting it as the result of a kbd action
|
||||||
@@ -603,9 +606,9 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxLogTrace(_T("focus"),
|
wxLogTrace(TRACE_FOCUS,
|
||||||
_T("SetFocusToChild() => first child (0x%08lx)."),
|
_T("SetFocusToChild() => first child (0x%p)."),
|
||||||
(unsigned long)child->GetHandle());
|
child->GetHandle());
|
||||||
|
|
||||||
*childLastFocused = child;
|
*childLastFocused = child;
|
||||||
child->SetFocusFromKbd();
|
child->SetFocusFromKbd();
|
||||||
|
@@ -354,7 +354,7 @@ void wxFileData::MakeItem( wxListItem &item )
|
|||||||
if ( dg.Ok() )
|
if ( dg.Ok() )
|
||||||
item.SetTextColour(dg);
|
item.SetTextColour(dg);
|
||||||
}
|
}
|
||||||
item.m_data = (long)this;
|
item.m_data = wxPtrToUInt(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -639,7 +639,7 @@ void wxFileCtrl::MakeDir()
|
|||||||
if (id != -1)
|
if (id != -1)
|
||||||
{
|
{
|
||||||
SortItems(m_sort_field, m_sort_foward);
|
SortItems(m_sort_field, m_sort_foward);
|
||||||
id = FindItem( 0, (long)fd );
|
id = FindItem( 0, wxPtrToUInt(fd) );
|
||||||
EnsureVisible( id );
|
EnsureVisible( id );
|
||||||
EditLabel( id );
|
EditLabel( id );
|
||||||
}
|
}
|
||||||
|
@@ -506,7 +506,12 @@ GdkAtom wxDropTarget::GetMatchingPair()
|
|||||||
GList *child = m_dragContext->targets;
|
GList *child = m_dragContext->targets;
|
||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
GdkAtom formatAtom = (GdkAtom) GPOINTER_TO_INT(child->data);
|
// in GTK+ 1.x GdkAtom was a gulong, but now it's a pointer
|
||||||
|
GdkAtom formatAtom = (GdkAtom)
|
||||||
|
#ifndef __WXGTK20__
|
||||||
|
GPOINTER_TO_INT
|
||||||
|
#endif
|
||||||
|
(child->data);
|
||||||
wxDataFormat format( formatAtom );
|
wxDataFormat format( formatAtom );
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
|
@@ -506,7 +506,12 @@ GdkAtom wxDropTarget::GetMatchingPair()
|
|||||||
GList *child = m_dragContext->targets;
|
GList *child = m_dragContext->targets;
|
||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
GdkAtom formatAtom = (GdkAtom) GPOINTER_TO_INT(child->data);
|
// in GTK+ 1.x GdkAtom was a gulong, but now it's a pointer
|
||||||
|
GdkAtom formatAtom = (GdkAtom)
|
||||||
|
#ifndef __WXGTK20__
|
||||||
|
GPOINTER_TO_INT
|
||||||
|
#endif
|
||||||
|
(child->data);
|
||||||
wxDataFormat format( formatAtom );
|
wxDataFormat format( formatAtom );
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
|
Reference in New Issue
Block a user