diff --git a/contrib/samples/stc/edit.cpp b/contrib/samples/stc/edit.cpp index 5c0aef717d..a402edc521 100644 --- a/contrib/samples/stc/edit.cpp +++ b/contrib/samples/stc/edit.cpp @@ -159,7 +159,6 @@ Edit::Edit (wxWindow *parent, wxWindowID id, SetMarginWidth (m_LineNrID, g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0); CmdKeyClear (wxSTC_KEY_TAB, 0); // this is done by the menu accelerator key - UsePopUp (0); SetLayoutCache (wxSTC_CACHE_PAGE); } @@ -361,7 +360,7 @@ void Edit::OnCharAdded (wxStyledTextEvent &event) { // private functions wxString Edit::DeterminePrefs (const wxString &filename) { - LanguageInfo const* curInfo = NULL; + LanguageInfo const* curInfo; // determine language from filepatterns int languageNr; diff --git a/contrib/samples/stc/stctest.cpp b/contrib/samples/stc/stctest.cpp index 5331ae5114..4f32ca3cd4 100644 --- a/contrib/samples/stc/stctest.cpp +++ b/contrib/samples/stc/stctest.cpp @@ -54,7 +54,7 @@ //============================================================================ #define APP_NAME _T("STC-Test") -#define APP_DESCR _("See http://wxguide.sourceforge.net/indexedit.html") +#define APP_DESCR _("See http://wxguide.sourceforge.net/") #define APP_MAINT _T("Otto Wyss") #define APP_VENDOR _T("wxWindows") @@ -289,7 +289,7 @@ BEGIN_EVENT_TABLE (AppFrame, wxFrame) END_EVENT_TABLE () AppFrame::AppFrame (const wxString &title) - : wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxSize(600,400), + : wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE) { // intitialize important variables @@ -311,6 +311,7 @@ AppFrame::AppFrame (const wxString &title) m_edit = new Edit (this, -1); m_edit->SetFocus(); + FileOpen (_T("stctest.cpp")); } AppFrame::~AppFrame () { @@ -377,6 +378,7 @@ void AppFrame::OnFileClose (wxCommandEvent &WXUNUSED(event)) { return; } } + Destroy(); } } diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 859d11ce9a..db2960ad5b 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -675,6 +675,7 @@ void Window::SetCursor(Cursor curs) { break; case cursorHand: cursorId = wxCURSOR_HAND; + break; default: cursorId = wxCURSOR_ARROW; break; @@ -888,7 +889,7 @@ PRectangle ListBoxImpl::GetDesiredRect() { // wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of // the max size in Append and calculate it here... int maxw = maxStrWidth; - int maxh = 0; + int maxh ; // give it a default if there are no lines, and/or add a bit more if (maxw == 0) maxw = 100; diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 9c6d8600ed..73fd2d1f75 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -409,7 +409,7 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { if (!label[0]) ((wxMenu*)popup.GetID())->AppendSeparator(); else - ((wxMenu*)popup.GetID())->Append(cmd, stc2wx(label)); + ((wxMenu*)popup.GetID())->Append(cmd, wxGetTranslation(stc2wx(label))); if (!enabled) ((wxMenu*)popup.GetID())->Enable(cmd, enabled);