From: John L. <jr...@us...> - 2007-06-27 15:57:19
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21869/wxLua/modules/wxbind/src Modified Files: datetime.cpp wx_bind.cpp Log Message: Replace wxDirSelectorPromptStr, wxFileSelectorPromptStr with wxT("value") for MingW 3.4.5 Fix wxLocale::GetString to use const wxChar* instead of wxString since MingW 3.4.5 doesn't that that an emptystring evalues to NULL Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** wx_bind.cpp 27 Jun 2007 03:11:29 -0000 1.121 --- wx_bind.cpp 27 Jun 2007 15:57:14 -0000 1.122 *************** *** 3701,3705 **** #endif // wxLUA_USE_wxGenericDirCtrl && wxUSE_DIRDLG ! { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, { "wxFILE_SEP_DSK", wxT(":") }, { "wxFILE_SEP_EXT", wxT(".") }, --- 3701,3705 ---- #endif // wxLUA_USE_wxGenericDirCtrl && wxUSE_DIRDLG ! { "wxDirSelectorPromptStr", wxT("Select a directory") }, { "wxFILE_SEP_DSK", wxT(":") }, { "wxFILE_SEP_EXT", wxT(".") }, *************** *** 3712,3716 **** #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG { "wxFileSelectorDefaultWildcardStr", wxFileSelectorDefaultWildcardStr }, ! { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, #endif // wxLUA_USE_wxFileDialog && wxUSE_FILEDLG --- 3712,3716 ---- #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG { "wxFileSelectorDefaultWildcardStr", wxFileSelectorDefaultWildcardStr }, ! { "wxFileSelectorPromptStr", wxT("Select a file") }, #endif // wxLUA_USE_wxFileDialog && wxUSE_FILEDLG Index: datetime.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/datetime.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** datetime.cpp 27 Jun 2007 14:29:54 -0000 1.54 --- datetime.cpp 27 Jun 2007 15:57:14 -0000 1.55 *************** *** 5737,5741 **** static int LUACALL wxLua_wxLocale_GetString1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxLocale_GetString1[1] = {{ wxLua_wxLocale_GetString1, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxLocale_GetString1 }}; ! // virtual wxString GetString(const wxString& szOrigString, const wxString& szOrigString2, size_t n, const wxString& szDomain = "") const; static int LUACALL wxLua_wxLocale_GetString1(lua_State *L) { --- 5737,5741 ---- static int LUACALL wxLua_wxLocale_GetString1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxLocale_GetString1[1] = {{ wxLua_wxLocale_GetString1, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxLocale_GetString1 }}; ! // virtual wxString GetString(const wxString& szOrigString, const wxString& szOrigString2, size_t n, const wxChar* szDomain = NULL) const; static int LUACALL wxLua_wxLocale_GetString1(lua_State *L) { *************** *** 5744,5749 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString szDomain = "" ! const wxString szDomain = (argCount >= 5 ? wxlState.GetwxStringType(5) : wxString(wxEmptyString)); // size_t n size_t n = (size_t)wxlua_getnumbertype(L, 4); --- 5744,5749 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxChar szDomain = NULL ! wxString szDomain = (argCount >= 5 ? wxlState.GetwxStringType(5) : wxString(wxEmptyString)); // size_t n size_t n = (size_t)wxlua_getnumbertype(L, 4); *************** *** 5755,5759 **** wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); // call GetString ! returns = (self->GetString(szOrigString, szOrigString2, n, szDomain)); // push the result string wxlState.lua_PushString(returns); --- 5755,5759 ---- wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); // call GetString ! returns = (self->GetString(szOrigString, szOrigString2, n, szDomain.IsEmpty() ? NULL : szDomain.c_str())); // push the result string wxlState.lua_PushString(returns); *************** *** 5765,5769 **** static int LUACALL wxLua_wxLocale_GetString(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxLocale_GetString[1] = {{ wxLua_wxLocale_GetString, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxLocale_GetString }}; ! // virtual wxString GetString(const wxString& szOrigString, const wxString& szDomain = "") const; static int LUACALL wxLua_wxLocale_GetString(lua_State *L) { --- 5765,5769 ---- static int LUACALL wxLua_wxLocale_GetString(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxLocale_GetString[1] = {{ wxLua_wxLocale_GetString, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxLocale_GetString }}; ! // virtual wxString GetString(const wxString& szOrigString, const wxChar* szDomain = NULL) const; static int LUACALL wxLua_wxLocale_GetString(lua_State *L) { *************** *** 5772,5777 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString szDomain = "" ! const wxString szDomain = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxEmptyString)); // const wxString szOrigString const wxString szOrigString = wxlState.GetwxStringType(2); --- 5772,5777 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxChar szDomain = NULL ! wxString szDomain = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxEmptyString)); // const wxString szOrigString const wxString szOrigString = wxlState.GetwxStringType(2); *************** *** 5779,5783 **** wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); // call GetString ! returns = (self->GetString(szOrigString, szDomain)); // push the result string wxlState.lua_PushString(returns); --- 5779,5783 ---- wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); // call GetString ! returns = (self->GetString(szOrigString, szDomain.IsEmpty() ? NULL : szDomain.c_str())); // push the result string wxlState.lua_PushString(returns); |