Patch #808669 more warngins and unicode fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-09-18 17:35:31 +00:00
parent 532c773634
commit 0e974385f6
6 changed files with 56 additions and 46 deletions

View File

@@ -132,11 +132,11 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
wxSTC_WRAP_WORD: wxSTC_WRAP_NONE); wxSTC_WRAP_WORD: wxSTC_WRAP_NONE);
wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL); wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL);
StyleSetFont (wxSTC_STYLE_DEFAULT, font); StyleSetFont (wxSTC_STYLE_DEFAULT, font);
StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour ("BLACK")); StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("BLACK")));
StyleSetBackground (wxSTC_STYLE_DEFAULT, wxColour ("WHITE")); StyleSetBackground (wxSTC_STYLE_DEFAULT, wxColour (_T("WHITE")));
StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY")));
StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour ("WHITE")); StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE")));
StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour ("DARK GREY")); StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY")));
InitializePrefs (DEFAULT_LANGUAGE); InitializePrefs (DEFAULT_LANGUAGE);
// set visibility // set visibility
@@ -145,13 +145,13 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
SetYCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1); SetYCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1);
// markers // markers
MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, "BLACK", "WHITE"); MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("WHITE"));
MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, "BLACK", "WHITE"); MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("WHITE"));
MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
// miscelaneous // miscelaneous
m_LineNrMargin = TextWidth (wxSTC_STYLE_LINENUMBER, _T("_999999")); m_LineNrMargin = TextWidth (wxSTC_STYLE_LINENUMBER, _T("_999999"));
@@ -233,11 +233,11 @@ void Edit::OnBraceMatch (wxCommandEvent &WXUNUSED(event)) {
void Edit::OnGoto (wxCommandEvent &WXUNUSED(event)) { void Edit::OnGoto (wxCommandEvent &WXUNUSED(event)) {
} }
void Edit::OnEditIndentInc (wxCommandEvent &event) { void Edit::OnEditIndentInc (wxCommandEvent &WXUNUSED(event)) {
CmdKeyExecute (wxSTC_CMD_TAB); CmdKeyExecute (wxSTC_CMD_TAB);
} }
void Edit::OnEditIndentRed (wxCommandEvent &event) { void Edit::OnEditIndentRed (wxCommandEvent &WXUNUSED(event)) {
CmdKeyExecute (wxSTC_CMD_DELETEBACK); CmdKeyExecute (wxSTC_CMD_DELETEBACK);
} }
@@ -407,8 +407,8 @@ bool Edit::InitializePrefs (const wxString &name) {
// set margin for line numbers // set margin for line numbers
SetMarginType (m_LineNrID, wxSTC_MARGIN_NUMBER); SetMarginType (m_LineNrID, wxSTC_MARGIN_NUMBER);
StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY")));
StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour ("WHITE")); StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE")));
SetMarginWidth (m_LineNrID, SetMarginWidth (m_LineNrID,
g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0); g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0);
@@ -420,8 +420,8 @@ bool Edit::InitializePrefs (const wxString &name) {
} }
// set common styles // set common styles
StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("DARK GREY")));
StyleSetForeground (wxSTC_STYLE_INDENTGUIDE, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY")));
// initialize settings // initialize settings
if (g_CommonPrefs.syntaxEnable) { if (g_CommonPrefs.syntaxEnable) {
@@ -459,7 +459,7 @@ bool Edit::InitializePrefs (const wxString &name) {
// folding // folding
SetMarginType (m_FoldingID, wxSTC_MARGIN_SYMBOL); SetMarginType (m_FoldingID, wxSTC_MARGIN_SYMBOL);
SetMarginMask (m_FoldingID, wxSTC_MASK_FOLDERS); SetMarginMask (m_FoldingID, wxSTC_MASK_FOLDERS);
StyleSetBackground (m_FoldingID, wxColour ("WHITE")); StyleSetBackground (m_FoldingID, wxColour (_T("WHITE")));
SetMarginWidth (m_FoldingID, 0); SetMarginWidth (m_FoldingID, 0);
SetMarginSensitive (m_FoldingID, false); SetMarginSensitive (m_FoldingID, false);
if (g_CommonPrefs.foldEnable) { if (g_CommonPrefs.foldEnable) {
@@ -601,7 +601,7 @@ EditProperties::EditProperties (Edit *edit,
long style) long style)
: wxDialog (edit, -1, wxEmptyString, : wxDialog (edit, -1, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
// sets the application title // sets the application title
SetTitle (_("Properties")); SetTitle (_("Properties"));
@@ -786,7 +786,7 @@ void EditPrint::GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *
*selPageTo = *maxPage; *selPageTo = *maxPage;
} }
bool EditPrint::HasPage (int page) { bool EditPrint::HasPage (int WXUNUSED(page)) {
return (m_printed < m_edit->GetLength()); return (m_printed < m_edit->GetLength());
} }

View File

@@ -32,6 +32,7 @@
#include <wx/notebook.h> // notebook support #include <wx/notebook.h> // notebook support
#include <wx/settings.h> // system settings #include <wx/settings.h> // system settings
#include <wx/string.h> // strings support #include <wx/string.h> // strings support
#include <wx/image.h> // images support
//! application headers //! application headers
#include "defsext.h" // Additional definitions #include "defsext.h" // Additional definitions
@@ -583,7 +584,7 @@ AppAbout::AppAbout (wxWindow *parent,
long style) long style)
: wxDialog (parent, -1, wxEmptyString, : wxDialog (parent, -1, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
// set timer if any // set timer if any
m_timer = NULL; m_timer = NULL;
@@ -651,7 +652,7 @@ AppAbout::~AppAbout () {
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// event handlers // event handlers
void AppAbout::OnTimerEvent (wxTimerEvent &event) { void AppAbout::OnTimerEvent (wxTimerEvent &WXUNUSED(event)) {
if (m_timer) delete m_timer; if (m_timer) delete m_timer;
m_timer = NULL; m_timer = NULL;
EndModal (wxID_OK); EndModal (wxID_OK);

View File

@@ -677,7 +677,11 @@ void ScintillaWX::DoAddChar(int key) {
} }
#ifdef __WXMAC__
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool meta, bool* consumed) { int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool meta, bool* consumed) {
#else
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool WXUNUSED(meta), bool* consumed) {
#endif
#if defined(__WXGTK__) || defined(__WXMAC__) #if defined(__WXGTK__) || defined(__WXMAC__)
// Ctrl chars (A-Z) end up with the wrong keycode on wxGTK // Ctrl chars (A-Z) end up with the wrong keycode on wxGTK
// TODO: Check this, it shouldn't be true any longer. // TODO: Check this, it shouldn't be true any longer.

View File

@@ -132,11 +132,11 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
wxSTC_WRAP_WORD: wxSTC_WRAP_NONE); wxSTC_WRAP_WORD: wxSTC_WRAP_NONE);
wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL); wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL);
StyleSetFont (wxSTC_STYLE_DEFAULT, font); StyleSetFont (wxSTC_STYLE_DEFAULT, font);
StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour ("BLACK")); StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("BLACK")));
StyleSetBackground (wxSTC_STYLE_DEFAULT, wxColour ("WHITE")); StyleSetBackground (wxSTC_STYLE_DEFAULT, wxColour (_T("WHITE")));
StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY")));
StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour ("WHITE")); StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE")));
StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour ("DARK GREY")); StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY")));
InitializePrefs (DEFAULT_LANGUAGE); InitializePrefs (DEFAULT_LANGUAGE);
// set visibility // set visibility
@@ -145,13 +145,13 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
SetYCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1); SetYCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1);
// markers // markers
MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, "BLACK", "WHITE"); MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("WHITE"));
MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, "BLACK", "WHITE"); MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("WHITE"));
MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, "BLACK", "BLACK"); MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
// miscelaneous // miscelaneous
m_LineNrMargin = TextWidth (wxSTC_STYLE_LINENUMBER, _T("_999999")); m_LineNrMargin = TextWidth (wxSTC_STYLE_LINENUMBER, _T("_999999"));
@@ -233,11 +233,11 @@ void Edit::OnBraceMatch (wxCommandEvent &WXUNUSED(event)) {
void Edit::OnGoto (wxCommandEvent &WXUNUSED(event)) { void Edit::OnGoto (wxCommandEvent &WXUNUSED(event)) {
} }
void Edit::OnEditIndentInc (wxCommandEvent &event) { void Edit::OnEditIndentInc (wxCommandEvent &WXUNUSED(event)) {
CmdKeyExecute (wxSTC_CMD_TAB); CmdKeyExecute (wxSTC_CMD_TAB);
} }
void Edit::OnEditIndentRed (wxCommandEvent &event) { void Edit::OnEditIndentRed (wxCommandEvent &WXUNUSED(event)) {
CmdKeyExecute (wxSTC_CMD_DELETEBACK); CmdKeyExecute (wxSTC_CMD_DELETEBACK);
} }
@@ -407,8 +407,8 @@ bool Edit::InitializePrefs (const wxString &name) {
// set margin for line numbers // set margin for line numbers
SetMarginType (m_LineNrID, wxSTC_MARGIN_NUMBER); SetMarginType (m_LineNrID, wxSTC_MARGIN_NUMBER);
StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY")));
StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour ("WHITE")); StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE")));
SetMarginWidth (m_LineNrID, SetMarginWidth (m_LineNrID,
g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0); g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0);
@@ -420,8 +420,8 @@ bool Edit::InitializePrefs (const wxString &name) {
} }
// set common styles // set common styles
StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("DARK GREY")));
StyleSetForeground (wxSTC_STYLE_INDENTGUIDE, wxColour ("DARK GREY")); StyleSetForeground (wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY")));
// initialize settings // initialize settings
if (g_CommonPrefs.syntaxEnable) { if (g_CommonPrefs.syntaxEnable) {
@@ -459,7 +459,7 @@ bool Edit::InitializePrefs (const wxString &name) {
// folding // folding
SetMarginType (m_FoldingID, wxSTC_MARGIN_SYMBOL); SetMarginType (m_FoldingID, wxSTC_MARGIN_SYMBOL);
SetMarginMask (m_FoldingID, wxSTC_MASK_FOLDERS); SetMarginMask (m_FoldingID, wxSTC_MASK_FOLDERS);
StyleSetBackground (m_FoldingID, wxColour ("WHITE")); StyleSetBackground (m_FoldingID, wxColour (_T("WHITE")));
SetMarginWidth (m_FoldingID, 0); SetMarginWidth (m_FoldingID, 0);
SetMarginSensitive (m_FoldingID, false); SetMarginSensitive (m_FoldingID, false);
if (g_CommonPrefs.foldEnable) { if (g_CommonPrefs.foldEnable) {
@@ -601,7 +601,7 @@ EditProperties::EditProperties (Edit *edit,
long style) long style)
: wxDialog (edit, -1, wxEmptyString, : wxDialog (edit, -1, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
// sets the application title // sets the application title
SetTitle (_("Properties")); SetTitle (_("Properties"));
@@ -786,7 +786,7 @@ void EditPrint::GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *
*selPageTo = *maxPage; *selPageTo = *maxPage;
} }
bool EditPrint::HasPage (int page) { bool EditPrint::HasPage (int WXUNUSED(page)) {
return (m_printed < m_edit->GetLength()); return (m_printed < m_edit->GetLength());
} }

View File

@@ -32,6 +32,7 @@
#include <wx/notebook.h> // notebook support #include <wx/notebook.h> // notebook support
#include <wx/settings.h> // system settings #include <wx/settings.h> // system settings
#include <wx/string.h> // strings support #include <wx/string.h> // strings support
#include <wx/image.h> // images support
//! application headers //! application headers
#include "defsext.h" // Additional definitions #include "defsext.h" // Additional definitions
@@ -583,7 +584,7 @@ AppAbout::AppAbout (wxWindow *parent,
long style) long style)
: wxDialog (parent, -1, wxEmptyString, : wxDialog (parent, -1, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
// set timer if any // set timer if any
m_timer = NULL; m_timer = NULL;
@@ -651,7 +652,7 @@ AppAbout::~AppAbout () {
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// event handlers // event handlers
void AppAbout::OnTimerEvent (wxTimerEvent &event) { void AppAbout::OnTimerEvent (wxTimerEvent &WXUNUSED(event)) {
if (m_timer) delete m_timer; if (m_timer) delete m_timer;
m_timer = NULL; m_timer = NULL;
EndModal (wxID_OK); EndModal (wxID_OK);

View File

@@ -677,7 +677,11 @@ void ScintillaWX::DoAddChar(int key) {
} }
#ifdef __WXMAC__
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool meta, bool* consumed) { int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool meta, bool* consumed) {
#else
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool WXUNUSED(meta), bool* consumed) {
#endif
#if defined(__WXGTK__) || defined(__WXMAC__) #if defined(__WXGTK__) || defined(__WXMAC__)
// Ctrl chars (A-Z) end up with the wrong keycode on wxGTK // Ctrl chars (A-Z) end up with the wrong keycode on wxGTK
// TODO: Check this, it shouldn't be true any longer. // TODO: Check this, it shouldn't be true any longer.