diff -ur rapidsvn-0.6.0/src/about_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/about_dlg.cpp --- rapidsvn-0.6.0/src/about_dlg.cpp 2004-05-24 11:45:17.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/about_dlg.cpp 2004-08-10 12:29:59.000000000 -0400 @@ -27,7 +27,7 @@ #include "res/bitmaps/logo.xpm" AboutDlg::AboutDlg (wxWindow * parent) - : wxDialog (parent, -1, "", wxDefaultPosition) + : wxDialog (parent, -1, wxString(), wxDefaultPosition) { wxString title; title.Printf (_("About %s"), APPLICATION_NAME); @@ -35,7 +35,7 @@ std::vector schemasVector = svn::Url::supportedSchemas (); - wxString schemasStr (""); + wxString schemasStr; std::vector::const_iterator it; bool first = true; for (it = schemasVector.begin (); it != schemasVector.end (); it++) @@ -43,10 +43,10 @@ if (first) first = false; else - schemasStr += "\n"; + schemasStr += wxString("\n", wxConvLocal); std::string schema = *it; - schemasStr += "- "; - schemasStr += schema.c_str (); + schemasStr += wxString("- ", wxConvLocal); + schemasStr += wxString(schema.c_str (), wxConvLocal); } @@ -69,34 +69,34 @@ SVN_VER_MICRO); wxString wx; - wx.Printf ("wxWindows %d.%d.%d", + wx.Printf (_("wxWindows %d.%d.%d"), wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER); wxString copy; - copy.Printf ("%s\n" // version - "%s\n" // milestone - "\n%s\n\n" // copyright - "%s\n" // for more information - "http://rapidsvn.tigris.org\n", + copy.Printf (_("%s\n" // version + "%s\n" // milestone + "\n%s\n\n" // copyright + "%s\n" // for more information + "http://rapidsvn.tigris.org\n"), version.c_str (), milestone.c_str (), RAPIDSVN_COPYRIGHT, _("For more information see:")); wxString built; - built.Printf ("%s\n" // built with - "%s\n" // subversion - "\n" - "%s", // wxwindows + built.Printf (_("%s\n" // built with + "%s\n" // subversion + "\n" + "%s"), // wxwindows _("Built with:"), subversion.c_str (), wx.c_str ()); wxString schemas; - schemas.Printf ("%s\n" // "supported url schemas" - "%s", // list of schemas + schemas.Printf (_("%s\n" // "supported url schemas" + "%s"), // list of schemas _("Supported URL schemas: "), schemasStr.c_str ()); diff -ur rapidsvn-0.6.0/src/action.cpp rapidsvn-0.6.0-unicode-fixed/src/action.cpp --- rapidsvn-0.6.0/src/action.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/action.cpp 2004-08-10 12:40:01.000000000 -0400 @@ -26,7 +26,7 @@ // subversion api #include "svn_wc.h" -static const char * +static const wxChar * ACTION_NAMES [] = { _("Add"), // svn_wc_notify_add, @@ -275,7 +275,7 @@ if (result) { - wxSetWorkingDirectory (m->path.c_str ()); + wxSetWorkingDirectory (wxString(m->path.c_str (), wxConvLocal)); } return result; @@ -290,13 +290,13 @@ const char * Action::GetName () const { - return m->name.c_str (); + return m->name.ToAscii (); } void Action::SetName (const char * name) { - m->name = name; + m->name = wxString(name, wxConvLocal); } void @@ -336,7 +336,7 @@ if (revision.kind () == revision.HEAD) revStr = _("HEAD"); else - revStr.Printf ("%" SVN_REVNUM_T_FMT, revision.revnum ()); + revStr.Printf (_("%" SVN_REVNUM_T_FMT), revision.revnum ()); wxString msg; msg.Printf (_("Get file %s rev. %s"), diff -ur rapidsvn-0.6.0/src/auth_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/auth_dlg.cpp --- rapidsvn-0.6.0/src/auth_dlg.cpp 2004-05-24 11:45:19.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/auth_dlg.cpp 2004-08-10 12:41:37.000000000 -0400 @@ -43,7 +43,7 @@ new wxStaticText (window, -1, _("User")); textUser = new wxTextCtrl ( - window, -1, "", wxDefaultPosition, wxDefaultSize, 0, + window, -1, _(""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NONE, &Username)); } @@ -51,7 +51,7 @@ new wxStaticText (window, -1, _("Password")); wxTextCtrl* textPassword = new wxTextCtrl ( - window, -1, "", wxPoint(-1,-1), + window, -1, _(""), wxPoint(-1,-1), wxDefaultSize, wxTE_PASSWORD, wxTextValidator (wxFILTER_NONE, &Password)); @@ -117,13 +117,13 @@ const char * AuthDlg::GetUsername () const { - return m->Username.c_str (); + return m->Username.ToAscii (); } const char * AuthDlg::GetPassword () const { - return m->Password.c_str (); + return m->Password.ToAscii (); } /* ----------------------------------------------------------------- diff -ur rapidsvn-0.6.0/src/bookmarks.cpp rapidsvn-0.6.0-unicode-fixed/src/bookmarks.cpp --- rapidsvn-0.6.0/src/bookmarks.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/bookmarks.cpp 2004-08-10 12:45:44.000000000 -0400 @@ -70,13 +70,13 @@ void AddBookmark (const char * name_) { - wxString name (name_); + wxString name (name_, wxConvLocal); TrimString (name); if (!svn::Url::isValid (name_)) { - wxFileName filename (name_); + wxFileName filename (name); name = filename.GetFullPath (wxPATH_NATIVE); } @@ -93,7 +93,7 @@ bool RemoveBookmark (const char * path) { - int index = bookmarks.Index (path); + int index = bookmarks.Index (wxString(path, wxConvLocal)); if (index == wxNOT_FOUND) return false; @@ -171,7 +171,7 @@ Bookmarks::GetBookmark (const size_t index) const { wxString bookmark = m->bookmarks[index]; - return bookmark.c_str (); + return bookmark.ToAscii(); } svn::Context * @@ -187,7 +187,7 @@ svn::Context * Bookmarks::GetContext (const char * path) { - int index = m->bookmarks.Index (path); + int index = m->bookmarks.Index (wxString(path, wxConvLocal)); if (index == wxNOT_FOUND) return 0; diff -ur rapidsvn-0.6.0/src/cert_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/cert_dlg.cpp --- rapidsvn-0.6.0/src/cert_dlg.cpp 2004-05-24 11:45:19.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/cert_dlg.cpp 2004-08-10 12:50:42.000000000 -0400 @@ -33,7 +33,7 @@ typedef struct { wxUint32 failure; - const char * descr; + const wxChar * descr; } FailureEntry; static const FailureEntry CERT_FAILURES [] = @@ -66,7 +66,7 @@ wxStaticText * labelTitle = new wxStaticText ( this, -1, _("There were errors validating the server certificate.\nDo you want to trust this certificate?")); - wxString failureStr (""); + wxString failureStr (_("")); const int count = sizeof (CERT_FAILURES)/sizeof (CERT_FAILURES[0]); for (int i=0; i < count; i++) @@ -74,7 +74,7 @@ if ((CERT_FAILURES[i].failure & trustData.failures) != 0) { failureStr += CERT_FAILURES[i].descr; - failureStr += "\n"; + failureStr += _("\n"); } } @@ -94,23 +94,23 @@ certSizer->Add (new wxStaticText ( this, -1, _("Hostname:"))); certSizer->Add (new wxStaticText ( - this, -1, trustData.hostname.c_str ())); + this, -1, wxString(trustData.hostname.c_str(), wxConvLocal) ) ); certSizer->Add (new wxStaticText ( this, -1, _("Issue:"))); certSizer->Add (new wxStaticText ( - this, -1, trustData.issuerDName.c_str ())); + this, -1, wxString(trustData.issuerDName.c_str(), wxConvLocal) )); certSizer->Add (new wxStaticText ( this, -1, _("Valid from:"))); certSizer->Add (new wxStaticText ( - this, -1, trustData.validFrom.c_str ())); + this, -1, wxString(trustData.validFrom.c_str(), wxConvLocal) )); certSizer->Add (new wxStaticText ( this, -1, _("Valid until:"))); certSizer->Add (new wxStaticText ( - this, -1, trustData.validUntil.c_str ())); + this, -1, wxString(trustData.validUntil.c_str(), wxConvLocal) )); certSizer->Add (new wxStaticText ( this, -1, _("Fingerprint:"))); certSizer->Add (new wxStaticText ( - this, -1, trustData.fingerprint.c_str ())); + this, -1, wxString(trustData.fingerprint.c_str(), wxConvLocal) )); wxStaticBox * certBox = new wxStaticBox ( this, -1, _("Certificate Information:")); diff -ur rapidsvn-0.6.0/src/checkout_action.cpp rapidsvn-0.6.0-unicode-fixed/src/checkout_action.cpp --- rapidsvn-0.6.0/src/checkout_action.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/checkout_action.cpp 2004-08-10 12:53:00.000000000 -0400 @@ -67,8 +67,8 @@ } wxSetWorkingDirectory (m_data.DestFolder); - client.checkout (m_data.RepUrl.c_str (), - m_data.DestFolder.c_str (), + client.checkout (m_data.RepUrl.ToAscii (), + svn::Path(m_data.DestFolder.ToAscii ()), revision, m_data.Recursive); // now post event to add bookmark to bookmarks diff -ur rapidsvn-0.6.0/src/checkout_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/checkout_dlg.cpp --- rapidsvn-0.6.0/src/checkout_dlg.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/checkout_dlg.cpp 2004-08-10 12:54:40.000000000 -0400 @@ -44,23 +44,23 @@ // create controls wxTextValidator valModule (wxFILTER_NONE, &data.RepUrl); m_textRepUrl = - new wxTextCtrl (wnd, -1, "", wxPoint(-1,-1), + new wxTextCtrl (wnd, -1, _(""), wxPoint(-1,-1), wxSize(235, -1), 0, valModule); wxStaticBox* destBox = new wxStaticBox(wnd, 0, _("Destination Directory")); wxTextValidator valDest (wxFILTER_NONE, &data.DestFolder); m_textDest = - new wxTextCtrl (wnd, -1, "", wxDefaultPosition, + new wxTextCtrl (wnd, -1, _(""), wxDefaultPosition, wxSize(205, -1), 0, valDest); wxButton* browse = - new wxButton(wnd, ID_BUTTON_BROWSE, "...", + new wxButton(wnd, ID_BUTTON_BROWSE, _("..."), wxDefaultPosition, wxSize(20, -1) ); wxStaticBox* revisionBox = new wxStaticBox(wnd, -1, _("Revision")); wxTextValidator valRevision (wxFILTER_NUMERIC, &data.Revision); m_textRevision = - new wxTextCtrl (wnd, -1, "", wxDefaultPosition, + new wxTextCtrl (wnd, -1, _(""), wxDefaultPosition, wxSize(50, -1), 0, valRevision); wxGenericValidator valLatest (&data.UseLatest); m_checkUseLatest = @@ -134,7 +134,7 @@ bool ok = true; if (!checked) { - ok = CheckRevision (m_textRevision->GetValue ()); + ok = CheckRevision (m_textRevision->GetValue ().ToAscii()); } if (m_textDest->GetValue ().Length () <= 0) diff -ur rapidsvn-0.6.0/src/cleanup_action.cpp rapidsvn-0.6.0-unicode-fixed/src/cleanup_action.cpp --- rapidsvn-0.6.0/src/cleanup_action.cpp 2004-05-24 11:45:19.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/cleanup_action.cpp 2004-08-10 12:55:43.000000000 -0400 @@ -40,7 +40,7 @@ svn::Client client (GetContext ()); const svn::Path & path = GetPath (); - wxSetWorkingDirectory (path.c_str ()); + wxSetWorkingDirectory (wxString(path.c_str (), wxConvLocal)); client.cleanup (path.c_str ()); return true; diff -ur rapidsvn-0.6.0/src/commit_action.cpp rapidsvn-0.6.0-unicode-fixed/src/commit_action.cpp --- rapidsvn-0.6.0/src/commit_action.cpp 2004-05-24 11:45:16.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/commit_action.cpp 2004-08-10 12:59:35.000000000 -0400 @@ -45,8 +45,8 @@ return false; } - m_recursive = dlg.GetRecursive (); - m_message = dlg.GetMessage (); + m_recursive = dlg.GetRecursive(); + m_message = wxString(dlg.GetMessage (), wxConvLocal); return true; } @@ -59,8 +59,8 @@ // WORKAROUND: CONVERT TO UTF8 // message = m_message.c_str (); - wxString messageUtf8 (m_message.mb_str (wxConvUTF8)); - const char * message = messageUtf8.c_str (); + wxString messageUtf8 (m_message.mb_str (wxConvUTF8), wxConvLocal); + const char * message = messageUtf8.ToAscii (); svn::Pool pool; long revision = @@ -68,7 +68,7 @@ m_recursive); wxString str; - str = wxString::Format ("Committed revision %" SVN_REVNUM_T_FMT ".", + str = wxString::Format (_("Committed revision %" SVN_REVNUM_T_FMT "."), revision); Trace (str); diff -ur rapidsvn-0.6.0/src/commit_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/commit_dlg.cpp --- rapidsvn-0.6.0/src/commit_dlg.cpp 2004-05-24 11:45:15.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/commit_dlg.cpp 2004-08-10 13:01:07.000000000 -0400 @@ -25,7 +25,7 @@ bool recursive; Data (wxWindow * window) - : message (""), recursive (false) + : message (_("")), recursive (false) { // create controls wxStaticBox* msgBox = @@ -37,14 +37,14 @@ wxTextCtrl* msg; { wxTextValidator val (wxFILTER_NONE, &message); - msg = new wxTextCtrl (window, -1, "", wxDefaultPosition, + msg = new wxTextCtrl (window, -1, _(""), wxDefaultPosition, msgSize, wxTE_MULTILINE, val); } wxCheckBox * checkRecursive; { wxGenericValidator val (&recursive); checkRecursive = - new wxCheckBox (window, -1, "Recursive", + new wxCheckBox (window, -1, _("Recursive"), wxDefaultPosition, wxDefaultSize, 0, val); } @@ -105,7 +105,7 @@ const char * CommitDlg::GetMessage () const { - return m->message; + return m->message.ToAscii(); } bool diff -ur rapidsvn-0.6.0/src/delete_action.cpp rapidsvn-0.6.0-unicode-fixed/src/delete_action.cpp --- rapidsvn-0.6.0/src/delete_action.cpp 2004-05-24 11:45:13.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/delete_action.cpp 2004-08-10 13:04:56.000000000 -0400 @@ -68,7 +68,7 @@ // handled by subversion if (status.isVersioned ()) client.remove (path, m_force); - else if (wxDirExists (cpath)) + else if (wxDirExists (wxString(cpath, wxConvLocal).c_str())) { // we dont want to delete unversioned directories... wxString msg; @@ -76,14 +76,14 @@ cpath); Trace (msg); } - else if (wxFileExists (cpath)) + else if (wxFileExists (wxString(cpath, wxConvLocal).c_str())) { wxString msg; msg.Printf (_("Deleting unversioned file: %s"), cpath); Trace (msg); - wxRemoveFile (cpath); + wxRemoveFile (wxString(cpath, wxConvLocal)); } } diff -ur rapidsvn-0.6.0/src/delete_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/delete_dlg.cpp --- rapidsvn-0.6.0/src/delete_dlg.cpp 2004-05-24 11:45:16.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/delete_dlg.cpp 2004-08-10 13:05:23.000000000 -0400 @@ -35,7 +35,7 @@ topSizer->Add (label, 0, wxALL, 5); // The "force" check box: - wxCheckBox* check = new wxCheckBox(window, -1, "Force removal", + wxCheckBox* check = new wxCheckBox(window, -1, _("Force removal"), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&force)); diff -ur rapidsvn-0.6.0/src/destination_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/destination_dlg.cpp --- rapidsvn-0.6.0/src/destination_dlg.cpp 2004-05-24 11:45:13.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/destination_dlg.cpp 2004-08-10 13:09:17.000000000 -0400 @@ -26,7 +26,7 @@ Data (wxWindow * window, const char * descr, int flags, const char * dest) - : destination (dest), force (false) + : destination (dest, wxConvLocal), force (false) { bool withForce = (flags & WITH_FORCE) != 0; @@ -35,13 +35,13 @@ // The description: wxStaticText * labelDescr = - new wxStaticText (window, -1, descr); + new wxStaticText (window, -1, wxString(descr, wxConvLocal)); mainSizer->Add (labelDescr, 0, wxALL, 5); // The destination: wxTextValidator val (wxFILTER_NONE, &destination); wxTextCtrl * textDest = - new wxTextCtrl (window, -1, "", wxDefaultPosition, + new wxTextCtrl (window, -1, _(""), wxDefaultPosition, wxSize (200, -1), 0, val); mainSizer->Add (textDest, 0, wxALL | wxEXPAND, 5); @@ -88,7 +88,7 @@ const char * descr, const int flags, const char * dst) - : wxDialog(parent, -1, title, + : wxDialog(parent, -1, wxString(title, wxConvLocal), wxDefaultPosition, wxDefaultSize, DIALOG_FLAGS) { @@ -111,7 +111,7 @@ const char * descr, const int flags, const char * dst) { - wxDialog::Create (parent, -1, title, wxDefaultPosition, + wxDialog::Create (parent, -1, wxString(title, wxConvLocal), wxDefaultPosition, wxDefaultSize, DIALOG_FLAGS); m = new Data (this, descr, flags, dst); @@ -120,7 +120,7 @@ const char * DestinationDlg::GetDestination () const { - return m->destination; + return m->destination.ToAscii(); } bool diff -ur rapidsvn-0.6.0/src/diff_action.cpp rapidsvn-0.6.0-unicode-fixed/src/diff_action.cpp --- rapidsvn-0.6.0/src/diff_action.cpp 2004-05-24 11:45:15.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/diff_action.cpp 2004-08-10 13:58:21.000000000 -0400 @@ -112,7 +112,7 @@ getPath1 (const svn::Path & path) { if (diffData.useUrl1) - return diffData.url1.c_str (); + return static_cast(diffData.url1.ToAscii()); else return path; } @@ -125,7 +125,7 @@ getPath2 (const svn::Path & path) { if (diffData.useUrl2) - return diffData.url2.c_str (); + return static_cast(diffData.url2.ToAscii()); else return path; } @@ -204,9 +204,9 @@ Preferences prefs; wxString argv; - wxString dstFile1Native (dstFile1.native ().c_str ()); - wxString dstFile2Native (dstFile2.native ().c_str ()); - argv.Printf ("\"%s\" \"%s\" \"%s\"", prefs.diffTool.c_str (), + wxString dstFile1Native (dstFile1.native ().c_str(), wxConvLocal); + wxString dstFile2Native (dstFile2.native ().c_str(), wxConvLocal); + argv.Printf (_("\"%s\" \"%s\" \"%s\""), prefs.diffTool.c_str (), dstFile1Native.c_str (), dstFile2Native.c_str ()); wxString msg; diff -ur rapidsvn-0.6.0/src/diff_data.hpp rapidsvn-0.6.0-unicode-fixed/src/diff_data.hpp --- rapidsvn-0.6.0/src/diff_data.hpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/diff_data.hpp 2004-08-10 13:52:30.000000000 -0400 @@ -46,8 +46,8 @@ /** Constructor */ DiffData () : compareType (WITH_SAME_REVISION), - useUrl1 (false), url1 (""), - useUrl2 (false), url2 ("") + useUrl1 (false), url1 (_("")), + useUrl2 (false), url2 (_("")) { } }; diff -ur rapidsvn-0.6.0/src/diff_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/diff_dlg.cpp --- rapidsvn-0.6.0/src/diff_dlg.cpp 2004-05-24 11:45:15.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/diff_dlg.cpp 2004-08-10 14:01:55.000000000 -0400 @@ -102,7 +102,7 @@ if (mRadioUseRevision->GetValue ()) { if (!mCheckUseLatest->GetValue ()) - valid = CheckRevision (mTextRevision->GetValue ()); + valid = CheckRevision (mTextRevision->GetValue ().ToAscii()); } else valid = CheckDateTime (mTextDate->GetValue ()); @@ -162,24 +162,24 @@ { mRadioUseDate->SetValue (true); mTextDate->SetValue ( - FormatDateTime (revision.date (), "%c")); - mTextRevision->SetValue (""); + FormatDateTime (revision.date (), _("%c"))); + mTextRevision->SetValue (_("")); mCheckUseLatest->SetValue (true); } else { mRadioUseRevision->SetValue (true); - mTextDate->SetValue (""); + mTextDate->SetValue (_("")); if (revision.kind () == svn_opt_revision_head) { - mTextRevision->SetValue (""); + mTextRevision->SetValue (_("")); mCheckUseLatest->SetValue (true); } else { wxString value; - value.Printf ("%" SVN_REVNUM_T_FMT, revision.revnum ()); + value.Printf (_("%" SVN_REVNUM_T_FMT), revision.revnum ()); mTextRevision->SetValue (value); mCheckUseLatest->SetValue (false); } @@ -250,7 +250,7 @@ mRadioUseRevision = new wxRadioButton ( this, ID_UseRevision, _("Revision:")); mRadioUseRevision->SetValue (true); - mTextRevision = new wxTextCtrl (this, ID_Revision, ""); + mTextRevision = new wxTextCtrl (this, ID_Revision, _("")); mCheckUseLatest = new wxCheckBox ( this, ID_UseLatest, _("Use latest")); mCheckUseLatest->SetValue (true); @@ -265,7 +265,7 @@ // second row: date mRadioUseDate = new wxRadioButton ( this, ID_UseDate, _("Date:")); - mTextDate = new wxTextCtrl (this, ID_Date, ""); + mTextDate = new wxTextCtrl (this, ID_Date, _("")); gridSizer->Add (mRadioUseDate); gridSizer->Add (mTextDate); @@ -274,7 +274,7 @@ // third row: url mCheckUseUrl = new wxCheckBox ( this, ID_UseUrl, _("Use Url/Path:")); - mTextUrl = new wxTextCtrl (this, ID_Url, ""); + mTextUrl = new wxTextCtrl (this, ID_Url, _("")); mButtonBrowse = CreateEllipsisButton (this, ID_Browse); gridSizer->Add (mCheckUseUrl); gridSizer->Add (mTextUrl, 0, wxEXPAND); @@ -505,7 +505,7 @@ this, -1, _("Compare:")); mComboCmpType = new wxComboBox ( - this, ID_CompareType, "", wxDefaultPosition, wxDefaultSize, + this, ID_CompareType, _(""), wxDefaultPosition, wxDefaultSize, WXSIZEOF (COMPARE_TYPE_LABELS), COMPARE_TYPE_LABELS, wxCB_READONLY); diff -ur rapidsvn-0.6.0/src/exceptions.hpp rapidsvn-0.6.0-unicode-fixed/src/exceptions.hpp --- rapidsvn-0.6.0/src/exceptions.hpp 2004-05-24 11:45:16.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/exceptions.hpp 2004-08-10 14:02:35.000000000 -0400 @@ -23,7 +23,7 @@ long code; public: - RapidSvnEx (const wxString & __estr = "", const long __code = -1); + RapidSvnEx (const wxString & __estr = _(""), const long __code = -1); virtual ~ RapidSvnEx (); diff -ur rapidsvn-0.6.0/src/external_program_action.cpp rapidsvn-0.6.0-unicode-fixed/src/external_program_action.cpp --- rapidsvn-0.6.0/src/external_program_action.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/external_program_action.cpp 2004-08-10 14:04:10.000000000 -0400 @@ -48,7 +48,7 @@ path = GetPathAsTempFile(path); } - wxString target_str = path.c_str (); + wxString target_str (path.c_str (), wxConvLocal); wxFileName target = target_str; // The target we'll pass to the external program @@ -82,7 +82,7 @@ } else { - wxString argv = prefs.explorer + " \"" + target_document + "\""; + wxString argv = prefs.explorer + _(" \"") + target_document + _("\""); wxExecute (argv); } @@ -96,7 +96,7 @@ } else { - wxString argv = prefs.editor + " \"" + target_document + "\""; + wxString argv = prefs.editor + _(" \"") + target_document + _("\""); wxExecute (argv); } diff -ur rapidsvn-0.6.0/src/file_info.cpp rapidsvn-0.6.0-unicode-fixed/src/file_info.cpp --- rapidsvn-0.6.0/src/file_info.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/file_info.cpp 2004-08-10 15:40:10.000000000 -0400 @@ -37,7 +37,7 @@ /* if this returns an error, just don't print anything out */ apr_err = apr_time_exp_tz (&extime, atime, 0); if (!apr_err) - str.Printf ("%s: %04lu-%02lu-%02lu %02lu:%02lu GMT", desc, + str.Printf (_("%s: %04lu-%02lu-%02lu %02lu:%02lu GMT"), desc, (unsigned long) (extime.tm_year + 1900), (unsigned long) (extime.tm_mon + 1), (unsigned long) (extime.tm_mday), @@ -60,8 +60,15 @@ void addLine (const char * line) { + info += wxString(line, wxConvLocal); + info += _("\n"); + } + + void + addLine (const wxChar * line) + { info += line; - info += "\n"; + info += _("\n"); } void @@ -159,13 +166,13 @@ str.Printf (_("Last Changed Rev: %ld"), entry.cmtRev ()); addLine (str); - info_print_time (entry.cmtDate (), _("Last Changed Date"), str); + info_print_time (entry.cmtDate (), "Last Changed Date", str); addLine (str); - info_print_time (entry.textTime (), _("Text Last Updated"), str); + info_print_time (entry.textTime (), "Text Last Updated", str); addLine (str); - info_print_time (entry.propTime (), _("Properties Last Updated"), str); + info_print_time (entry.propTime (), "Properties Last Updated", str); addLine (str); str.Printf (_("Checksum: %s"), entry.checksum ()); @@ -220,7 +227,7 @@ const char * FileInfo::info () const { - m->info = ""; + m->info = _(""); svn::Client client (m->context); std::vector::const_iterator it; @@ -234,7 +241,7 @@ m->addLine (""); } - return m->info; + return m->info.ToAscii(); } /* ----------------------------------------------------------------- diff -ur rapidsvn-0.6.0/src/filelist_ctrl.cpp rapidsvn-0.6.0-unicode-fixed/src/filelist_ctrl.cpp --- rapidsvn-0.6.0/src/filelist_ctrl.cpp 2004-05-24 11:45:17.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/filelist_ctrl.cpp 2004-08-10 15:34:44.000000000 -0400 @@ -91,12 +91,12 @@ * Tags for wxConfig file settings, defined here to avoid duplicate * hard coded strings. */ -static const char ConfigSortColumn[] = "/FileListCtrl/SortColumn"; -static const char ConfigSortOrder[] = "/FileListCtrl/SortOrder"; -static const char ConfigColumnWidthFmt[] = "/FileListCtrl/Column%sWidth"; -static const char ConfigColumnVisibleFmt[] = "/FileListCtrl/Column%sVisible"; -static const char ConfigWithUpdate[] = "/FileListCtrl/WithUpdate"; -static const char ConfigFlatView[] = "/FileListCtrl/FlatView"; +static const wxChar * ConfigSortColumn = _("/FileListCtrl/SortColumn"); +static const wxChar * ConfigSortOrder = _("/FileListCtrl/SortOrder"); +static const wxChar * ConfigColumnWidthFmt = _("/FileListCtrl/Column%sWidth"); +static const wxChar * ConfigColumnVisibleFmt = _("/FileListCtrl/Column%sVisible"); +static const wxChar * ConfigWithUpdate = _("/FileListCtrl/WithUpdate"); +static const wxChar * ConfigFlatView = _("/FileListCtrl/FlatView"); /** * test if the given status entry is a file or @@ -133,7 +133,7 @@ } // unversioned. - return wxDirExists (status->path ()); + return wxDirExists (wxString(status->path (), wxConvLocal)); } static const int @@ -242,8 +242,8 @@ static int ComparePaths (const char * p1, const char * p2) { - wxFileName fn1 (p1); - wxFileName fn2 (p2); + wxFileName fn1 (wxString(p1, wxConvLocal)); + wxFileName fn2 (wxString(p2, wxConvLocal)); wxString path1 = fn1.GetPath (); wxString path2 = fn2.GetPath (); @@ -251,13 +251,13 @@ int res = 0; // Is p2 a subdir or entry of p1? - if (path1.CmpNoCase (p2) == 0) + if (path1.CmpNoCase (fn2.GetFullPath()) == 0) { return -1; } // Is p1 a subdir or entry of p2? - if (path2.CmpNoCase (p1) == 0) + if (path2.CmpNoCase (fn1.GetFullPath()) == 0) { return 1; } @@ -309,7 +309,7 @@ const char * sv1 = s1 == 0 ? "" : s1; const char * sv2 = s2 == 0 ? "" : s2; - return wxString (sv1).CmpNoCase (sv2); + return wxString (sv1, wxConvLocal).CmpNoCase (wxString(sv2, wxConvLocal)); } /** @@ -494,7 +494,7 @@ /** * array with column captions */ -static const char * +static const wxChar * COLUMN_CAPTIONS[FileListCtrl::COL_COUNT] = { _("Name"), @@ -576,7 +576,7 @@ Data () : SortIncreasing (true), SortColumn (COL_NAME), DirtyColumns (true), FlatMode (false), Context (0), - Path (""), WithUpdate (false) + Path (_("")), WithUpdate (false) { ImageListSmall = new wxImageList (16, 16, TRUE); @@ -809,11 +809,11 @@ // Hide the list to speed up inserting Hide (); - std::string stdpath (path.c_str ()); + std::string stdpath (path.ToAscii()); svn::Client client (m->Context); const svn::StatusEntries statusVector = - client.status (path.c_str (), m->FlatMode, true, m->WithUpdate); + client.status (path.ToAscii (), m->FlatMode, true, m->WithUpdate); svn::StatusEntries::const_iterator it; const size_t pathLength = path.Length () + 1; @@ -825,11 +825,11 @@ int i = GetItemCount (); // truncate the first part of the path - wxString fullPath (status.path ()); + wxString fullPath (status.path (), wxConvLocal); wxString filename (fullPath.Mid (pathLength)); if (filename.Length () == 0) { - values[COL_NAME] = "."; + values[COL_NAME] = _("."); } else { @@ -882,11 +882,11 @@ { // unversioned entries dont carry dir info // with them. must find this out by ourself - if (wxDirExists (status.path ())) + if (wxDirExists(wxString(status.path (), wxConvLocal) ) ) { imageIndex = GetImageIndex (IMG_INDX_FOLDER, -1); } - else if (wxFileExists (status.path ())) + else if (wxFileExists(wxString(status.path (), wxConvLocal) )) { imageIndex = GetImageIndex (svn_wc_status_unversioned, -1); } @@ -903,24 +903,24 @@ SetItemData (i, (long)new svn::Status (status)); // The control now owns this data // and must delete it in due course. - text = ""; + text = _(""); if (status.isVersioned ()) { const svn::Entry & entry = status.entry (); - values[COL_REV].Printf ("%ld", entry.revision ()); - values[COL_CMT_REV].Printf ("%ld", entry.cmtRev ()); + values[COL_REV].Printf (_("%ld"), entry.revision ()); + values[COL_CMT_REV].Printf (_("%ld"), entry.cmtRev ()); - values[COL_AUTHOR] = entry.cmtAuthor (); + values[COL_AUTHOR] = wxString(entry.cmtAuthor (), wxConvLocal); // date formatting - values[COL_CMT_DATE] = FormatDateTime (entry.cmtDate ()); - values[COL_TEXT_TIME] = FormatDateTime (entry.textTime ()); - values[COL_PROP_TIME] = FormatDateTime (entry.propTime ()); - - values[COL_URL] = entry.url (); - values[COL_REPOS] = entry.repos (); - values[COL_UUID] = entry.uuid (); + values[COL_CMT_DATE] = wxString(FormatDateTime (entry.cmtDate ()), wxConvLocal); + values[COL_TEXT_TIME] = wxString(FormatDateTime (entry.textTime ()), wxConvLocal); + values[COL_PROP_TIME] = wxString(FormatDateTime (entry.propTime ()), wxConvLocal); + + values[COL_URL] = wxString(entry.url (), wxConvLocal); + values[COL_REPOS] = wxString(entry.repos (), wxConvLocal); + values[COL_UUID] = wxString(entry.uuid (), wxConvLocal); wxString schedule; switch (entry.schedule ()) @@ -935,22 +935,22 @@ schedule = _("replace"); break; case svn_wc_schedule_normal: - schedule = ""; + schedule = _(""); break; } values[COL_SCHEDULE] = schedule; if (entry.isCopied ()) { - values[COL_COPIED].Printf ("%s, %ld", + values[COL_COPIED].Printf (_("%s, %ld"), entry.copyfromUrl (), entry.copyfromRev ()); } - values[COL_CONFLICT_OLD] = entry.conflictOld (); - values[COL_CONFLICT_NEW] = entry.conflictNew (); - values[COL_CONFLICT_WRK] = entry.conflictWrk (); - values[COL_CHECKSUM] = entry.checksum (); + values[COL_CONFLICT_OLD] = wxString(entry.conflictOld (), wxConvLocal); + values[COL_CONFLICT_NEW] = wxString(entry.conflictNew (), wxConvLocal); + values[COL_CONFLICT_WRK] = wxString(entry.conflictWrk (), wxConvLocal); + values[COL_CHECKSUM] = wxString(entry.checksum (), wxConvLocal); } switch (status.textStatus ()) { @@ -1085,7 +1085,7 @@ try { if(status != 0) - verbList.InitFromDocument (status->path ()); + verbList.InitFromDocument (wxString(status->path (), wxConvLocal)); } catch (std::exception) { @@ -1101,7 +1101,7 @@ wxMenuItem *pItem; // TODO: Convert verb names to unicode on the fly if needed (or make // verblist follow wxWindows' unicode setting) - pItem = new wxMenuItem (&menu, ID_Verb_Min + i, verbList.GetName (i)); + pItem = new wxMenuItem (&menu, ID_Verb_Min + i, wxString(verbList.GetName (i), wxConvLocal)); //pItem->SetBitmap (wxBITMAP (?)) menu.Append (pItem); } @@ -1112,7 +1112,7 @@ Preferences prefs; if (!prefs.editor.IsEmpty () || IsDir (status)) { - const char * defaultActionVerb = _("Open"); + const wxChar * defaultActionVerb = _("Open"); if (!IsDir (status)) { if (svn::Url::isValid (status->path ())) @@ -1395,7 +1395,7 @@ while (GetColumnCount () < count) { - InsertColumn (0, ""); + InsertColumn (0, _("")); } // Now set the captions and widths diff -ur rapidsvn-0.6.0/src/folder_browser.cpp rapidsvn-0.6.0-unicode-fixed/src/folder_browser.cpp --- rapidsvn-0.6.0/src/folder_browser.cpp 2004-05-24 11:45:13.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/folder_browser.cpp 2004-08-10 15:51:58.000000000 -0400 @@ -94,7 +94,7 @@ if (path.length() <= MAXLENGTH_BOOKMARK) return path; - size_t pos = path.Find (":"); + size_t pos = path.Find (_(":")); wxString newPath; pos++; @@ -117,7 +117,7 @@ break; } - newPath += "..."; + newPath += _("..."); const int restPos = path.Length () - MAXLENGTH_BOOKMARK + newPath.Length (); @@ -131,7 +131,7 @@ static bool IsValidSeparator (const wxString & sep) { - return ((sep == "/") || (sep == "\\")); + return ((sep == _("/")) || (sep == _("\\"))); } @@ -181,7 +181,7 @@ if(!id.IsOk()) { - return ""; + return _(""); } FolderItemData* data = GetItemData (id); @@ -227,7 +227,7 @@ break; case FOLDER_TYPE_BOOKMARK: - context = bookmarks.GetContext (data->getPath ()); + context = bookmarks.GetContext(data->getPath().ToAscii()); ok = context != 0; break; @@ -274,7 +274,7 @@ if (context != 0) { - username = context->getUsername (); + username = wxString(context->getUsername (), wxConvLocal); } if (username.length () == 0) @@ -325,7 +325,7 @@ while (ok) { - if (filename != svn::Wc::ADM_DIR_NAME) + if (filename != wxString(svn::Wc::ADM_DIR_NAME, wxConvLocal)) return true; ok = dir.GetNext (&filename); } @@ -385,7 +385,7 @@ for(index = 0; index < count; index++) { - const wxString path (bookmarks.GetBookmark (index)); + const wxString path (bookmarks.GetBookmark (index), wxConvLocal); FolderItemData* data= new FolderItemData (FOLDER_TYPE_BOOKMARK, path, path, TRUE); wxString label (TruncatePath (path)); @@ -406,7 +406,7 @@ { const wxString& parentPath = parentData->getPath (); - if ( svn::Url::isValid (parentPath) ) + if ( svn::Url::isValid (parentPath.ToAscii()) ) RefreshRepository (parentPath, parentId); else RefreshLocal (parentPath, parentId); @@ -455,13 +455,13 @@ while(ok) { - if(filename != svn::Wc::ADM_DIR_NAME) + if(filename != wxString(svn::Wc::ADM_DIR_NAME, wxConvLocal)) { parentHasSubdirectories = true; wxFileName path(parentPath, filename, wxPATH_NATIVE); wxString fullPath = path.GetFullPath (); - const char * fullPath_c = fullPath.c_str (); + const char * fullPath_c = fullPath.ToAscii (); int image = FOLDER_IMAGE_FOLDER; int open_image = FOLDER_IMAGE_OPEN_FOLDER; @@ -511,7 +511,7 @@ svn::Client client (GetContext ()); svn::Revision rev (svn::Revision::HEAD); svn::DirEntries entries = - client.ls (parentPath, rev, false); + client.ls (parentPath.ToAscii(), rev, false); svn::DirEntries::const_iterator it; //bool parentHasSubdirectories = false; @@ -521,7 +521,7 @@ int image = FOLDER_IMAGE_FOLDER; int open_image = FOLDER_IMAGE_OPEN_FOLDER; - wxString fullPath = entry.name (); + wxString fullPath (entry.name (), wxConvLocal); wxString filename (fullPath.Mid (parentPath.Length () + 1)); //parentHasSubdirectories = true; @@ -693,7 +693,7 @@ break; // bookmark match? - if (data->getPath () == bookmarkPath) + if (data->getPath () == wxString(bookmarkPath, wxConvLocal) ) { // select bookmark success = true; @@ -749,7 +749,7 @@ { wxTreeItemId id = GetSelectedBookmarkId (); - wxString path (""); + wxString path (_("")); if (id.IsOk ()) { @@ -799,14 +799,14 @@ if (bookmarkPath.Length () == 0) return; - if(!m->SelectBookmark (bookmarkPath)) + if(!m->SelectBookmark (bookmarkPath.ToAscii())) return; wxTreeItemId bookmarkId = m->treeCtrl->GetSelection (); if (m->treeCtrl->ItemHasChildren (bookmarkId)) m->treeCtrl->Expand (bookmarkId); - SelectFolder (path); + SelectFolder (path.ToAscii()); } const bool @@ -824,7 +824,7 @@ { wxString path = data->getPath (); m->Delete (id); - m->bookmarks.RemoveBookmark (path.c_str ()); + m->bookmarks.RemoveBookmark (path.ToAscii ()); success = TRUE; } } @@ -890,7 +890,7 @@ bool FolderBrowser::SelectFolder (const char * path) { - return m->SelectFolder (path); + return m->SelectFolder (wxString(path, wxConvLocal)); } const size_t diff -ur rapidsvn-0.6.0/src/folder_browser.hpp rapidsvn-0.6.0-unicode-fixed/src/folder_browser.hpp --- rapidsvn-0.6.0/src/folder_browser.hpp 2004-05-24 11:45:16.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/folder_browser.hpp 2004-08-10 14:05:17.000000000 -0400 @@ -31,7 +31,7 @@ FolderBrowser (wxWindow * parent, const wxWindowID id = -1, const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize, - const wxString & name = "FolderBrowser"); + const wxString & name = _("FolderBrowser")); virtual ~ FolderBrowser (); diff -ur rapidsvn-0.6.0/src/get_action.cpp rapidsvn-0.6.0-unicode-fixed/src/get_action.cpp --- rapidsvn-0.6.0/src/get_action.cpp 2004-05-24 11:45:18.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/get_action.cpp 2004-08-10 15:55:30.000000000 -0400 @@ -40,9 +40,9 @@ { svn::Client client (GetContext ()); - wxSetWorkingDirectory (GetPath ().c_str ()); - client.update (m_data.path.c_str (), - m_data.revision, + wxSetWorkingDirectory (wxString(GetPath ().c_str (), wxConvLocal)); + client.update (static_cast(m_data.path.ToAscii()), + m_data.revision, false); return true; diff -ur rapidsvn-0.6.0/src/import_action.cpp rapidsvn-0.6.0-unicode-fixed/src/import_action.cpp --- rapidsvn-0.6.0/src/import_action.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/import_action.cpp 2004-08-10 15:57:17.000000000 -0400 @@ -50,8 +50,9 @@ ImportAction::Perform () { svn::Client client (GetContext ()); - client.import (m_data.Path.c_str (), m_data.Repository.c_str (), - m_data.LogMessage.c_str(), m_data.Recursive); + client.import (static_cast(m_data.Path.ToAscii()), + m_data.Repository.ToAscii (), m_data.LogMessage.ToAscii(), + m_data.Recursive); return true; } diff -ur rapidsvn-0.6.0/src/import_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/import_dlg.cpp --- rapidsvn-0.6.0/src/import_dlg.cpp 2004-05-24 11:45:17.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/import_dlg.cpp 2004-08-10 15:58:34.000000000 -0400 @@ -50,22 +50,22 @@ // Row 0: Grid->Add(new wxStaticText(wnd, -1, _("Repository URL")), 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 5); - wxTextCtrl *Repository = new wxTextCtrl(wnd, -1, "", + wxTextCtrl *Repository = new wxTextCtrl(wnd, -1, _(""), wxDefaultPosition, wxSize(300, -1), 0, wxTextValidator(wxFILTER_NONE, &data.Repository)); Grid->Add(Repository, 1, wxLEFT | wxEXPAND | wxALIGN_CENTER_VERTICAL, 5); - Grid->Add(new wxStaticText(wnd, -1, ""), 0, + Grid->Add(new wxStaticText(wnd, -1, _("")), 0, 0, 5); // Row 1: Grid->Add(new wxStaticText(wnd, -1, _("Path")), 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 5); - wxTextCtrl *Path = new wxTextCtrl(wnd, -1, "", + wxTextCtrl *Path = new wxTextCtrl(wnd, -1, _(""), wxDefaultPosition, wxSize(300, -1), 0, wxTextValidator(wxFILTER_NONE, &data.Path)); Grid->Add(Path, 1, wxLEFT | wxEXPAND, 5); - wxButton* BrowseButton = new wxButton(wnd, ID_BUTTON_BROWSE, "...", + wxButton* BrowseButton = new wxButton(wnd, ID_BUTTON_BROWSE, _("..."), wxPoint(-1,-1), wxSize(20, -1)); Grid->Add(BrowseButton, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 5); @@ -76,7 +76,7 @@ wxStaticBoxSizer *messageSizer = new wxStaticBoxSizer( new wxStaticBox(wnd, -1, _("Enter log message")), wxHORIZONTAL); - wxTextCtrl* Log = new wxTextCtrl(wnd, -1, "", wxDefaultPosition, + wxTextCtrl* Log = new wxTextCtrl(wnd, -1, _(""), wxDefaultPosition, wxSize(-1, 50), wxTE_MULTILINE, wxTextValidator(wxFILTER_NONE, &data.LogMessage)); diff -ur rapidsvn-0.6.0/src/listed_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/listed_dlg.cpp --- rapidsvn-0.6.0/src/listed_dlg.cpp 2004-05-24 11:45:18.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/listed_dlg.cpp 2004-08-10 16:00:40.000000000 -0400 @@ -40,10 +40,10 @@ EDIT_EDIT }; -static const char * LABEL_EDIT=_("&Edit..."); -static const char * LABEL_VIEW=_("&View..."); -static const char * LABEL_NEW=_("&New..."); -static const char * LABEL_DELETE=_("&Delete..."); +static const wxChar * LABEL_EDIT=_("&Edit..."); +static const wxChar * LABEL_VIEW=_("&View..."); +static const wxChar * LABEL_NEW=_("&New..."); +static const wxChar * LABEL_DELETE=_("&Delete..."); class ListCtrl : public wxListView { @@ -162,7 +162,7 @@ wxTextCtrl * textName = new wxTextCtrl (this, ID_Name); wxTextCtrl * textValue = - new wxTextCtrl (this, ID_Value, "", wxDefaultPosition, + new wxTextCtrl (this, ID_Value, _(""), wxDefaultPosition, wxSize (300, 100), wxTE_MULTILINE); wxFlexGridSizer * textSizer = new wxFlexGridSizer (2, 5, 5); @@ -196,8 +196,8 @@ m_labelName = labelName; m_labelValue = labelValue; - m_addTitle = ""; - m_editTitle = ""; + m_addTitle = _(""); + m_editTitle = _(""); m_mode = EDIT_NEW; } @@ -319,7 +319,7 @@ { // create controls wxStaticBoxSizer *boxSizer = new wxStaticBoxSizer ( - box = new wxStaticBox (wnd, -1, ""), + box = new wxStaticBox (wnd, -1, _("")), wxHORIZONTAL); listCtrl = new ListCtrl (wnd); @@ -407,7 +407,7 @@ void Edit (int mode) { - wxString name (""), value (""), title (""); + wxString name (_("")), value (_("")), title (_("")); if (mode != EDIT_EDIT) title = addTitle; diff -ur rapidsvn-0.6.0/src/listener.cpp rapidsvn-0.6.0-unicode-fixed/src/listener.cpp --- rapidsvn-0.6.0/src/listener.cpp 2004-05-24 11:45:19.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/listener.cpp 2004-08-10 17:03:00.000000000 -0400 @@ -21,7 +21,7 @@ #include "tracer.hpp" #include "auth_dlg.hpp" -static const char * +static const wxChar * ACTION_NAMES [] = { _("Add"), // svn_wc_notify_add, @@ -178,12 +178,12 @@ if (ok) { // WORKAROUND: CONVERT TO UTF8 - wxString usernameNative (dlg.GetUsername ()); - wxString passwordNative (dlg.GetPassword ()); - wxString usernameUtf8 (usernameNative.mb_str (wxConvUTF8)); - wxString passwordUtf8 (passwordNative.mb_str (wxConvUTF8)); - username = usernameUtf8.c_str (); - password = passwordUtf8.c_str (); + wxString usernameNative (dlg.GetUsername (), wxConvLocal); + wxString passwordNative (dlg.GetPassword (), wxConvLocal); + wxString usernameUtf8 (usernameNative.mb_str(wxConvUTF8), wxConvUTF8); + wxString passwordUtf8 (passwordNative.mb_str(wxConvUTF8), wxConvUTF8); + username = (const char *)usernameUtf8.ToAscii (); + password = (const char *)passwordUtf8.ToAscii (); } return ok; @@ -200,7 +200,7 @@ svn_revnum_t revision) { // Map an action to string and trace the action and path - const char * actionString = 0; + const wxChar * actionString = 0; if (action >= 0 && action <= MAX_ACTION) actionString = ACTION_NAMES [action]; @@ -208,7 +208,7 @@ if (actionString != 0) { wxString msg; - msg.Printf ("%s: %s", actionString, path); + msg.Printf (_("%s: %s"), actionString, path); Trace (msg); } @@ -245,15 +245,15 @@ Listener::contextSslClientCertPrompt (std::string & certFile) { wxString filename = wxFileSelector ( - _("Select Certificate File"), "", "", "", - "*.*", wxOPEN | wxFILE_MUST_EXIST, + _("Select Certificate File"), _(""), _(""), _(""), + _("*.*"), wxOPEN | wxFILE_MUST_EXIST, GetParent ()); if (filename.empty ()) return false; //TODO - certFile = filename.c_str (); + certFile = filename.ToAscii (); return true; } diff -ur rapidsvn-0.6.0/src/log_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/log_dlg.cpp --- rapidsvn-0.6.0/src/log_dlg.cpp 2004-05-24 11:45:15.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/log_dlg.cpp 2004-08-10 17:06:34.000000000 -0400 @@ -149,13 +149,13 @@ wxString rev; wxString dateStr (FormatDateTime (entry.date)); - rev.Printf ("%ld", (long) entry.revision); + rev.Printf (_("%ld"), (long) entry.revision); //TODO perform date formatting. but dont use //subversion but wxDateTime //wxString date (entry.date.c_str ()); InsertItem (index, rev); - SetItem (index, 1, entry.author.c_str ()); + SetItem (index, 1, wxString(entry.author.c_str (), wxConvLocal)); SetItem (index, 2, dateStr); index++; } @@ -184,7 +184,7 @@ wxWindow * wnd, const char * path_, const svn::LogEntries * entries_) - : entries (entries_), path (path_), + : entries (entries_), path (path_, wxConvLocal), parent (parent_), window (wnd) { // create controls @@ -194,7 +194,7 @@ m_logList = new LogList (wnd, entries); - m_logMsg = new wxTextCtrl (wnd, LOG_MSG, "", + m_logMsg = new wxTextCtrl (wnd, LOG_MSG, _(""), wxDefaultPosition, wxSize (420, 110), wxTE_READONLY | wxTE_MULTILINE ); @@ -288,7 +288,7 @@ { wxString message; const svn::LogEntry & entry = (*entries)[index]; - message = entry.message.c_str (); + message = wxString(entry.message.c_str (), wxConvLocal); message.Trim (false); m_logMsg->Show (false); diff -ur rapidsvn-0.6.0/src/merge_action.cpp rapidsvn-0.6.0-unicode-fixed/src/merge_action.cpp --- rapidsvn-0.6.0/src/merge_action.cpp 2004-05-24 11:45:13.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/merge_action.cpp 2004-08-10 17:08:12.000000000 -0400 @@ -51,7 +51,7 @@ // Set current working directory to point to the path // in the folder browser (the path where the merge will be // performed) - wxString path (GetPath ().c_str ()); + wxString path (GetPath ().c_str (), wxConvLocal); if (!wxSetWorkingDirectory (path)) { wxString msg; @@ -66,11 +66,11 @@ //TODO check this long rev1 = 0;//MergeAction::getRevision (m_data.Path1Rev); long rev2 = 0;//MergeAction::getRevision (m_data.Path2Rev); - client.merge (m_data.Path1.c_str (), + client.merge (static_cast(m_data.Path1.ToAscii ()), rev1, - m_data.Path2.c_str (), + static_cast(m_data.Path2.ToAscii ()), rev2, - path.c_str (), + static_cast(path.ToAscii ()), m_data.Force, m_data.Recursive); return true; diff -ur rapidsvn-0.6.0/src/merge_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/merge_dlg.cpp --- rapidsvn-0.6.0/src/merge_dlg.cpp 2004-05-24 11:45:19.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/merge_dlg.cpp 2004-08-10 17:09:39.000000000 -0400 @@ -130,12 +130,12 @@ wxLEFT | wxALIGN_CENTER_VERTICAL, 20); // Row 1: - wxTextCtrl *Path1 = new wxTextCtrl(this, -1, "", + wxTextCtrl *Path1 = new wxTextCtrl(this, -1, _(""), wxDefaultPosition, wxSize(300, -1), 0, wxTextValidator(wxFILTER_NONE, &m_data.Path1)); grid->Add(Path1, 1, wxBOTTOM | wxEXPAND, 10); - wxTextCtrl *Path1Rev = new wxTextCtrl(this, -1, "", + wxTextCtrl *Path1Rev = new wxTextCtrl(this, -1, _(""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator(wxFILTER_NUMERIC, &m_data.Path1Rev)); grid->Add(Path1Rev, 0, wxLEFT, 20); @@ -147,12 +147,12 @@ wxLEFT | wxALIGN_CENTER_VERTICAL, 20); // Row 3: - wxTextCtrl *Path2 = new wxTextCtrl(this, -1, "", + wxTextCtrl *Path2 = new wxTextCtrl(this, -1, _(""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator(wxFILTER_NONE, &m_data.Path2)); grid->Add(Path2, 1, wxBOTTOM | wxEXPAND, 10); - wxTextCtrl *Path2Rev = new wxTextCtrl(this, -1, "", + wxTextCtrl *Path2Rev = new wxTextCtrl(this, -1, _(""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator(wxFILTER_NUMERIC, &m_data.Path2Rev)); grid->Add(Path2Rev, 0, wxLEFT, 20); @@ -160,16 +160,16 @@ // Row 4: grid->Add(new wxStaticText(this, -1, _("Destination path")), 0, 0, 5); - grid->Add(new wxStaticText(this, -1, ""), 0, + grid->Add(new wxStaticText(this, -1, _("")), 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 20); // Row 5: - wxTextCtrl *Destination = new wxTextCtrl(this, -1, "", + wxTextCtrl *Destination = new wxTextCtrl(this, -1, _(""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator(wxFILTER_NONE, &m_data.Destination)); grid->Add(Destination, 1, wxBOTTOM | wxEXPAND, 5); - wxButton* BrowseButton = new wxButton(this, ID_BUTTON_BROWSE, "...", + wxButton* BrowseButton = new wxButton(this, ID_BUTTON_BROWSE, _("..."), wxPoint(-1,-1), wxSize(20, -1)); grid->Add(BrowseButton, 0, wxALL, 5); diff -ur rapidsvn-0.6.0/src/mkdir_action.cpp rapidsvn-0.6.0-unicode-fixed/src/mkdir_action.cpp --- rapidsvn-0.6.0/src/mkdir_action.cpp 2004-05-24 11:45:15.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/mkdir_action.cpp 2004-08-10 17:16:24.000000000 -0400 @@ -23,7 +23,7 @@ MkdirAction::MkdirAction (wxWindow * parent, const char * path) : Action (parent, _("Mkdir"), GetBaseFlags ()), - m_path (path) + m_path (path, wxConvLocal) { } @@ -35,15 +35,15 @@ return false; } - DestinationDlg dlg (GetParent (), _("Make directory"), - _("Directory:")); + DestinationDlg dlg (GetParent (), "Make directory", + "Directory:"); if (dlg.ShowModal () != wxID_OK) { return false; } - wxString target (dlg.GetDestination ()); + wxString target (dlg.GetDestination (), wxConvLocal); m_target = target.Strip (wxString::both); return true; } @@ -56,8 +56,8 @@ // add target to path wxString newDir (m_path + m_target); - svn::Path target (m_path.c_str ()); - target.addComponent (m_target.c_str ()); + svn::Path target (m_path.ToAscii ()); + target.addComponent (m_target.ToAscii ()); client.mkdir (target, ""); return true; diff -ur rapidsvn-0.6.0/src/move_action.cpp rapidsvn-0.6.0-unicode-fixed/src/move_action.cpp --- rapidsvn-0.6.0/src/move_action.cpp 2004-05-24 11:45:13.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/move_action.cpp 2004-08-10 17:22:05.000000000 -0400 @@ -23,20 +23,20 @@ MoveAction::MoveAction (wxWindow * parent, int kind) - : Action (parent, "", GetBaseFlags ()), + : Action (parent, _(""), GetBaseFlags ()), m_kind (kind) { const char * name; switch (kind) { case MOVE_MOVE: - name = _("Move"); + name = "Move"; break; case MOVE_COPY: - name = _("Copy"); + name = "Copy"; break; case MOVE_RENAME: - name = _("Rename"); + name = "Rename"; break; default: name = ""; @@ -74,10 +74,10 @@ { case MOVE_COPY: case MOVE_MOVE: - descr = _("Select destination:"); + descr = "Select destination:"; break; case MOVE_RENAME: - descr = _("Enter new name:"); + descr = "Enter new name:"; break; default: return false; @@ -91,7 +91,7 @@ return false; } - m_destination = dlg.GetDestination (); + m_destination = wxString(dlg.GetDestination (), wxConvLocal); m_force = dlg.GetForce (); return true; @@ -103,7 +103,7 @@ svn::Client client; svn::Path srcPath = GetTarget (); - svn::Path destPath (m_destination.c_str ()); + svn::Path destPath (m_destination.ToAscii ()); svn::Revision unusedRevision; switch (m_kind) @@ -122,7 +122,7 @@ std::string dirpath; srcPath.split (dirpath, basename); destPath = dirpath.c_str (); - destPath.addComponent (m_destination.c_str ()); + destPath.addComponent (m_destination.ToAscii ()); client.move (srcPath, unusedRevision, destPath, m_force); } diff -ur rapidsvn-0.6.0/src/preferences.cpp rapidsvn-0.6.0-unicode-fixed/src/preferences.cpp --- rapidsvn-0.6.0/src/preferences.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/preferences.cpp 2004-08-10 17:24:30.000000000 -0400 @@ -21,30 +21,30 @@ // platform dependant constants #ifdef _WIN32 - static const char * DEFAULT_EXPLORER = "explorer.exe"; + static const wxChar * DEFAULT_EXPLORER = _("explorer.exe"); #else - static const char * DEFAULT_EXPLORER = ""; + static const wxChar * DEFAULT_EXPLORER = _(""); #endif -static const char * DEFAULT_EDITOR = ""; -static const char * DEFAULT_DIFF_TOOL = ""; +static const wxChar * DEFAULT_EDITOR = _(""); +static const wxChar * DEFAULT_DIFF_TOOL = _(""); /** * Configuration key names */ -static const char CONF_EDITOR[] = - "/Preferences/StandardEditor"; -static const char CONF_EDITOR_ALWAYS[] = - "/Preferences/AlwaysStandardEditor"; -static const char CONF_EXPLORER[] = - "/Preferences/StandardFileExplorer"; -static const char CONF_EXPLORER_ALWAYS[] = - "/Preferences/AlwaysStandardFileExplorer"; -static const char CONF_PURGE_TEMP_FILES[] = - "/Preferences/PurgeTempFiles"; -static const char CONF_AUTH_PER_BOOKMARK[] = - "/Preferences/AuthPerBookmark"; -static const char CONF_DIFF_TOOL[] = - "/Preferences/DiffTool"; +static const wxChar * CONF_EDITOR = + _("/Preferences/StandardEditor"); +static const wxChar * CONF_EDITOR_ALWAYS = + _("/Preferences/AlwaysStandardEditor"); +static const wxChar * CONF_EXPLORER = + _("/Preferences/StandardFileExplorer"); +static const wxChar * CONF_EXPLORER_ALWAYS = + _("/Preferences/AlwaysStandardFileExplorer"); +static const wxChar * CONF_PURGE_TEMP_FILES = + _("/Preferences/PurgeTempFiles"); +static const wxChar * CONF_AUTH_PER_BOOKMARK = + _("/Preferences/AuthPerBookmark"); +static const wxChar * CONF_DIFF_TOOL = + _("/Preferences/DiffTool"); Preferences::Preferences () : editor (DEFAULT_EDITOR), editorAlways (false), diff -ur rapidsvn-0.6.0/src/preferences_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/preferences_dlg.cpp --- rapidsvn-0.6.0/src/preferences_dlg.cpp 2004-05-24 11:45:16.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/preferences_dlg.cpp 2004-08-10 17:26:31.000000000 -0400 @@ -35,13 +35,13 @@ // platform dependant constants #ifdef _WIN32 -static const char * EXECUTABLE_WILDCARD = +static const wxChar * EXECUTABLE_WILDCARD = _("Executable Files|*.exe;*.com;*.bat|All files (*.*)|*.*"); #else // NOTE: (WX 2.4.0) On Motif, neither multiple extensions nor multiple file // types are supported (wildcard is limited to a single "*.ext" string) -static const char * EXECUTABLE_WILDCARD = ""; +static const wxChar * EXECUTABLE_WILDCARD = _(""); #endif /* GeneralPanel **************************************************************/ @@ -169,7 +169,7 @@ // text ctrl wxTextValidator valText (wxFILTER_NONE, & m_prefs->editor); - mTextEditor = new wxTextCtrl (this, -1, "", + mTextEditor = new wxTextCtrl (this, -1, _(""), wxDefaultPosition, wxSize (200, -1), 0, valText); @@ -203,7 +203,7 @@ // text ctrl wxTextValidator valText (wxFILTER_NONE, &m_prefs->explorer); mTextExplorer = - new wxTextCtrl (this, -1, "", wxDefaultPosition, + new wxTextCtrl (this, -1, _(""), wxDefaultPosition, wxSize (200, -1), 0, valText); @@ -240,7 +240,7 @@ // text ctrl wxTextValidator valText (wxFILTER_NONE, &m_prefs->diffTool); mTextDiffTool = - new wxTextCtrl (this, -1, "", wxDefaultPosition, + new wxTextCtrl (this, -1, _(""), wxDefaultPosition, wxSize (200, -1), 0, valText); @@ -395,10 +395,10 @@ wxBoxSizer *button_sizer = new wxBoxSizer (wxHORIZONTAL); button_sizer->Add ( - new wxButton (wnd, wxID_OK, "OK"), + new wxButton (wnd, wxID_OK, _("OK")), 0, wxALL, 10); button_sizer->Add ( - new wxButton (wnd, wxID_CANCEL, "Cancel"), + new wxButton (wnd, wxID_CANCEL, _("Cancel")), 0, wxALL, 10); notebook = new wxNotebook (wnd, -1, wxDefaultPosition, wxDefaultSize); diff -ur rapidsvn-0.6.0/src/property_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/property_dlg.cpp --- rapidsvn-0.6.0/src/property_dlg.cpp 2004-05-24 11:45:18.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/property_dlg.cpp 2004-08-11 12:49:37.000000000 -0400 @@ -82,7 +82,7 @@ { const svn::PropertyEntry & entry = *it; const char * name = entry.name.c_str (); - bool found = FindEntry (name) != -1; + bool found = FindEntry (wxString(name, wxConvLocal)) != -1; if (!found) { @@ -102,7 +102,7 @@ GetEntryAtIndex (index, name, value); - m->property.set (name.c_str (), value.c_str ()); + m->property.set (name.ToAscii (), value.ToAscii ()); } } catch (...) @@ -132,7 +132,8 @@ { const svn::PropertyEntry & entry = *it; - SetEntry (entry.name.c_str (), entry.value.c_str ()); + SetEntry (wxString(entry.name.c_str (), wxConvLocal), + wxString(entry.value.c_str (), wxConvLocal)); it++; } diff -ur rapidsvn-0.6.0/src/rapidsvn_app.cpp rapidsvn-0.6.0-unicode-fixed/src/rapidsvn_app.cpp --- rapidsvn-0.6.0/src/rapidsvn_app.cpp 2004-05-24 11:45:16.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/rapidsvn_app.cpp 2004-08-11 12:50:40.000000000 -0400 @@ -33,8 +33,8 @@ SetAppName (APPLICATION_NAME); m_locale.Init (); - m_locale.AddCatalogLookupPathPrefix ("locale"); - m_locale.AddCatalog ("rapidsvn"); + m_locale.AddCatalogLookupPathPrefix (_("locale")); + m_locale.AddCatalog (_("rapidsvn")); RapidSvnFrame * frame = new RapidSvnFrame (APPLICATION_NAME); frame->Show (TRUE); @@ -62,7 +62,7 @@ if (prefs.purgeTempFiles) { - wxString str (filename); + wxString str (filename, wxConvLocal); m_TempFiles.Add(str); } else diff -ur rapidsvn-0.6.0/src/rapidsvn_frame.cpp rapidsvn-0.6.0-unicode-fixed/src/rapidsvn_frame.cpp --- rapidsvn-0.6.0/src/rapidsvn_frame.cpp 2004-05-24 11:45:12.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/rapidsvn_frame.cpp 2004-08-11 13:07:25.000000000 -0400 @@ -78,16 +78,16 @@ static const int NUM_ITEMS = 30; // List config keys here, to avoid duplicating literal text: -const static char ConfigLeft[] = "/MainFrame/Left"; -const static char ConfigTop[] = "/MainFrame/Top"; -const static char ConfigWidth[] = "/MainFrame/Width"; -const static char ConfigHeight[] = "/MainFrame/Height"; -const static char ConfigSplitterHoriz[] = "/MainFrame/SplitterHoriz"; -const static char ConfigSplitterVert[] = "/MainFrame/SplitterVert"; -const static char ConfigBookmarkFmt[] = "/Bookmarks/Bookmark%ld"; -const static char ConfigBookmarkCount[] = "/Bookmarks/Count"; +const static wxChar * const ConfigLeft = _("/MainFrame/Left"); +const static wxChar * const ConfigTop = _("/MainFrame/Top"); +const static wxChar * const ConfigWidth = _("/MainFrame/Width"); +const static wxChar * const ConfigHeight = _("/MainFrame/Height"); +const static wxChar * const ConfigSplitterHoriz = _("/MainFrame/SplitterHoriz"); +const static wxChar * const ConfigSplitterVert = _("/MainFrame/SplitterVert"); +const static wxChar * const ConfigBookmarkFmt = _("/Bookmarks/Bookmark%ld"); +const static wxChar * const ConfigBookmarkCount = _("/Bookmarks/Count"); -const static char TraceMisc[] = "tracemisc"; +const static wxChar * const TraceMisc = _("tracemisc"); // Platform specific constants. #ifdef __WXMSW__ @@ -132,11 +132,11 @@ * the column headings in FileListCtrl since they dont have * shortcuts. */ -static const char * +static const wxChar * COLUMN_CAPTIONS[FileListCtrl::COL_COUNT] = { - "", // Name is not used here - "", // Path is not used here + _(""), // Name is not used here + _(""), // Path is not used here _("&Revision"), _("R&ep. Rev."), _("&Author"), @@ -372,7 +372,7 @@ m_info_panel = new InfoPanel (m_horiz_splitter); m_log = new wxTextCtrl (m_horiz_splitter, -1, - "", + _(""), wxPoint (0, 0), wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY); @@ -516,14 +516,14 @@ wxString msg; msg.Printf (_("Error while updating filelist (%s)"), e.message ()); - Trace (msg); + Trace (msg.ToAscii()); // probably unversioned resource m_listCtrl->Show (FALSE); } catch (...) { - Trace (_("Error while updating filelist")); + Trace ("Error while updating filelist"); } } else @@ -787,7 +787,7 @@ // admin dir? wxFileName fileName (dialog.GetPath ()); - if ((fileName.GetName () + fileName.GetExt ()) == SVN_WC_ADM_DIR_NAME) + if ((fileName.GetName () + fileName.GetExt ()) == _(SVN_WC_ADM_DIR_NAME)) { add = FALSE; wxMessageBox (_("You cannot add a subversion " @@ -797,7 +797,7 @@ } // add - m_folder_browser->AddBookmark (dialog.GetPath ()); + m_folder_browser->AddBookmark (dialog.GetPath().ToAscii()); UpdateFolderBrowser (); wxLogStatus (_("Added working copy to bookmarks '%s'"), @@ -811,7 +811,7 @@ UpdateDlg::WITH_URL | UpdateDlg::WITHOUT_RECURSIVE | UpdateDlg::WITHOUT_REVISION; - UpdateDlg dialog (this, _("Repository URL"), flags); + UpdateDlg dialog (this, "Repository URL", flags); if (dialog.ShowModal () != wxID_OK) { @@ -820,7 +820,7 @@ // add wxString url = dialog.GetData ().url; - m_folder_browser->AddBookmark (url); + m_folder_browser->AddBookmark (url.ToAscii()); UpdateFolderBrowser (); wxLogStatus (_("Added repository to bookmarks '%s'"), @@ -854,9 +854,9 @@ for (item = 0; item < count; item++) { key.Printf (ConfigBookmarkFmt, item); - if (pConfig->Read (key, &bookmark, "")) + if (pConfig->Read (key, &bookmark, _(""))) { - m_folder_browser->AddBookmark (bookmark); + m_folder_browser->AddBookmark (bookmark.ToAscii()); } else @@ -876,13 +876,13 @@ { wxString path = m_folder_browser->GetPath (); - if (!svn::Url::isValid (path)) + if (!svn::Url::isValid (path.ToAscii())) { wxFileName fname (path); path = fname.GetFullPath (); } - return svn::Targets (path.c_str ()); + return svn::Targets (path.ToAscii()); } else { @@ -905,7 +905,7 @@ flags |= Action::IS_DIR; wxString path = m_folder_browser->GetPath (); - const char * path_c = path.c_str (); + const char * path_c = path.ToAscii(); if (*path_c != '\0') { flags |= Action::SINGLE_TARGET; @@ -1184,7 +1184,7 @@ break; case ID_Mkdir: - action = new MkdirAction (this, m_currentPath); + action = new MkdirAction (this, m_currentPath.ToAscii()); break; case ID_Merge: @@ -1209,7 +1209,7 @@ case ID_Contents: //TODO default: - m_logTracer->Trace ("Unimplemented action!"); + m_logTracer->Trace (_("Unimplemented action!")); break; } } @@ -1226,18 +1226,18 @@ switch (token) { case TOKEN_INFO: - Trace (event.GetString ()); + Trace (event.GetString ().ToAscii()); break; case TOKEN_SVN_INTERNAL_ERROR: case TOKEN_INTERNAL_ERROR: - Trace (event.GetString ()); + Trace (event.GetString ().ToAscii()); UpdateFileList (); - Trace (_("Ready\n")); + Trace ("Ready\n"); break; case TOKEN_ACTION_START: - Trace (event.GetString ()); + Trace (event.GetString ().ToAscii()); wxLogStatus (event.GetString ()); break; @@ -1255,11 +1255,11 @@ } else if ((actionFlags & Action::DONT_UPDATE) == 0) { - Trace (_("Updating...")); + Trace ("Updating..."); UpdateFileList (); } - Trace (_("Ready\n")); + Trace ("Ready\n"); } break; @@ -1283,7 +1283,7 @@ case TOKEN_ADD_BOOKMARK: { - const char * bookmark = event.GetString ().c_str (); + const char * bookmark = event.GetString ().ToAscii (); m_folder_browser->AddBookmark (bookmark); m_folder_browser->Refresh (); @@ -1346,7 +1346,7 @@ fileInfo.addPath (path.c_str ()); } - wxString info = fileInfo.info (); + wxString info (fileInfo.info (), wxConvLocal); ReportDlg dlg (this, _("Info"), info, NORMAL_REPORT); dlg.ShowModal (); @@ -1400,7 +1400,7 @@ { if (m_folder_browser == 0) { - m_currentPath = ""; + m_currentPath = _(""); m_context = 0; } else @@ -1409,7 +1409,7 @@ m_context = m_folder_browser->GetContext (); } - SetTitle (m_title + ": " + m_currentPath); + SetTitle (m_title + _(": ") + m_currentPath); } bool @@ -1442,7 +1442,8 @@ void RapidSvnFrame::Perform (Action * action) { - action->SetPath (m_currentPath.c_str ()); + action->SetPath (static_cast + (m_currentPath.ToAscii())); action->SetContext (m_context); if ((action->GetFlags () & Action::WITHOUT_TARGET) == 0) { @@ -1515,7 +1516,7 @@ { wxBusyCursor busy; - m_currentPath = ""; + m_currentPath = _(""); UpdateFileList (); try @@ -1539,7 +1540,7 @@ if (m_log != 0) { wxString message; - message.Printf ("%s\n", msg); + message.Printf (_("%s\n"), msg); m_log->AppendText (message); } } @@ -1579,7 +1580,7 @@ } LogTracer::LogTracer (wxWindow * parent) - : wxTextCtrl (parent, -1, "", wxPoint (0, 0), + : wxTextCtrl (parent, -1, _(""), wxPoint (0, 0), wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY) { SetMaxLength (0); @@ -1588,7 +1589,7 @@ void LogTracer::Trace (const wxString & str) { - AppendText (str + "\n"); + AppendText (str + _("\n")); } /* ----------------------------------------------------------------- * local variables: diff -ur rapidsvn-0.6.0/src/report_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/report_dlg.cpp --- rapidsvn-0.6.0/src/report_dlg.cpp 2004-05-24 11:45:12.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/report_dlg.cpp 2004-08-11 13:08:27.000000000 -0400 @@ -31,7 +31,7 @@ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER), m_str (data) { - m_text = new wxTextCtrl (this, -1, "", + m_text = new wxTextCtrl (this, -1, _(""), wxDefaultPosition, wxSize (500, 200), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH); @@ -43,7 +43,7 @@ } m_text->WriteText (m_str); - m_button = new wxButton (this, wxID_OK, "OK"); + m_button = new wxButton (this, wxID_OK, _("OK")); wxBoxSizer * topsizer = new wxBoxSizer (wxVERTICAL); diff -ur rapidsvn-0.6.0/src/switch_action.cpp rapidsvn-0.6.0-unicode-fixed/src/switch_action.cpp --- rapidsvn-0.6.0/src/switch_action.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/switch_action.cpp 2004-08-11 13:10:24.000000000 -0400 @@ -37,18 +37,18 @@ } // first try to get the URL for the target - wxString url = ""; + wxString url = _(""); { svn::Path path = GetTarget (); svn::Client client (GetContext ()); svn::Status status (client.singleStatus (path.c_str ())); - url = status.entry ().url (); + url = wxString(status.entry ().url (), wxConvLocal); } // create flags for the dialog int flags = UpdateDlg::WITH_URL; - UpdateDlg dlg (GetParent (), _("Switch"), flags, + UpdateDlg dlg (GetParent (), "Switch", flags, true); dlg.GetData ().url = url; @@ -66,7 +66,7 @@ SwitchAction::Perform () { svn::Path path = GetTarget (); - const char * url = m_data.url.c_str (); + const char * url = m_data.url.ToAscii (); svn::Revision revision (svn::Revision::HEAD); if (!m_data.useLatest) diff -ur rapidsvn-0.6.0/src/trace_update.cpp rapidsvn-0.6.0-unicode-fixed/src/trace_update.cpp --- rapidsvn-0.6.0/src/trace_update.cpp 2004-05-24 11:45:12.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/trace_update.cpp 2004-08-11 13:20:29.000000000 -0400 @@ -11,6 +11,8 @@ * ==================================================================== */ +#include "wx/wx.h" + // subversion #include "svn_path.h" #include "svn_wc.h" @@ -151,7 +153,7 @@ { //printf ("A %s\n", new_db->path); - wxString str = wxString::Format ("A %s", new_db->path); + wxString str = wxString::Format (_("A %s"), new_db->path); eb->tracer->Trace (str); } @@ -194,7 +196,7 @@ statchar_buf[1] = 'U'; { //printf ("%s %s\n", statchar_buf, db->path); - wxString str = wxString::Format ("%s %s", statchar_buf, db->path); + wxString str = wxString::Format (_("%s %s"), statchar_buf, db->path); eb->tracer->Trace (str); } @@ -296,7 +298,7 @@ { //printf ("%s %s\n", statchar_buf, fb->path); - wxString str = wxString::Format ("%s %s", statchar_buf, fb->path); + wxString str = wxString::Format (_("%s %s"), statchar_buf, fb->path); eb->tracer->Trace (str); } @@ -347,7 +349,7 @@ { //printf( "D %s\n", svn_path_join( eb->path, path, pool ) ); wxString str = - wxString::Format ("D %s", svn_path_join (eb->path, path, pool)); + wxString::Format (_("D %s"), svn_path_join (eb->path, path, pool)); eb->tracer->Trace (str); } return SVN_NO_ERROR; @@ -379,7 +381,7 @@ // eb->revision ); { wxString str = - wxString::Format ("Checked out revision %" SVN_REVNUM_T_FMT ".", + wxString::Format (_("Checked out revision %" SVN_REVNUM_T_FMT "."), eb->revision); eb->tracer->Trace (str); } @@ -390,7 +392,7 @@ //printf( "Updated to revision %" SVN_REVNUM_T_FMT ".\n", // eb->revision ); wxString str = - wxString::Format ("Updated to revision %" SVN_REVNUM_T_FMT ".", + wxString::Format (_("Updated to revision %" SVN_REVNUM_T_FMT "."), eb->revision); eb->tracer->Trace (str); } @@ -399,7 +401,7 @@ { //printf( "At revision %" SVN_REVNUM_T_FMT ".\n", // eb->revision ); - wxString str = wxString::Format ("At revision %" SVN_REVNUM_T_FMT ".", + wxString str = wxString::Format (_("At revision %" SVN_REVNUM_T_FMT "."), eb->revision); eb->tracer->Trace (str); } diff -ur rapidsvn-0.6.0/src/tracer.cpp rapidsvn-0.6.0-unicode-fixed/src/tracer.cpp --- rapidsvn-0.6.0/src/tracer.cpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/tracer.cpp 2004-08-11 13:12:09.000000000 -0400 @@ -28,7 +28,7 @@ TextCtrlTracer::Trace (const wxString & str) { wxMutexGuiEnter (); - m_txtCtrl->AppendText (str + "\n"); + m_txtCtrl->AppendText (str + _("\n")); wxMutexGuiLeave (); } @@ -60,7 +60,7 @@ void ErrorTracer::Trace (const wxString & str) { - m_msgs += str + "\n"; + m_msgs += str + _("\n"); } void @@ -78,7 +78,7 @@ void StringTracer::Trace (const wxString & str) { - m_msgs += str + "\n"; + m_msgs += str + _("\n"); } /* ----------------------------------------------------------------- * local variables: diff -ur rapidsvn-0.6.0/src/tviewer.cpp rapidsvn-0.6.0-unicode-fixed/src/tviewer.cpp --- rapidsvn-0.6.0/src/tviewer.cpp 2004-05-24 11:45:19.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/tviewer.cpp 2004-08-11 13:21:37.000000000 -0400 @@ -31,7 +31,7 @@ wxSize size (window->GetCharWidth () * 40, window->GetCharHeight () * 20); const long style = wxTE_MULTILINE | wxTE_READONLY; - m_text = new wxTextCtrl (window, -1, "", wxDefaultPosition, + m_text = new wxTextCtrl (window, -1, _(""), wxDefaultPosition, size, style); // Close Button @@ -54,7 +54,7 @@ SetText (const char * text) { m_text->Show (false); - m_text->SetValue (text); + m_text->SetValue (wxString(text, wxConvLocal)); m_text->Show (true); } }; @@ -66,7 +66,7 @@ TextViewer::TextViewer (const char * title) - : wxDialog (NULL, -1, title, + : wxDialog (NULL, -1, wxString(title, wxConvLocal), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDIALOG_NO_PARENT) diff -ur rapidsvn-0.6.0/src/update_action.cpp rapidsvn-0.6.0-unicode-fixed/src/update_action.cpp --- rapidsvn-0.6.0/src/update_action.cpp 2004-05-24 11:45:16.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/update_action.cpp 2004-08-11 13:24:09.000000000 -0400 @@ -37,7 +37,7 @@ return false; } - UpdateDlg dlg (GetParent (), _("Update")); + UpdateDlg dlg (GetParent (), "Update"); if (dlg.ShowModal () != wxID_OK) { @@ -66,7 +66,7 @@ const std::vector & v = GetTargets (); std::vector::const_iterator it; - wxSetWorkingDirectory (GetPath ().c_str ()); + wxSetWorkingDirectory (wxString(GetPath ().c_str (), wxConvLocal)); svn::Client client (GetContext ()); for (it = v.begin(); it != v.end(); it++) { diff -ur rapidsvn-0.6.0/src/update_data.hpp rapidsvn-0.6.0-unicode-fixed/src/update_data.hpp --- rapidsvn-0.6.0/src/update_data.hpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/update_data.hpp 2004-08-11 12:51:47.000000000 -0400 @@ -19,7 +19,7 @@ struct UpdateData { UpdateData() - : revision (""), url (""), useLatest (true), recursive (true) + : revision (_("")), url (_("")), useLatest (true), recursive (true) { } diff -ur rapidsvn-0.6.0/src/update_dlg.cpp rapidsvn-0.6.0-unicode-fixed/src/update_dlg.cpp --- rapidsvn-0.6.0/src/update_dlg.cpp 2004-05-24 11:45:13.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/update_dlg.cpp 2004-08-11 13:26:10.000000000 -0400 @@ -58,7 +58,7 @@ wxStaticBoxSizer * sizer = new wxStaticBoxSizer (box, wxHORIZONTAL); wxTextValidator val (wxFILTER_NONE, &data.url); - m_textUrl = new wxTextCtrl (window, ID_URL, "", + m_textUrl = new wxTextCtrl (window, ID_URL, _(""), wxDefaultPosition, wxDefaultSize, 0, val); sizer->Add (m_textUrl, 1, wxALL | wxEXPAND, 5); @@ -72,7 +72,7 @@ wxStaticBoxSizer *revSizer = new wxStaticBoxSizer (box, wxHORIZONTAL); wxTextValidator val (wxFILTER_NUMERIC, &data.revision); - m_textRevision = new wxTextCtrl (window, ID_REVISION, "", + m_textRevision = new wxTextCtrl (window, ID_REVISION, _(""), wxDefaultPosition, wxDefaultSize, 0, val); revSizer->Add (m_textRevision, 1, @@ -135,12 +135,12 @@ { if (!m_checkUseLatest->IsChecked ()) { - ok = CheckRevision (m_textRevision->GetValue ()); + ok = CheckRevision (m_textRevision->GetValue ().ToAscii()); } } if (ok && withUrl ()) { - ok = svn::Url::isValid(m_textUrl->GetValue ()); + ok = svn::Url::isValid(m_textUrl->GetValue ().ToAscii()); } m_buttonOk->Enable (ok); @@ -178,7 +178,7 @@ UpdateDlg::UpdateDlg (wxWindow* parent, const char * title, int flags, bool recursive) - : wxDialog(parent, -1, title, + : wxDialog(parent, -1, wxString(title, wxConvLocal), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { diff -ur rapidsvn-0.6.0/src/utils.cpp rapidsvn-0.6.0-unicode-fixed/src/utils.cpp --- rapidsvn-0.6.0/src/utils.cpp 2004-05-24 11:45:17.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/utils.cpp 2004-08-11 13:29:39.000000000 -0400 @@ -121,7 +121,7 @@ wxButton * CreateEllipsisButton(wxWindow *parent, long id) { - const char *ELLIPSIS = "..."; + const wxChar * const ELLIPSIS = _("..."); int ellipsis_width, ellipsis_height; wxButton *button = new wxButton (parent, id, ELLIPSIS); @@ -190,7 +190,7 @@ { svn_revnum_t revnum; - return ParseRevision (revstring, revnum); + return ParseRevision (wxString(revstring, wxConvLocal), revnum); } wxCommandEvent @@ -205,7 +205,7 @@ wxMenuItem * AppendMenuItem (wxMenu & menu, int id) { - const char * caption = ""; + const wxChar * caption = _(""); wxBitmap bitmap; switch (id) @@ -293,7 +293,7 @@ // (we check only if the complete parsing failed, // not if only the partial string could be parsed) wxDateTime dateTime; - if (dateTime.ParseFormat (datestring, "%c") ==0) + if (dateTime.ParseFormat (datestring, _("%c")) ==0) return false; apr_time_ansi_put (&date, dateTime.GetTicks ()); @@ -314,7 +314,7 @@ FormatDateTime (apr_time_t date, wxString fmt) { if (date == 0) - return ""; + return _(""); apr_time_exp_t exp_time; char timestr[80]; @@ -329,14 +329,14 @@ if (apr_err) timestr[0] = '\0'; - return timestr; + return wxString(timestr, wxConvLocal); } wxString BeautifyPath (const wxString & path) { - int pos = path.Find (":"); + int pos = path.Find (_(":")); if (pos <= 0) return path; diff -ur rapidsvn-0.6.0/src/utils.hpp rapidsvn-0.6.0-unicode-fixed/src/utils.hpp --- rapidsvn-0.6.0/src/utils.hpp 2004-05-24 11:45:14.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/utils.hpp 2004-08-10 12:42:21.000000000 -0400 @@ -167,7 +167,7 @@ * @return formatted date/time string */ wxString -FormatDateTime (apr_time_t date, wxString fmt = "%x %X"); +FormatDateTime (apr_time_t date, wxString fmt = wxString("%x %X", wxConvLocal)); /** diff -ur rapidsvn-0.6.0/src/view_action.cpp rapidsvn-0.6.0-unicode-fixed/src/view_action.cpp --- rapidsvn-0.6.0/src/view_action.cpp 2004-05-24 11:45:15.000000000 -0400 +++ rapidsvn-0.6.0-unicode-fixed/src/view_action.cpp 2004-08-11 13:31:44.000000000 -0400 @@ -38,9 +38,9 @@ bool ViewAction::Perform () { - wxSetWorkingDirectory (GetPath ().c_str ()); + wxSetWorkingDirectory (wxString(GetPath ().c_str (), wxConvLocal)); - svn::Path path (m_data.path.c_str ()); + svn::Path path (m_data.path.ToAscii()); svn::Client client (GetContext ()); std::string text = client.cat (path, m_data.revision); @@ -48,7 +48,7 @@ title.Printf (_("View %s Revision %ld"), path.c_str (), m_data.revision.revnum ()); - TextViewer * viewer = new TextViewer (title); + TextViewer * viewer = new TextViewer (title.ToAscii()); viewer->SetText (text.c_str ()); viewer->Show (true);