aboutsummaryrefslogtreecommitdiff
path: root/c/datalistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r--c/datalistview.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp
index f75fc99..532e3a6 100644
--- a/c/datalistview.cpp
+++ b/c/datalistview.cpp
@@ -9,6 +9,7 @@
#include "episodelistview.h"
#include "listview.h"
#include "main.h"
+#include "pl.h"
extern EpisodeListView *g_lpElv;
@@ -44,24 +45,21 @@ void DataListView::ShowEpisode(int iEpisode)
PL_predicate("episode_datum", 3, "episode_data"), t);
for (int i = 0; PL_next_solution(q); i++) {
- char *szKey;
- char *szValue;
+ TCHAR *tszKey;
+ TCHAR *tszValue;
- if (!(PL_get_atom_chars(t+1,&szKey) && PL_get_atom_chars(t+2,&szValue)))
+ if (!(PlGet(t+1, &tszKey) && PlGet(t+2, &tszValue)))
continue;
- std::basic_string<TCHAR> tsmKey = TsmFromSz(szKey, CP_UTF8);
- std::basic_string<TCHAR> tsmValue = TsmFromSz(szValue, CP_UTF8);
-
lviKey.mask = LVIF_TEXT;
lviKey.iItem = i;
lviKey.iSubItem = 0;
- lviKey.pszText = tsmKey.data();
+ lviKey.pszText = tszKey;
ListView_InsertItem(m_hWnd, &lviKey);
lviValue.iItem = i;
lviValue.iSubItem = 1;
- lviValue.pszText = tsmValue.data();
+ lviValue.pszText = tszValue;
ListView_SetItem(m_hWnd, &lviValue);
}