Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Loaden on October 04, 2008, 10:30:13 am

Title: wxSmith: have a option set _() to _T()?
Post by: Loaden on October 04, 2008, 10:30:13 am
Now, use wxSmith, the code like:
Code
_("&Exit")
but i want:
Code
_T("&Exit")

How to set?
Thanks!
Title: Re: wxSmith: have a option set _() to _T()?
Post by: byo on October 06, 2008, 07:43:17 am
Currently there's no option for that. wxSmith uses _() where string will be directly presented on the screen, otherwise _T() is used.

BYO
Title: Re: wxSmith: have a option set _() to _T()?
Post by: Borr on October 19, 2010, 10:25:24 am
I have the same problem, but i want

Code
wxT("&Exit")
Title: Re: wxSmith: have a option set _() to _T()?
Post by: Jenna on October 19, 2010, 10:35:32 am
I have the same problem, but i want

Code
wxT("&Exit")
wxT() and _T() are exactly the same.
Title: Re: wxSmith: have a option set _() to _T()?
Post by: Borr on October 19, 2010, 10:44:43 am
I have the same problem, but i want

Code
wxT("&Exit")
wxT() and _T() are exactly the same.

I tried wxWidgets 2.9.0. Project with _() failed compile. wxSmith for non-English strings use _().
Title: Re: wxSmith: have a option set _() to _T()?
Post by: Loaden on October 19, 2010, 12:43:59 pm
I think we need a option to use _() or _T("").
 :)
Title: Re: wxSmith: have a option set _() to _T()?
Post by: Loaden on October 22, 2010, 01:06:45 pm
Done in rev6741.  :D
If you want switch the option, you need editing cbp project file, like this:
Quote
      <Extensions>
         <code_completion />
         <debugger />
         <wxsmith version="1">
            <gui name="wxWidgets" src="sssApp.cpp" main="sssFrame" init_handlers="necessary" language="CPP" />
            <resources>
               <wxFrame wxs="wxsmith/sssframe.wxs" src="sssMain.cpp" hdr="sssMain.h" fwddecl="0" i18n="1" name="sssFrame" language="CPP" />
               <wxDialog wxs="wxsmith/NewDialog.wxs" src="NewDialog.cpp" hdr="NewDialog.h" fwddecl="0" i18n="1" name="NewDialog" language="CPP" />
               <wxPanel wxs="wxsmith/NewPanel.wxs" src="NewPanel.cpp" hdr="NewPanel.h" fwddecl="1" i18n="0" name="NewPanel" language="CPP" />
            </resources>
         </wxsmith>
      </Extensions>
Title: Re: wxSmith: have a option set _() to _T()?
Post by: Borr on October 22, 2010, 01:36:15 pm
many thanks