Patch #809286 and a couple other minor changes to the stc sample

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-09-19 18:40:13 +00:00
parent 5ea8a0241b
commit 3e01b8d2cb
4 changed files with 8 additions and 6 deletions

View File

@@ -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;

View File

@@ -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();
}
}

View File

@@ -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;

View File

@@ -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);