[commit] r414 - in sofaswitch/trunk/callflow: bitmaps src
Author: derek Date: Fri May 23 01:04:54 2008 New Revision: 414 Modified: sofaswitch/trunk/callflow/bitmaps/ControlsEndHere.xpm sofaswitch/trunk/callflow/bitmaps/ControlsIf.xpm sofaswitch/trunk/callflow/bitmaps/Controlsend_for.xpm sofaswitch/trunk/callflow/bitmaps/Controlsfor.xpm sofaswitch/trunk/callflow/bitmaps/Controlsstart.xpm sofaswitch/trunk/callflow/bitmaps/EditCopy.xpm sofaswitch/trunk/callflow/bitmaps/EditCut.xpm sofaswitch/trunk/callflow/bitmaps/EditPaste.xpm sofaswitch/trunk/callflow/bitmaps/FileE_xit.xpm sofaswitch/trunk/callflow/bitmaps/FileNew.xpm sofaswitch/trunk/callflow/bitmaps/FileOpen.xpm sofaswitch/trunk/callflow/bitmaps/FileSave.xpm sofaswitch/trunk/callflow/bitmaps/FileSave__As.xpm sofaswitch/trunk/callflow/bitmaps/HelpAbout.xpm sofaswitch/trunk/callflow/bitmaps/HelpManual.xpm sofaswitch/trunk/callflow/bitmaps/JoinObjects.xpm sofaswitch/trunk/callflow/bitmaps/Python.xpm sofaswitch/trunk/callflow/bitmaps/RequestNode.xpm sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm sofaswitch/trunk/callflow/bitmaps/compile.xpm sofaswitch/trunk/callflow/bitmaps/death.xpm sofaswitch/trunk/callflow/bitmaps/endcall.xpm sofaswitch/trunk/callflow/bitmaps/eventer.xpm sofaswitch/trunk/callflow/bitmaps/makecall.xpm sofaswitch/trunk/callflow/bitmaps/masternode.xpm sofaswitch/trunk/callflow/bitmaps/miniclock.xpm sofaswitch/trunk/callflow/bitmaps/newgraph.xpm sofaswitch/trunk/callflow/bitmaps/readfromfile.xpm sofaswitch/trunk/callflow/bitmaps/senddtmf.xpm sofaswitch/trunk/callflow/bitmaps/sendmessage.xpm sofaswitch/trunk/callflow/bitmaps/stoptimer.xpm sofaswitch/trunk/callflow/bitmaps/transfermedia.xpm sofaswitch/trunk/callflow/bitmaps/writetofile.xpm sofaswitch/trunk/callflow/src/acceptcall.cpp sofaswitch/trunk/callflow/src/acceptcall.h sofaswitch/trunk/callflow/src/callflow.cpp sofaswitch/trunk/callflow/src/callstartstop.cpp sofaswitch/trunk/callflow/src/canvas.cpp sofaswitch/trunk/callflow/src/conditional.cpp sofaswitch/trunk/callflow/src/conditional.h sofaswitch/trunk/callflow/src/death.cpp sofaswitch/trunk/callflow/src/death.h sofaswitch/trunk/callflow/src/dnd.cpp sofaswitch/trunk/callflow/src/dnd.h sofaswitch/trunk/callflow/src/endcall.h sofaswitch/trunk/callflow/src/endfor.cpp sofaswitch/trunk/callflow/src/endfor.h sofaswitch/trunk/callflow/src/endhere.cpp sofaswitch/trunk/callflow/src/endhere.h sofaswitch/trunk/callflow/src/eventer.cpp sofaswitch/trunk/callflow/src/eventer.h sofaswitch/trunk/callflow/src/fileio.cpp sofaswitch/trunk/callflow/src/information.cpp sofaswitch/trunk/callflow/src/joinblocks.cpp sofaswitch/trunk/callflow/src/joinblocks.h sofaswitch/trunk/callflow/src/loadnewgraph.cpp sofaswitch/trunk/callflow/src/loadnewgraph.h sofaswitch/trunk/callflow/src/makecall.h sofaswitch/trunk/callflow/src/masternode.cpp sofaswitch/trunk/callflow/src/masternode.h sofaswitch/trunk/callflow/src/python.cpp sofaswitch/trunk/callflow/src/python.h sofaswitch/trunk/callflow/src/readfromfile.h sofaswitch/trunk/callflow/src/requestnode.cpp sofaswitch/trunk/callflow/src/requestnode.h sofaswitch/trunk/callflow/src/senddtmf.h sofaswitch/trunk/callflow/src/sendmessage.h sofaswitch/trunk/callflow/src/shapeselect.h sofaswitch/trunk/callflow/src/startfor.h sofaswitch/trunk/callflow/src/starthere.h sofaswitch/trunk/callflow/src/stoptimer.h sofaswitch/trunk/callflow/src/timer.h sofaswitch/trunk/callflow/src/transfermedia.h sofaswitch/trunk/callflow/src/writetofile.h Log: Many lines of tedious cahnges to get it to compile on wxWidgets 2.8 Sigh, job not finished. Modified: sofaswitch/trunk/callflow/bitmaps/ControlsEndHere.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/ControlsEndHere.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/ControlsEndHere.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *ControlsEndHere[]={ +static const char *ControlsEndHere[]={ "16 15 3 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/ControlsIf.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/ControlsIf.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/ControlsIf.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *ControlsIf_xpm[]={ +static const char *ControlsIf_xpm[]={ "16 15 3 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/Controlsend_for.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/Controlsend_for.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/Controlsend_for.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *Controlsend_for_xpm[] = { +static const char *Controlsend_for_xpm[] = { "16 15 3 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/Controlsfor.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/Controlsfor.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/Controlsfor.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *Controlsfor_xpm[] = { +static const char *Controlsfor_xpm[] = { "16 15 3 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/Controlsstart.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/Controlsstart.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/Controlsstart.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *Controlsstart[]={ +static const char *Controlsstart[]={ "16 15 3 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/EditCopy.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/EditCopy.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/EditCopy.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *EditCopy_xpm[] = { +static const char *EditCopy_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 4 1", " c None", Modified: sofaswitch/trunk/callflow/bitmaps/EditCut.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/EditCut.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/EditCut.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *EditCut_xpm[] = { +static const char *EditCut_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 3 1", " c None", Modified: sofaswitch/trunk/callflow/bitmaps/EditPaste.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/EditPaste.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/EditPaste.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *EditPaste_xpm[] = { +static const char *EditPaste_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 6 1", " c None", Modified: sofaswitch/trunk/callflow/bitmaps/FileE_xit.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/FileE_xit.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/FileE_xit.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *FileE_xit_xpm[] = { +static const char *FileE_xit_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 3 1", "X c Black", Modified: sofaswitch/trunk/callflow/bitmaps/FileNew.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/FileNew.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/FileNew.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *FileNew_xpm[] = { +static const char *FileNew_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 3 1", " c None", Modified: sofaswitch/trunk/callflow/bitmaps/FileOpen.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/FileOpen.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/FileOpen.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *FileOpen_xpm[] = { +static const char *FileOpen_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 5 1", " c None", Modified: sofaswitch/trunk/callflow/bitmaps/FileSave.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/FileSave.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/FileSave.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *FileSave_xpm[] = { +static const char *FileSave_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 4 1", " c None", Modified: sofaswitch/trunk/callflow/bitmaps/FileSave__As.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/FileSave__As.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/FileSave__As.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char * FileSave_As_xpm[] = { +static const char * FileSave_As_xpm[] = { "14 14 96 2", " c None", ". c #A6A6A6", Modified: sofaswitch/trunk/callflow/bitmaps/HelpAbout.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/HelpAbout.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/HelpAbout.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *HelpAbout[]={ +static const char *HelpAbout[]={ "16 15 4 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/HelpManual.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/HelpManual.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/HelpManual.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *HelpManual_xpm[] = { +static const char *HelpManual_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 4 1", " c None", Modified: sofaswitch/trunk/callflow/bitmaps/JoinObjects.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/JoinObjects.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/JoinObjects.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *JoinObjects[]={ +static const char *JoinObjects[]={ "16 15 2 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/Python.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/Python.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/Python.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *Python_xpm[]={ +static const char *Python_xpm[]={ "32 32 358 2", "Qt c None", "cG c #facc6e", Modified: sofaswitch/trunk/callflow/bitmaps/RequestNode.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/RequestNode.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/RequestNode.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *RequestNode[]={ +static const char *RequestNode[]={ "16 15 5 1", ". c None", "# c #00c000", Modified: sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *acceptcall_xpm[]={ +static const char *acceptcall_xpm[]={ "32 32 6 1", ". c None", "# c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/compile.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/compile.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/compile.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char * compile_xpm[] = { +static const char * compile_xpm[] = { /* width height ncolors cpp [x_hot y_hot] */ "24 24 4 1 0 0", /* colors */ Modified: sofaswitch/trunk/callflow/bitmaps/death.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/death.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/death.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *death[] = { +static const char *death[] = { /* columns rows colors chars-per-pixel */ "24 24 118 2", " c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/endcall.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/endcall.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/endcall.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *endcall[]={ +static const char *endcall[]={ "32 32 6 1", "d c None", "# c None", Modified: sofaswitch/trunk/callflow/bitmaps/eventer.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/eventer.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/eventer.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char * eventer_xpm[] = { +static const char * eventer_xpm[] = { "32 32 127 2", " c None", ". c #FFE81F", Modified: sofaswitch/trunk/callflow/bitmaps/makecall.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/makecall.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/makecall.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *makecall[]={ +static const char *makecall[]={ "32 32 5 1", "c c None", ". c None", Modified: sofaswitch/trunk/callflow/bitmaps/masternode.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/masternode.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/masternode.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *masternode_xpm[] = { +static const char *masternode_xpm[] = { /* columns rows colors chars-per-pixel */ "22 22 27 1", " c #9494AD", Modified: sofaswitch/trunk/callflow/bitmaps/miniclock.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/miniclock.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/miniclock.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char * miniclock_xpm[] = { +static const char * miniclock_xpm[] = { "16 16 4 1", " c None s None", ". c Black", Modified: sofaswitch/trunk/callflow/bitmaps/newgraph.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/newgraph.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/newgraph.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *newgraph[]={ +static const char *newgraph[]={ "32 32 5 1", "# c None", "b c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/readfromfile.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/readfromfile.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/readfromfile.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *readfromfile[]={ +static const char *readfromfile[]={ "32 32 5 1", "a c None", "# c None", Modified: sofaswitch/trunk/callflow/bitmaps/senddtmf.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/senddtmf.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/senddtmf.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *senddtmf[]={ +static const char *senddtmf[]={ "32 32 6 1", ". c None", "c c #0000ff", Modified: sofaswitch/trunk/callflow/bitmaps/sendmessage.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/sendmessage.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/sendmessage.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char * sendmessage_xpm[] = { +static const char * sendmessage_xpm[] = { "16 16 4 1", " c None", ". c #000000", Modified: sofaswitch/trunk/callflow/bitmaps/stoptimer.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/stoptimer.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/stoptimer.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *stoptimer[]={ +static const char *stoptimer[]={ "16 16 5 1", "c c None", ". c None", Modified: sofaswitch/trunk/callflow/bitmaps/transfermedia.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/transfermedia.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/transfermedia.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *transfermedia[]={ +static const char *transfermedia[]={ "32 32 7 1", "e c None", ". c None", Modified: sofaswitch/trunk/callflow/bitmaps/writetofile.xpm ============================================================================== --- sofaswitch/trunk/callflow/bitmaps/writetofile.xpm (original) +++ sofaswitch/trunk/callflow/bitmaps/writetofile.xpm Fri May 23 01:04:54 2008 @@ -1,5 +1,5 @@ /* XPM */ -static char *writetofile[]={ +static const char *writetofile[]={ "32 32 4 1", "# c None", "a c #000000", Modified: sofaswitch/trunk/callflow/src/acceptcall.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/acceptcall.cpp (original) +++ sofaswitch/trunk/callflow/src/acceptcall.cpp Fri May 23 01:04:54 2008 @@ -43,7 +43,7 @@ dc.SetPen(*wxGREEN_PEN); dc.SetBrush(wxBrush(*wxGREEN, wxTRANSPARENT)); - wxString text = wxString::Format("? ?"); + wxString text = wxString::Format(wxT("? ?")); wxCoord w, h; dc.GetTextExtent(text, &w, &h); int xPos = m_rect.x + 25 - (w/2); @@ -55,47 +55,46 @@ bool DndShapeAcceptCall::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Accept_Call(self, sTuple): "); - file.AddLine(" a,b,c = sTuple "); - file.AddLine(" self.aMedia = self.data[a][\"dest node\"] "); - file.AddLine(" try: "); - file.AddLine(" self.rhost = eval(self.aMedia) "); - file.AddLine(" except: "); - file.AddLine(" print \"The SofaSwitch node id \", self.aMedia, \" could not be evaluated\" "); - file.AddLine(" return self.data[a][\"Output\"] "); - - file.AddLine(" self.mesg = self.data[a][\"do answer\"] "); - file.AddLine(" try: "); - file.AddLine(" self.myanswer = eval(self.mesg) "); - file.AddLine(" except: "); - file.AddLine(" print \"The evaluation of \", self.mesg, \" failed - no idea what this means\" "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(" self.rhost += \":ANSWER \" + self.myanswer + \"\\0\" "); - file.AddLine(" self.transport.write(self.rhost) "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(""); + file.AddLine(wxT(" def Accept_Call(self, sTuple): ")); + file.AddLine(wxT(" a,b,c = sTuple ")); + file.AddLine(wxT(" self.aMedia = self.data[a][\"dest node\"] ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.rhost = eval(self.aMedia) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"The SofaSwitch node id \", self.aMedia, \" could not be evaluated\" ")); + file.AddLine(wxT(" return self.data[a][\")Output\"] ")); + file.AddLine(wxT(" self.mesg = self.data[a][\"do answer\"] ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.myanswer = eval(self.mesg) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"The evaluation of \", self.mesg, \" failed - no idea what this means\" ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT(" self.rhost += \":ANSWER \" + self.myanswer + \"\\0\" ")); + file.AddLine(wxT(" self.transport.write(self.rhost) ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT("")); - return true; + return true; } bool DndShapeAcceptCall::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxString::Format(wxT(" \"%s\" : { "), GetKey().c_str())); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Output\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxString::Format(wxT(" \"Output\" : "))); + file.AddLine(wxString::Format(wxT(" %s, "), outputLabel.c_str())); - file.AddLine(wxString::Format(" \"dest node\" : ")); + file.AddLine(wxString::Format(wxT(" \"dest node\" : "))); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxString::Format(wxT(" \"%s\", "), dest.c_str())); - file.AddLine(wxString::Format(" \"do answer\" : ")); + file.AddLine(wxString::Format(wxT(" \"do answer\" : "))); dest = ProtectString(displayData[2].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxString::Format(wxT(" \"%s\", "), dest.c_str())); - file.AddLine(wxString::Format(" },")); + file.AddLine(wxString::Format(wxT(" },"))); return true; } Modified: sofaswitch/trunk/callflow/src/acceptcall.h ============================================================================== --- sofaswitch/trunk/callflow/src/acceptcall.h (original) +++ sofaswitch/trunk/callflow/src/acceptcall.h Fri May 23 01:04:54 2008 @@ -18,7 +18,7 @@ void Draw(wxDC & dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Accept Call"); } + static wxString GetKindName() { return wxT("Accept Call"); } /**Write the code generic to this Accept Call code shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/callflow.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/callflow.cpp (original) +++ sofaswitch/trunk/callflow/src/callflow.cpp Fri May 23 01:04:54 2008 @@ -218,7 +218,7 @@ BuildToolBars(); CreateStatusBar(); - SetStatusText(" Welcome to Call Flow. "); + SetStatusText(wxT(" Welcome to Call Flow. ")); int w, h; GetSize(&w, &h); @@ -231,12 +231,12 @@ void MyFrame::OnClose (wxCloseEvent& event) { - int answer = wxMessageBox("Quit program?", "Confirm", - wxYES_NO, this); - if (answer == wxYES) - event.Skip(); - else - event.Veto(); + int answer = wxMessageBox(wxT("Quit program?"), wxT("Confirm"), + wxYES_NO, this); + if (answer == wxYES) + event.Skip(); + else + event.Veto(); } @@ -259,13 +259,13 @@ return; wxString name = filedlg.GetPath(); - if (name.Right(4) != wxString(".src")) - name = name + wxString(".src"); + if (name.Right(4) != wxT(".src")) + name = name + wxT(".src"); wxTextFile file(name); if (!file.Exists()) { - wxMessageBox(wxString::Format("The file %s must exist to read from", filedlg.GetFilename().c_str())); + wxMessageBox(wxT("The file ") + filedlg.GetFilename() + wxT(" must exist to read from")); return; } @@ -274,18 +274,18 @@ file.Close(); currentFileName = name; canvas->ReadShapeInformationFromFile(currentFileName); - SetStatusText(wxString::Format("Read source code from %s", currentFileName.c_str())); + SetStatusText(wxT("Read source code from ") + currentFileName); SetNewWindowName(currentFileName); } else { - wxMessageBox(wxString::Format("Unable to open the file %s to read from", filedlg.GetFilename().c_str())); + wxMessageBox(wxT("Unable to open the file ") + filedlg.GetFilename() + wxT(" to read from")); return; } } void MyFrame::SetNewWindowName(wxString & newFileName) { - wxString title = "CallFlow " + newFileName; - SetLabel(title); + wxString title = wxT("CallFlow ") + newFileName; + SetLabel(title); } void MyFrame::OnFileSave (wxCommandEvent & event) @@ -301,10 +301,10 @@ if (file.IsOpened()) { file.Close(); canvas->ShapeInformationToFile(currentFileName); - SetStatusText(wxString::Format("Saved source code to %s", currentFileName.c_str())); + SetStatusText(wxT("Saved source code to ") + currentFileName); SetNewWindowName(currentFileName); } else { - wxMessageBox(wxString::Format("Unable to open the file %s for saving", currentFileName.c_str())); + wxMessageBox(wxT("Unable to open the file ") + currentFileName + wxT("for saving")); return; } } @@ -320,17 +320,17 @@ wxString name = filedlg.GetPath(); - if (name.Right(4) != wxString(".src")) - name = name + wxString(".src"); + if (name.Right(4) != wxT(".src")) + name = name + wxT(".src"); currentFileName = name; wxTextFile file(name); if (file.Exists()) { - wxString msg = wxString::Format("The file \n%s\n exists. Overwrite ? ", (const char *)name); - wxMessageDialog *dlg= new wxMessageDialog(this, msg, "Overwrite existing file", wxYES_DEFAULT | wxYES_NO); - if (wxID_NO == dlg->ShowModal()) - return; + wxString msg = wxT("The file \n") + name + wxT("\n exists. Overwrite ? "); + wxMessageDialog *dlg= new wxMessageDialog(this, msg, wxT("Overwrite existing file"), wxYES_DEFAULT | wxYES_NO); + if (wxID_NO == dlg->ShowModal()) + return; } if (!file.Exists()) @@ -338,13 +338,13 @@ file.Open(); if (!file.IsOpened()) { - wxMessageBox(wxString::Format("Unable to open the file %s to write data to", name.c_str())); + wxMessageBox(wxT("Unable to open the file ") + name + wxT(" to write data to")); return; } file.Close(); canvas->ShapeInformationToFile(name); - SetStatusText(wxString::Format("Saved source code to %s", name.c_str())); + SetStatusText(wxT("Saved source code to ") + name); SetNewWindowName(name); } @@ -617,8 +617,8 @@ void MyFrame::OnHelpAbout (wxCommandEvent & WXUNUSED(event)) { - SetStatusText("Help | About"); - wxMessageBox(_T("Call Flow 1.0.0 \n\nAuthor Derek J Smithies <derek@indranet.co.nz>\n\n Copyright 2007"), _T("About Call Flow")); + SetStatusText(wxT("Help | About")); + wxMessageBox(_T("Call Flow 1.0.0 \n\nAuthor Derek J Smithies <derek@indranet.co.nz>\n\n Copyright 2007"), _T("About Call Flow")); } @@ -663,8 +663,8 @@ return; wxString name = filedlg.GetPath(); - if (name.Right(3) != wxString(".py")) - name = name + wxString(".py"); + if (name.Right(3) != wxT(".py")) + name = name + wxT(".py"); wxTextFile file(name); @@ -672,14 +672,14 @@ file.Create(); file.Open(); if (!file.IsOpened()) { - wxMessageBox(wxString::Format("Unable to open the file %s to write data to", name.c_str())); - return; + wxMessageBox(wxT("Unable to open the file ") + name + wxT(" to write data to")); + return; } if (canvas->Compile(file)) - SetStatusText(wxString::Format("wrote compiled code to %s", name.c_str())); + SetStatusText(wxT("wrote compiled code to ") + name); else - wxMessageBox(wxString::Format("failed - could not compile code to %s", name.c_str())); + wxMessageBox(wxT("failed - could not compile code to ") + name); file.Close(); } Modified: sofaswitch/trunk/callflow/src/callstartstop.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/callstartstop.cpp (original) +++ sofaswitch/trunk/callflow/src/callstartstop.cpp Fri May 23 01:04:54 2008 @@ -48,87 +48,87 @@ { wxString label; switch(kind) { - case MakeCall: - label = "Make_Call"; - break; - case EndCall: - label = "End_Call"; - break; - case AcceptCall: - label = "Accept_Call"; - break; + case MakeCall: + label = wxT("Make_Call"); + break; + case EndCall: + label = wxT("End_Call"); + break; + case AcceptCall: + label = wxT("Accept_Call"); + break; } - wxString header = wxString::Format(" def %s(self, sTuple):", (const char *)label); + wxString header = wxT(" def ") + label + wxT("(self, sTuple):"); file.AddLine(header); - file.AddLine(" a,b,c = sTuple "); - file.AddLine(" try: "); - file.AddLine(" self.rhost = eval(self.data[a][\"worker node\"]) "); - file.AddLine(" except: "); - file.AddLine(" print \"The worker node string \", self.data[a][\"worker node\"], \" could not be evaluated as a Python string\" "); - file.AddLine(" self.rhost = \"\" "); + file.AddLine(wxT(" a,b,c = sTuple ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.rhost = eval(self.data[a][\"worker node\"]) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"The worker node string \", self.data[a][\"worker node\"], \" could not be evaluated as a Python string\" ")); + file.AddLine(wxT(" self.rhost = \"\" ")); if (kind == MakeCall) { - file.AddLine(" try: "); - file.AddLine(" self.dest = eval(self.data[a][\"call destination\"]) "); - file.AddLine(" except: "); - file.AddLine(" print \"The destination string \", self.data[a][\"call destination\"], \" could not be evaluated as a Python string\" "); - file.AddLine(" self.dest = None "); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.dest = eval(self.data[a][\"call destination\"]) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"The destination string \", self.data[a][\"call destination\"], \" could not be evaluated as a Python string\" ")); + file.AddLine(wxT(" self.dest = None ")); } if (kind == AcceptCall) { - file.AddLine(" try: "); - file.AddLine(" self.option = eval(self.data[a][\"answer option\"]) "); - file.AddLine(" except: "); - file.AddLine(" print \"The answer call option string \", self.data[a][\"answer option\"], \" could not be evaluated as a Python string\" "); - file.AddLine(" self.option = \"No\" "); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.option = eval(self.data[a][\"answer option\"]) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"The answer call option string \", self.data[a][\"answer option\"], \" could not be evaluated as a Python string\" ")); + file.AddLine(wxT(" self.option = \"No\" ")); } switch(kind) { case MakeCall: - file.AddLine(" self.rhost += \":CALLNODE \" + self.dest + \"\\0\" "); + file.AddLine(wxT(" self.rhost += \":CALLNODE \" + self.dest + \"\\0\" ")); break; case EndCall: - file.AddLine(" self.rhost += \":HANGUP \\0\" "); + file.AddLine(wxT(" self.rhost += \":HANGUP \\0\" ")); break; case AcceptCall: - file.AddLine(" self.rhost += \":Answer \" + self.option + \"\\0\" "); + file.AddLine(wxT(" self.rhost += \":Answer \" + self.option + \"\\0\" ")); break; } - file.AddLine(" self.transport.write(self.rhost) "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(" "); + file.AddLine(wxT(" self.transport.write(self.rhost) ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT(" ")); return true; } bool DndShapeCallStartStop::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Output\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"Output\" : ")); + file.AddLine(wxString::Format(wxT(" %s, "), outputLabel.c_str())); - file.AddLine(wxString::Format(" \"worker node\" : ")); + file.AddLine(wxString::Format(wxT(" \"worker node\" : "))); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); - + file.AddLine(wxString::Format(wxT(" \"%s\", "), dest.c_str())); + switch(kind) { - case AcceptCall: - file.AddLine(wxString::Format(" \"answer option\" : ")); - dest = ProtectString(displayData[2].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); - break; - case MakeCall: - file.AddLine(wxString::Format(" \"call destination\" : ")); - dest = ProtectString(displayData[2].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); - break; + case AcceptCall: + file.AddLine(wxString::Format(wxT(" \"answer option\" : "))); + dest = ProtectString(displayData[2].data); + file.AddLine(wxString::Format(wxT(" \"%s\", "), dest.c_str())); + break; + case MakeCall: + file.AddLine(wxString::Format(wxT(" \"call destination\" : "))); + dest = ProtectString(displayData[2].data); + file.AddLine(wxString::Format(wxT(" \"%s\", "), dest.c_str())); + break; } - - file.AddLine(wxString::Format(" },")); - + + file.AddLine(wxT(" },")); + return true; } @@ -171,14 +171,13 @@ f.SetPointSize(7); dc.SetFont(f); for (int i = 0; i < 9; i++){ - wxString text = wxString::Format("%d", i+1); - wxCoord w, h; - dc.GetTextExtent(text, &w, &h); - int xPos = m_rect.x + 17 + ((i%3)*9) - (w/2); - int yPos = m_rect.y + 18 + ((i/3)*9) - (h/2); - dc.DrawText(text, xPos, yPos); + wxString text = wxString::Format(wxT("%d"), i+1); + wxCoord w, h; + dc.GetTextExtent(text, &w, &h); + int xPos = m_rect.x + 17 + ((i%3)*9) - (w/2); + int yPos = m_rect.y + 18 + ((i/3)*9) - (h/2); + dc.DrawText(text, xPos, yPos); } - DndShape::Draw(dc); // Draw the selected overlay if required. } Modified: sofaswitch/trunk/callflow/src/canvas.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/canvas.cpp (original) +++ sofaswitch/trunk/callflow/src/canvas.cpp Fri May 23 01:04:54 2008 @@ -578,14 +578,14 @@ { CloseJoinBlocks (); pFrame->SetStatusText - ("Waiting for a mouse click event"); + (wxT("Waiting for a mouse click event")); } break; case DownEventNew:; { CloseJoinBlocks (); pFrame->SetStatusText - ("Waiting for a mouse click event"); + (wxT("Waiting for a mouse click event")); } break; case PlaceOneShape:; @@ -596,8 +596,7 @@ GetImageTypeForPlacing ()); wxString mess = - wxString - ("Set the mouse at desired position to place a ") + wxT("Set the mouse at desired position to place a ") + kindName; pFrame->SetStatusText (mess); selectingRegion.SetSelected (false); @@ -608,7 +607,7 @@ { CloseJoinBlocks (); pFrame->SetStatusText - ("Mark a rectangle on screen, and select objects within"); + (wxT("Mark a rectangle on screen, and select objects within")); selectingRegion.SetOtherCorner (lastMouseDownPoint); selectingRegion.SetSelected (true); } @@ -617,25 +616,25 @@ { CloseJoinBlocks (); pFrame->SetStatusText - ("Moving one or more shapes on the screen"); + (wxT("Moving one or more shapes on the screen")); } break; case MovingShapesRectangle:; { CloseJoinBlocks (); pFrame->SetStatusText - ("Moving one or more shapes, and a selecting rectangle, on the screen"); + (wxT("Moving one or more shapes, and a selecting rectangle, on the screen")); } break; case PlaceJoinBlocks:; { pFrame->SetStatusText - ("Draw interconnecting logic flow between blocks on the screen"); + (wxT("Draw interconnecting logic flow between blocks on the screen")); } break; default: { - pFrame->SetStatusText ("Should not be selected"); + pFrame->SetStatusText (wxT("Should not be selected")); } break; } Modified: sofaswitch/trunk/callflow/src/conditional.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/conditional.cpp (original) +++ sofaswitch/trunk/callflow/src/conditional.cpp Fri May 23 01:04:54 2008 @@ -69,11 +69,11 @@ dc.DrawLine(pvr, prr); DrawArrow(dc, pvr, ArrowRight, OutputPointConnected(1) ? Connected : Loose); - wxString text("T"); + wxString text(wxT("T")); dc.SetFont(*wxITALIC_FONT); dc.DrawText(text, m_rect.x + 10, m_rect.y + 35); - text = "F"; + text = wxT("F"); dc.DrawText(text, m_rect.x + 35, m_rect.y + 5); DndShape::Draw(dc); @@ -81,42 +81,41 @@ bool DndShapeConditional::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Conditional(self, aTuple): "); - file.AddLine(" a,b,c = aTuple "); - file.AddLine(" test = self.data[a][\"Test\"] "); - file.AddLine(" try: "); - file.AddLine(" self.conditional= eval(test) "); - file.AddLine(" except: "); - file.AddLine(" self.conditional=False "); - file.AddLine(" print \"Condition of \", test, \" was not valid Python code\" "); - file.AddLine(" if self.conditional : "); - file.AddLine(" return self.data[a][\"OutputTrue\"] "); - file.AddLine(" return self.data[a][\"OutputFalse\"] "); - file.AddLine(" "); + file.AddLine(wxT(" def Conditional(self, aTuple): ")); + file.AddLine(wxT(" a,b,c = aTuple ")); + file.AddLine(wxT(" test = self.data[a][\"Test\"] ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.conditional= eval(test) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" self.conditional=False ")); + file.AddLine(wxT(" print \"Condition of \", test, \" was not valid Python code\" ")); + file.AddLine(wxT(" if self.conditional : ")); + file.AddLine(wxT(" return self.data[a][\"OutputTrue\"] ")); + file.AddLine(wxT(" return self.data[a][\"OutputFalse\"] ")); + file.AddLine(wxT(" ")); return true; } bool DndShapeConditional::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); - file.AddLine(wxString::Format(" \"Test\" : ")); + file.AddLine(wxT(" \"Test\" : ")); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); - + file.AddLine(wxT(" \"") + dest + wxT("\", ")); + wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"OutputTrue\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"OutputTrue\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(", ")); outputNode = outputNode->GetNext(); const wxString & outputLabel2 = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"OutputFalse\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel2.c_str())); - - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" \"OutputFalse\" : ")); + file.AddLine(wxT(" ") + outputLabel2 + wxT(", ")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/conditional.h ============================================================================== --- sofaswitch/trunk/callflow/src/conditional.h (original) +++ sofaswitch/trunk/callflow/src/conditional.h Fri May 23 01:04:54 2008 @@ -22,7 +22,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Conditional"); } + static wxString GetKindName() { return wxT("Conditional"); } /**Write the code generic to this Conditional shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/death.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/death.cpp (original) +++ sofaswitch/trunk/callflow/src/death.cpp Fri May 23 01:04:54 2008 @@ -48,31 +48,31 @@ bool DndShapeDeath::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Death(self, sTuple): "); - file.AddLine(" \"\"\"Terminate processing of this flow chart, by closing this particular connection. "); - file.AddLine(" \"\"\" "); - file.AddLine(" if self.isMaster: "); - file.AddLine(" reactor.stop() "); - file.AddLine(" else: "); - file.AddLine(" self.transport.loseConnection() "); - file.AddLine(" self.keepGoing = False "); - file.AddLine(" return None "); - file.AddLine(" "); + file.AddLine(wxT(" def Death(self, sTuple): ")); + file.AddLine(wxT(" \"\"\"Terminate processing of this flow chart, by closing this particular connection. ")); + file.AddLine(wxT(" \"\"\" ")); + file.AddLine(wxT(" if self.isMaster: ")); + file.AddLine(wxT(" reactor.stop() ")); + file.AddLine(wxT(" else: ")); + file.AddLine(wxT(" self.transport.loseConnection() ")); + file.AddLine(wxT(" self.keepGoing = False ")); + file.AddLine(wxT(" return None ")); + file.AddLine(wxT(" ")); return true; } bool DndShapeDeath::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/death.h ============================================================================== --- sofaswitch/trunk/callflow/src/death.h (original) +++ sofaswitch/trunk/callflow/src/death.h Fri May 23 01:04:54 2008 @@ -19,7 +19,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Death"); } + static wxString GetKindName() { return wxT("Death"); } /**Write the code generic to this Death shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/dnd.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/dnd.cpp (original) +++ sofaswitch/trunk/callflow/src/dnd.cpp Fri May 23 01:04:54 2008 @@ -63,7 +63,7 @@ wxString MyTokenizer::GetToken() { if (readPosn >= source.size()) { - return wxString(""); + return wxT(""); } wxString working = source.Mid(readPosn); @@ -87,7 +87,7 @@ LabelledPoint::LabelledPoint() { thisPoint = wxPoint(0, 0); - otherNodeLabel = wxString(""); + otherNodeLabel = wxT(""); otherNodeIndex = -1; otherNodeKind = DndShape::None; countLinks = 0;} @@ -95,7 +95,7 @@ LabelledPoint::LabelledPoint(int x, int y) { thisPoint = wxPoint(x, y); - otherNodeLabel = wxString(""); + otherNodeLabel = wxT(""); otherNodeIndex = -1; otherNodeKind = DndShape::None; countLinks = 0; @@ -113,7 +113,7 @@ LabelledPoint::LabelledPoint(wxPoint &srcData) { thisPoint = srcData; - otherNodeLabel = wxString(""); + otherNodeLabel = wxT(""); otherNodeIndex = -1; otherNodeKind = DndShape::None; countLinks = 0; @@ -148,16 +148,13 @@ wxString LabelledPoint::GetFullLabel() const { if (otherNodeKind == DndShape::None) - return "None"; + return wxT("None"); wxString kindLabel = DndShape::GetKindName((DndShape::Kind)otherNodeKind); - kindLabel.Replace(" ", "_", true); //Replace all spaces with underscores. + kindLabel.Replace(wxT(" "), wxT("_"), true); //Replace all spaces with underscores. - wxString answer = wxString::Format("(\"%s\", %d, \"%s\" )", - otherNodeLabel.c_str(), - otherNodeIndex, - kindLabel.c_str()); - + wxString answer = wxT("(\"") + otherNodeLabel + wxT("\", ") + wxString::Format(wxT("%d"),otherNodeIndex) + + wxT(", \"") + kindLabel + wxT("\" )"); return answer; } @@ -177,7 +174,7 @@ otherNodeIndex = -1; if (otherNodeLabel.IsNull()) printf("not null\n"); - otherNodeLabel = wxString(""); + otherNodeLabel = wxT(""); if (otherNodeLabel.IsNull()) printf("not null second time.\n"); @@ -188,7 +185,7 @@ if (otherNodeIndex < 0) return false; - if (otherNodeLabel == wxString("")) + if (otherNodeLabel == wxT("")) return false; return true; @@ -393,7 +390,7 @@ ioPointsLinked = false; - StoreNewKey(GetName() + wxString::Format(" %lX", (long unsigned)this)); + StoreNewKey(GetName() + wxString::Format(wxT(" %lX"), (long unsigned)this)); displayData[displayData.size()] = InformationSection(wxT("Tool Tip"), GetName()); } @@ -417,7 +414,7 @@ void DndShape::StoreNewKey(wxString newKey) { uniqueKey = newKey; - uniqueKey.Replace(" ", "_", true); //Replace all spaces with underscores. + uniqueKey.Replace(wxT(" "), wxT("_"), true); //Replace all spaces with underscores. inputPoints.SetKey(uniqueKey); outputPoints.SetKey(uniqueKey); } @@ -425,7 +422,7 @@ wxString DndShape::GetKindName(Kind thisKind) { if (thisKind == None) - return wxString("No kind"); + return wxT("No kind"); if (thisKind == StartHere) return DndShapeStartHere::GetKindName(); @@ -496,14 +493,14 @@ if (thisKind == AcceptCall) return DndShapeAcceptCall::GetKindName(); - wxString answer = wxString::Format("node kind is %d", thisKind); + wxString answer = wxString::Format(wxT("node kind is %d"), thisKind); return answer; } DndShape * DndShape::Construct(int shapeRequired) { if ((shapeRequired < 0) || ( shapeRequired >= KnownShapes)) { - wxMessageBox(wxString::Format("Unknown DndShape of kind %d", + wxMessageBox(wxString::Format(wxT("Unknown DndShape of kind %d"), shapeRequired)); return NULL; } @@ -831,14 +828,14 @@ wxString DndShape::GetShapeInfo() { - wxString answer = wxString::Format("%d", kind); + wxString answer = wxString::Format(wxT("%d"), kind); answer += GetEndBlock(); - answer += wxString::Format("%d", m_rect.x); + answer += wxString::Format(wxT("%d"), m_rect.x); answer += GetEndBlock(); - answer += wxString::Format("%d", m_rect.y); + answer += wxString::Format(wxT("%d"), m_rect.y); answer += GetEndBlock(); - answer += GetShapeInfoSpecial() + wxString(" ") + GetEndBlock() + GetEndShape(); + answer += GetShapeInfoSpecial() + wxT(" ") + GetEndBlock() + GetEndShape(); return answer; } @@ -1002,7 +999,7 @@ void DndShape::ProcessRightMouseButton(MyFrame *frame) { - wxString heading = "Properties: " + GetName(); + wxString heading = wxT("Properties: ") + GetName(); Information dialog(frame, heading, displayData); dialog.ShowModal(); //We don't care what the return value was. @@ -1012,7 +1009,7 @@ bool DndShape::WriteSystemCode(wxTextFile & file) { - file.AddLine("system code "); + file.AddLine(wxT("system code ")); file.AddLine(GetName()); return true; @@ -1021,7 +1018,7 @@ bool DndShape::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine("this shape info"); + file.AddLine(wxT("this shape info")); file.AddLine(GetKey()); return true; @@ -1032,10 +1029,10 @@ char dq= '\"'; char s = '\\'; char sq = '\''; - wxString str_dq = wxString::Format("%c", dq); - wxString str_sq = wxString::Format("%c", sq); - wxString esc_sq = wxString::Format("%c%c", s, sq); - wxString esc_dq = wxString::Format("%c%c", s, dq); + wxString str_dq = wxString::Format(wxT("%c"), dq); + wxString str_sq = wxString::Format(wxT("%c"), sq); + wxString esc_sq = wxString::Format(wxT("%c%c"), s, sq); + wxString esc_dq = wxString::Format(wxT("%c%c"), s, dq); wxString answer = src; answer.Replace(str_dq, esc_dq); answer.Replace(str_sq, esc_sq); Modified: sofaswitch/trunk/callflow/src/dnd.h ============================================================================== --- sofaswitch/trunk/callflow/src/dnd.h (original) +++ sofaswitch/trunk/callflow/src/dnd.h Fri May 23 01:04:54 2008 @@ -350,7 +350,7 @@ /** Used to report the name of this particular class. */ static wxString GetKindName() - { return wxString("DndShape has no name"); } + { return wxT("DndShape has no name"); } /**Draw this particular shape to the screen. This method could be made pure, which means this particular class is never used @@ -404,7 +404,7 @@ /**Report a piece of special information, which will be peculiar to a particular shape. This is made virtual. A descendant shape will specify a full function here */ - virtual wxString GetDescendantShapeInfo() { return wxString(" extra "); } + virtual wxString GetDescendantShapeInfo() { return wxT(" extra "); } /**Set information which is highly peculiar to a descendant shape. For example, the multi line join blocks shape has some @@ -458,21 +458,21 @@ wxString GetToolTip() { return displayData[0].data; } /**Get the tokenizir string to indicate end widget */ - static wxString GetEndShape() { return "<Shape>"; } - + static wxString GetEndShape() { return wxT("<Shape>"); } + /**Get the tokenizer string to indicate end of a block of information within the description of one shape */ - static wxString GetEndBlock() { return "<B>"; } - + static wxString GetEndBlock() { return wxT("<B>"); } + /**Get the tokenizer string to indicate the end of one piece of special information. One piece of special information could be the caption and the data value */ - static wxString GetEndSpecial() { return "<special>"; } + static wxString GetEndSpecial() { return wxT("<special>"); } /**Get the tokenizer string to indicate the end of one part of one piece of special information. This could indicate the end of the caption, or the end of the data value */ - static wxString GetMidSpecial() { return "<ms>"; } +static wxString GetMidSpecial() { return wxT("<ms>"); } /**Write the code which is specific to one type of shape. This code will describe how (for example) an if statement is @@ -512,7 +512,7 @@ /**Clear the text string associated with this shape which describes any compile error in creating this structure */ - void ClearCompileError() { compileError = ""; } + void ClearCompileError() { compileError = wxT(""); } /**Place a compile message into this shape - this will show up when this shape is next displayed */ Modified: sofaswitch/trunk/callflow/src/endcall.h ============================================================================== --- sofaswitch/trunk/callflow/src/endcall.h (original) +++ sofaswitch/trunk/callflow/src/endcall.h Fri May 23 01:04:54 2008 @@ -20,7 +20,7 @@ void Draw(wxDC & dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("End Call"); } + static wxString GetKindName() { return wxT("End Call"); } }; Modified: sofaswitch/trunk/callflow/src/endfor.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/endfor.cpp (original) +++ sofaswitch/trunk/callflow/src/endfor.cpp Fri May 23 01:04:54 2008 @@ -62,30 +62,29 @@ bool DndShapeEndFor::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def End_For_Loop(self, aTuple): "); - file.AddLine(" a,b,c = aTuple"); - file.AddLine(" return self.data[a][\"LoopAgain\"]"); - file.AddLine(""); + file.AddLine(wxT(" def End_For_Loop(self, aTuple): ")); + file.AddLine(wxT(" a,b,c = aTuple")); + file.AddLine(wxT(" return self.data[a][\"LoopAgain\"]")); + file.AddLine(wxT("")); return true; } bool DndShapeEndFor::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - - file.AddLine(wxString::Format(" \"LoopAgain\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); - + + file.AddLine(wxT(" \"LoopAgain\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(" ")); + outputNode = outputNode->GetNext(); const wxString & outputLabel2 = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"AllDone\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel2.c_str())); - - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" \"AllDone\" : ")); + file.AddLine(wxT(" ") + outputLabel2 + wxT(", ")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/endfor.h ============================================================================== --- sofaswitch/trunk/callflow/src/endfor.h (original) +++ sofaswitch/trunk/callflow/src/endfor.h Fri May 23 01:04:54 2008 @@ -24,7 +24,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("End For Loop"); } + static wxString GetKindName() { return wxT("End For Loop"); } /**Write the code generic to this End For loop shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/endhere.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/endhere.cpp (original) +++ sofaswitch/trunk/callflow/src/endhere.cpp Fri May 23 01:04:54 2008 @@ -26,7 +26,7 @@ relInputPoints.Add(25, 0); AdjustIoPoints(); - displayData[0] = InformationSection(wxT("Tool Tip"), wxString("Suspend Processing")); + displayData[0] = InformationSection(wxT("Tool Tip"), wxT("Suspend Processing")); } void DndShapeEndHere::Draw(wxDC& dc) @@ -50,30 +50,29 @@ bool DndShapeEndHere::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def End_Processing(self, sTuple): "); - file.AddLine(" \"\"\"Terminate processing of this flow chart, by returning a None structure "); - file.AddLine(" Processing on this flow chart may continue if there is an outstanding signal"); - file.AddLine(" handle. "); - file.AddLine(" \"\"\" "); - file.AddLine(" a,b,c = sTuple "); - file.AddLine(" #print \"end of processing at \", a "); - file.AddLine(" return None "); - file.AddLine(" "); + file.AddLine(wxT(" def End_Processing(self, sTuple): ")); + file.AddLine(wxT(" \"\"\"Terminate processing of this flow chart, by returning a None structure ")); + file.AddLine(wxT(" Processing on this flow chart may continue if there is an outstanding signal")); + file.AddLine(wxT(" handle. ")); + file.AddLine(wxT(" \"\"\" ")); + file.AddLine(wxT(" a,b,c = sTuple ")); + file.AddLine(wxT(" #print \"end of processing at \", a ")); + file.AddLine(wxT(" return None ")); + file.AddLine(wxT(" ")); return true; } bool DndShapeEndHere::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); - - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/endhere.h ============================================================================== --- sofaswitch/trunk/callflow/src/endhere.h (original) +++ sofaswitch/trunk/callflow/src/endhere.h Fri May 23 01:04:54 2008 @@ -23,7 +23,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Suspend Processing"); } + static wxString GetKindName() { return wxT("Suspend Processing"); } /**Write the code generic to this EndHere shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/eventer.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/eventer.cpp (original) +++ sofaswitch/trunk/callflow/src/eventer.cpp Fri May 23 01:04:54 2008 @@ -113,83 +113,83 @@ bool DndShapeEventer::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Eventer(self, sTuple): "); - file.AddLine(" \"\"\"Register the left down output as being available to handle a particular event "); - file.AddLine(" After registration, continue execution to right horizontal output. Should this "); - file.AddLine(" link not be connected, a None value will be returned. "); - file.AddLine(" \"\"\" "); - file.AddLine(" a,b,c = sTuple "); - file.AddLine(" pVbl = self.data[a][\"Event Source\"] + \" = None\" "); - file.AddLine(" try: "); - file.AddLine(" exec(pVbl) "); - file.AddLine(" except: "); - file.AddLine(" pVbl = self.data[a][\"Event Source\"] "); - file.AddLine(" print \"The Python variable \", pVbl, \" to hold event source output could not be initialisd\" "); - - file.AddLine(" pVbl = self.data[a][\"Event Name\"] + \" = None\" "); - file.AddLine(" try: "); - file.AddLine(" exec(pVbl) "); - file.AddLine(" except: "); - file.AddLine(" pVbl = self.data[a][\"Event Name\"] "); - file.AddLine(" print \"The Python variable \", pVbl, \" to hold event name output could not be initialisd\" "); - - file.AddLine(" pVbl = self.data[a][\"Event Data\"] + \" = None\" "); - file.AddLine(" try: "); - file.AddLine(" exec(pVbl) "); - file.AddLine(" except: "); - file.AddLine(" pVbl = self.data[a][\"Event Data\"] "); - file.AddLine(" print \"The Python variable \", pVbl, \" to hold event data output could not be initialisd\" "); - - file.AddLine(" ePyn = self.data[a][\"Event Python\"] "); - file.AddLine(" eReg = self.data[a][\"Event RegExp\"] "); - file.AddLine(" if len(ePyn) > 0: "); - file.AddLine(" self.currentHandlers[eval(ePyn)] = a "); - file.AddLine(" else: "); - file.AddLine(" self.currentHandlers[eReg] = a "); - file.AddLine(" return self.data[a][\"OutputKeepGoing\"] "); - file.AddLine(""); + file.AddLine(wxT(" def Eventer(self, sTuple): ")); + file.AddLine(wxT(" \"\"\"Register the left down output as being available to handle a particular event ")); + file.AddLine(wxT(" After registration, continue execution to right horizontal output. Should this ")); + file.AddLine(wxT(" link not be connected, a None value will be returned. ")); + file.AddLine(wxT(" \"\"\" ")); + file.AddLine(wxT(" a,b,c = sTuple ")); + file.AddLine(wxT(" pVbl = self.data[a][\"Event Source\"] + \" = None\" ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" exec(pVbl) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" pVbl = self.data[a][\"Event Source\"] ")); + file.AddLine(wxT(" print \"The Python variable \", pVbl, \" to hold event source output could not be initialisd\" ")); + + file.AddLine(wxT(" pVbl = self.data[a][\"Event Name\"] + \" = None\" ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" exec(pVbl) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" pVbl = self.data[a][\"Event Name\"] ")); + file.AddLine(wxT(" print \"The Python variable \", pVbl, \" to hold event name output could not be initialisd\" ")); + + file.AddLine(wxT(" pVbl = self.data[a][\"Event Data\"] + \" = None\" ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" exec(pVbl) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" pVbl = self.data[a][\"Event Data\"] ")); + file.AddLine(wxT(" print \"The Python variable \", pVbl, \" to hold event data output could not be initialisd\" ")); + + file.AddLine(wxT(" ePyn = self.data[a][\"Event Python\"] ")); + file.AddLine(wxT(" eReg = self.data[a][\"Event RegExp\"] ")); + file.AddLine(wxT(" if len(ePyn) > 0: ")); + file.AddLine(wxT(" self.currentHandlers[eval(ePyn)] = a ")); + file.AddLine(wxT(" else: ")); + file.AddLine(wxT(" self.currentHandlers[eReg] = a ")); + file.AddLine(wxT(" return self.data[a][\"OutputKeepGoing\"] ")); + file.AddLine(wxT("")); return true; } bool DndShapeEventer::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxString::Format(wxT(" \"%s\" : { "), GetKey().c_str())); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Event Handler\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"Event Handler\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(", ")); outputNode = outputNode->GetNext(); const wxString & outputLabel2 = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"OutputKeepGoing\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel2.c_str())); + file.AddLine(wxT(" \"OutputKeepGoing\" : ")); + file.AddLine(wxT(" ") + outputLabel2 + wxT(", ")); - file.AddLine(wxString::Format(" \"Event Python\" : ")); + file.AddLine(wxT(" \"Event Python\" : ")); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); + + file.AddLine(wxT(" \"Event RegExp\" : ")); + file.AddLine(wxT(" \"") + displayData[2].data + wxT("\", ")); - file.AddLine(wxString::Format(" \"Event RegExp\" : ")); - file.AddLine(wxString::Format(" \"%s\", ", displayData[2].data.c_str())); + file.AddLine(wxT(" \"Event Source\" : ")); + file.AddLine(wxT(" \"") + displayData[3].data + wxT("\", ")); - file.AddLine(wxString::Format(" \"Event Source\" : ")); - file.AddLine(wxString::Format(" \"%s\", ", displayData[3].data.c_str())); + file.AddLine(wxT(" \"Event Name\" : ")); + file.AddLine(wxT(" \"") + displayData[4].data + wxT("\", ")); - file.AddLine(wxString::Format(" \"Event Name\" : ")); - file.AddLine(wxString::Format(" \"%s\", ", displayData[4].data.c_str())); + file.AddLine(wxT(" \"Event Data\" : ")); + file.AddLine(wxT(" \"") + displayData[5].data + wxT("\", ")); - file.AddLine(wxString::Format(" \"Event Data\" : ")); - file.AddLine(wxString::Format(" \"%s\", ", displayData[5].data.c_str())); - - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/eventer.h ============================================================================== --- sofaswitch/trunk/callflow/src/eventer.h (original) +++ sofaswitch/trunk/callflow/src/eventer.h Fri May 23 01:04:54 2008 @@ -32,7 +32,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Eventer"); } + static wxString GetKindName() { return wxT("Eventer"); } /**Write the code generic to this End Call shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/fileio.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/fileio.cpp (original) +++ sofaswitch/trunk/callflow/src/fileio.cpp Fri May 23 01:04:54 2008 @@ -84,27 +84,27 @@ bool DndShapeFileIo::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Output\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"Output\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(", ")); - file.AddLine(wxString::Format(" \"File Name\" : ")); + file.AddLine(wxT(" \"File Name\" : ")); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" \"answering machine node\" : ")); + file.AddLine(wxT(" \"answering machine node\" : ")); dest = ProtectString(displayData[2].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" },")); return true; } @@ -112,19 +112,19 @@ bool DndShapeFileIo::WriteSystemCode(wxTextFile & file) { if (kind == WriteToFile) - file.AddLine(" def Write_To_File(self, aTuple): "); + file.AddLine(wxT(" def Write_To_File(self, aTuple): ")); else - file.AddLine(" def Read_From_File(self, aTuple): "); - file.AddLine(" a,y,z = aTuple "); - file.AddLine(" fName = self.data[a][\"File Name\"] "); - file.AddLine(" rhost = eval(self.data[a][\"answering machine node\"]) "); + file.AddLine(wxT(" def Read_From_File(self, aTuple): ")); + file.AddLine(wxT(" a,y,z = aTuple ")); + file.AddLine(wxT(" fName = self.data[a][\"File Name\"] ")); + file.AddLine(wxT(" rhost = eval(self.data[a][\"answering machine node\"]) ")); if (kind == WriteToFile) - file.AddLine(" rhost += \":SETRECEIVEDMSGFILE \" "); + file.AddLine(wxT(" rhost += \":SETRECEIVEDMSGFILE \" ")); else - file.AddLine(" rhost += \":SETANNOUNCEMENTFILE \" "); - file.AddLine(" rhost += eval(self.data[a][\"File Name\"]) + \" \\0\" "); - file.AddLine(" self.transport.write(rhost) "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(""); + file.AddLine(wxT(" rhost += \":SETANNOUNCEMENTFILE \" ")); + file.AddLine(wxT(" rhost += eval(self.data[a][\"File Name\"]) + \" \\0\" ")); + file.AddLine(wxT(" self.transport.write(rhost) ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT("")); return true; } Modified: sofaswitch/trunk/callflow/src/information.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/information.cpp (original) +++ sofaswitch/trunk/callflow/src/information.cpp Fri May 23 01:04:54 2008 @@ -40,12 +40,12 @@ for (int i = 0; i < enabledControls; i++) { - wxString label = wxString::Format("Control %d", i+1); + wxString label = wxString::Format(wxT("Control %d"), i+1); staticText[i] = new wxStaticText(this, wxID_ANY, label); staticText[i]->SetLabel(data[i].caption); mainsizer -> Add (staticText[i], 0, wxALL | wxEXPAND, 1); - wxString initialMessage = wxString::Format("initial value %d", i + 1); + wxString initialMessage = wxString::Format(wxT("initial value %d"), i + 1); wxSize nSize = wxSize(400,50); textEntry[i] = new wxTextCtrl(this, wxID_ANY, initialMessage, Modified: sofaswitch/trunk/callflow/src/joinblocks.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/joinblocks.cpp (original) +++ sofaswitch/trunk/callflow/src/joinblocks.cpp Fri May 23 01:04:54 2008 @@ -170,15 +170,15 @@ { wxNode *node = (wxNode *)points.GetFirst(); if (node == NULL) - return wxString(""); + return wxT(""); wxString answer; while (node != NULL) { wxPoint onePoint = *((wxPoint *)node->GetData()); if (answer.Length() == 0) - answer = answer + wxString::Format("%d,%d", onePoint.x, onePoint.y); + answer = answer + wxString::Format(wxT("%d,%d"), onePoint.x, onePoint.y); else - answer = answer + wxString::Format(",%d,%d", onePoint.x, onePoint.y); + answer = answer + wxString::Format(wxT(",%d,%d"), onePoint.x, onePoint.y); node = node->GetNext(); } return answer; @@ -186,10 +186,10 @@ void DndShapeJoinBlocks::SetDescendantShapeInfo(const wxString & newValue) { - wxStringTokenizer bits(newValue, ",", wxTOKEN_RET_EMPTY); + wxStringTokenizer bits(newValue, wxT(","), wxTOKEN_RET_EMPTY); if ((bits.CountTokens() % 2) != 0) { - wxMessageBox("invalid string to process"); + wxMessageBox(wxT("invalid string to process")); printf(" %s \n", newValue.c_str()); return; } Modified: sofaswitch/trunk/callflow/src/joinblocks.h ============================================================================== --- sofaswitch/trunk/callflow/src/joinblocks.h (original) +++ sofaswitch/trunk/callflow/src/joinblocks.h Fri May 23 01:04:54 2008 @@ -30,7 +30,7 @@ virtual void DrawSelected(wxDC &dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Join blocks shape"); } + static wxString GetKindName() { return wxT("Join blocks shape"); } /**Mark this shape as having a top left postion as determined by the parameter */ virtual void SetPosition(wxPoint & newPosition); Modified: sofaswitch/trunk/callflow/src/loadnewgraph.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/loadnewgraph.cpp (original) +++ sofaswitch/trunk/callflow/src/loadnewgraph.cpp Fri May 23 01:04:54 2008 @@ -69,54 +69,54 @@ bool DndShapeLoadNewGraph::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Load_New_Graph(self, sTuple): "); - file.AddLine(" a,b,c = sTuple "); - file.AddLine(" try: "); - file.AddLine(" self.udata = (self.myId, eval(self.data[a][\"user variable\"]) )"); - file.AddLine(" except: "); - file.AddLine(" self.udata = (self.myId, None) "); - file.AddLine(" "); - file.AddLine(" try: "); - file.AddLine(" self.fname = eval(self.data[a][\"new graph file\"]) "); - file.AddLine(" except: "); - file.AddLine(" print \"The new graph file \", self.data[a][\"new graph file\"], \" is not a valid Python string\" "); - file.AddLine(" self.fname = None "); - file.AddLine(" f = MyFactory() "); - file.AddLine(" f.isMaster = False "); - file.AddLine(" f.setGraph(self.fname) "); - file.AddLine(" f.setMaster(False) "); - file.AddLine(" f.setUserData(self.udata) "); - file.AddLine(" f.setScriptArgs(self.scriptArgs) "); - file.AddLine(" reactor.connectTCP(sofaServer, 5000, f) "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(""); + file.AddLine(wxT(" def Load_New_Graph(self, sTuple): ")); + file.AddLine(wxT(" a,b,c = sTuple ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.udata = (self.myId, eval(self.data[a][\"user variable\"]) )")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" self.udata = (self.myId, None) ")); + file.AddLine(wxT(" ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" self.fname = eval(self.data[a][\"new graph file\"]) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"The new graph file \", self.data[a][\"new graph file\"], \" is not a valid Python string\" ")); + file.AddLine(wxT(" self.fname = None ")); + file.AddLine(wxT(" f = MyFactory() ")); + file.AddLine(wxT(" f.isMaster = False ")); + file.AddLine(wxT(" f.setGraph(self.fname) ")); + file.AddLine(wxT(" f.setMaster(False) ")); + file.AddLine(wxT(" f.setUserData(self.udata) ")); + file.AddLine(wxT(" f.setScriptArgs(self.scriptArgs) ")); + file.AddLine(wxT(" reactor.connectTCP(sofaServer, 5000, f) ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT("")); return true; } bool DndShapeLoadNewGraph::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Output\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"Output\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(", ")); - file.AddLine(wxString::Format(" \"new graph file\" : ")); + file.AddLine(wxT(" \"new graph file\" : ")); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" \"user variable\" : ")); + file.AddLine(wxT(" \"user variable\" : ")); dest = ProtectString(displayData[2].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/loadnewgraph.h ============================================================================== --- sofaswitch/trunk/callflow/src/loadnewgraph.h (original) +++ sofaswitch/trunk/callflow/src/loadnewgraph.h Fri May 23 01:04:54 2008 @@ -23,7 +23,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Load New Graph");} + static wxString GetKindName() { return wxT("Load New Graph");} /**Write the code generic to this Python code shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/makecall.h ============================================================================== --- sofaswitch/trunk/callflow/src/makecall.h (original) +++ sofaswitch/trunk/callflow/src/makecall.h Fri May 23 01:04:54 2008 @@ -18,7 +18,7 @@ void Draw(wxDC & dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Make Call"); } + static wxString GetKindName() { return wxT("Make Call"); } }; Modified: sofaswitch/trunk/callflow/src/masternode.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/masternode.cpp (original) +++ sofaswitch/trunk/callflow/src/masternode.cpp Fri May 23 01:04:54 2008 @@ -26,7 +26,7 @@ relInputPoints.Add(16, 0); relOutputPoints.Add(16, 40); - displayData[0] = InformationSection(wxT("Tool Tip"), "Register for events from voip2"); + displayData[0] = InformationSection(wxT("Tool Tip"), wxT("Register for events from voip2")); displayData[displayData.size()] = InformationSection(wxT("Node to receive events from (Python code)"), wxT("\"voip2\"")); @@ -58,39 +58,39 @@ bool DndShapeMasterNode::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Master_Node(self, sTuple): "); - file.AddLine(" a,b,c = sTuple "); - file.AddLine(" try: "); - file.AddLine(" mesg = eval(self.data[a][\"Master Node Code\"]) "); - file.AddLine(" mesg = mesg + \":reporttome\" + \"\\0\" "); - file.AddLine(" self.transport.write(mesg) "); - file.AddLine(" except: "); - file.AddLine(" print \"target for Master Node \", self.data[a][\"Master Node Code\"], \" could not be parsed\" "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(""); + file.AddLine(wxT(" def Master_Node(self, sTuple): ")); + file.AddLine(wxT(" a,b,c = sTuple ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" mesg = eval(self.data[a][\"Master Node Code\"]) ")); + file.AddLine(wxT(" mesg = mesg + \":reporttome\" + \"\\0\" ")); + file.AddLine(wxT(" self.transport.write(mesg) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"target for Master Node \", self.data[a][\"Master Node Code\"], \" could not be parsed\" ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT("")); return true; } bool DndShapeMasterNode::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Output\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"Output\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(", ")); - file.AddLine(wxString::Format(" \"Master Node Code\" : ")); + file.AddLine(wxT(" \"Master Node Code\" : ")); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/masternode.h ============================================================================== --- sofaswitch/trunk/callflow/src/masternode.h (original) +++ sofaswitch/trunk/callflow/src/masternode.h Fri May 23 01:04:54 2008 @@ -22,7 +22,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Master Node"); } + static wxString GetKindName() { return wxT("Master Node"); } /**Write the code generic to this MasterNode code shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/python.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/python.cpp (original) +++ sofaswitch/trunk/callflow/src/python.cpp Fri May 23 01:04:54 2008 @@ -56,37 +56,37 @@ bool DndShapePython::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Python(self, sTuple): "); - file.AddLine(" a,b,c = sTuple "); - file.AddLine(" try: "); - file.AddLine(" exec(self.data[a][\"Python Code\"]) "); - file.AddLine(" except: "); - file.AddLine(" print \"Python code \", self.data[a][\"Python Code\"], \" could not be executed\" "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(""); + file.AddLine(wxT(" def Python(self, sTuple): ")); + file.AddLine(wxT(" a,b,c = sTuple ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" exec(self.data[a][\"Python Code\"]) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"Python code \", self.data[a][\"Python Code\"], \" could not be executed\" ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT("")); return true; } bool DndShapePython::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Output\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"Output\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(", ")); - file.AddLine(wxString::Format(" \"Python Code\" : ")); + file.AddLine(wxT(" \"Python Code\" : ")); wxString dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/python.h ============================================================================== --- sofaswitch/trunk/callflow/src/python.h (original) +++ sofaswitch/trunk/callflow/src/python.h Fri May 23 01:04:54 2008 @@ -22,7 +22,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Python"); } + static wxString GetKindName() { return wxT("Python"); } /**Write the code generic to this Python code shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/readfromfile.h ============================================================================== --- sofaswitch/trunk/callflow/src/readfromfile.h (original) +++ sofaswitch/trunk/callflow/src/readfromfile.h Fri May 23 01:04:54 2008 @@ -16,7 +16,7 @@ DndShapeReadFromFile(); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Read From File"); } + static wxString GetKindName() { return wxT("Read From File"); } }; Modified: sofaswitch/trunk/callflow/src/requestnode.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/requestnode.cpp (original) +++ sofaswitch/trunk/callflow/src/requestnode.cpp Fri May 23 01:04:54 2008 @@ -69,7 +69,7 @@ DrawStar(dc, 0, 42); DrawClock(dc, 43, 42, 8); - wxString text("R ?"); + wxString text(wxT("R ?")); wxFont f = wxFont(*wxITALIC_FONT); f.SetPointSize(20); dc.SetFont(f); @@ -90,118 +90,118 @@ bool DndShapeRequestNode::WriteSystemCode(wxTextFile & file) { - file.AddLine(" def Request_Node(self, aTuple): "); - file.AddLine(" a,y,z = aTuple "); - file.AddLine(" eName = a + \"_Timer\" "); - file.AddLine(" if y == 0: "); - file.AddLine(" define=self.data[a][\"Event Source\"] "); - file.AddLine(" define = define + \" = None\" "); - file.AddLine(" exec(define); "); - file.AddLine(" define=self.data[a][\"Event Name\"] "); - file.AddLine(" define = define + \" = None\" "); - file.AddLine(" exec(define); "); - file.AddLine(" define=self.data[a][\"Event Data\"] "); - file.AddLine(" define = define + \" = None\" "); - file.AddLine(" exec(define); "); - file.AddLine(" self.pendingEvents[eName] = (a, eName, \"\") "); - file.AddLine(" reactor.callLater(self.data[a][\"Timer period\"], self.timerObjectExpired, eName)"); - file.AddLine(" rNode = self.data[a][\"Request node from\"] "); - file.AddLine(" try: "); - file.AddLine(" rhost = eval(rNode) "); - file.AddLine(" except: "); - file.AddLine(" print \"Could not process \", rNode, \" as a Python string\" "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(" rhost = rhost + \":REQUESTNEWID \" "); - file.AddLine(" additional = self.data[a][\"Additional info\"] "); - file.AddLine(" if len(additional) > 0: "); - file.AddLine(" try: "); - file.AddLine(" rhost += eval(additional) "); - file.AddLine(" except: "); - file.AddLine(" print \"Could not process \", additional, \" as a Python string \" "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(" rhost += \"\\0\" "); - file.AddLine(" self.transport.write(rhost) "); - file.AddLine(" self.currentHandlers[eName] = a "); - file.AddLine(" rEvent = eval(rNode) + \"REQUESTNEWID\" "); - file.AddLine(" self.currentHandlers[rEvent] = a "); - file.AddLine(" return self.data[a][\"Output\"] "); - file.AddLine(" else: "); - file.AddLine(" define=self.data[a][\"Event Name\"] "); - file.AddLine(" try: "); - file.AddLine(" defineName = eval(define) "); - file.AddLine(" except: "); - file.AddLine(" print \"Failed to turn \", data[a][\"Event Name\"], \" into a name\" "); - file.AddLine(" defineName = \"not available\" "); - file.AddLine(" self.DeleteThisEvent(eName) "); - file.AddLine(" if defineName.find(\"Timer\") < 0: "); - file.AddLine(" return self.data[a][\"Have Node Handler\"] "); - file.AddLine(" else: "); - file.AddLine(" return self.data[a][\"Timeout Handler\"] "); - file.AddLine(""); + file.AddLine(wxT(" def Request_Node(self, aTuple): ")); + file.AddLine(wxT(" a,y,z = aTuple ")); + file.AddLine(wxT(" eName = a + \"_Timer\" ")); + file.AddLine(wxT(" if y == 0: ")); + file.AddLine(wxT(" define=self.data[a][\"Event Source\"] ")); + file.AddLine(wxT(" define = define + \" = None\" ")); + file.AddLine(wxT(" exec(define); ")); + file.AddLine(wxT(" define=self.data[a][\"Event Name\"] ")); + file.AddLine(wxT(" define = define + \" = None\" ")); + file.AddLine(wxT(" exec(define); ")); + file.AddLine(wxT(" define=self.data[a][\"Event Data\"] ")); + file.AddLine(wxT(" define = define + \" = None\" ")); + file.AddLine(wxT(" exec(define); ")); + file.AddLine(wxT(" self.pendingEvents[eName] = (a, eName, \"\") ")); + file.AddLine(wxT(" reactor.callLater(self.data[a][\"Timer period\"], self.timerObjectExpired, eName)")); + file.AddLine(wxT(" rNode = self.data[a][\"Request node from\"] ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" rhost = eval(rNode) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"Could not process \", rNode, \" as a Python string\" ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT(" rhost = rhost + \":REQUESTNEWID \" ")); + file.AddLine(wxT(" additional = self.data[a][\"Additional info\"] ")); + file.AddLine(wxT(" if len(additional) > 0: ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" rhost += eval(additional) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"Could not process \", additional, \" as a Python string \" ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT(" rhost += \"\\0\" ")); + file.AddLine(wxT(" self.transport.write(rhost) ")); + file.AddLine(wxT(" self.currentHandlers[eName] = a ")); + file.AddLine(wxT(" rEvent = eval(rNode) + \"REQUESTNEWID\" ")); + file.AddLine(wxT(" self.currentHandlers[rEvent] = a ")); + file.AddLine(wxT(" return self.data[a][\"Output\"] ")); + file.AddLine(wxT(" else: ")); + file.AddLine(wxT(" define=self.data[a][\"Event Name\"] ")); + file.AddLine(wxT(" try: ")); + file.AddLine(wxT(" defineName = eval(define) ")); + file.AddLine(wxT(" except: ")); + file.AddLine(wxT(" print \"Failed to turn \", data[a][\"Event Name\"], \" into a name\" ")); + file.AddLine(wxT(" defineName = \"not available\" ")); + file.AddLine(wxT(" self.DeleteThisEvent(eName) ")); + file.AddLine(wxT(" if defineName.find(\"Timer\") < 0: ")); + file.AddLine(wxT(" return self.data[a][\"Have Node Handler\"] ")); + file.AddLine(wxT(" else: ")); + file.AddLine(wxT(" return self.data[a][\"Timeout Handler\"] ")); + file.AddLine(wxT("")); return true; } bool DndShapeRequestNode::WriteThisShapeInfo(wxTextFile & file) { - file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str())); + file.AddLine(wxT(" \"") + GetKey() + wxT("\" : { ")); wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst(); const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Input\" : ")); - file.AddLine(wxString::Format(" %s, ", inputLabel.c_str())); + file.AddLine(wxT(" \"Input\" : ")); + file.AddLine(wxT(" ") + inputLabel + wxT(", ")); /**Output, made the request */ wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst(); const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Output\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel.c_str())); + file.AddLine(wxT(" \"Output\" : ")); + file.AddLine(wxT(" ") + outputLabel + wxT(", ")); /**Output, have the answer */ outputNode = outputNode->GetNext(); const wxString & outputLabel2 = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Have Node Handler\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel2.c_str())); + file.AddLine(wxT(" \"Have Node Handler\" : ")); + file.AddLine(wxT(" ") + outputLabel2 + wxT(", ")); /*Output, have a timeout condition */ outputNode = outputNode->GetNext(); const wxString & outputLabel3 = ((LabelledPoint *)outputNode->GetData())->GetFullLabel(); - file.AddLine(wxString::Format(" \"Timeout Handler\" : ")); - file.AddLine(wxString::Format(" %s, ", outputLabel3.c_str())); + file.AddLine(wxT(" \"Timeout Handler\" : ")); + file.AddLine(wxT(" ") + outputLabel3 + wxT(", ")); /**We direct all events to ourselves. Out Function input handler has to determine if the incoming call is requesting a node, reporting a node supplied, or reporting a timeout event*/ - file.AddLine(wxString::Format(" \"Event Handler\" : ")); + file.AddLine(wxT(" \"Event Handler\" : ")); wxString nameRequestNode = GetName(); - nameRequestNode.Replace(" ", "_", true); //Replace all spaces with underscores. - file.AddLine(wxString::Format(" (\"%s\", 1, \"%s\"), ", GetKey().c_str(), nameRequestNode.c_str())); + nameRequestNode.Replace(wxT(" "), wxT("_"), true); //Replace all spaces with underscores. + file.AddLine(wxT(" (\"") + GetKey() + wxT("\", 1, \"") + nameRequestNode + wxT("\"), ")); wxString dest; dest = ProtectString(displayData[1].data); - file.AddLine(wxString::Format(" \"Request node from\" : ")); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"Request node from\" : ")); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" \"Timer period\" : ")); - file.AddLine(wxString::Format(" %s, ", displayData[2].data.c_str())); + file.AddLine(wxT(" \"Timer period\" : ")); + file.AddLine(wxT(" ") + displayData[2] + wxT(", ")); - file.AddLine(wxString::Format(" \"Event Source\" : ")); - file.AddLine(wxString::Format(" \"self.%s_Source\", ", GetKey().c_str())); + file.AddLine(wxT(" \"Event Source\" : ")); + file.AddLine(wxT(" \"self.") + GetKey() + wxT("_Source\", ")); - file.AddLine(wxString::Format(" \"Event Name\" : ")); - file.AddLine(wxString::Format(" \"self.%s_Name\", ", GetKey().c_str())); + file.AddLine(wxT(" \"Event Name\" : ")); + file.AddLine(wxT(" \"self.") + GetKey() + wxT("_Name\", ")); - file.AddLine(wxString::Format(" \"Event Data\" : ")); - file.AddLine(wxString::Format(" \"%s\", ", displayData[4].data.c_str())); + file.AddLine(wxT(" \"Event Data\" : ")); + file.AddLine(wxT(" \"") + displayData[4] + wxT("\", ")); - file.AddLine(wxString::Format(" \"Request Pending\" : ")); - file.AddLine(wxString::Format(" 0, ")); + file.AddLine(wxT(" \"Request Pending\" : ")); + file.AddLine(wxT(" 0, ")); - file.AddLine(wxString::Format(" \"Additional info\" : ")); + file.AddLine(wxT(" \"Additional info\" : ")); dest = ProtectString(displayData[3].data); - file.AddLine(wxString::Format(" \"%s\", ", dest.c_str())); + file.AddLine(wxT(" \"") + dest + wxT("\", ")); - file.AddLine(wxString::Format(" },")); + file.AddLine(wxT(" },")); return true; } Modified: sofaswitch/trunk/callflow/src/requestnode.h ============================================================================== --- sofaswitch/trunk/callflow/src/requestnode.h (original) +++ sofaswitch/trunk/callflow/src/requestnode.h Fri May 23 01:04:54 2008 @@ -25,7 +25,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Request Node"); } + static wxString GetKindName() { return wxT("Request Node"); } /**Write the code generic to this StartHere shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/senddtmf.h ============================================================================== --- sofaswitch/trunk/callflow/src/senddtmf.h (original) +++ sofaswitch/trunk/callflow/src/senddtmf.h Fri May 23 01:04:54 2008 @@ -27,7 +27,7 @@ virtual bool WriteThisShapeInfo(wxTextFile & file); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Send Dtmf"); } + static wxString GetKindName() { return wxT("Send Dtmf"); } }; Modified: sofaswitch/trunk/callflow/src/sendmessage.h ============================================================================== --- sofaswitch/trunk/callflow/src/sendmessage.h (original) +++ sofaswitch/trunk/callflow/src/sendmessage.h Fri May 23 01:04:54 2008 @@ -22,7 +22,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Send Message"); } + static wxString GetKindName() { return wxT("Send Message"); } /**Write the code generic to this SendMessage code shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/shapeselect.h ============================================================================== --- sofaswitch/trunk/callflow/src/shapeselect.h (original) +++ sofaswitch/trunk/callflow/src/shapeselect.h Fri May 23 01:04:54 2008 @@ -30,7 +30,7 @@ void SetOtherCorner(wxPoint & newPosition); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Select"); } + static wxString GetKindName() { return wxT("Select"); } /**Mark this shape as having a top left postion as determined by the parameter */ virtual void SetPosition(wxPoint & newPosition); Modified: sofaswitch/trunk/callflow/src/startfor.h ============================================================================== --- sofaswitch/trunk/callflow/src/startfor.h (original) +++ sofaswitch/trunk/callflow/src/startfor.h Fri May 23 01:04:54 2008 @@ -23,7 +23,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Start For"); } + static wxString GetKindName() { return wxT("Start For"); } /**Write the code generic to this StartFor shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/starthere.h ============================================================================== --- sofaswitch/trunk/callflow/src/starthere.h (original) +++ sofaswitch/trunk/callflow/src/starthere.h Fri May 23 01:04:54 2008 @@ -21,7 +21,7 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Start Processing"); } + static wxString GetKindName() { return wxT("Start Processing"); } /**Write the code generic to this StartHere shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/stoptimer.h ============================================================================== --- sofaswitch/trunk/callflow/src/stoptimer.h (original) +++ sofaswitch/trunk/callflow/src/stoptimer.h Fri May 23 01:04:54 2008 @@ -23,10 +23,10 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Stop Timer"); } + static wxString GetKindName() { return wxT("Stop Timer"); } /** Used to report the name of this particular class. */ - virtual wxString GetName() { return wxString("Stop Timer"); } + virtual wxString GetName() { return wxT("Stop Timer"); } /**Write the code generic to this End For loop shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/timer.h ============================================================================== --- sofaswitch/trunk/callflow/src/timer.h (original) +++ sofaswitch/trunk/callflow/src/timer.h Fri May 23 01:04:54 2008 @@ -30,10 +30,10 @@ virtual void Draw(wxDC& dc); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Timer"); } + static wxString GetKindName() { return wxT("Timer"); } /** Used to report the name of this particular class. */ - virtual wxString GetName() const { return wxString("Timer"); } + virtual wxString GetName() const { return wxT("Timer"); } /**Write the code generic to this End For loop shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/transfermedia.h ============================================================================== --- sofaswitch/trunk/callflow/src/transfermedia.h (original) +++ sofaswitch/trunk/callflow/src/transfermedia.h Fri May 23 01:04:54 2008 @@ -27,7 +27,7 @@ virtual bool TestInternalVariables(); /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Transfer Media"); } + static wxString GetKindName() { return wxT("Transfer Media"); } /**Write the code generic to this TransferMedia code shape */ virtual bool WriteSystemCode(wxTextFile & file); Modified: sofaswitch/trunk/callflow/src/writetofile.h ============================================================================== --- sofaswitch/trunk/callflow/src/writetofile.h (original) +++ sofaswitch/trunk/callflow/src/writetofile.h Fri May 23 01:04:54 2008 @@ -17,7 +17,7 @@ /** Used to report the name of this particular class. */ - static wxString GetKindName() { return wxString("Write To File"); } + static wxString GetKindName() { return wxT("Write To File"); } };
participants (1)
-
SofaSWITCH SVN