#include "wx/utils.h"
#include "wx/log.h"
#include "wx/app.h"
+#include "wx/icon.h"
#ifdef __VMS__
#pragma message disable nosimpint
SetTitle( title );
wxLogTrace(wxTRACE_Messages,
- "Created frame (0x%08x) with work area 0x%08x and client "
- "area 0x%08x", m_mainWidget, m_workArea, m_clientArea);
+ "Created frame (0x%p) with work area 0x%p and client "
+ "area 0x%p", m_mainWidget, m_workArea, m_clientArea);
XtAddEventHandler((Widget) m_clientArea, ExposureMask,FALSE,
wxUniversalRepaintProc, (XtPointer) this);
delete m_frameStatusBar;
m_frameStatusBar = NULL;
}
+
+ PreDestroy();
+ DoDestroy();
}
void wxFrame::DoDestroy()
{
Widget frameShell = (Widget)GetShellWidget();
- XtRemoveEventHandler( frameShell, StructureNotifyMask,
- False, (XtEventHandler)wxFrameMapProc,
- (XtPointer)this );
+ if( frameShell )
+ XtRemoveEventHandler( frameShell, StructureNotifyMask,
+ False, (XtEventHandler)wxFrameMapProc,
+ (XtPointer)this );
if( m_clientArea )
{
if (!m_frameShell)
return;
- if (!icon.Ok() || !icon.GetPixmap())
+ if (!icon.Ok() || !icon.GetDrawable())
return;
- XtVaSetValues((Widget) m_frameShell, XtNiconPixmap, icon.GetPixmap(), NULL);
+ XtVaSetValues((Widget) m_frameShell,
+ XtNiconPixmap, icon.GetDrawable(),
+ NULL);
}
void wxFrame::SetIcon(const wxIcon& icon)
tw = cw;
}
- tb->SetSize(0, 0, tw, th, wxSIZE_NO_ADJUSTMENTS);
+ tb->SetSize(0, 0, -1, -1, wxSIZE_NO_ADJUSTMENTS);
}
}
#endif // wxUSE_TOOLBAR