regen
build/bakefiles/*.bkl
-build/bakefiles/Makefile
+build/bakefiles/Bakefiles.bkgen
+build/bakefiles/README
build/bakefiles/*.py
+build/bakefiles/*.mk
build/bakefiles/compat/FORMATS.bkmanifest
build/bakefiles/compat/README
build/bakefiles/compat/wx24dsp.bkl
new revision: 1.71; previous revision: 1.70
+28. patch [ 771772 ] Crashes when setting icon tooltip longer than 63 characters
+
+Checking in window.cpp;
+/pack/cvsroots/wxwindows/wxWindows/src/msw/window.cpp,v <-- window.cpp
+new revision: 1.431; previous revision: 1.430
+done
+
+#if wxUSE_UNICODE
+ // in Unicode mode this is just what we need
+ ttText->lpszText = (wxChar *)ttip.c_str();
+#else // !Unicode
+ // Fix by dimitrishortcut: see patch 771772
+
+ // FIXME: szText has a max of 80 bytes, so limit the tooltip string
+ // length accordingly. Ideally lpszText should be used, but who
+ // would be responsible for freeing the buffer?
+
+ // Maximum length of a tip is 39 characters. 39 is 80/2 minus 1 byte
+ // needed for NULL character.
+ size_t tipLength = wxMin(ttip.Len(), 39);
+
+ // Convert to WideChar without adding the NULL character. The NULL
+ // character is added afterwards (Could have used ttip.Left(tipLength)
+ // and a cchMultiByte parameter of tipLength+1, but this is more
+ //efficient.
+ ::MultiByteToWideChar(CP_ACP, 0, ttip, tipLength,
+ (wchar_t *)ttText->szText,
+ sizeof(ttText->szText) / sizeof(wchar_t));
+
+ // Add the NULL character.
+ ttText->szText[tipLength*2+0] = '\0';
+ ttText->szText[tipLength*2+1] = '\0';
+#endif // Unicode/!Unicode
+
TODO for 2.4 (items that are not backports)
===========================================
we definitely need it for the users makefiles.
- Properties/Member-Metadata, 2-Step Init with virtual create
- TODO: still unclear what do we need exactly
-- Tidy code and add comments to headers (preferably in
+- Tidy code and add comments to headers (possibly in
Doxygen/Javadoc style)
In addition to wxCOMPATIBILITY code:
-- wxProperty classes.
-- All wxCOMPATIBILITY (1.X) code.
-- contrib/src/canvas?
- contrib/src/mmedia
- contrib/src/applet?
-- Old wxODBC code
- Dialog Editor
wxMiscellaneous
#endif // 0
}
-void MyFrame::OnTestNormal(wxCommandEvent& event)
+void MyFrame::OnTestNormal(wxCommandEvent& WXUNUSED(event))
{
wxLogMessage(_T("Normal item selected"));
}
event.Check(FALSE);
}
-void MyFrame::OnSize(wxSizeEvent& event)
+void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event))
{
if ( !m_textctrl )
return;
SetMenuBar( menu_bar );
}
-void MyFrame::OnAbout( wxCommandEvent &event )
+void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
{
}
-void MyFrame::OnQuit( wxCommandEvent &event )
+void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) )
{
Close( TRUE );
}
-void MyFrame::OnCloseWindow( wxCloseEvent &event )
+void MyFrame::OnCloseWindow( wxCloseEvent &WXUNUSED(event) )
{
Destroy();
}
wxLogMessage( wxT("-> Position after inserting %d %d"), pt.x, pt.y );
}
-void MyCanvas::OnDeleteButton( wxCommandEvent &event )
+void MyCanvas::OnDeleteButton( wxCommandEvent &WXUNUSED(event) )
{
wxLogMessage( wxT("Deleting button inserted with \"Add button\"...") );
wxWindow *win = FindWindow( ID_NEWBUTTON );
m_owner = parent;
}
-void MyTopLabels::OnPaint( wxPaintEvent &event )
+void MyTopLabels::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
wxPaintDC dc(this);
m_owner = parent;
}
-void MyRightLabels::OnPaint( wxPaintEvent &event )
+void MyRightLabels::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
wxPaintDC dc(this);
m_hasShape = SetShape(region);
}
-void ShapedFrame::OnDoubleClick(wxMouseEvent& evt)
+void ShapedFrame::OnDoubleClick(wxMouseEvent& WXUNUSED(evt))
{
if (m_hasShape)
{
m_delta = wxPoint(dx, dy);
}
-void ShapedFrame::OnLeftUp(wxMouseEvent& evt)
+void ShapedFrame::OnLeftUp(wxMouseEvent& WXUNUSED(evt))
{
if (HasCapture())
{
ReleaseMouse();
//printf("Mouse released\n");
-}
+ }
}
void ShapedFrame::OnMouseMove(wxMouseEvent& evt)
}
}
-void ShapedFrame::OnExit(wxMouseEvent& evt)
+void ShapedFrame::OnExit(wxMouseEvent& WXUNUSED(evt))
{
Close();
}
-void ShapedFrame::OnPaint(wxPaintEvent& evt)
+void ShapedFrame::OnPaint(wxPaintEvent& WXUNUSED(evt))
{
wxPaintDC dc(this);
dc.DrawBitmap(m_bmp, 0, 0, TRUE);
}
-void ShapedFrame::OnWindowCreate(wxWindowCreateEvent& evt)
+void ShapedFrame::OnWindowCreate(wxWindowCreateEvent& WXUNUSED(evt))
{
SetWindowShape();
}
Init();
}
-void MyDialog::OnOK(wxCommandEvent& event)
+void MyDialog::OnOK(wxCommandEvent& WXUNUSED(event))
{
Show(FALSE);
}
-void MyDialog::OnExit(wxCommandEvent& event)
+void MyDialog::OnExit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
-void MyDialog::OnCloseWindow(wxCloseEvent& event)
+void MyDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
{
Destroy();
}
toolBar->AddTool(wxID_COPY, _T("Copy"), toolBarBitmaps[3], _T("Toggle button 2"), wxITEM_CHECK);
toolBar->AddTool(wxID_CUT, _T("Cut"), toolBarBitmaps[4], _T("Toggle/Untoggle help button"));
toolBar->AddTool(wxID_PASTE, _T("Paste"), toolBarBitmaps[5], _T("Paste"));
- toolBar->AddTool(wxID_PRINT, _T("Print"), toolBarBitmaps[6], _T("Delete this tool"));
+ toolBar->AddTool(wxID_PRINT, _T("Print"), toolBarBitmaps[6], _T("Delete this tool. This is a very long tooltip to test whether it does the right thing when the tooltip is more than Windows can cope with."));
toolBar->AddSeparator();
toolBar->AddTool(wxID_HELP, _T("Help"), toolBarBitmaps[7], _T("Help button"), wxITEM_CHECK);
}
}
-void MyFrame::OnSelect(wxCommandEvent& event)
+void MyFrame::OnSelect(wxCommandEvent& WXUNUSED(event))
{
m_treeCtrl->SelectItem(m_treeCtrl->GetSelection());
}
-void MyFrame::OnUnselect(wxCommandEvent& event)
+void MyFrame::OnUnselect(wxCommandEvent& WXUNUSED(event))
{
m_treeCtrl->UnselectAll();
}
m_treeCtrl->AddTestItemsToTree(5, 2);
}
-void MyFrame::OnSetImageSize(wxCommandEvent& event)
+void MyFrame::OnSetImageSize(wxCommandEvent& WXUNUSED(event))
{
int size = wxGetNumberFromUser(wxT("Enter the size for the images to use"),
wxT("Size: "),
wxGetApp().SetShowImages(TRUE);
}
-void MyFrame::OnToggleImages(wxCommandEvent& event)
+void MyFrame::OnToggleImages(wxCommandEvent& WXUNUSED(event))
{
if ( wxGetApp().ShowImages() )
{
}
}
-void MyFrame::OnToggleButtons(wxCommandEvent& event)
+void MyFrame::OnToggleButtons(wxCommandEvent& WXUNUSED(event))
{
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
if ( wxGetApp().ShowButtons() )
#endif
}
-void MyFrame::OnCollapseAndReset(wxCommandEvent& event)
+void MyFrame::OnCollapseAndReset(wxCommandEvent& WXUNUSED(event))
{
m_treeCtrl->CollapseAndReset(m_treeCtrl->GetRootItem());
}
-void MyFrame::OnEnsureVisible(wxCommandEvent& event)
+void MyFrame::OnEnsureVisible(wxCommandEvent& WXUNUSED(event))
{
m_treeCtrl->DoEnsureVisible();
}
AssignImageList(images);
}
+#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
void MyTreeCtrl::CreateButtonsImageList(int size)
{
-#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
if ( size == -1 )
{
SetButtonsImageList(NULL);
}
AssignButtonsImageList(images);
+#else
+void MyTreeCtrl::CreateButtonsImageList(int WXUNUSED(size))
+{
#endif
}