Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31232/src
Modified Files:
LangChoice.cpp
Log Message:
Ask user to confirm language selection if not the same as the system language.
Index: LangChoice.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LangChoice.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- LangChoice.cpp 3 Jun 2008 07:16:43 -0000 1.8
+++ LangChoice.cpp 1 Jun 2009 05:11:09 -0000 1.9
@@ -22,6 +22,7 @@
#include <wx/choice.h>
#include <wx/dialog.h>
#include <wx/intl.h>
+#include <wx/msgdlg.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
@@ -102,7 +103,34 @@
void LangChoiceDialog::OnOk(wxCommandEvent & event)
{
- mLang = mLangCodes[mChoice->GetSelection()];
+ int ndx = mChoice->GetSelection();
+ mLang = mLangCodes[ndx];
+
+ wxString slang = GetSystemLanguageCode();
+ int sndx = mLangCodes.Index(slang);
+ wxString sname;
+
+ if (sndx == wxNOT_FOUND) {
+ const wxLanguageInfo *sinfo = wxLocale::FindLanguageInfo(slang);
+ if (sinfo) {
+ sname = sinfo->Description;
+ }
+ }
+ else {
+ sname = mLangNames[sndx];
+ }
+
+ if (mLang.Left(2) != slang.Left(2)) {
+ wxString msg;
+ msg.Printf(_("The language you have chosen, %s (%s), is not the same as
the system language, %s (%s)."),
+ mLangNames[ndx].c_str(),
+ mLang.c_str(),
+ sname.c_str(),
+ slang.c_str());
+ if (wxMessageBox(msg, _("Confirm"), wxYES_NO) == wxNO) {
+ return;
+ }
+ }
EndModal(true);
}
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs