git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35708
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/radiobut.h"
#endif
#include "wx/radiobut.h"
#endif
+// trace mask for focus messages
+#define TRACE_FOCUS _T("focus")
+
// ============================================================================
// implementation
// ============================================================================
// ============================================================================
// implementation
// ============================================================================
- wxLogTrace(_T("focus"), _T("Set last focus to %s(%s)"),
+ wxLogTrace(TRACE_FOCUS, _T("Set last focus to %s(%s)"),
win->GetClassInfo()->GetClassName(),
win->GetLabel().c_str());
}
else
{
win->GetClassInfo()->GetClassName(),
win->GetLabel().c_str());
}
else
{
- wxLogTrace(_T("focus"), _T("No more last focus"));
+ wxLogTrace(TRACE_FOCUS, _T("No more last focus"));
bool wxControlContainer::DoSetFocus()
{
bool wxControlContainer::DoSetFocus()
{
- wxLogTrace(_T("focus"), _T("SetFocus on wxPanel 0x%08lx."),
- (unsigned long)m_winParent->GetHandle());
+ wxLogTrace(TRACE_FOCUS, _T("SetFocus on wxPanel 0x%p."),
+ m_winParent->GetHandle());
if (m_inSetFocus)
return true;
if (m_inSetFocus)
return true;
void wxControlContainer::HandleOnFocus(wxFocusEvent& event)
{
void wxControlContainer::HandleOnFocus(wxFocusEvent& event)
{
- wxLogTrace(_T("focus"), _T("OnFocus on wxPanel 0x%08lx, name: %s"),
- (unsigned long)m_winParent->GetHandle(),
+ wxLogTrace(TRACE_FOCUS, _T("OnFocus on wxPanel 0x%p, name: %s"),
+ m_winParent->GetHandle(),
m_winParent->GetName().c_str() );
DoSetFocus();
m_winParent->GetName().c_str() );
DoSetFocus();
// It might happen that the window got reparented
if ( (*childLastFocused)->GetParent() == win )
{
// It might happen that the window got reparented
if ( (*childLastFocused)->GetParent() == win )
{
- wxLogTrace(_T("focus"),
- _T("SetFocusToChild() => last child (0x%08lx)."),
- (unsigned long)(*childLastFocused)->GetHandle());
+ wxLogTrace(TRACE_FOCUS,
+ _T("SetFocusToChild() => last child (0x%p)."),
+ (*childLastFocused)->GetHandle());
// not SetFocusFromKbd(): we're restoring focus back to the old
// window and not setting it as the result of a kbd action
// not SetFocusFromKbd(): we're restoring focus back to the old
// window and not setting it as the result of a kbd action
- wxLogTrace(_T("focus"),
- _T("SetFocusToChild() => first child (0x%08lx)."),
- (unsigned long)child->GetHandle());
+ wxLogTrace(TRACE_FOCUS,
+ _T("SetFocusToChild() => first child (0x%p)."),
+ child->GetHandle());
*childLastFocused = child;
child->SetFocusFromKbd();
*childLastFocused = child;
child->SetFocusFromKbd();
if ( dg.Ok() )
item.SetTextColour(dg);
}
if ( dg.Ok() )
item.SetTextColour(dg);
}
- item.m_data = (long)this;
+ item.m_data = wxPtrToUInt(this);
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
if (id != -1)
{
SortItems(m_sort_field, m_sort_foward);
if (id != -1)
{
SortItems(m_sort_field, m_sort_foward);
- id = FindItem( 0, (long)fd );
+ id = FindItem( 0, wxPtrToUInt(fd) );
EnsureVisible( id );
EditLabel( id );
}
EnsureVisible( id );
EditLabel( id );
}
GList *child = m_dragContext->targets;
while (child)
{
GList *child = m_dragContext->targets;
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 );
#ifdef __WXDEBUG__
wxDataFormat format( formatAtom );
#ifdef __WXDEBUG__
GList *child = m_dragContext->targets;
while (child)
{
GList *child = m_dragContext->targets;
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 );
#ifdef __WXDEBUG__
wxDataFormat format( formatAtom );
#ifdef __WXDEBUG__