};// ps_action = PS_PREVIEW;
// PostScript printer settings
-void WXDLLEXPORT wxSetPrinterCommand(char *cmd);
-void WXDLLEXPORT wxSetPrintPreviewCommand(char *cmd);
-void WXDLLEXPORT wxSetPrinterOptions(char *flags);
+void WXDLLEXPORT wxSetPrinterCommand(const char *cmd);
+void WXDLLEXPORT wxSetPrintPreviewCommand(const char *cmd);
+void WXDLLEXPORT wxSetPrinterOptions(const char *flags);
void WXDLLEXPORT wxSetPrinterOrientation(int orientation);
void WXDLLEXPORT wxSetPrinterScaling(double x, double y);
void WXDLLEXPORT wxSetPrinterTranslation(long x, long y);
void WXDLLEXPORT wxSetPrinterMode(int mode);
-void WXDLLEXPORT wxSetPrinterFile(char *f);
-void WXDLLEXPORT wxSetAFMPath(char *f);
+void WXDLLEXPORT wxSetPrinterFile(const char *f);
+void WXDLLEXPORT wxSetAFMPath(const char *f);
// Get current values
char* WXDLLEXPORT wxGetPrinterCommand(void);
wxPrintSetupData(void);
~wxPrintSetupData(void);
- void SetPrinterCommand(char *cmd);
- void SetPaperName(char *paper);
- void SetPrintPreviewCommand(char *cmd);
- void SetPrinterOptions(char *flags);
- void SetPrinterFile(char *f);
+ void SetPrinterCommand(const char *cmd);
+ void SetPaperName(const char *paper);
+ void SetPrintPreviewCommand(const char *cmd);
+ void SetPrinterOptions(const char *flags);
+ void SetPrinterFile(const char *f);
void SetPrinterOrientation(int orient);
void SetPrinterScaling(double x, double y);
void SetPrinterTranslation(long x, long y);
// 1 = Preview, 2 = print to file, 3 = send to printer
void SetPrinterMode(int mode);
- void SetAFMPath(char *f);
+ void SetAFMPath(const char *f);
void SetColour(bool col);
// Get current values
int heightPixels;
char *pageName;
- wxPrintPaperType(char *name = NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
+ wxPrintPaperType(const char *name = NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
~wxPrintPaperType(void);
};
void CreateDatabase(void);
void ClearDatabase(void);
- void AddPaperType(char *name, int wmm, int hmm, int wp, int hp);
+ void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp);
wxPrintPaperType *FindPaperType(const char *name);
};
--- /dev/null
+configure
+config.cache
+config.status
+Linux.system.cache
+system.list
--- /dev/null
+setup.h
+substit
#if USE_TIMEDATE
#include "wx/date.h"
+#include <wx/intl.h>
#include <stdio.h>
#include <string.h>
#define ABBR_LENGTH 3
-static const char *dayname[] = {"Sunday","Monday","Tuesday","Wednesday",
- "Thursday","Friday","Saturday"} ;
+static const char *dayname[] = {
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+};
-static const char *mname[] = {"January","February","March","April","May",
- "June","July","August","September","October","November","December"};
+static const char *mname[] = {
+ "January", "February", "March", "April", "May", "June", "July", "August",
+ "September", "October", "November", "December"
+};
static int GauDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
{
case wxDAY:
if ( (day_of_week < 1) || (day_of_week > 7) )
- strcpy(buf,"invalid day");
+ strcpy(buf, _("invalid day"));
else
- strncpy( buf, dayname[day_of_week-1],
+ strncpy( buf, _(dayname[day_of_week-1]),
(DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
return wxString(buf);
case wxMONTH:
if ( (month < 1) || (month > 12) )
- strcpy(buf,"invalid month");
+ strcpy(buf, _("invalid month"));
else
- strncpy( buf, mname[month-1],
+ strncpy( buf, _(mname[month-1]),
(DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
return wxString(buf);
if ( (month < 1) || (month > 12) || (day_of_week < 0) ||
(day_of_week > 7) )
{
- strcpy(buf,"invalid date");
+ strcpy(buf, _("invalid date"));
return wxString(buf);
}
- strncpy( buf, dayname[day_of_week-1],
+ strncpy( buf, _(dayname[day_of_week-1]),
(DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
strcat( buf, ", ");
- strncat( buf, mname[month-1],
+ strncat( buf, _(mname[month-1]),
(DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
strcat( buf, " ");
sprintf( buf+strlen(buf), "%d, %d", day, abs(year) );
if (year < 0)
- strcat(buf," B.C.");
+ strcat(buf,_(" B.C."));
return wxString(buf);
case wxEUROPEAN:
if ( (month < 1) || (month > 12) || (day_of_week < 0) ||
(day_of_week > 7) )
{
- strcpy(buf,"invalid date");
+ strcpy(buf, _("invalid date"));
return wxString(buf);
}
sprintf(buf,"%d ", day);
- strncat(buf, mname[month-1],
+ strncat(buf, _(mname[month-1]),
(DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
sprintf( buf+strlen(buf), " %d", abs(year) );
if (year < 0)
- strcat(buf," B.C.");
+ strcat(buf, _(" B.C."));
return wxString(buf);
case wxMDY:
default:
if (day==0 || month==0 || year==0)
- strcpy(buf,"invalid date");
+ strcpy(buf, _("invalid date"));
else
sprintf( buf+strlen(buf), "%1d/%1d/%02d", month, day,
(DisplayOptions & wxNO_CENTURY) && (abs(year) > 1899)
#include "wx/menu.h"
#include "wx/list.h"
#include "wx/filedlg.h"
+#include <wx/intl.h>
#endif
#ifdef __WXGTK__
if (!docTemplate)
return FALSE;
- char *tmp = wxFileSelector("Save as", docTemplate->GetDirectory(), GetFilename(),
+ char *tmp = wxFileSelector(_("Save as"), docTemplate->GetDirectory(), GetFilename(),
docTemplate->GetDefaultExtension(), docTemplate->GetFileFilter(),
wxSAVE|wxOVERWRITE_PROMPT, GetDocumentWindow());
if (wxTheApp->GetAppName() != "")
msgTitle = wxTheApp->GetAppName();
else
- msgTitle = wxString("File error");
+ msgTitle = wxString(_("File error"));
ofstream store(file);
if (store.fail() || store.bad())
{
- (void)wxMessageBox("Sorry, could not open this file for saving.", msgTitle, wxOK | wxICON_EXCLAMATION,
+ (void)wxMessageBox(_("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION,
GetDocumentWindow());
// Saving error
return FALSE;
}
if (SaveObject(store)==FALSE)
{
- (void)wxMessageBox("Sorry, could not save this file.", msgTitle, wxOK | wxICON_EXCLAMATION,
+ (void)wxMessageBox(_("Sorry, could not save this file."), msgTitle, wxOK | wxICON_EXCLAMATION,
GetDocumentWindow());
// Saving error
return FALSE;
if (wxTheApp->GetAppName() != "")
msgTitle = wxTheApp->GetAppName();
else
- msgTitle = wxString("File error");
+ msgTitle = wxString(_("File error"));
ifstream store(file);
if (store.fail() || store.bad())
{
- (void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION,
+ (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
return FALSE;
}
if (LoadObject(store)==FALSE)
{
- (void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION,
+ (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
return FALSE;
}
}
else
{
- buf = "unnamed";
+ buf = _("unnamed");
return TRUE;
}
}
if (wxTheApp->GetAppName() != "")
msgTitle = wxTheApp->GetAppName();
else
- msgTitle = wxString("Warning");
+ msgTitle = wxString(_("Warning"));
- sprintf(buf, "Do you want to save changes to document %s?", (const char *)title);
+ sprintf(buf, _("Do you want to save changes to document %s?"), (const char *)title);
int res = wxMessageBox(buf, msgTitle, wxYES_NO|wxCANCEL|wxICON_QUESTION,
GetDocumentWindow());
if (res == wxNO)
#endif
preview = new wxPostScriptPrintPreview(printout, view->OnCreatePrintout());
- wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), "Print Preview",
+ wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), _("Print Preview"),
wxPoint(100, 100), wxSize(600, 650));
frame->Centre(wxBOTH);
frame->Initialize();
bool wxDocManager::MakeDefaultName(wxString& name)
{
char buf[256];
- sprintf(buf, "unnamed%d", m_defaultDocumentNameCounter);
+ sprintf(buf, _("unnamed%d"), m_defaultDocumentNameCounter);
m_defaultDocumentNameCounter ++;
name = buf;
return TRUE;
// Omit final "|"
descrBuf[len-1] = 0;
- char *pathTmp = wxFileSelector("Select a file", "", "", "", descrBuf, 0, wxTheApp->GetTopWindow());
+ char *pathTmp = wxFileSelector(_("Select a file"), "", "", "", descrBuf, 0, wxTheApp->GetTopWindow());
delete[] descrBuf;
if (pathTmp)
{
if (!temp)
return NULL;
- char *pathTmp = wxFileSelector("Select a file", "", "",
+ char *pathTmp = wxFileSelector(_("Select a file"), "", "",
temp->GetDefaultExtension(),
temp->GetFileFilter(),
0, wxTheApp->GetTopWindow());
return temp;
}
- wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData("Select a document template", "Templates", n,
+ wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document template"), _("Templates"), n,
strings, data);
delete[] strings;
delete[] data;
n ++;
}
}
- wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData("Select a document view", "Views", n,
+ wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document view"), _("Views"), n,
strings, data);
delete[] strings;
delete[] data;
{
wxCommand *command = (wxCommand *)m_currentCommand->Data();
wxString commandName(command->GetName());
- if (commandName == "") commandName = "Unnamed command";
+ if (commandName == "") commandName = _("Unnamed command");
bool canUndo = command->CanUndo();
if (canUndo)
- buf = wxString("&Undo ") + commandName;
+ buf = wxString(_("&Undo ")) + commandName;
else
- buf = wxString("Can't &Undo ") + commandName;
+ buf = wxString(_("Can't &Undo ")) + commandName;
m_commandEditMenu->SetLabel(wxID_UNDO, buf);
m_commandEditMenu->Enable(wxID_UNDO, canUndo);
{
wxCommand *redoCommand = (wxCommand *)m_currentCommand->Next()->Data();
wxString redoCommandName(redoCommand->GetName());
- if (redoCommandName == "") redoCommandName = "Unnamed command";
- buf = wxString("&Redo ") + redoCommandName;
+ if (redoCommandName == "") redoCommandName = _("Unnamed command");
+ buf = wxString(_("&Redo ")) + redoCommandName;
m_commandEditMenu->SetLabel(wxID_REDO, buf);
m_commandEditMenu->Enable(wxID_REDO, TRUE);
}
else
{
- m_commandEditMenu->SetLabel(wxID_REDO, "&Redo");
+ m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo"));
m_commandEditMenu->Enable(wxID_REDO, FALSE);
}
}
else
{
- m_commandEditMenu->SetLabel(wxID_UNDO, "&Undo");
+ m_commandEditMenu->SetLabel(wxID_UNDO, _("&Undo"));
m_commandEditMenu->Enable(wxID_UNDO, FALSE);
if (m_commands.Number() == 0)
{
- m_commandEditMenu->SetLabel(wxID_REDO, "&Redo");
+ m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo"));
m_commandEditMenu->Enable(wxID_REDO, FALSE);
}
else
// we've undone to the start of the list, but can redo the first.
wxCommand *redoCommand = (wxCommand *)m_commands.First()->Data();
wxString redoCommandName(redoCommand->GetName());
- if (!redoCommandName) redoCommandName = "Unnamed command";
- buf = wxString("&Redo ") + redoCommandName;
+ if (!redoCommandName) redoCommandName = _("Unnamed command");
+ buf = wxString(_("&Redo ")) + redoCommandName;
m_commandEditMenu->SetLabel(wxID_REDO, buf);
m_commandEditMenu->Enable(wxID_REDO, TRUE);
}
{
if (m_fileHistoryN == 0)
m_fileMenu->AppendSeparator();
- m_fileMenu->Append(wxID_FILE1+m_fileHistoryN, "[EMPTY]");
+ m_fileMenu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]"));
m_fileHistoryN ++;
}
// Shuffle filenames down
#endif
#include "wx/dynarray.h"
+#include <wx/intl.h>
#include <stdlib.h>
#include <string.h> // for memmove
// add item at the given position
void wxBaseArray::Insert(long lItem, uint uiIndex)
{
- wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Insert" );
+ wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Insert") );
Grow();
// removes item from array (by index)
void wxBaseArray::Remove(uint uiIndex)
{
- wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Remove" );
+ wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Remove") );
memmove(&m_pItems[uiIndex], &m_pItems[uiIndex + 1],
(m_uiCount - uiIndex - 1)*sizeof(long));
int iIndex = Index(lItem);
wxCHECK_RET( iIndex != NOT_FOUND,
- "removing inexistent item in wxArray::Remove" );
+ _("removing inexistent item in wxArray::Remove") );
Remove((uint)iIndex);
}
int fd = open(szFileName, O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access);
if ( fd == -1 ) {
- wxLogSysError("can't create file '%s'", szFileName);
+ wxLogSysError(_("can't create file '%s'"), szFileName);
return FALSE;
}
else {
int fd = open(szFileName, flags, access);
if ( fd == -1 ) {
- wxLogSysError("can't open file '%s'", szFileName);
+ wxLogSysError(_("can't open file '%s'"), szFileName);
return FALSE;
}
else {
{
if ( IsOpened() ) {
if ( close(m_fd) == -1 ) {
- wxLogSysError("can't close file descriptor %d", m_fd);
+ wxLogSysError(_("can't close file descriptor %d"), m_fd);
m_fd = fd_invalid;
return FALSE;
}
int iRc = ::read(m_fd, pBuf, nCount);
if ( iRc == -1 ) {
- wxLogSysError("can't read from file descriptor %d", m_fd);
+ wxLogSysError(_("can't read from file descriptor %d"), m_fd);
return wxInvalidOffset;
}
else
int iRc = ::write(m_fd, pBuf, nCount);
if ( iRc == -1 ) {
- wxLogSysError("can't write to file descriptor %d", m_fd);
+ wxLogSysError(_("can't write to file descriptor %d"), m_fd);
m_error = TRUE;
return 0;
}
// @@@ fsync() is not ANSI (BSDish)
// if ( fsync(m_fd) == -1 ) { // TODO
if (TRUE) {
- wxLogSysError("can't flush file descriptor %d", m_fd);
+ wxLogSysError(_("can't flush file descriptor %d"), m_fd);
return FALSE;
}
}
break;
default:
- wxFAIL_MSG("unknown seek origin");
+ wxFAIL_MSG(_("unknown seek origin"));
}
int iRc = lseek(m_fd, ofs, flag);
if ( iRc == -1 ) {
- wxLogSysError("can't seek on file descriptor %d", m_fd);
+ wxLogSysError(_("can't seek on file descriptor %d"), m_fd);
return wxInvalidOffset;
}
else
int iRc = tell(m_fd);
if ( iRc == -1 ) {
- wxLogSysError("can't get seek position on file descriptor %d", m_fd);
+ wxLogSysError(_("can't get seek position on file descriptor %d"), m_fd);
return wxInvalidOffset;
}
else
#endif //_MSC_VER
if ( iRc == -1 ) {
- wxLogSysError("can't find length of file on file descriptor %d", m_fd);
+ wxLogSysError(_("can't find length of file on file descriptor %d"), m_fd);
return wxInvalidOffset;
}
else
return FALSE;
case -1:
- wxLogSysError("can't determine if the end of file is reached on "
- "descriptor %d", m_fd);
+ wxLogSysError(_("can't determine if the end of file is reached on \
+descriptor %d"), m_fd);
break;
default:
- wxFAIL_MSG("invalid eof() return value.");
+ wxFAIL_MSG(_("invalid eof() return value."));
}
return TRUE;
m_file.Close();
if ( wxFile::Exists(m_strName) && remove(m_strName) != 0 ) {
- wxLogSysError("can't remove file '%s'", m_strName.c_str());
+ wxLogSysError(_("can't remove file '%s'"), m_strName.c_str());
return FALSE;
}
if ( rename(m_strTemp, m_strName) != 0 ) {
- wxLogSysError("can't commit changes to file '%s'", m_strName.c_str());
+ wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str());
return FALSE;
}
{
m_file.Close();
if ( remove(m_strTemp) != 0 )
- wxLogSysError("can't remove temporary file '%s'", m_strTemp.c_str());
+ wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str());
}
wxString strName = path.Name();
if ( strName.IsEmpty() ) {
// setting the value of a group is an error
- wxASSERT_MSG( IsEmpty(szValue), "can't set value of a group!" );
+ wxASSERT_MSG( IsEmpty(szValue), _("can't set value of a group!") );
// ... except if it's empty in which case it's a way to force it's creation
m_pCurrentGroup->SetDirty();
#endif
#include "wx/utils.h"
+#include <wx/intl.h>
#include <ctype.h>
#include <stdio.h>
return buf;
}
}
- cerr << "wxWindows: error finding temporary file name.\n";
+ cerr << _("wxWindows: error finding temporary file name.\n");
if (buf) buf[0] = 0;
return NULL;
#endif
{
// we assume that it's not empty
wxCHECK_MSG( !IsEmpty(pszFile), FALSE,
- "empty file name in wxFindFileInPath");
+ _("empty file name in wxFindFileInPath"));
// skip path separator in the beginning of the file name if present
if ( wxIsPathSeparator(*pszFile) )
wxString *pstrName,
wxString *pstrExt)
{
- wxCHECK_RET( pszFileName, "NULL file name in wxSplitPath" );
+ wxCHECK_RET( pszFileName, _("NULL file name in wxSplitPath") );
const char *pDot = strrchr(pszFileName, FILE_SEP_EXT);
const char *pSepUnix = strrchr(pszFileName, FILE_SEP_PATH_UNIX);
// (we're using an object because we have several return paths)
NoTransErr noTransErr;
- wxLogVerbose("looking for catalog '%s' in path '%s'.",
+ wxLogVerbose(_("looking for catalog '%s' in path '%s'."),
szName, strPath.c_str());
wxString strFullName;
if ( !wxFindFileInPath(&strFullName, strPath, strFile) ) {
- wxLogWarning("catalog file for domain '%s' not found.", szName);
+ wxLogWarning(_("catalog file for domain '%s' not found."), szName);
return FALSE;
}
// open file
- wxLogVerbose("using catalog '%s' from '%s'.",
+ wxLogVerbose(_("using catalog '%s' from '%s'."),
szName, strFullName.c_str());
wxFile fileMsg(strFullName);
if ( !bValid ) {
// it's either too short or has incorrect magic number
- wxLogWarning("'%s' is not a valid message catalog.", strFullName.c_str());
+ wxLogWarning(_("'%s' is not a valid message catalog."), strFullName.c_str());
wxDELETEA(m_pData);
return FALSE;
szLocale = szName;
m_pszOldLocale = setlocale(LC_ALL, szLocale);
if ( m_pszOldLocale == NULL )
- wxLogError("locale '%s' can not be set.", szLocale);
+ wxLogError(_("locale '%s' can not be set."), szLocale);
// the short name will be used to look for catalog files as well,
// so we need something here
wxSuppressTransErrors();
if ( szDomain != NULL )
- wxLogWarning("string '%s' not found in domain '%s' for locale '%s'.",
+ wxLogWarning(_("string '%s' not found in domain '%s' for locale '%s'."),
szOrigString, szDomain, m_strLocale.c_str());
else
- wxLogWarning("string '%s' not found in locale '%s'.",
+ wxLogWarning(_("string '%s' not found in locale '%s'."),
szOrigString, m_strLocale.c_str());
}
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
+#include <wx/intl.h>
#endif
#include "wx/layout.h"
// failed, so we can print a specific diagnostic message.
if (noFailures > 0)
{
- wxDebugMsg("wxWindow::Layout() failed.\n");
+ wxDebugMsg(_("wxWindow::Layout() failed.\n"));
}
*/
// Now set the sizes and positions of the children, and
{
if (!m_sizerParent)
{
- wxMessageBox("wxExpandSizer has no parent!", "Sizer error", wxOK);
+ wxMessageBox(_("wxExpandSizer has no parent!"), _("Sizer error"), wxOK);
return TRUE;
}
#include "wx/defs.h"
#include "wx/list.h"
#include "wx/utils.h"
+#include <wx/intl.h>
#endif
// Sun CC compatibility (interference with xview/pkg.h, apparently...)
{
if (!current->key.string)
{
- wxFatalError ("wxList: string key not present, probably did not Append correctly!");
+ wxFatalError (_("wxList: string key not present, probably did not Append correctly!"));
break;
}
if (strcmp (current->key.string, key) == 0)
break;
default:
- wxFAIL_MSG("unknown log level in wxLog::DoLog");
+ wxFAIL_MSG(_("unknown log level in wxLog::DoLog"));
}
}
void wxLog::DoLogString(const char *WXUNUSED(szString))
{
- wxFAIL_MSG("DoLogString must be overrided if it's called.");
+ wxFAIL_MSG(_("DoLogString must be overrided if it's called."));
}
void wxLog::Flush()
break;
default:
- wxFAIL_MSG("unknown log level in wxLogGui::DoLog");
+ wxFAIL_MSG(_("unknown log level in wxLogGui::DoLog"));
}
}
// create menu
wxMenuBar *pMenuBar = new wxMenuBar;
wxMenu *pMenu = new wxMenu;
- pMenu->Append(Menu_Save, "&Save...");
- pMenu->Append(Menu_Clear, "C&lear");
+ pMenu->Append(Menu_Save, _("&Save..."));
+ pMenu->Append(Menu_Clear, _("C&lear"));
pMenu->AppendSeparator();
- pMenu->Append(Menu_Close, "&Close");
- pMenuBar->Append(pMenu, "&Log");
+ pMenu->Append(Menu_Close, _("&Close"));
+ pMenuBar->Append(pMenu, _("&Log"));
SetMenuBar(pMenuBar);
// @@ what about status bar? needed (for menu prompts)?
wxString strMsg;
strMsg.Printf(_("Append log to file '%s' "
"(choosing [No] will overwrite it)?"), szFileName);
- switch ( wxMessageBox(strMsg, "Question", wxYES_NO | wxCANCEL) ) {
+ switch ( wxMessageBox(strMsg, _("Question"), wxYES_NO | wxCANCEL) ) {
case wxYES:
bAppend = TRUE;
break;
return;
default:
- wxFAIL_MSG("invalid message box return value");
+ wxFAIL_MSG(_("invalid message box return value"));
}
if ( bAppend ) {
// -------------------------
#ifdef __WXGTK__
// @@@@ TODO: no GetNumberOfLines and GetLineText in wxGTK yet
- wxLogError("Sorry, this function is not implemented under GTK");
+ wxLogError(_("Sorry, this function is not implemented under GTK"));
#else
int nLines = m_pTextCtrl->GetNumberOfLines();
for ( int nLine = 0; bOk && nLine < nLines; nLine++ ) {
bool wxPostScriptDC::PrinterDialog(wxWindow *parent)
{
- wxPostScriptPrintDialog dialog (parent, "Printer Settings", wxPoint(150, 150), wxSize(400, 400), wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL);
+ wxPostScriptPrintDialog dialog (parent, _("Printer Settings"), wxPoint(150, 150), wxSize(400, 400), wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL);
m_ok = (dialog.ShowModal () == wxID_OK) ;
if (!m_ok)
}
else if ((m_filename == "") && (wxThePrintSetupData->GetPrinterMode() == PS_FILE))
{
- char *file = wxSaveFileSelector ("PostScript", "ps");
+ char *file = wxSaveFileSelector (_("PostScript"), "ps");
if (!file)
{
m_ok = FALSE;
{
const char *paperType = wxThePrintSetupData->GetPaperName();
if (!paperType)
- paperType = "A4 210 x 297 mm";
+ paperType = _("A4 210 x 297 mm");
wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType);
if (!paper)
- paper = wxThePrintPaperDatabase->FindPaperType("A4 210 x 297 mm");
+ paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm"));
if (paper)
{
*width = paper->widthPixels;
{
const char *paperType = wxThePrintSetupData->GetPaperName();
if (!paperType)
- paperType = "A4 210 x 297 mm";
+ paperType = _("A4 210 x 297 mm");
wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType);
if (!paper)
- paper = wxThePrintPaperDatabase->FindPaperType("A4 210 x 297 mm");
+ paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm"));
if (paper)
{
*width = paper->widthMM;
(void) new wxStaticText(this, -1, _("Printer Command: "), wxPoint(5, yPos));
wxTextCtrl *text_prt = new wxTextCtrl(this, wxID_PRINTER_COMMAND, wxThePrintSetupData->GetPrinterCommand(), wxPoint(100, yPos), wxSize(100, -1));
- (void) new wxStaticText(this, -1, "Printer Options: ", wxPoint(210, yPos));
+ (void) new wxStaticText(this, -1, _("Printer Options: "), wxPoint(210, yPos));
wxTextCtrl *text0 = new wxTextCtrl(this, wxID_PRINTER_OPTIONS, wxThePrintSetupData->GetPrinterOptions(), wxPoint(305, yPos), wxSize(150, -1));
yPos += 40;
#endif
wxString orientation[2];
- orientation[0] = "Portrait";
- orientation[1] = "Landscape";
+ orientation[0] = _("Portrait");
+ orientation[1] = _("Landscape");
wxRadioBox *radio0 = new wxRadioBox(this, wxID_PRINTER_ORIENTATION, "Orientation: ", wxPoint(5, yPos), wxSize(-1,-1),
2,orientation,2,0);
wxGetResource ("wxWindows", "PSView", &wxThePrintSetupData->previewCommand);
wxString print_modes[3];
- print_modes[0] = "Send to Printer";
- print_modes[1] = "Print to File";
- print_modes[2] = "Preview Only";
+ print_modes[0] = _("Send to Printer");
+ print_modes[1] = _("Print to File");
+ print_modes[2] = _("Preview Only");
int features = (wxThePrintSetupData->GetPrintPreviewCommand() && *wxThePrintSetupData->GetPrintPreviewCommand()) ? 3 : 2;
- wxRadioBox *radio1 = new wxRadioBox(this, wxID_PRINTER_MODES, "PostScript:",
+ wxRadioBox *radio1 = new wxRadioBox(this, wxID_PRINTER_MODES, _("PostScript:"),
wxPoint(150, yPos), wxSize(-1,-1), features, print_modes, features, 0);
#ifdef __WXMSW__
yPos += 90;
- (void) new wxStaticText(this, -1, "X Scaling", wxPoint(5, yPos));
+ (void) new wxStaticText(this, -1, _("X Scaling"), wxPoint(5, yPos));
/* wxTextCtrl *text1 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_SCALE, buf, wxPoint(100, yPos), wxSize(100, -1));
sprintf (buf, "%.2f", wx_printer_scale_y);
- (void) new wxStaticText(this, -1, "Y Scaling", wxPoint(220, yPos));
+ (void) new wxStaticText(this, -1, _("Y Scaling"), wxPoint(220, yPos));
/* wxTextCtrl *text2 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_SCALE, buf, wxPoint(320, yPos), wxSize(100, -1));
yPos += 25;
- (void) new wxStaticText(this, -1, "X Translation", wxPoint(5, yPos));
+ (void) new wxStaticText(this, -1, _("X Translation"), wxPoint(5, yPos));
sprintf (buf, "%.2ld", wx_printer_translate_x);
/* wxTextCtrl *text3 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_TRANS, buf, wxPoint(100, yPos), wxSize(100, -1));
- (void) new wxStaticText(this, -1, "Y Translation", wxPoint(220, yPos));
+ (void) new wxStaticText(this, -1, _("Y Translation"), wxPoint(220, yPos));
sprintf (buf, "%.2ld", wx_printer_translate_y);
/* wxTextCtrl *text4 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_TRANS, buf, wxPoint(320, yPos), wxSize(100, -1));
// PostScript printer settings
// RETAINED FOR BACKWARD COMPATIBILITY
-void wxSetPrinterCommand(char *cmd)
+void wxSetPrinterCommand(const char *cmd)
{
wxThePrintSetupData->SetPrinterCommand(cmd);
}
-void wxSetPrintPreviewCommand(char *cmd)
+void wxSetPrintPreviewCommand(const char *cmd)
{
wxThePrintSetupData->SetPrintPreviewCommand(cmd);
}
-void wxSetPrinterOptions(char *flags)
+void wxSetPrinterOptions(const char *flags)
{
wxThePrintSetupData->SetPrinterOptions(flags);
}
-void wxSetPrinterFile(char *f)
+void wxSetPrinterFile(const char *f)
{
wxThePrintSetupData->SetPrinterFile(f);
}
wxThePrintSetupData->SetPrinterMode(mode);
}
-void wxSetAFMPath(char *f)
+void wxSetAFMPath(const char *f)
{
wxThePrintSetupData->SetAFMPath(f);
}
delete[] printerFile;
}
-void wxPrintSetupData::SetPrinterCommand(char *cmd)
+void wxPrintSetupData::SetPrinterCommand(const char *cmd)
{
if (cmd == printerCommand)
return;
printerCommand = NULL;
}
-void wxPrintSetupData::SetPrintPreviewCommand(char *cmd)
+void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd)
{
if (cmd == previewCommand)
return;
previewCommand = NULL;
}
-void wxPrintSetupData::SetPaperName(char *name)
+void wxPrintSetupData::SetPaperName(const char *name)
{
if (name == paperName)
return;
paperName = NULL;
}
-void wxPrintSetupData::SetPrinterOptions(char *flags)
+void wxPrintSetupData::SetPrinterOptions(const char *flags)
{
if (printerFlags == flags)
return;
printerFlags = NULL;
}
-void wxPrintSetupData::SetPrinterFile(char *f)
+void wxPrintSetupData::SetPrinterFile(const char *f)
{
if (f == printerFile)
return;
printerMode = mode;
}
-void wxPrintSetupData::SetAFMPath(char *f)
+void wxPrintSetupData::SetAFMPath(const char *f)
{
if (f == afmPath)
return;
wxThePrintSetupData->SetPrintPreviewCommand(PS_VIEWER_PROG);
wxThePrintSetupData->SetPrinterOrientation(PS_PORTRAIT);
wxThePrintSetupData->SetPrinterMode(PS_PREVIEW);
- wxThePrintSetupData->SetPaperName("A4 210 x 297 mm");
+ wxThePrintSetupData->SetPaperName(_("A4 210 x 297 mm"));
// Could have a .ini file to read in some defaults
// - and/or use environment variables, e.g. WXWIN
* Paper size database for PostScript
*/
-wxPrintPaperType::wxPrintPaperType(char *name, int wmm, int hmm, int wp, int hp)
+wxPrintPaperType::wxPrintPaperType(const char *name, int wmm, int hmm, int wp, int hp)
{
widthMM = wmm;
heightMM = hmm;
// Heck, someone will know how to make it hunky-dory...
// JACS 25/5/95
- AddPaperType("A4 210 x 297 mm", 210, 297, 595, 842);
- AddPaperType("A3 297 x 420 mm", 297, 420, 842, 1191);
- AddPaperType("Letter 8 1/2 x 11 in", 216, 279, 612, 791);
- AddPaperType("Legal 8 1/2 x 14 in", 216, 356, 612, 1009);
+ AddPaperType(_("A4 210 x 297 mm"), 210, 297, 595, 842);
+ AddPaperType(_("A3 297 x 420 mm"), 297, 420, 842, 1191);
+ AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279, 612, 791);
+ AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356, 612, 1009);
}
void wxPrintPaperDatabase::ClearDatabase(void)
Clear();
}
-void wxPrintPaperDatabase::AddPaperType(char *name, int wmm, int hmm, int wp, int hp)
+void wxPrintPaperDatabase::AddPaperType(const char *name, int wmm, int hmm, int wp, int hp)
{
Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp));
}
void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), char *message)
{
- wxMessageBox(message, "Printing Error", wxOK, parent);
+ wxMessageBox(message, _("Printing Error"), wxOK, parent);
}
/*
bool wxPrintout::OnBeginDocument(int WXUNUSED(startPage), int WXUNUSED(endPage))
{
- return GetDC()->StartDoc("Printing");
+ return GetDC()->StartDoc(_("Printing"));
}
void wxPrintout::OnEndDocument(void)
int y = 5;
int gap = 5;
- closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, "Close",
+ closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, _("Close"),
wxPoint(x, y), wxSize(buttonWidth, buttonHeight));
x += gap + buttonWidth;
if (buttonFlags & wxPREVIEW_PRINT)
{
- printButton = new wxButton(this, wxID_PREVIEW_PRINT, "Print...", wxPoint(x, y),
+ printButton = new wxButton(this, wxID_PREVIEW_PRINT, _("Print..."), wxPoint(x, y),
wxSize(buttonWidth, buttonHeight));
x += gap + buttonWidth;
}
if (!previewCanvas)
{
- wxMessageBox("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!",
- "Print Preview Failure", wxOK);
+ wxMessageBox(_("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"),
+ _("Print Preview Failure"), wxOK);
return FALSE;
}
previewCanvas->GetSize(&canvasWidth, &canvasHeight);
{
if (previewBitmap)
delete previewBitmap;
- wxMessageBox("Sorry, not enough memory to create a preview.", "Print Preview Failure", wxOK);
+ wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
return FALSE;
}
}
if (!previewPrintout->OnBeginDocument(printData.GetFromPage(), printData.GetToPage()))
{
- wxMessageBox("Could not start document preview.", "Print Preview Failure", wxOK);
+ wxMessageBox(_("Could not start document preview."), _("Print Preview Failure"), wxOK);
memoryDC.SelectObject(wxNullBitmap);
char buf[200];
if (maxPage != 0)
- sprintf(buf, "Page %d of %d", pageNum, maxPage);
+ sprintf(buf, _("Page %d of %d"), pageNum, maxPage);
else
- sprintf(buf, "Page %d", pageNum);
+ sprintf(buf, _("Page %d"), pageNum);
if (previewFrame)
previewFrame->SetStatusText(buf);
void wxWarning(char *msg)
{
- wxMessageBox(msg, "Warning", wxOK);
+ wxMessageBox(msg, _("Warning"), wxOK);
}
#if !USE_SHARED_LIBRARY
PrologDatabase db;
if (!db.ReadPrologFromString(data))
{
- wxWarning("Ill-formed resource file syntax.");
+ wxWarning(_("Ill-formed resource file syntax."));
return FALSE;
}
if (id == 0)
{
char buf[300];
- sprintf(buf, "Could not resolve control class or id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)",
+ sprintf(buf, _("Could not resolve control class or id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)"),
(const char*) expr1->StringValue());
wxWarning(buf);
delete controlItem;
if (id == 0)
{
char buf[300];
- sprintf(buf, "Could not resolve menu id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)",
+ sprintf(buf, _("Could not resolve menu id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)"),
(const char*) idExpr->StringValue());
wxWarning(buf);
}
else
{
char buf[300];
- sprintf(buf, "#define %s must be an integer.", name);
+ sprintf(buf, _("#define %s must be an integer."), name);
wxWarning(buf);
delete[] name;
delete[] value;
if (!wxResourceParseIncludeFile(actualName, table))
{
char buf[400];
- sprintf(buf, "Could not find resource include file %s.", actualName);
+ sprintf(buf, _("Could not find resource include file %s."), actualName);
wxWarning(buf);
}
delete[] name;
else if (strcmp(wxResourceBuffer, "static") != 0)
{
char buf[300];
- strcpy(buf, "Found ");
+ strcpy(buf, _("Found "));
strncat(buf, wxResourceBuffer, 30);
- strcat(buf, ", expected static, #include or #define\nwhilst parsing resource.");
+ strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
wxWarning(buf);
return FALSE;
}
// char
if (!wxGetResourceToken(fd))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (strcmp(wxResourceBuffer, "char") != 0)
{
- wxWarning("Expected 'char' whilst parsing resource.");
+ wxWarning(_("Expected 'char' whilst parsing resource."));
return FALSE;
}
// *name
if (!wxGetResourceToken(fd))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (wxResourceBuffer[0] != '*')
{
- wxWarning("Expected '*' whilst parsing resource.");
+ wxWarning(_("Expected '*' whilst parsing resource."));
return FALSE;
}
char nameBuf[100];
// =
if (!wxGetResourceToken(fd))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (strcmp(wxResourceBuffer, "=") != 0)
{
- wxWarning("Expected '=' whilst parsing resource.");
+ wxWarning(_("Expected '=' whilst parsing resource."));
return FALSE;
}
// String
if (!wxGetResourceToken(fd))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (!db.ReadPrologFromString(wxResourceBuffer))
{
char buf[300];
- sprintf(buf, "%s: ill-formed resource file syntax.", nameBuf);
+ sprintf(buf, _("%s: ill-formed resource file syntax."), nameBuf);
wxWarning(buf);
return FALSE;
}
if (!found)
{
char buf[200];
- sprintf(buf, "Unrecognized style %s whilst parsing resource.", word);
+ sprintf(buf, _("Unrecognized style %s whilst parsing resource."), word);
wxWarning(buf);
return 0;
}
if (!item->GetType() || strcmp(item->GetType(), "wxBitmap") != 0)
{
char buf[300];
- sprintf(buf, "%s not a bitmap resource specification.", resource);
+ sprintf(buf, _("%s not a bitmap resource specification."), resource);
wxWarning(buf);
return NULL;
}
if (!item)
{
char buf[400];
- sprintf(buf, "Failed to find XBM resource %s.\nForgot to use wxResourceLoadBitmapData?", name);
+ sprintf(buf, _("Failed to find XBM resource %s.\nForgot to use wxResourceLoadBitmapData?"), name);
wxWarning(buf);
return NULL;
}
bitmap = new wxBitmap((char *)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
#else
- wxWarning("No XBM facility available!");
+ wxWarning(_("No XBM facility available!"));
#endif
break;
}
if (!item)
{
char buf[400];
- sprintf(buf, "Failed to find XPM resource %s.\nForgot to use wxResourceLoadBitmapData?", name);
+ sprintf(buf, _("Failed to find XPM resource %s.\nForgot to use wxResourceLoadBitmapData?"), name);
wxWarning(buf);
return NULL;
}
bitmap = new wxBitmap(item->GetValue1());
#else
- wxWarning("No XPM facility available!");
+ wxWarning(_("No XPM facility available!"));
#endif
break;
}
else
{
char buf[300];
- sprintf(buf, "Bitmap resource specification %s not found.", resource);
+ sprintf(buf, _("Bitmap resource specification %s not found."), resource);
wxWarning(buf);
return NULL;
}
if (!item->GetType() || strcmp(item->GetType(), "wxIcon") != 0)
{
char buf[300];
- sprintf(buf, "%s not an icon resource specification.", resource);
+ sprintf(buf, _("%s not an icon resource specification."), resource);
wxWarning(buf);
return NULL;
}
if (!item)
{
char buf[400];
- sprintf(buf, "Failed to find XBM resource %s.\nForgot to use wxResourceLoadIconData?", name);
+ sprintf(buf, _("Failed to find XBM resource %s.\nForgot to use wxResourceLoadIconData?"), name);
wxWarning(buf);
return NULL;
}
icon = new wxIcon((char *)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
#else
- wxWarning("No XBM facility available!");
+ wxWarning(_("No XBM facility available!"));
#endif
break;
}
if (!item)
{
char buf[400];
- sprintf(buf, "Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?", name);
+ sprintf(buf, _("Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?"), name);
wxWarning(buf);
return NULL;
}
icon = new wxIcon((char **)item->GetValue1());
#else
- wxWarning("No XPM facility available!");
+ wxWarning(_("No XPM facility available!"));
#endif
*/
- wxWarning("No XPM icon facility available!");
+ wxWarning(_("No XPM icon facility available!"));
break;
}
default:
else
{
char buf[300];
- sprintf(buf, "Icon resource specification %s not found.", resource);
+ sprintf(buf, _("Icon resource specification %s not found."), resource);
wxWarning(buf);
return NULL;
}
else
{
char buf[300];
- sprintf(buf, "#define %s must be an integer.", name);
+ sprintf(buf, _("#define %s must be an integer."), name);
wxWarning(buf);
delete[] name;
delete[] value;
if (!wxResourceParseIncludeFile(actualName, table))
{
char buf[400];
- sprintf(buf, "Could not find resource include file %s.", actualName);
+ sprintf(buf, _("Could not find resource include file %s."), actualName);
wxWarning(buf);
}
delete[] name;
else if (strcmp(wxResourceBuffer, "static") != 0)
{
char buf[300];
- strcpy(buf, "Found ");
+ strcpy(buf, _("Found "));
strncat(buf, wxResourceBuffer, 30);
- strcat(buf, ", expected static, #include or #define\nwhilst parsing resource.");
+ strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
wxWarning(buf);
return FALSE;
}
// char
if (!wxGetResourceTokenString(s))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (strcmp(wxResourceBuffer, "char") != 0)
{
- wxWarning("Expected 'char' whilst parsing resource.");
+ wxWarning(_("Expected 'char' whilst parsing resource."));
return FALSE;
}
// *name
if (!wxGetResourceTokenString(s))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (wxResourceBuffer[0] != '*')
{
- wxWarning("Expected '*' whilst parsing resource.");
+ wxWarning(_("Expected '*' whilst parsing resource."));
return FALSE;
}
char nameBuf[100];
// =
if (!wxGetResourceTokenString(s))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (strcmp(wxResourceBuffer, "=") != 0)
{
- wxWarning("Expected '=' whilst parsing resource.");
+ wxWarning(_("Expected '=' whilst parsing resource."));
return FALSE;
}
// String
if (!wxGetResourceTokenString(s))
{
- wxWarning("Unexpected end of file whilst parsing resource.");
+ wxWarning(_("Unexpected end of file whilst parsing resource."));
*eof = TRUE;
return FALSE;
}
if (!db.ReadPrologFromString(wxResourceBuffer))
{
char buf[300];
- sprintf(buf, "%s: ill-formed resource file syntax.", nameBuf);
+ sprintf(buf, _("%s: ill-formed resource file syntax."), nameBuf);
wxWarning(buf);
return FALSE;
}
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/string.h"
+#include <wx/intl.h>
#endif
#include <ctype.h>
{
wxASSERT( str.GetStringData()->IsValid() );
- wxCHECK_RET( nIndex <= m_nCount, "bad index in wxArrayString::Insert" );
+ wxCHECK_RET( nIndex <= m_nCount, ("bad index in wxArrayString::Insert") );
Grow();
// removes item from array (by index)
void wxArrayString::Remove(size_t nIndex)
{
- wxCHECK_RET( nIndex <= m_nCount, "bad index in wxArrayString::Remove" );
+ wxCHECK_RET( nIndex <= m_nCount, _("bad index in wxArrayString::Remove") );
// release our lock
Item(nIndex).GetStringData()->Unlock();
int iIndex = Index(sz);
wxCHECK_RET( iIndex != NOT_FOUND,
- "removing inexistent element in wxArrayString::Remove" );
+ _("removing inexistent element in wxArrayString::Remove") );
Remove((size_t)iIndex);
}
case Type_Unix: nUnix++; break; \
case Type_Dos: nDos++; break; \
case Type_Mac: nMac++; break; \
- default: wxFAIL_MSG("unknown line terminator"); \
+ default: wxFAIL_MSG(_("unknown line terminator")); \
}
uint n;
// interpret the results (@@ far from being even 50% fool proof)
if ( nDos + nUnix + nMac == 0 ) {
// no newlines at all
- wxLogWarning("'%s' is probably a binary file.", m_strFile.c_str());
+ wxLogWarning(_("'%s' is probably a binary file."), m_strFile.c_str());
}
else {
#define GREATER_OF(t1, t2) n##t1 == n##t2 ? typeDefault \
wxTempFile fileTmp(m_strFile);
if ( !fileTmp.IsOpened() ) {
- wxLogError("can't write file '%s' to disk.", m_strFile.c_str());
+ wxLogError(_("can't write file '%s' to disk."), m_strFile.c_str());
return FALSE;
}
#include "wx/time.h"
#include "wx/date.h"
#include "wx/utils.h"
+#include <wx/intl.h>
#if USE_IOSTREAMH
#include <iostream.h>
/*
if (IsDST()) setError(NIHCL_BADTIME,DEFAULT,
date.dayOfMonth(),date.nameOfMonth(),date.year(),
- h,m,s,(dst?"DST":""));
+ h,m,s,(dst?_("DST"):""));
*/
}
sec += TIME_ZONE; // adjust to GMT
if (Format == wx12h)
if (GetHour() <= 12)
- strcat(timeBuf,"am");
+ strcat(timeBuf,_("am"));
else
- strcat(timeBuf,"pm");
+ strcat(timeBuf,_("pm"));
return timeBuf;
}
strm << ' ' << ((hh <= 12) ? hh : hh-12) << ':'
<< setfill('0') << setw(2) << GetMinute() << ':'
<< setfill('0') << setw(2) << GetSecond() << ' ';
- if (hh < 12) strm << "am";
- else strm << "pm";
+ if (hh < 12) strm << _("am");
+ else strm << _("pm");
}
wxTime::wxTime(OIOin& strm)
if ( !m_includeList.Member(val) )
{
char buf[512];
- sprintf(buf, "%s is invalid.", (const char *)val);
- wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+ sprintf(buf, _("%s is invalid."), (const char *)val);
+ wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return FALSE;
}
}
if ( m_excludeList.Member(val) )
{
char buf[512];
- sprintf(buf, "%s is invalid.", (const char *)val);
- wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+ sprintf(buf, _("%s is invalid."), (const char *)val);
+ wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return FALSE;
}
}
if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() )
{
char buf[512];
- sprintf(buf, "%s should only contain ASCII characters.", (const char *)val);
- wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+ sprintf(buf, _("%s should only contain ASCII characters."), (const char *)val);
+ wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return FALSE;
}
if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) )
{
char buf[512];
- sprintf(buf, "%s should only contain alphabetic characters.", (const char *)val);
- wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+ sprintf(buf, _("%s should only contain alphabetic characters."), (const char *)val);
+ wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return FALSE;
}
if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val))
{
char buf[512];
- sprintf(buf, "%s should only contain alphabetic or numeric characters.", (const char *)val);
- wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+ sprintf(buf, _("%s should only contain alphabetic or numeric characters."), (const char *)val);
+ wxMessageBox(buf,_("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return FALSE;
}
if ( (m_validatorStyle & wxFILTER_NUMERIC) && !val.IsNumber())
{
char buf[512];
- sprintf(buf, "%s should be numeric.", (const char *)val);
- wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+ sprintf(buf, _("%s should be numeric."), (const char *)val);
+ wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return FALSE;
}
#include <wx/stream.h>
#include <wx/zstream.h>
#include <wx/utils.h>
+#include <wx/intl.h>
#include "../zlib/zlib.h" // don't change this, Robert
#ifdef __BORLANDC__
err = deflate(&m_deflate, Z_FINISH);
if (err != Z_STREAM_END) {
- wxDebugMsg("wxZlibOutputStream: an error occured while we was closing "
- "the stream.\n");
+ wxDebugMsg(_("wxZlibOutputStream: an error occured while we was closing "
+ "the stream.\n"));
return;
}
{
wxBeginBusyCursor();
- wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(okButtonX, buttonY));
+ wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY));
int bw, bh;
okButton->GetSize(&bw, &bh);
- (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(okButtonX + bw + 10, buttonY));
- (void) new wxButton(this, wxID_ADD_CUSTOM, "Add to custom colours",
+ (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 10, buttonY));
+ (void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"),
wxPoint(customButtonX, buttonY));
int sliderX = singleCustomColourRect.x + singleCustomColourRect.width + sectionSpacing;
#include "wx/dcclient.h"
#include "wx/choice.h"
#include "wx/checkbox.h"
+#include <wx/intl.h>
#endif
#include <string.h>
}
wxGenericFontDialog::wxGenericFontDialog(wxWindow *parent, wxFontData *data):
- wxDialog(parent, -1, "Font", wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+ wxDialog(parent, -1, _("Font"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
{
m_useEvents = FALSE;
Create(parent, data);
}
pointSizeChoice = new wxChoice(this, wxID_FONT_SIZE, wxPoint(210, y), wxSize(50, -1), 40, pointSizes);
- underLineCheckBox = new wxCheckBox(this, wxID_FONT_UNDERLINE, "Underline", wxPoint(280, y));
+ underLineCheckBox = new wxCheckBox(this, wxID_FONT_UNDERLINE, _("Underline"), wxPoint(280, y));
int rectY;
pointSizeChoice->GetPosition(&x, &rectY); //NL mod
int by = (fontRect.y + fontRect.height + 5);
- wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(5, by));
- (void) new wxButton(this, wxID_OK, "Cancel", wxPoint(50, by));
+ wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, by));
+ (void) new wxButton(this, wxID_OK, _("Cancel"), wxPoint(50, by));
familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) );
styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle()));
float cy = (float)(fontRect.y + (fontRect.height/2.0) - (h/2.0));
dc.SetTextForeground(fontData.fontColour);
dc.SetClippingRegion( fontRect.x, fontRect.y, (long)(fontRect.width-2.0), (long)(fontRect.height-2.0));
- dc.DrawText("ABCDEFGabcdefg12345", (long)cx, (long)cy);
+ dc.DrawText(_("ABCDEFGabcdefg12345"), (long)cx, (long)cy);
dc.DestroyClippingRegion();
dc.SetFont(wxNullFont);
}
m_text->SetFocus();
*/
/*
- char *res = wxGetTextFromUser( "Enter new name:", "", s );
+ char *res = wxGetTextFromUser( _("Enter new name:"), "", s );
if (res)
{
m_dirty = TRUE;
#include "wx/dc.h"
#include "wx/app.h"
#include "wx/msgdlg.h"
+#include <wx/intl.h>
#endif
#include "wx/generic/printps.h"
if (!printout->OnBeginDocument(printData.GetFromPage(), printData.GetToPage()))
{
wxEndBusyCursor();
- wxMessageBox("Could not start printing.", "Print Error", wxOK, parent);
+ wxMessageBox(_("Could not start printing."), _("Print Error"), wxOK, parent);
break;
}
if (abortIt)
{
const char *paperType = wxThePrintSetupData->GetPaperName();
if (!paperType)
- paperType = "A4 210 x 297 mm";
+ paperType = _("A4 210 x 297 mm");
wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType);
if (!paper)
- paper = wxThePrintPaperDatabase->FindPaperType("A4 210 x 297 mm");
+ paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm"));
if (paper)
{
previewPrintout->SetPPIScreen(100, 100);
#include "wx/radiobox.h"
#include "wx/filedlg.h"
#include "wx/choice.h"
+#include <wx/intl.h>
#endif
#include "wx/generic/prntdlgg.h"
wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
- wxDialog(parent, -1, "Print", wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+ wxDialog(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
{
if ( data )
printData = *data;
int yPos = 5;
int xPos = 5;
- wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
- (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
+ wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
+ (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
- setupButton = new wxButton(this, wxPRINTID_SETUP, "Setup...", wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
+ setupButton = new wxButton(this, wxPRINTID_SETUP, _("Setup..."), wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
okButton->SetDefault();
okButton->SetFocus();
yPos += 35;
wxString choices[2];
- choices[0] = "All";
- choices[1] = "Pages";
+ choices[0] = _("All");
+ choices[1] = _("Pages");
- rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, "Print Range",
+ rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, _("Print Range"),
wxPoint(5, yPos), wxSize(-1, -1), 2, choices, 2);
rangeRadioBox->SetSelection(1);
int textWidth = 40;
spacing = 10;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "From:", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("From:"), wxPoint(xPos, yPos));
xPos += staticWidth;
fromText = new wxTextCtrl(this, wxPRINTID_FROM, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
xPos += spacing + textWidth;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "To:", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("To:"), wxPoint(xPos, yPos));
xPos += staticWidth;
toText = new wxTextCtrl(this, wxPRINTID_TO, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
xPos += spacing + textWidth;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Copies:", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Copies:"), wxPoint(xPos, yPos));
xPos += spacing + staticWidth;
noCopiesText = new wxTextCtrl(this, wxPRINTID_COPIES, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
yPos += 30;
xPos = 5;
- printToFileCheckBox = new wxCheckBox(this, wxPRINTID_PRINTTOFILE, "Print to File", wxPoint(xPos, yPos));
+ printToFileCheckBox = new wxCheckBox(this, wxPRINTID_PRINTTOFILE, _("Print to File"), wxPoint(xPos, yPos));
Fit();
Centre(wxBOTH);
{
wxThePrintSetupData->SetPrinterMode(PS_FILE);
- char *f = wxFileSelector("PostScript file",
+ char *f = wxFileSelector(_("PostScript file"),
wxPathOnly(wxThePrintSetupData->GetPrinterFile()),
wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()),
"ps", "*.ps", 0, this);
*/
wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data):
- wxDialog(parent, -1, "Print Setup", wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+ wxDialog(parent, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
{
if ( data )
printData = *data;
int yPos = 5;
int xPos = 5;
- wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
+ wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
xPos += buttonWidth + spacing;
- (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
+ (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
okButton->SetDefault();
okButton->SetFocus();
paperTypeChoice = CreatePaperTypeChoice(&xPos, &yPos);
wxString choices[2];
- choices[0] = "Portrait";
- choices[1] = "Landscape";
+ choices[0] = _("Portrait");
+ choices[1] = _("Landscape");
- orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, "Orientation",
+ orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
wxPoint(xPos, yPos), wxSize(-1, -1), 2, choices, 2);
orientationRadioBox->SetSelection(0);
xPos += 200;
- colourCheckBox = new wxCheckBox(this, wxPRINTID_PRINTCOLOUR, "Print in colour", wxPoint(xPos, yPos));
+ colourCheckBox = new wxCheckBox(this, wxPRINTID_PRINTCOLOUR, _("Print in colour"), wxPoint(xPos, yPos));
xPos = 5;
yPos += 60;
int textWidth = 120;
spacing = 10;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Printer command:", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer command:"), wxPoint(xPos, yPos));
xPos += staticWidth;
printerCommandText = new wxTextCtrl(this, wxPRINTID_COMMAND, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
xPos += textWidth + spacing;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Printer options:", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer options:"), wxPoint(xPos, yPos));
xPos += staticWidth;
printerOptionsText = new wxTextCtrl(this, wxPRINTID_OPTIONS, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
sel = i;
}
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Paper size", wxPoint(*x, *y));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y));
*y += 25;
wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(300, -1), n,
}
wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data):
- wxDialog(parent, -1, "Page Setup", wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE)
+ wxDialog(parent, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE)
{
if ( data )
pageData = *data;
int yPos = 5;
int xPos = 5;
- wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
- (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
+ wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
+ (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
- printerButton = new wxButton(this, wxPRINTID_SETUP, "Printer...", wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
+ printerButton = new wxButton(this, wxPRINTID_SETUP, _("Printer..."), wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
if ( !pageData.GetEnablePrinter() )
printerButton->Enable(FALSE);
// if (printData.GetEnableHelp())
-// wxButton *helpButton = new wxButton(this, (wxFunction)wxGenericPageSetupHelpProc, "Help", -1, -1, buttonWidth, buttonHeight);
+// wxButton *helpButton = new wxButton(this, (wxFunction)wxGenericPageSetupHelpProc, _("Help"), -1, -1, buttonWidth, buttonHeight);
okButton->SetDefault();
okButton->SetFocus();
xPos = 5;
wxString choices[2];
- choices[0] = "Portrait";
- choices[1] = "Landscape";
- orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, "Orientation",
+ choices[0] = _("Portrait");
+ choices[1] = _("Landscape");
+ orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
wxPoint(xPos, yPos), wxSize(-1, -1), 2, choices, 2);
orientationRadioBox->SetSelection(0);
int textWidth = 60;
spacing = 10;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Left margin (mm):", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Left margin (mm):"), wxPoint(xPos, yPos));
xPos += staticWidth;
marginLeftText = new wxTextCtrl(this, wxPRINTID_LEFTMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
xPos += textWidth + spacing;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Right margin (mm):", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Right margin (mm):"), wxPoint(xPos, yPos));
xPos += staticWidth;
marginRightText = new wxTextCtrl(this, wxPRINTID_RIGHTMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
yPos += 35;
xPos = 5;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Top margin (mm):", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Top margin (mm):"), wxPoint(xPos, yPos));
xPos += staticWidth;
marginTopText = new wxTextCtrl(this, wxPRINTID_TOPMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
xPos += textWidth + spacing;
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Bottom margin (mm):", wxPoint(xPos, yPos));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Bottom margin (mm):"), wxPoint(xPos, yPos));
xPos += staticWidth;
marginBottomText = new wxTextCtrl(this, wxPRINTID_BOTTOMMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
sel = i;
}
- (void) new wxStaticText(this, wxPRINTID_STATIC, "Paper size", wxPoint(*x, *y));
+ (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y));
*y += 25;
wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(300, -1), n,
control->SetSelected((sel != 0)); // TODO ??
else
{
- wxMessageBox("Could not find tab for id", "Error", wxOK);
+ wxMessageBox(_("Could not find tab for id"), _("Error"), wxOK);
return;
}
void wxTreeCtrl::DeleteItem( long item )
{
wxGenericTreeItem *pItem = FindItem( item );
- wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteItem: no such pItem." );
+ wxCHECK_RET( pItem != NULL, _("wxTreeCtrl::DeleteItem: no such pItem.") );
pItem->m_parent->m_children.DeleteObject(pItem);
void wxTreeCtrl::DeleteChildren( long item )
{
wxGenericTreeItem *pItem = FindItem( item );
- wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteChildren: no such pItem." );
+ wxCHECK_RET( pItem != NULL, _("wxTreeCtrl::DeleteChildren: no such pItem.") );
pItem->m_children.Clear();
{
wxGenericTreeItem *pItem = FindItem(itemId);
if ( !pItem ) {
- wxLogDebug("Can't select an item %d which doesn't exist.", itemId);
+ wxLogDebug(_("Can't select an item %d which doesn't exist."), itemId);
return FALSE;
}
{
if (!wxApp::GetInitializerFunction())
{
- printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" );
+ printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
return 0;
};
if (!wxTheApp)
{
- printf( "wxWindows error: wxTheApp == NULL\n" );
+ printf( _("wxWindows error: wxTheApp == NULL\n") );
return 0;
};
#endif
#include "wx/combobox.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// data
wxNode *node = m_clientData.Nth( n );
if (!node)
{
- wxFAIL_MSG("wxComboBox::Delete wrong index");
+ wxFAIL_MSG(_("wxComboBox::Delete wrong index"));
}
else
m_clientData.DeleteNode( node );
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
+#include <wx/intl.h>
#include "gdk/gdkprivate.h"
if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) {
- if(wxMessageBox("File exists. Overwrite?","Confirm",wxYES_NO)!=wxYES)
+ if(wxMessageBox(_("File exists. Overwrite?"),
+ _("Confirm"), wxYES_NO) != wxYES)
return;
}
m_dialogStyle = style;
m_filterIndex = 1;
- m_widget = gtk_file_selection_new( "File selection" );
+ m_widget = gtk_file_selection_new(_("File selection"));
int x = (gdk_screen_width () - 400) / 2;
int y = (gdk_screen_height () - 400) / 2;
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
};
-
-
-
#include "wx/dynarray.h"
#include "wx/listbox.h"
#include "wx/utils.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// data
wxNode *node = m_clientData.Nth( n );
if (!node)
{
- wxFAIL_MSG("wxListBox::Delete wrong index");
+ wxFAIL_MSG(_("wxListBox::Delete wrong index"));
}
else
m_clientData.DeleteNode( node );
#include "wx/dialog.h"
#include "wx/menu.h"
#include "wx/gtk/win_gtk.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
{
if (!child->IsKindOf(CLASSINFO(wxMDIChildFrame)))
{
- wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame");
+ wxFAIL_MSG(_("wxNotebook::AddChild: Child has to be wxMDIChildFrame"));
return;
};
wxString s;
wxMDIChildFrame* mdi_child = (wxMDIChildFrame*) child;
s = mdi_child->m_title;
- if (s.IsNull()) s = "MDI child";
+ if (s.IsNull()) s = _("MDI child");
GtkWidget *label_widget;
label_widget = gtk_label_new( s );
void wxMenuItem::Check( bool check )
{
- wxCHECK_RET( IsCheckable(), "can't check uncheckable item!" )
+ wxCHECK_RET( IsCheckable(), _("can't check uncheckable item!") )
m_isChecked = check;
gtk_check_menu_item_set_state( (GtkCheckMenuItem*)m_menuItem, (gint)check );
node = node->Next();
};
- wxLogDebug("wxMenu::FindItem: item %d not found.", id);
+ wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
return NULL;
}
node = node->Next();
};
- wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?");
+ wxCHECK_MSG( node != NULL, -1, _("wxNotebook: no selection?"));
return page->m_id;
};
node = node->Next();
};
- wxLogDebug( "Notebook page %d not found!", page );
+ wxLogDebug( _("Notebook page %d not found!"), page );
return NULL;
};
void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
{
- wxFAIL_MSG("wxNotebook::SetPageSize not implemented");
+ wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented"));
};
void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
{
- wxFAIL_MSG("wxNotebook::SetPadding not implemented");
+ wxFAIL_MSG(_("wxNotebook::SetPadding not implemented"));
};
bool wxNotebook::DeleteAllPages()
};
wxCHECK_MSG(page != NULL, FALSE,
- "Can't add a page whose parent is not the notebook!");
+ _("Can't add a page whose parent is not the notebook!"));
// then set the attributes
page->m_text = text;
wxNotebookPage *page = new wxNotebookPage();
page->m_id = GetPageCount();
- page->m_label = (GtkLabel *)gtk_label_new("Handle");
+ page->m_label = (GtkLabel *)gtk_label_new(_("Handle"));
page->m_client = win;
gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), win->m_widget,
(GtkWidget *)page->m_label);
if (!page->m_page)
{
- wxLogFatalError( "Notebook page creation error" );
+ wxLogFatalError( _("Notebook page creation error") );
return;
}
#endif
#include "wx/toolbar.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// wxToolBarTool
void wxToolBar::ClearTools(void)
{
- wxFAIL_MSG("wxToolBar::ClearTools not implemented");
+ wxFAIL_MSG(_("wxToolBar::ClearTools not implemented"));
};
void wxToolBar::Realize(void)
void wxToolBar::ToggleTool(int WXUNUSED(toolIndex), bool WXUNUSED(toggle) )
{
- wxFAIL_MSG("wxToolBar::ToggleTool not implemented");
+ wxFAIL_MSG(_("wxToolBar::ToggleTool not implemented"));
};
wxObject *wxToolBar::GetToolClientData(int index) const
#include "wx/textctrl.h"
#include "wx/utils.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// wxTextCtrl
bool wxTextCtrl::LoadFile( const wxString &WXUNUSED(file) )
{
- wxFAIL_MSG("wxTextCtrl::LoadFile not implemented");
+ wxFAIL_MSG(_("wxTextCtrl::LoadFile not implemented"));
return FALSE;
};
bool wxTextCtrl::SaveFile( const wxString &WXUNUSED(file) )
{
- wxFAIL_MSG("wxTextCtrl::SaveFile not implemented");
+ wxFAIL_MSG(_("wxTextCtrl::SaveFile not implemented"));
return FALSE;
};
void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
{
- wxFAIL_MSG("wxTextCtrl::ShowPosition not implemented");
+ wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented"));
};
long wxTextCtrl::GetInsertionPoint(void) const
#include "wx/mdi.h"
#include "wx/notebook.h"
#include "wx/statusbr.h"
+#include <wx/intl.h>
//#include "wx/treectrl.h"
#include "gdk/gdkkeysyms.h"
#include <math.h>
long style, const wxString &name )
{
if (m_needParent && (parent == NULL))
- wxFatalError( "Need complete parent.", name );
+ wxFatalError( _("Need complete parent."), name );
m_widget = NULL;
m_hasVMT = FALSE;
if (!m_parent)
{
- printf( "wxWindow::SetSize error.\n" );
+ printf( _("wxWindow::SetSize error.\n") );
return;
}
if (child->GetValidator() && /* child->GetValidator()->Ok() && */
!child->GetValidator()->TransferToWindow() )
{
- wxMessageBox( "Application Error", "Could not transfer data to window", wxOK|wxICON_EXCLAMATION );
+ wxMessageBox( _("Application Error"), _("Could not transfer data to window"), wxOK|wxICON_EXCLAMATION );
return FALSE;
};
node = node->Next();
wxString winName;
if (GetName() == "")
- winName = "unnamed";
+ winName = _("unnamed");
else
winName = GetName();
- wxDebugMsg("Constraint(s) not satisfied for window of type %s, name %s:\n", (const char *)windowClass, (const char *)winName);
+ wxDebugMsg(_("Constraint(s) not satisfied for window of type %s, name %s:\n"), (const char *)windowClass, (const char *)winName);
if (!constr->left.GetDone())
- wxDebugMsg(" unsatisfied 'left' constraint.\n");
+ wxDebugMsg(_(" unsatisfied 'left' constraint.\n"));
if (!constr->right.GetDone())
- wxDebugMsg(" unsatisfied 'right' constraint.\n");
+ wxDebugMsg(_(" unsatisfied 'right' constraint.\n"));
if (!constr->width.GetDone())
- wxDebugMsg(" unsatisfied 'width' constraint.\n");
+ wxDebugMsg(_(" unsatisfied 'width' constraint.\n"));
if (!constr->height.GetDone())
- wxDebugMsg(" unsatisfied 'height' constraint.\n");
- wxDebugMsg("Please check constraints: try adding AsIs() constraints.\n");
+ wxDebugMsg(_(" unsatisfied 'height' constraint.\n"));
+ wxDebugMsg(_("Please check constraints: try adding AsIs() constraints.\n"));
}
if (recurse)
{
if (!wxApp::GetInitializerFunction())
{
- printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" );
+ printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
return 0;
};
if (!wxTheApp)
{
- printf( "wxWindows error: wxTheApp == NULL\n" );
+ printf( _("wxWindows error: wxTheApp == NULL\n") );
return 0;
};
#endif
#include "wx/combobox.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// data
wxNode *node = m_clientData.Nth( n );
if (!node)
{
- wxFAIL_MSG("wxComboBox::Delete wrong index");
+ wxFAIL_MSG(_("wxComboBox::Delete wrong index"));
}
else
m_clientData.DeleteNode( node );
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
+#include <wx/intl.h>
#include "gdk/gdkprivate.h"
if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) {
- if(wxMessageBox("File exists. Overwrite?","Confirm",wxYES_NO)!=wxYES)
+ if(wxMessageBox(_("File exists. Overwrite?"),
+ _("Confirm"), wxYES_NO) != wxYES)
return;
}
m_dialogStyle = style;
m_filterIndex = 1;
- m_widget = gtk_file_selection_new( "File selection" );
+ m_widget = gtk_file_selection_new(_("File selection"));
int x = (gdk_screen_width () - 400) / 2;
int y = (gdk_screen_height () - 400) / 2;
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
};
-
-
-
#include "wx/dynarray.h"
#include "wx/listbox.h"
#include "wx/utils.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// data
wxNode *node = m_clientData.Nth( n );
if (!node)
{
- wxFAIL_MSG("wxListBox::Delete wrong index");
+ wxFAIL_MSG(_("wxListBox::Delete wrong index"));
}
else
m_clientData.DeleteNode( node );
#include "wx/dialog.h"
#include "wx/menu.h"
#include "wx/gtk/win_gtk.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
{
if (!child->IsKindOf(CLASSINFO(wxMDIChildFrame)))
{
- wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame");
+ wxFAIL_MSG(_("wxNotebook::AddChild: Child has to be wxMDIChildFrame"));
return;
};
wxString s;
wxMDIChildFrame* mdi_child = (wxMDIChildFrame*) child;
s = mdi_child->m_title;
- if (s.IsNull()) s = "MDI child";
+ if (s.IsNull()) s = _("MDI child");
GtkWidget *label_widget;
label_widget = gtk_label_new( s );
void wxMenuItem::Check( bool check )
{
- wxCHECK_RET( IsCheckable(), "can't check uncheckable item!" )
+ wxCHECK_RET( IsCheckable(), _("can't check uncheckable item!") )
m_isChecked = check;
gtk_check_menu_item_set_state( (GtkCheckMenuItem*)m_menuItem, (gint)check );
node = node->Next();
};
- wxLogDebug("wxMenu::FindItem: item %d not found.", id);
+ wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
return NULL;
}
node = node->Next();
};
- wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?");
+ wxCHECK_MSG( node != NULL, -1, _("wxNotebook: no selection?"));
return page->m_id;
};
node = node->Next();
};
- wxLogDebug( "Notebook page %d not found!", page );
+ wxLogDebug( _("Notebook page %d not found!"), page );
return NULL;
};
void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
{
- wxFAIL_MSG("wxNotebook::SetPageSize not implemented");
+ wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented"));
};
void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
{
- wxFAIL_MSG("wxNotebook::SetPadding not implemented");
+ wxFAIL_MSG(_("wxNotebook::SetPadding not implemented"));
};
bool wxNotebook::DeleteAllPages()
};
wxCHECK_MSG(page != NULL, FALSE,
- "Can't add a page whose parent is not the notebook!");
+ _("Can't add a page whose parent is not the notebook!"));
// then set the attributes
page->m_text = text;
wxNotebookPage *page = new wxNotebookPage();
page->m_id = GetPageCount();
- page->m_label = (GtkLabel *)gtk_label_new("Handle");
+ page->m_label = (GtkLabel *)gtk_label_new(_("Handle"));
page->m_client = win;
gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), win->m_widget,
(GtkWidget *)page->m_label);
if (!page->m_page)
{
- wxLogFatalError( "Notebook page creation error" );
+ wxLogFatalError( _("Notebook page creation error") );
return;
}
#endif
#include "wx/toolbar.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// wxToolBarTool
void wxToolBar::ClearTools(void)
{
- wxFAIL_MSG("wxToolBar::ClearTools not implemented");
+ wxFAIL_MSG(_("wxToolBar::ClearTools not implemented"));
};
void wxToolBar::Realize(void)
void wxToolBar::ToggleTool(int WXUNUSED(toolIndex), bool WXUNUSED(toggle) )
{
- wxFAIL_MSG("wxToolBar::ToggleTool not implemented");
+ wxFAIL_MSG(_("wxToolBar::ToggleTool not implemented"));
};
wxObject *wxToolBar::GetToolClientData(int index) const
#include "wx/textctrl.h"
#include "wx/utils.h"
+#include <wx/intl.h>
//-----------------------------------------------------------------------------
// wxTextCtrl
bool wxTextCtrl::LoadFile( const wxString &WXUNUSED(file) )
{
- wxFAIL_MSG("wxTextCtrl::LoadFile not implemented");
+ wxFAIL_MSG(_("wxTextCtrl::LoadFile not implemented"));
return FALSE;
};
bool wxTextCtrl::SaveFile( const wxString &WXUNUSED(file) )
{
- wxFAIL_MSG("wxTextCtrl::SaveFile not implemented");
+ wxFAIL_MSG(_("wxTextCtrl::SaveFile not implemented"));
return FALSE;
};
void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
{
- wxFAIL_MSG("wxTextCtrl::ShowPosition not implemented");
+ wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented"));
};
long wxTextCtrl::GetInsertionPoint(void) const
#include "wx/mdi.h"
#include "wx/notebook.h"
#include "wx/statusbr.h"
+#include <wx/intl.h>
//#include "wx/treectrl.h"
#include "gdk/gdkkeysyms.h"
#include <math.h>
long style, const wxString &name )
{
if (m_needParent && (parent == NULL))
- wxFatalError( "Need complete parent.", name );
+ wxFatalError( _("Need complete parent."), name );
m_widget = NULL;
m_hasVMT = FALSE;
if (!m_parent)
{
- printf( "wxWindow::SetSize error.\n" );
+ printf( _("wxWindow::SetSize error.\n") );
return;
}
if (child->GetValidator() && /* child->GetValidator()->Ok() && */
!child->GetValidator()->TransferToWindow() )
{
- wxMessageBox( "Application Error", "Could not transfer data to window", wxOK|wxICON_EXCLAMATION );
+ wxMessageBox( _("Application Error"), _("Could not transfer data to window"), wxOK|wxICON_EXCLAMATION );
return FALSE;
};
node = node->Next();
wxString winName;
if (GetName() == "")
- winName = "unnamed";
+ winName = _("unnamed");
else
winName = GetName();
- wxDebugMsg("Constraint(s) not satisfied for window of type %s, name %s:\n", (const char *)windowClass, (const char *)winName);
+ wxDebugMsg(_("Constraint(s) not satisfied for window of type %s, name %s:\n"), (const char *)windowClass, (const char *)winName);
if (!constr->left.GetDone())
- wxDebugMsg(" unsatisfied 'left' constraint.\n");
+ wxDebugMsg(_(" unsatisfied 'left' constraint.\n"));
if (!constr->right.GetDone())
- wxDebugMsg(" unsatisfied 'right' constraint.\n");
+ wxDebugMsg(_(" unsatisfied 'right' constraint.\n"));
if (!constr->width.GetDone())
- wxDebugMsg(" unsatisfied 'width' constraint.\n");
+ wxDebugMsg(_(" unsatisfied 'width' constraint.\n"));
if (!constr->height.GetDone())
- wxDebugMsg(" unsatisfied 'height' constraint.\n");
- wxDebugMsg("Please check constraints: try adding AsIs() constraints.\n");
+ wxDebugMsg(_(" unsatisfied 'height' constraint.\n"));
+ wxDebugMsg(_("Please check constraints: try adding AsIs() constraints.\n"));
}
if (recurse)