[Dsmyth-checkins] SF.net SVN: dsmyth: [544] trunk/MythTVReader
Brought to you by:
tobbej
From: <to...@us...> - 2007-07-11 21:10:30
|
Revision: 544 http://svn.sourceforge.net/dsmyth/?rev=544&view=rev Author: tobbej Date: 2007-07-11 14:10:28 -0700 (Wed, 11 Jul 2007) Log Message: ----------- Fix a few things i forgot after changing CProgramInfo to use wide strings Modified Paths: -------------- trunk/MythTVReader/MythSource/MythSourcePage.cpp trunk/MythTVReader/MythSource/RecordedProgramsPage.cpp trunk/MythTVReader/NuvConv/Convert.cpp Modified: trunk/MythTVReader/MythSource/MythSourcePage.cpp =================================================================== --- trunk/MythTVReader/MythSource/MythSourcePage.cpp 2007-07-11 21:02:40 UTC (rev 543) +++ trunk/MythTVReader/MythSource/MythSourcePage.cpp 2007-07-11 21:10:28 UTC (rev 544) @@ -173,12 +173,12 @@ CProgramInfo proginfo; proginfo.FromString(CAtlString(pProgInfo)); ///@todo fix the character conversion to do something better and still be compatible with win9x/me - SetDlgItemText(IDC_MYTHSOURCEPAGE_TITLE,CW2A(CA2W(proginfo.m_title,CP_UTF8))); - SetDlgItemText(IDC_MYTHSOURCEPAGE_SUBTITLE,CW2A(CA2W(proginfo.m_subtitle,CP_UTF8))); - SetDlgItemText(IDC_MYTHSOURCEPAGE_CATEGORY,CW2A(CA2W(proginfo.m_category,CP_UTF8))); - SetDlgItemText(IDC_MYTHSOURCEPAGE_CHANNEL,CW2A(CA2W(proginfo.m_channame,CP_UTF8))); - SetDlgItemText(IDC_MYTHSOURCEPAGE_CALLSIGN,CW2A(CA2W(proginfo.m_chansign,CP_UTF8))); - SetDlgItemText(IDC_MYTHSOURCEPAGE_DESCRIPTION,CW2A(CA2W(proginfo.m_description,CP_UTF8))); + SetDlgItemText(IDC_MYTHSOURCEPAGE_TITLE,CW2A(proginfo.m_title,CP_UTF8)); + SetDlgItemText(IDC_MYTHSOURCEPAGE_SUBTITLE,CW2A(proginfo.m_subtitle,CP_UTF8)); + SetDlgItemText(IDC_MYTHSOURCEPAGE_CATEGORY,CW2A(proginfo.m_category,CP_UTF8)); + SetDlgItemText(IDC_MYTHSOURCEPAGE_CHANNEL,CW2A(proginfo.m_channame,CP_UTF8)); + SetDlgItemText(IDC_MYTHSOURCEPAGE_CALLSIGN,CW2A(proginfo.m_chansign,CP_UTF8)); + SetDlgItemText(IDC_MYTHSOURCEPAGE_DESCRIPTION,CW2A(proginfo.m_description,CP_UTF8)); CoTaskMemFree(pProgInfo); pProgInfo=NULL; Modified: trunk/MythTVReader/MythSource/RecordedProgramsPage.cpp =================================================================== --- trunk/MythTVReader/MythSource/RecordedProgramsPage.cpp 2007-07-11 21:02:40 UTC (rev 543) +++ trunk/MythTVReader/MythSource/RecordedProgramsPage.cpp 2007-07-11 21:10:28 UTC (rev 544) @@ -193,8 +193,7 @@ { LVITEMW lvi; lvi.mask=LVIF_TEXT|LVIF_PARAM; - CA2W tmptitle(m_ProgInfo[i].m_title,CP_UTF8); - lvi.pszText=tmptitle; + lvi.pszText=m_ProgInfo[i].m_title.GetBuffer(); lvi.iItem=0; lvi.iSubItem=0; lvi.lParam=i; @@ -202,22 +201,20 @@ LVITEMW lvSubItem; lvSubItem.mask=LVIF_TEXT; - CA2W tmpsubtitle(m_ProgInfo[i].m_subtitle,CP_UTF8); - lvSubItem.pszText=tmpsubtitle; + lvSubItem.pszText=m_ProgInfo[i].m_subtitle.GetBuffer(); lvSubItem.iItem=res; lvSubItem.iSubItem=1; res=SendMessage(hList,LVM_SETITEMW,0,(LPARAM)&lvSubItem); lvSubItem.iSubItem=2; - CA2W tmpchname(m_ProgInfo[i].m_channame,CP_UTF8); - lvSubItem.pszText=tmpchname; + lvSubItem.pszText=m_ProgInfo[i].m_channame.GetBuffer(); res=SendMessage(hList,LVM_SETITEMW,0,(LPARAM)&lvSubItem); } else { LVITEMA lvi; lvi.mask=LVIF_TEXT|LVIF_PARAM; - lvi.pszText=m_ProgInfo[i].m_title.GetBuffer(); + lvi.pszText=CW2A(m_ProgInfo[i].m_title.GetBuffer()); lvi.iItem=0; lvi.iSubItem=0; lvi.lParam=i; @@ -225,13 +222,13 @@ LVITEMA lvSubItem; lvSubItem.mask=LVIF_TEXT; - lvSubItem.pszText=m_ProgInfo[i].m_subtitle.GetBuffer(); + lvSubItem.pszText=CW2A(m_ProgInfo[i].m_subtitle.GetBuffer()); lvSubItem.iItem=res; lvSubItem.iSubItem=1; res=SendMessage(hList,LVM_SETITEMA,0,(LPARAM)&lvSubItem); lvSubItem.iSubItem=2; - lvSubItem.pszText=m_ProgInfo[i].m_channame.GetBuffer(); + lvSubItem.pszText=CW2A(m_ProgInfo[i].m_channame.GetBuffer()); res=SendMessage(hList,LVM_SETITEMA,0,(LPARAM)&lvSubItem); } } @@ -384,10 +381,10 @@ { CAtlStringW str; str.Format(L"Are you sure you want to delete:\n%s: %s recorded at %s on %s", - (LPWSTR)CA2W(prog.m_title,CP_UTF8), - (LPWSTR)CA2W(prog.m_subtitle,CP_UTF8), - (LPWSTR)CA2W(prog.m_recstartts.Format("%Y-%m-%d %H:%M:%S"),CP_UTF8), - (LPWSTR)CA2W(prog.m_channame,CP_UTF8)); + (LPWSTR)prog.m_title.GetBuffer(), + (LPWSTR)prog.m_subtitle.GetBuffer(), + (LPWSTR)prog.m_recstartts.Format("%Y-%m-%d %H:%M:%S").GetBuffer(), + (LPWSTR)prog.m_channame.GetBuffer()); if(MessageBoxW(m_hWnd,str.GetBuffer(),L"Delete?",MB_YESNO|MB_ICONQUESTION)==IDYES) { CAtlString tmp; Modified: trunk/MythTVReader/NuvConv/Convert.cpp =================================================================== --- trunk/MythTVReader/NuvConv/Convert.cpp 2007-07-11 21:02:40 UTC (rev 543) +++ trunk/MythTVReader/NuvConv/Convert.cpp 2007-07-11 21:10:28 UTC (rev 544) @@ -261,7 +261,7 @@ if(m_fileinfo.m_ProgramInfo.m_subtitle.GetLength()>0) { str+=": "; - str+=CT2W(m_fileinfo.m_ProgramInfo.m_subtitle); + str+=m_fileinfo.m_ProgramInfo.m_subtitle; } val=str; hr=pBag->Write(OLESTR("INFO/INAM"),&val); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |