git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48603
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
INCOMPATIBLE CHANGES SINCE 2.8.x
================================
INCOMPATIBLE CHANGES SINCE 2.8.x
================================
+Unicode-related changes
+-----------------------
+
+The biggest changes in wxWidgets 3.0 are the changes due to the merge of the
+old ANSI and Unicode build modes in a single build. See the Unicode overview
+in the manual for more details but here are the most important incompatible
+changes:
+
+- Many wxWidgets functions taking "const wxChar *" have been changed to take
+ either "const wxString&" if they should accept both Unicode or ANSI strings
+ and the argument can't be NULL or "const char *" if the strings are always
+ ANSI but may be NULL.
+
+- Some structure fields have been changed from "wxChar *" to "char *" too:
+ e.g. wxCmdLineEntryDesc fields.
+
+
Changes in behaviour not resulting in compilation errors, please read this!
---------------------------------------------------------------------------
Changes in behaviour not resulting in compilation errors, please read this!
---------------------------------------------------------------------------
\func{const wxChar *}{wxTRANSLATE}{\param{const char *}{s}}
This macro doesn't do anything in the program code -- it simply expands to the
\func{const wxChar *}{wxTRANSLATE}{\param{const char *}{s}}
This macro doesn't do anything in the program code -- it simply expands to the
-value of its argument (except in Unicode build where it is equivalent to
-\helpref{wxT}{wxt} which makes it unnecessary to use both wxTRANSLATE and wxT
-with the same string which would be really unreadable).
-However it does have a purpose and it is to mark the literal strings for the
+However it does have a purpose which is to mark the literal strings for the
extraction into the message catalog created by {\tt xgettext} program. Usually
this is achieved using \helpref{\_()}{underscore} but that macro not only marks
the string for extraction but also expands into a
extraction into the message catalog created by {\tt xgettext} program. Usually
this is achieved using \helpref{\_()}{underscore} but that macro not only marks
the string for extraction but also expands into a
day names already). If you write
\begin{verbatim}
day names already). If you write
\begin{verbatim}
-static const wxChar * const weekdays[] = { _("Mon"), ..., _("Sun") };
+static const char * const weekdays[] = { _("Mon"), ..., _("Sun") };
...
// use weekdays[n] as usual
\end{verbatim}
...
// use weekdays[n] as usual
\end{verbatim}
initializer. So instead you should do
\begin{verbatim}
initializer. So instead you should do
\begin{verbatim}
-static const wxChar * const weekdays[] = { wxTRANSLATE("Mon"), ..., wxTRANSLATE("Sun") };
+static const char * const weekdays[] = { wxTRANSLATE("Mon"), ..., wxTRANSLATE("Sun") };
...
// use wxGetTranslation(weekdays[n])
\end{verbatim}
...
// use wxGetTranslation(weekdays[n])
\end{verbatim}
no translations for the weekday names in the program message catalog and
wxGetTranslation wouldn't find them.
no translations for the weekday names in the program message catalog and
wxGetTranslation wouldn't find them.
\membersection{::wxVsnprintf}\label{wxvsnprintf}
\func{int}{wxVsnprintf}{\param{wxChar *}{buf}, \param{size\_t }{len}, \param{const wxChar *}{format}, \param{va\_list }{argPtr}}
\membersection{::wxVsnprintf}\label{wxvsnprintf}
\func{int}{wxVsnprintf}{\param{wxChar *}{buf}, \param{size\_t }{len}, \param{const wxChar *}{format}, \param{va\_list }{argPtr}}
static const struct wxKeyName
{
wxKeyCode code;
static const struct wxKeyName
{
wxKeyCode code;
} wxKeyNames[] =
{
{ WXK_DELETE, wxTRANSLATE("DEL") },
} wxKeyNames[] =
{
{ WXK_DELETE, wxTRANSLATE("DEL") },
//
// as accels can be either translated or not, check for both possibilities and
// also compare case-insensitively as the key names case doesn't count
//
// as accels can be either translated or not, check for both possibilities and
// also compare case-insensitively as the key names case doesn't count
-static inline bool CompareAccelString(const wxString& str, const wxChar *accel)
+static inline bool CompareAccelString(const wxString& str, const char *accel)
{
return str.CmpNoCase(accel) == 0
#if wxUSE_INTL
{
return str.CmpNoCase(accel) == 0
#if wxUSE_INTL
//
// first and last parameter specify the valid domain for "number" part
static int IsNumberedAccelKey(const wxString& str,
//
// first and last parameter specify the valid domain for "number" part
static int IsNumberedAccelKey(const wxString& str,
wxKeyCode prefixCode,
unsigned first,
unsigned last)
wxKeyCode prefixCode,
unsigned first,
unsigned last)
-#define OPTION_VERBOSE _T("verbose")
+#define OPTION_VERBOSE "verbose"
void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
{
void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
{
gettext_noop("show this help message"),
wxCMD_LINE_VAL_NONE,
wxCMD_LINE_OPTION_HELP
gettext_noop("show this help message"),
wxCMD_LINE_VAL_NONE,
wxCMD_LINE_OPTION_HELP
#if wxUSE_LOG
{
wxCMD_LINE_SWITCH,
#if wxUSE_LOG
{
wxCMD_LINE_SWITCH,
OPTION_VERBOSE,
gettext_noop("generate verbose log messages"),
wxCMD_LINE_VAL_NONE,
OPTION_VERBOSE,
gettext_noop("generate verbose log messages"),
wxCMD_LINE_VAL_NONE,
// terminator
{
wxCMD_LINE_NONE,
// terminator
{
wxCMD_LINE_NONE,
- wxEmptyString,
- wxEmptyString,
- wxEmptyString,
wxCMD_LINE_VAL_NONE,
0x0
}
wxCMD_LINE_VAL_NONE,
0x0
}
#ifdef __WXUNIVERSAL__
{
wxCMD_LINE_OPTION,
#ifdef __WXUNIVERSAL__
{
wxCMD_LINE_OPTION,
OPTION_THEME,
gettext_noop("specify the theme to use"),
wxCMD_LINE_VAL_STRING,
OPTION_THEME,
gettext_noop("specify the theme to use"),
wxCMD_LINE_VAL_STRING,
// and not mgl/app.cpp
{
wxCMD_LINE_OPTION,
// and not mgl/app.cpp
{
wxCMD_LINE_OPTION,
OPTION_MODE,
gettext_noop("specify display mode to use (e.g. 640x480-16)"),
wxCMD_LINE_VAL_STRING,
OPTION_MODE,
gettext_noop("specify display mode to use (e.g. 640x480-16)"),
wxCMD_LINE_VAL_STRING,
// terminator
{
wxCMD_LINE_NONE,
// terminator
{
wxCMD_LINE_NONE,
- wxEmptyString,
- wxEmptyString,
- wxEmptyString,
wxCMD_LINE_VAL_NONE,
0x0
}
wxCMD_LINE_VAL_NONE,
0x0
}
// some special cases
static struct
{
// some special cases
static struct
{
int dayDiffFromToday;
} literalDates[] =
{
int dayDiffFromToday;
} literalDates[] =
{
else // not a valid weekday name
{
// try the ordinals
else // not a valid weekday name
{
// try the ordinals
- static const wxChar *ordinals[] =
+ static const char *ordinals[] =
{
wxTRANSLATE("first"),
wxTRANSLATE("second"),
{
wxTRANSLATE("first"),
wxTRANSLATE("second"),
// first try some extra things
static const struct
{
// first try some extra things
static const struct
{
wxDateTime_t hour;
} stdTimes[] =
{
wxDateTime_t hour;
} stdTimes[] =
{
};
// the descriptions for them
};
// the descriptions for them
-static const wxChar* gs_encodingDescs[] =
+static const char* gs_encodingDescs[] =
{
wxTRANSLATE( "Western European (ISO-8859-1)" ),
wxTRANSLATE( "Central European (ISO-8859-2)" ),
{
wxTRANSLATE( "Western European (ISO-8859-1)" ),
wxTRANSLATE( "Central European (ISO-8859-2)" ),
- static const wxChar *msg = wxTRANSLATE(
-"The version of remote access service (RAS) installed on this machine is too\
-old, please upgrade (the following required function is missing: %s)."
- );
-
- wxLogError(wxGetTranslation(msg), funcName);
+ wxLogError(_("The version of remote access service (RAS) installed "
+ "on this machine is too old, please upgrade (the "
+ "following required function is missing: %s)."),
+ funcName);
m_dllRas.Unload();
return;
}
m_dllRas.Unload();
return;
}