Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -246,7 +246,7 @@ int wxPoll(wxPollFd *ufds, unsigned int nfds, int timeout)
|
||||
unsigned int i;
|
||||
for ( i = 0; i < nfds; i++ )
|
||||
{
|
||||
wxASSERT_MSG( ufds[i].fd < FD_SETSIZE, _T("fd out of range") );
|
||||
wxASSERT_MSG( ufds[i].fd < FD_SETSIZE, wxT("fd out of range") );
|
||||
|
||||
if ( ufds[i].events & G_IO_IN )
|
||||
wxFD_SET(ufds[i].fd, &readfds);
|
||||
|
@@ -267,7 +267,7 @@ wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data)
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
wxASSERT_MSG( !data.m_palette,
|
||||
_T("copying bitmaps palette not implemented") );
|
||||
wxT("copying bitmaps palette not implemented") );
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
|
||||
|
@@ -111,21 +111,21 @@ bool wxBrush::operator == ( const wxBrush& brush ) const
|
||||
|
||||
wxBrushStyle wxBrush::GetStyle() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, _T("invalid brush") );
|
||||
wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, wxT("invalid brush") );
|
||||
|
||||
return M_BRUSHDATA->m_style;
|
||||
}
|
||||
|
||||
wxColour wxBrush::GetColour() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
|
||||
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid brush") );
|
||||
|
||||
return M_BRUSHDATA->m_colour;
|
||||
}
|
||||
|
||||
wxBitmap *wxBrush::GetStipple() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), NULL, _T("invalid brush") );
|
||||
wxCHECK_MSG( Ok(), NULL, wxT("invalid brush") );
|
||||
|
||||
return &M_BRUSHDATA->m_stipple;
|
||||
}
|
||||
|
@@ -228,7 +228,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n)
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
|
||||
|
||||
wxCHECK_RET( IsValid(n), _T("invalid index in wxChoice::Delete") );
|
||||
wxCHECK_RET( IsValid(n), wxT("invalid index in wxChoice::Delete") );
|
||||
|
||||
// if the item to delete is before the selection, and the selection is valid
|
||||
if (((int)n < m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
|
||||
|
@@ -83,7 +83,7 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
|
||||
if ( strcmp(atom_name, "TARGETS") )
|
||||
{
|
||||
wxLogTrace( TRACE_CLIPBOARD,
|
||||
_T("got unsupported clipboard target") );
|
||||
wxT("got unsupported clipboard target") );
|
||||
|
||||
clipboard->m_waiting = false;
|
||||
g_free(atom_name);
|
||||
@@ -257,7 +257,7 @@ selection_handler( GtkWidget *WXUNUSED(widget),
|
||||
(guchar*)&(timestamp),
|
||||
sizeof(timestamp));
|
||||
wxLogTrace(TRACE_CLIPBOARD,
|
||||
_T("Clipboard TIMESTAMP requested, returning timestamp=%u"),
|
||||
wxT("Clipboard TIMESTAMP requested, returning timestamp=%u"),
|
||||
timestamp);
|
||||
return;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ selection_handler( GtkWidget *WXUNUSED(widget),
|
||||
wxDataFormat format( selection_data->target );
|
||||
|
||||
wxLogTrace(TRACE_CLIPBOARD,
|
||||
_T("clipboard data in format %s, GtkSelectionData is target=%s type=%s selection=%s timestamp=%u"),
|
||||
wxT("clipboard data in format %s, GtkSelectionData is target=%s type=%s selection=%s timestamp=%u"),
|
||||
format.GetId().c_str(),
|
||||
wxString::FromAscii(gdk_atom_name(selection_data->target)).c_str(),
|
||||
wxString::FromAscii(gdk_atom_name(selection_data->type)).c_str(),
|
||||
|
@@ -134,7 +134,7 @@ wxString wxControl::GTKRemoveMnemonics(const wxString& label)
|
||||
{
|
||||
wxChar ch = label[i];
|
||||
|
||||
if ( ch == _T('&') )
|
||||
if ( ch == wxT('&') )
|
||||
{
|
||||
if ( i == len - 1 )
|
||||
{
|
||||
@@ -144,7 +144,7 @@ wxString wxControl::GTKRemoveMnemonics(const wxString& label)
|
||||
}
|
||||
|
||||
ch = label[++i]; // skip '&' itself
|
||||
if ( ch == _T('&') )
|
||||
if ( ch == wxT('&') )
|
||||
{
|
||||
// special case: "&&" is not a mnemonic at all but just an
|
||||
// escaped "&"
|
||||
|
@@ -251,12 +251,12 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *buf)
|
||||
if ( (*p == '\r' && *(p+1) == '\n') || !*p )
|
||||
{
|
||||
size_t lenPrefix = 5; // strlen("file:")
|
||||
if ( filename.Left(lenPrefix).MakeLower() == _T("file:") )
|
||||
if ( filename.Left(lenPrefix).MakeLower() == wxT("file:") )
|
||||
{
|
||||
// sometimes the syntax is "file:filename", sometimes it's
|
||||
// URL-like: "file://filename" - deal with both
|
||||
if ( filename[lenPrefix] == _T('/') &&
|
||||
filename[lenPrefix + 1] == _T('/') )
|
||||
if ( filename[lenPrefix] == wxT('/') &&
|
||||
filename[lenPrefix + 1] == wxT('/') )
|
||||
{
|
||||
// skip the slashes
|
||||
lenPrefix += 2;
|
||||
@@ -267,7 +267,7 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *buf)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogDebug(_T("Unsupported URI '%s' in wxFileDataObject"),
|
||||
wxLogDebug(wxT("Unsupported URI '%s' in wxFileDataObject"),
|
||||
filename.c_str());
|
||||
}
|
||||
|
||||
|
@@ -90,9 +90,9 @@ void gdk_wx_draw_bitmap(GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
wxCHECK_RET( drawable, _T("NULL drawable in gdk_wx_draw_bitmap") );
|
||||
wxCHECK_RET( src, _T("NULL src in gdk_wx_draw_bitmap") );
|
||||
wxCHECK_RET( gc, _T("NULL gc in gdk_wx_draw_bitmap") );
|
||||
wxCHECK_RET( drawable, wxT("NULL drawable in gdk_wx_draw_bitmap") );
|
||||
wxCHECK_RET( src, wxT("NULL src in gdk_wx_draw_bitmap") );
|
||||
wxCHECK_RET( gc, wxT("NULL gc in gdk_wx_draw_bitmap") );
|
||||
|
||||
GdkWindowPrivate *drawable_private;
|
||||
GdkWindowPrivate *src_private;
|
||||
@@ -423,7 +423,7 @@ void wxWindowDCImpl::SetUpDC()
|
||||
|
||||
void wxWindowDCImpl::DoGetSize( int* width, int* height ) const
|
||||
{
|
||||
wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") );
|
||||
wxCHECK_RET( m_owner, wxT("GetSize() doesn't work without window") );
|
||||
|
||||
m_owner->GetSize(width, height);
|
||||
}
|
||||
@@ -2189,7 +2189,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxClientDCImpl, wxWindowDCImpl)
|
||||
wxClientDCImpl::wxClientDCImpl(wxDC *owner, wxWindow *win)
|
||||
: wxWindowDCImpl(owner, win)
|
||||
{
|
||||
wxCHECK_RET( win, _T("NULL window in wxClientDCImpl::wxClientDCImpl") );
|
||||
wxCHECK_RET( win, wxT("NULL window in wxClientDCImpl::wxClientDCImpl") );
|
||||
|
||||
#ifdef __WXUNIVERSAL__
|
||||
wxPoint ptOrigin = win->GetClientAreaOrigin();
|
||||
@@ -2201,7 +2201,7 @@ wxClientDCImpl::wxClientDCImpl(wxDC *owner, wxWindow *win)
|
||||
|
||||
void wxClientDCImpl::DoGetSize(int *width, int *height) const
|
||||
{
|
||||
wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") );
|
||||
wxCHECK_RET( m_owner, wxT("GetSize() doesn't work without window") );
|
||||
|
||||
m_owner->GetClientSize( width, height );
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ static long gs_flagsForDrag = 0;
|
||||
// the trace mask we use with wxLogTrace() - call
|
||||
// wxLog::AddTraceMask(TRACE_DND) to enable the trace messages from here
|
||||
// (there are quite a few of them, so don't enable this by default)
|
||||
#define TRACE_DND _T("dnd")
|
||||
#define TRACE_DND wxT("dnd")
|
||||
|
||||
// global variables because GTK+ DnD want to have the
|
||||
// mouse event that caused it
|
||||
@@ -358,7 +358,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
|
||||
GdkAtom format = drop_target->GetMatchingPair();
|
||||
|
||||
// this does happen somehow, see bug 555111
|
||||
wxCHECK_MSG( format, FALSE, _T("no matching GdkAtom for format?") );
|
||||
wxCHECK_MSG( format, FALSE, wxT("no matching GdkAtom for format?") );
|
||||
|
||||
/*
|
||||
GdkDragAction action = GDK_ACTION_MOVE;
|
||||
|
@@ -62,13 +62,13 @@ private:
|
||||
|
||||
wxGUIEventLoop::~wxGUIEventLoop()
|
||||
{
|
||||
wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") );
|
||||
wxASSERT_MSG( !m_impl, wxT("should have been deleted in Run()") );
|
||||
}
|
||||
|
||||
int wxGUIEventLoop::Run()
|
||||
{
|
||||
// event loops are not recursive, you need to create another loop!
|
||||
wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") );
|
||||
wxCHECK_MSG( !IsRunning(), -1, wxT("can't reenter a message loop") );
|
||||
|
||||
wxEventLoopActivator activate(this);
|
||||
|
||||
@@ -87,7 +87,7 @@ int wxGUIEventLoop::Run()
|
||||
|
||||
void wxGUIEventLoop::Exit(int rc)
|
||||
{
|
||||
wxCHECK_RET( IsRunning(), _T("can't call Exit() if not running") );
|
||||
wxCHECK_RET( IsRunning(), wxT("can't call Exit() if not running") );
|
||||
|
||||
m_impl->SetExitCode(rc);
|
||||
|
||||
@@ -112,7 +112,7 @@ bool wxGUIEventLoop::Pending() const
|
||||
|
||||
bool wxGUIEventLoop::Dispatch()
|
||||
{
|
||||
wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") );
|
||||
wxCHECK_MSG( IsRunning(), false, wxT("can't call Dispatch() if not running") );
|
||||
|
||||
gtk_main_iteration();
|
||||
|
||||
|
@@ -179,17 +179,17 @@ void wxFontRefData::InitFromNative()
|
||||
m_weight = wxFONTWEIGHT_NORMAL;
|
||||
|
||||
wxString w = m_nativeFontInfo.GetXFontComponent(wxXLFD_WEIGHT).Upper();
|
||||
if ( !w.empty() && w != _T('*') )
|
||||
if ( !w.empty() && w != wxT('*') )
|
||||
{
|
||||
// the test below catches all of BOLD, EXTRABOLD, DEMIBOLD, ULTRABOLD
|
||||
// and BLACK
|
||||
if ( ((w[0u] == _T('B') && (!wxStrcmp(w.c_str() + 1, wxT("OLD")) ||
|
||||
if ( ((w[0u] == wxT('B') && (!wxStrcmp(w.c_str() + 1, wxT("OLD")) ||
|
||||
!wxStrcmp(w.c_str() + 1, wxT("LACK"))))) ||
|
||||
wxStrstr(w.c_str() + 1, _T("BOLD")) )
|
||||
wxStrstr(w.c_str() + 1, wxT("BOLD")) )
|
||||
{
|
||||
m_weight = wxFONTWEIGHT_BOLD;
|
||||
}
|
||||
else if ( w == _T("LIGHT") || w == _T("THIN") )
|
||||
else if ( w == wxT("LIGHT") || w == wxT("THIN") )
|
||||
{
|
||||
m_weight = wxFONTWEIGHT_LIGHT;
|
||||
}
|
||||
@@ -198,11 +198,11 @@ void wxFontRefData::InitFromNative()
|
||||
switch ( wxToupper(m_nativeFontInfo.
|
||||
GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() )
|
||||
{
|
||||
case _T('I'): // italique
|
||||
case wxT('I'): // italique
|
||||
m_style = wxFONTSTYLE_ITALIC;
|
||||
break;
|
||||
|
||||
case _T('O'): // oblique
|
||||
case wxT('O'): // oblique
|
||||
m_style = wxFONTSTYLE_SLANT;
|
||||
break;
|
||||
|
||||
@@ -224,7 +224,7 @@ void wxFontRefData::InitFromNative()
|
||||
// examine the spacing: if the font is monospaced, assume wxTELETYPE
|
||||
// family for compatibility with the old code which used it instead of
|
||||
// IsFixedWidth()
|
||||
if ( m_nativeFontInfo.GetXFontComponent(wxXLFD_SPACING).Upper() == _T('M') )
|
||||
if ( m_nativeFontInfo.GetXFontComponent(wxXLFD_SPACING).Upper() == wxT('M') )
|
||||
{
|
||||
m_family = wxFONTFAMILY_TELETYPE;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ void wxFontRefData::InitFromNative()
|
||||
registry = m_nativeFontInfo.GetXFontComponent(wxXLFD_REGISTRY).Upper(),
|
||||
encoding = m_nativeFontInfo.GetXFontComponent(wxXLFD_ENCODING).Upper();
|
||||
|
||||
if ( registry == _T("ISO8859") )
|
||||
if ( registry == wxT("ISO8859") )
|
||||
{
|
||||
int cp;
|
||||
if ( wxSscanf(encoding, wxT("%d"), &cp) == 1 )
|
||||
@@ -251,7 +251,7 @@ void wxFontRefData::InitFromNative()
|
||||
m_encoding = (wxFontEncoding)(wxFONTENCODING_ISO8859_1 + cp - 1);
|
||||
}
|
||||
}
|
||||
else if ( registry == _T("MICROSOFT") )
|
||||
else if ( registry == wxT("MICROSOFT") )
|
||||
{
|
||||
int cp;
|
||||
if ( wxSscanf(encoding, wxT("cp125%d"), &cp) == 1 )
|
||||
@@ -259,7 +259,7 @@ void wxFontRefData::InitFromNative()
|
||||
m_encoding = (wxFontEncoding)(wxFONTENCODING_CP1250 + cp);
|
||||
}
|
||||
}
|
||||
else if ( registry == _T("KOI8") )
|
||||
else if ( registry == wxT("KOI8") )
|
||||
{
|
||||
m_encoding = wxFONTENCODING_KOI8;
|
||||
}
|
||||
@@ -337,9 +337,9 @@ void wxFontRefData::SetPointSize(int pointSize)
|
||||
{
|
||||
wxString size;
|
||||
if ( pointSize == -1 )
|
||||
size = _T('*');
|
||||
size = wxT('*');
|
||||
else
|
||||
size.Printf(_T("%d"), 10*pointSize);
|
||||
size.Printf(wxT("%d"), 10*pointSize);
|
||||
|
||||
m_nativeFontInfo.SetXFontComponent(wxXLFD_POINTSIZE, size);
|
||||
}
|
||||
@@ -362,19 +362,19 @@ void wxFontRefData::SetStyle(wxFontStyle style)
|
||||
switch ( style )
|
||||
{
|
||||
case wxFONTSTYLE_ITALIC:
|
||||
slant = _T('i');
|
||||
slant = wxT('i');
|
||||
break;
|
||||
|
||||
case wxFONTSTYLE_SLANT:
|
||||
slant = _T('o');
|
||||
slant = wxT('o');
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown font style") );
|
||||
wxFAIL_MSG( wxT("unknown font style") );
|
||||
// fall through
|
||||
|
||||
case wxFONTSTYLE_NORMAL:
|
||||
slant = _T('r');
|
||||
slant = wxT('r');
|
||||
}
|
||||
|
||||
m_nativeFontInfo.SetXFontComponent(wxXLFD_SLANT, slant);
|
||||
@@ -391,20 +391,20 @@ void wxFontRefData::SetWeight(wxFontWeight weight)
|
||||
switch ( weight )
|
||||
{
|
||||
case wxFONTWEIGHT_BOLD:
|
||||
boldness = _T("bold");
|
||||
boldness = wxT("bold");
|
||||
break;
|
||||
|
||||
case wxFONTWEIGHT_LIGHT:
|
||||
boldness = _T("light");
|
||||
boldness = wxT("light");
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown font weight") );
|
||||
wxFAIL_MSG( wxT("unknown font weight") );
|
||||
// fall through
|
||||
|
||||
case wxFONTWEIGHT_NORMAL:
|
||||
// unspecified
|
||||
boldness = _T("medium");
|
||||
boldness = wxT("medium");
|
||||
}
|
||||
|
||||
m_nativeFontInfo.SetXFontComponent(wxXLFD_WEIGHT, boldness);
|
||||
@@ -612,7 +612,7 @@ bool wxFont::IsFixedWidth() const
|
||||
wxString spacing = M_FONTDATA->
|
||||
m_nativeFontInfo.GetXFontComponent(wxXLFD_SPACING);
|
||||
|
||||
return spacing.Upper() == _T('M');
|
||||
return spacing.Upper() == wxT('M');
|
||||
}
|
||||
|
||||
return wxFontBase::IsFixedWidth();
|
||||
|
@@ -164,7 +164,7 @@ bool wxFontDialog::DoCreate(wxWindow *parent)
|
||||
else
|
||||
{
|
||||
// this is not supposed to happen!
|
||||
wxFAIL_MSG(_T("font is ok but no native font info?"));
|
||||
wxFAIL_MSG(wxT("font is ok but no native font info?"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ bool wxGauge::Create( wxWindow *parent,
|
||||
void wxGauge::DoSetGauge()
|
||||
{
|
||||
wxASSERT_MSG( 0 <= m_gaugePos && m_gaugePos <= m_rangeMax,
|
||||
_T("invalid gauge position in DoSetGauge()") );
|
||||
wxT("invalid gauge position in DoSetGauge()") );
|
||||
|
||||
gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget),
|
||||
m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.);
|
||||
@@ -88,7 +88,7 @@ void wxGauge::SetRange( int range )
|
||||
|
||||
void wxGauge::SetValue( int pos )
|
||||
{
|
||||
wxCHECK_RET( pos <= m_rangeMax, _T("invalid value in wxGauge::SetValue()") );
|
||||
wxCHECK_RET( pos <= m_rangeMax, wxT("invalid value in wxGauge::SetValue()") );
|
||||
|
||||
m_gaugePos = pos;
|
||||
|
||||
|
@@ -267,7 +267,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
|
||||
{
|
||||
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
|
||||
|
||||
wxASSERT_MSG( child_frame, _T("child is not a wxMDIChildFrame") );
|
||||
wxASSERT_MSG( child_frame, wxT("child is not a wxMDIChildFrame") );
|
||||
|
||||
if (child_frame->m_page == page)
|
||||
return child_frame;
|
||||
|
@@ -579,7 +579,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
||||
|
||||
/* should find it for normal (not popup) menu */
|
||||
wxASSERT_MSG( (id != -1) || (menu->GetInvokingWindow() != NULL),
|
||||
_T("menu item not found in gtk_menu_clicked_callback") );
|
||||
wxT("menu item not found in gtk_menu_clicked_callback") );
|
||||
|
||||
if (!menu->IsEnabled(id))
|
||||
return;
|
||||
@@ -902,7 +902,7 @@ void wxMenuItem::Check( bool check )
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("can't check this item") );
|
||||
wxFAIL_MSG( wxT("can't check this item") );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1037,7 +1037,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
|
||||
}
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected menu item kind") );
|
||||
wxFAIL_MSG( wxT("unexpected menu item kind") );
|
||||
// fall through
|
||||
|
||||
case wxITEM_NORMAL:
|
||||
|
@@ -90,7 +90,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
|
||||
// are you trying to call SetSelection() from a notebook event handler?
|
||||
// you shouldn't!
|
||||
wxCHECK_RET( !notebook->m_inSwitchPage,
|
||||
_T("gtk_notebook_page_change_callback reentered") );
|
||||
wxT("gtk_notebook_page_change_callback reentered") );
|
||||
|
||||
notebook->m_inSwitchPage = true;
|
||||
if (g_isIdle)
|
||||
@@ -230,7 +230,7 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
|
||||
if (sel == -1)
|
||||
return TRUE;
|
||||
wxGtkNotebookPage *nb_page = notebook->GetNotebookPage(sel);
|
||||
wxCHECK_MSG( nb_page, FALSE, _T("invalid selection in wxNotebook") );
|
||||
wxCHECK_MSG( nb_page, FALSE, wxT("invalid selection in wxNotebook") );
|
||||
|
||||
wxNavigationKeyEvent event;
|
||||
event.SetEventObject( notebook );
|
||||
@@ -589,7 +589,7 @@ bool wxNotebook::DeleteAllPages()
|
||||
while (m_pagesData.GetCount() > 0)
|
||||
DeletePage( m_pagesData.GetCount()-1 );
|
||||
|
||||
wxASSERT_MSG( GetPageCount() == 0, _T("all pages must have been deleted") );
|
||||
wxASSERT_MSG( GetPageCount() == 0, wxT("all pages must have been deleted") );
|
||||
|
||||
InvalidateBestSize();
|
||||
return wxNotebookBase::DeleteAllPages();
|
||||
@@ -641,7 +641,7 @@ bool wxNotebook::InsertPage( size_t position,
|
||||
wxT("Can't add a page whose parent is not the notebook!") );
|
||||
|
||||
wxCHECK_MSG( position <= GetPageCount(), FALSE,
|
||||
_T("invalid page index in wxNotebookPage::InsertPage()") );
|
||||
wxT("invalid page index in wxNotebookPage::InsertPage()") );
|
||||
|
||||
// Hack Alert! (Part II): See above in wxInsertChildInNotebook callback
|
||||
// why this has to be done. NOTE: using gtk_widget_unparent here does not
|
||||
|
@@ -145,10 +145,10 @@ static gint gtk_radiobutton_focus_out( GtkWidget *WXUNUSED(widget),
|
||||
GdkEvent *WXUNUSED(event),
|
||||
wxRadioBox *win )
|
||||
{
|
||||
// wxASSERT_MSG( win->m_hasFocus, _T("got focus out without any focus in?") );
|
||||
// wxASSERT_MSG( win->m_hasFocus, wxT("got focus out without any focus in?") );
|
||||
// Replace with a warning, else we dump core a lot!
|
||||
// if (!win->m_hasFocus)
|
||||
// wxLogWarning(_T("Radiobox got focus out without any focus in.") );
|
||||
// wxLogWarning(wxT("Radiobox got focus out without any focus in.") );
|
||||
|
||||
// we might have lost the focus, but may be not - it may have just gone to
|
||||
// another button in the same radiobox, so we'll check for it in the next
|
||||
|
@@ -219,7 +219,7 @@ bool wxRegion::DoUnionWithRegion( const wxRegion& region )
|
||||
|
||||
bool wxRegion::DoIntersect( const wxRegion& region )
|
||||
{
|
||||
wxCHECK_MSG( region.Ok(), false, _T("invalid region") );
|
||||
wxCHECK_MSG( region.Ok(), false, wxT("invalid region") );
|
||||
|
||||
if (!m_refData)
|
||||
{
|
||||
@@ -238,7 +238,7 @@ bool wxRegion::DoIntersect( const wxRegion& region )
|
||||
|
||||
bool wxRegion::DoSubtract( const wxRegion& region )
|
||||
{
|
||||
wxCHECK_MSG( region.Ok(), false, _T("invalid region") );
|
||||
wxCHECK_MSG( region.Ok(), false, wxT("invalid region") );
|
||||
|
||||
if (!m_refData)
|
||||
{
|
||||
@@ -257,7 +257,7 @@ bool wxRegion::DoSubtract( const wxRegion& region )
|
||||
|
||||
bool wxRegion::DoXor( const wxRegion& region )
|
||||
{
|
||||
wxCHECK_MSG( region.Ok(), false, _T("invalid region") );
|
||||
wxCHECK_MSG( region.Ok(), false, wxT("invalid region") );
|
||||
|
||||
if (!m_refData)
|
||||
{
|
||||
@@ -474,28 +474,28 @@ wxRegionIterator wxRegionIterator::operator ++ (int)
|
||||
|
||||
wxCoord wxRegionIterator::GetX() const
|
||||
{
|
||||
wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") );
|
||||
wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") );
|
||||
|
||||
return ((wxRIRefData*)m_refData)->m_rects[m_current].x;
|
||||
}
|
||||
|
||||
wxCoord wxRegionIterator::GetY() const
|
||||
{
|
||||
wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") );
|
||||
wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") );
|
||||
|
||||
return ((wxRIRefData*)m_refData)->m_rects[m_current].y;
|
||||
}
|
||||
|
||||
wxCoord wxRegionIterator::GetW() const
|
||||
{
|
||||
wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") );
|
||||
wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") );
|
||||
|
||||
return ((wxRIRefData*)m_refData)->m_rects[m_current].width;
|
||||
}
|
||||
|
||||
wxCoord wxRegionIterator::GetH() const
|
||||
{
|
||||
wxCHECK_MSG( HaveRects(), 0, _T("invalid wxRegionIterator") );
|
||||
wxCHECK_MSG( HaveRects(), 0, wxT("invalid wxRegionIterator") );
|
||||
|
||||
return ((wxRIRefData*)m_refData)->m_rects[m_current].height;
|
||||
}
|
||||
|
@@ -171,7 +171,7 @@ void wxScrollHelper::DoScrollOneDir(int orient,
|
||||
|
||||
void wxScrollHelper::DoScroll( int x_pos, int y_pos )
|
||||
{
|
||||
wxCHECK_RET( m_targetWindow != 0, _T("No target window") );
|
||||
wxCHECK_RET( m_targetWindow != 0, wxT("No target window") );
|
||||
|
||||
DoScrollOneDir(wxHORIZONTAL, m_win->m_hAdjust, x_pos, m_xScrollPixelsPerLine,
|
||||
&m_xScrollPosition);
|
||||
|
@@ -82,7 +82,7 @@ static bool GetColourFromGTKWidget(int& red, int& green, int& blue,
|
||||
switch ( type )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected GTK widget type") );
|
||||
wxFAIL_MSG( wxT("unexpected GTK widget type") );
|
||||
// fall through
|
||||
|
||||
case wxGTK_BUTTON:
|
||||
@@ -108,7 +108,7 @@ static bool GetColourFromGTKWidget(int& red, int& green, int& blue,
|
||||
switch ( colour )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected GTK colour type") );
|
||||
wxFAIL_MSG( wxT("unexpected GTK colour type") );
|
||||
// fall through
|
||||
|
||||
case wxGTK_FG:
|
||||
@@ -325,7 +325,7 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
||||
|
||||
case wxSYS_COLOUR_MAX:
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown system colour index") );
|
||||
wxFAIL_MSG( wxT("unknown system colour index") );
|
||||
}
|
||||
|
||||
return *wxWHITE;
|
||||
|
@@ -112,7 +112,7 @@ public:
|
||||
return GTK_TOOLBAR_CHILD_RADIOBUTTON;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown toolbar child type") );
|
||||
wxFAIL_MSG( wxT("unknown toolbar child type") );
|
||||
// fall through
|
||||
|
||||
case wxITEM_NORMAL:
|
||||
@@ -439,7 +439,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||
|
||||
if ( !tool->m_item )
|
||||
{
|
||||
wxFAIL_MSG( _T("gtk_toolbar_insert_element() failed") );
|
||||
wxFAIL_MSG( wxT("gtk_toolbar_insert_element() failed") );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -543,7 +543,7 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase * WXUNUSED(tool),
|
||||
bool WXUNUSED(toggle))
|
||||
{
|
||||
// VZ: absolutely no idea about how to do it
|
||||
wxFAIL_MSG( _T("not implemented") );
|
||||
wxFAIL_MSG( wxT("not implemented") );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -554,7 +554,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
|
||||
wxCoord WXUNUSED(y)) const
|
||||
{
|
||||
// VZ: GTK+ doesn't seem to have such thing
|
||||
wxFAIL_MSG( _T("wxToolBar::FindToolForPosition() not implemented") );
|
||||
wxFAIL_MSG( wxT("wxToolBar::FindToolForPosition() not implemented") );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ gtk_insert_text_callback(GtkEditable *editable,
|
||||
// we should only be called if we have a max len limit at all
|
||||
GtkEntry *entry = GTK_ENTRY (editable);
|
||||
|
||||
wxCHECK_RET( entry->text_max_length, _T("shouldn't be called") );
|
||||
wxCHECK_RET( entry->text_max_length, wxT("shouldn't be called") );
|
||||
|
||||
// check that we don't overflow the max length limit
|
||||
//
|
||||
@@ -190,7 +190,7 @@ static void wxgtk_text_draw( GtkWidget *widget, GdkRectangle *rect)
|
||||
if ( loop && !loop->IsYielding() )
|
||||
{
|
||||
wxCHECK_RET( gs_gtk_text_draw != wxgtk_text_draw,
|
||||
_T("infinite recursion in wxgtk_text_draw aborted") );
|
||||
wxT("infinite recursion in wxgtk_text_draw aborted") );
|
||||
|
||||
gs_gtk_text_draw(widget, rect);
|
||||
}
|
||||
@@ -818,7 +818,7 @@ void wxTextCtrl::SetSelection( long from, long to )
|
||||
!GTK_TEXT(m_text)->line_start_cache )
|
||||
{
|
||||
// tell the programmer that it didn't work
|
||||
wxLogDebug(_T("Can't call SetSelection() before realizing the control"));
|
||||
wxLogDebug(wxT("Can't call SetSelection() before realizing the control"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1073,7 +1073,7 @@ void wxTextCtrl::ChangeFontGlobally()
|
||||
// possible!
|
||||
wxASSERT_MSG( (m_windowStyle & wxTE_MULTILINE) && m_updateFont,
|
||||
|
||||
_T("shouldn't be called for single line controls") );
|
||||
wxT("shouldn't be called for single line controls") );
|
||||
|
||||
wxString value = GetValue();
|
||||
if ( !value.empty() )
|
||||
@@ -1147,7 +1147,7 @@ bool wxTextCtrl::SetStyle( long start, long end, const wxTextAttr& style )
|
||||
gint l = gtk_text_get_length( GTK_TEXT(m_text) );
|
||||
|
||||
wxCHECK_MSG( start >= 0 && end <= l, false,
|
||||
_T("invalid range in wxTextCtrl::SetStyle") );
|
||||
wxT("invalid range in wxTextCtrl::SetStyle") );
|
||||
|
||||
gint old_pos = gtk_editable_get_position( GTK_EDITABLE(m_text) );
|
||||
char *text = gtk_editable_get_chars( GTK_EDITABLE(m_text), start, end );
|
||||
|
@@ -47,7 +47,7 @@ bool wxGTKTimerImpl::Start(int millisecs, bool oneShot)
|
||||
if ( !wxTimerImpl::Start(millisecs, oneShot) )
|
||||
return false;
|
||||
|
||||
wxASSERT_MSG( m_tag == -1, _T("shouldn't be still running") );
|
||||
wxASSERT_MSG( m_tag == -1, wxT("shouldn't be still running") );
|
||||
|
||||
m_tag = gtk_timeout_add( m_milli, timeout_callback, this );
|
||||
|
||||
@@ -56,7 +56,7 @@ bool wxGTKTimerImpl::Start(int millisecs, bool oneShot)
|
||||
|
||||
void wxGTKTimerImpl::Stop()
|
||||
{
|
||||
wxASSERT_MSG( m_tag != -1, _T("should be running") );
|
||||
wxASSERT_MSG( m_tag != -1, wxT("should be running") );
|
||||
|
||||
gtk_timeout_remove( m_tag );
|
||||
m_tag = -1;
|
||||
|
@@ -656,7 +656,7 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK()
|
||||
{
|
||||
if (m_grabbed)
|
||||
{
|
||||
wxASSERT_MSG( false, _T("Window still grabbed"));
|
||||
wxASSERT_MSG( false, wxT("Window still grabbed"));
|
||||
RemoveGrab();
|
||||
}
|
||||
|
||||
@@ -1043,8 +1043,8 @@ void wxTopLevelWindowGTK::OnInternalIdle()
|
||||
if ( g_delayedFocus &&
|
||||
wxGetTopLevelParent((wxWindow*)g_delayedFocus) == this )
|
||||
{
|
||||
wxLogTrace(_T("focus"),
|
||||
_T("Setting focus from wxTLW::OnIdle() to %s(%s)"),
|
||||
wxLogTrace(wxT("focus"),
|
||||
wxT("Setting focus from wxTLW::OnIdle() to %s(%s)"),
|
||||
g_delayedFocus->GetClassInfo()->GetClassName(),
|
||||
g_delayedFocus->GetLabel().c_str());
|
||||
|
||||
@@ -1119,12 +1119,12 @@ void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons )
|
||||
|
||||
void wxTopLevelWindowGTK::Maximize(bool WXUNUSED(maximize))
|
||||
{
|
||||
wxFAIL_MSG( _T("not implemented") );
|
||||
wxFAIL_MSG( wxT("not implemented") );
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowGTK::IsMaximized() const
|
||||
{
|
||||
// wxFAIL_MSG( _T("not implemented") );
|
||||
// wxFAIL_MSG( wxT("not implemented") );
|
||||
|
||||
// This is an approximation
|
||||
return false;
|
||||
@@ -1132,7 +1132,7 @@ bool wxTopLevelWindowGTK::IsMaximized() const
|
||||
|
||||
void wxTopLevelWindowGTK::Restore()
|
||||
{
|
||||
wxFAIL_MSG( _T("not implemented") );
|
||||
wxFAIL_MSG( wxT("not implemented") );
|
||||
}
|
||||
|
||||
void wxTopLevelWindowGTK::Iconize( bool iconize )
|
||||
@@ -1142,7 +1142,7 @@ void wxTopLevelWindowGTK::Iconize( bool iconize )
|
||||
GdkWindow *window = m_widget->window;
|
||||
|
||||
// you should do it later, for example from OnCreate() handler
|
||||
wxCHECK_RET( window, _T("frame not created yet - can't iconize") );
|
||||
wxCHECK_RET( window, wxT("frame not created yet - can't iconize") );
|
||||
|
||||
XIconifyWindow( GDK_WINDOW_XDISPLAY( window ),
|
||||
GDK_WINDOW_XWINDOW( window ),
|
||||
@@ -1210,7 +1210,7 @@ static bool do_shape_combine_region(GdkWindow* window, const wxRegion& region)
|
||||
bool wxTopLevelWindowGTK::SetShape(const wxRegion& region)
|
||||
{
|
||||
wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), false,
|
||||
_T("Shaped windows must be created with the wxFRAME_SHAPED style."));
|
||||
wxT("Shaped windows must be created with the wxFRAME_SHAPED style."));
|
||||
|
||||
GdkWindow *window = NULL;
|
||||
if (m_wxwindow)
|
||||
|
@@ -245,7 +245,7 @@ extern bool g_mainThreadLocked;
|
||||
#endif
|
||||
|
||||
// the trace mask used for the focus debugging messages
|
||||
#define TRACE_FOCUS _T("focus")
|
||||
#define TRACE_FOCUS wxT("focus")
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// missing gdk functions
|
||||
@@ -620,7 +620,7 @@ static void gtk_window_draw_callback( GtkWidget *widget,
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// set WXTRACE to this to see the key event codes on the console
|
||||
#define TRACE_KEYS _T("keyevent")
|
||||
#define TRACE_KEYS wxT("keyevent")
|
||||
|
||||
// translates an X key symbol to WXK_XXX value
|
||||
//
|
||||
@@ -954,9 +954,9 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
|
||||
|
||||
KeySym keysym = gdk_event->keyval;
|
||||
|
||||
wxLogTrace(TRACE_KEYS, _T("Key %s event: keysym = %ld"),
|
||||
event.GetEventType() == wxEVT_KEY_UP ? _T("release")
|
||||
: _T("press"),
|
||||
wxLogTrace(TRACE_KEYS, wxT("Key %s event: keysym = %ld"),
|
||||
event.GetEventType() == wxEVT_KEY_UP ? wxT("release")
|
||||
: wxT("press"),
|
||||
keysym);
|
||||
|
||||
long key_code = wxTranslateKeySymToWXKey(keysym, false /* !isChar */);
|
||||
@@ -985,7 +985,7 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
|
||||
Display *dpy = (Display *)wxGetDisplay();
|
||||
KeyCode keycode = XKeysymToKeycode(dpy, keysym);
|
||||
|
||||
wxLogTrace(TRACE_KEYS, _T("\t-> keycode %d"), keycode);
|
||||
wxLogTrace(TRACE_KEYS, wxT("\t-> keycode %d"), keycode);
|
||||
|
||||
KeySym keysymNormalized = XKeycodeToKeysym(dpy, keycode, 0);
|
||||
|
||||
@@ -1024,7 +1024,7 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
|
||||
}
|
||||
}
|
||||
|
||||
wxLogTrace(TRACE_KEYS, _T("\t-> wxKeyCode %ld"), key_code);
|
||||
wxLogTrace(TRACE_KEYS, wxT("\t-> wxKeyCode %ld"), key_code);
|
||||
|
||||
// sending unknown key events doesn't really make sense
|
||||
if ( !key_code )
|
||||
@@ -1176,7 +1176,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
|
||||
if ( key_code )
|
||||
{
|
||||
wxLogTrace(TRACE_KEYS, _T("Char event: %ld"), key_code);
|
||||
wxLogTrace(TRACE_KEYS, wxT("Char event: %ld"), key_code);
|
||||
|
||||
event.m_keyCode = key_code;
|
||||
|
||||
@@ -1820,7 +1820,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget,
|
||||
g_focusWindow = win;
|
||||
|
||||
wxLogTrace(TRACE_FOCUS,
|
||||
_T("%s: focus in"), win->GetName().c_str());
|
||||
wxT("%s: focus in"), win->GetName().c_str());
|
||||
|
||||
#ifdef HAVE_XIM
|
||||
if (win->m_ic)
|
||||
@@ -1868,7 +1868,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *WXUNUSED(widget),
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
wxLogTrace( TRACE_FOCUS,
|
||||
_T("%s: focus out"), win->GetName().c_str() );
|
||||
wxT("%s: focus out"), win->GetName().c_str() );
|
||||
|
||||
|
||||
wxWindowGTK *winFocus = wxFindFocusedChild(win);
|
||||
@@ -3292,7 +3292,7 @@ void wxWindowGTK::SetFocus()
|
||||
// it should be focused and will do it later, during the idle
|
||||
// time, as soon as we can
|
||||
wxLogTrace(TRACE_FOCUS,
|
||||
_T("Delaying setting focus to %s(%s)"),
|
||||
wxT("Delaying setting focus to %s(%s)"),
|
||||
GetClassInfo()->GetClassName(), GetLabel().c_str());
|
||||
|
||||
g_delayedFocus = this;
|
||||
@@ -3300,7 +3300,7 @@ void wxWindowGTK::SetFocus()
|
||||
else
|
||||
{
|
||||
wxLogTrace(TRACE_FOCUS,
|
||||
_T("Setting focus to %s(%s)"),
|
||||
wxT("Setting focus to %s(%s)"),
|
||||
GetClassInfo()->GetClassName(), GetLabel().c_str());
|
||||
|
||||
gtk_widget_grab_focus (m_widget);
|
||||
@@ -3314,7 +3314,7 @@ void wxWindowGTK::SetFocus()
|
||||
else
|
||||
{
|
||||
wxLogTrace(TRACE_FOCUS,
|
||||
_T("Can't set focus to %s(%s)"),
|
||||
wxT("Can't set focus to %s(%s)"),
|
||||
GetClassInfo()->GetClassName(), GetLabel().c_str());
|
||||
}
|
||||
}
|
||||
@@ -3913,7 +3913,7 @@ void wxWindowGTK::DoCaptureMouse()
|
||||
else
|
||||
window = GetConnectWidget()->window;
|
||||
|
||||
wxCHECK_RET( window, _T("CaptureMouse() failed") );
|
||||
wxCHECK_RET( window, wxT("CaptureMouse() failed") );
|
||||
|
||||
const wxCursor* cursor = &m_cursor;
|
||||
if (!cursor->Ok())
|
||||
|
Reference in New Issue
Block a user