diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2010-01-29 09:26:55 +0300 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2010-01-29 09:26:55 +0300 |
commit | 5b65765087d0c7641f8b6569909be98f369e797f (patch) | |
tree | 517af788f82a38b12dc70d2dc93422c54147fbec /src/apps/mplayerc/TunerScanDlg.cpp | |
parent | e0b0b1fd888a83822f8425dd9583eb8dabd452f4 (diff) |
Fix : bug #237: DVB channels are all saved as number 0 when tunning
Patch by XPC
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1570 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/TunerScanDlg.cpp')
-rw-r--r-- | src/apps/mplayerc/TunerScanDlg.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/apps/mplayerc/TunerScanDlg.cpp b/src/apps/mplayerc/TunerScanDlg.cpp index 1f5b3b0e9..384ca2507 100644 --- a/src/apps/mplayerc/TunerScanDlg.cpp +++ b/src/apps/mplayerc/TunerScanDlg.cpp @@ -111,6 +111,7 @@ void CTunerScanDlg::OnBnClickedSave() {
CDVBChannel Channel;
Channel.FromString (m_ChannelList.GetItemText (i, TSCC_CHANNEL));
+ Channel.SetPrefNumber(i); // XPC
s.DVBChannels.AddTail (Channel);
}
@@ -170,17 +171,21 @@ LRESULT CTunerScanDlg::OnNewChannel(WPARAM wParam, LPARAM lParam) CString strTemp;
int nItem;
Channel.FromString ((LPCTSTR) lParam);
-
+
strTemp.Format(_T("%03d"), Channel.GetOriginNumber());
nItem = m_ChannelList.InsertItem (m_ChannelList.GetItemCount(), strTemp);
+ strTemp.Format(_T("%d"), m_ChannelList.GetItemCount()); //XPC
+ m_ChannelList.SetItemText (nItem, TSCC_NUMBER, strTemp); //XPC
+
m_ChannelList.SetItemText (nItem, TSCC_NAME, Channel.GetName());
strTemp.Format(_T("%d"), Channel.GetFrequency());
m_ChannelList.SetItemText (nItem, TSCC_FREQUENCY, strTemp);
m_ChannelList.SetItemText (nItem, TSCC_CHANNEL, (LPCTSTR) lParam);
-
+
+
return TRUE;
}
|