diff options
author | v0lt <v0lt@users.sourceforge.net> | 2012-04-08 11:11:10 +0400 |
---|---|---|
committer | v0lt <v0lt@users.sourceforge.net> | 2012-04-08 11:11:10 +0400 |
commit | ee39994f27c64f539fe66303941b6e8180d80f44 (patch) | |
tree | d7d41a983c53960df625470d8dd18234c08deb24 | |
parent | 51bddf6a70f02723785a2ed9e7795a5123c9b2ba (diff) |
optimization and fixed typos
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4287 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r-- | src/apps/mplayerc/MainFrm.cpp | 7 | ||||
-rw-r--r-- | src/apps/mplayerc/PlayerSubresyncBar.cpp | 9 |
2 files changed, 4 insertions, 12 deletions
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index 22aa4f957..a31ce0a83 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -3332,13 +3332,10 @@ void CMainFrame::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu) }
CString key = CPPageAccelTbl::MakeAccelShortcutLabel(nID);
- if (!key.IsEmpty()) {
- str += _T("\t") + key;
- }
-
- if (key.IsEmpty() && i < 0) {
+ if (key.IsEmpty() && k < 0) {
continue;
}
+ str += _T("\t") + key;
// BUG(?): this disables menu item update ui calls for some reason...
// pPopupMenu->ModifyMenu(i, MF_BYPOSITION|MF_STRING, nID, str);
diff --git a/src/apps/mplayerc/PlayerSubresyncBar.cpp b/src/apps/mplayerc/PlayerSubresyncBar.cpp index ca87b34d1..603917aae 100644 --- a/src/apps/mplayerc/PlayerSubresyncBar.cpp +++ b/src/apps/mplayerc/PlayerSubresyncBar.cpp @@ -1110,16 +1110,11 @@ void CPlayerSubresyncBar::OnNMDblclkList(NMHDR* pNMHDR, LRESULT* pResult) if (lpnmlv->iItem >= 0 && lpnmlv->iSubItem >= 0 && (m_mode == VOBSUB || m_mode == TEXTSUB)) {
if (CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd()) {
int t = 0;
- if (!ParseTime(m_list.GetItemText(lpnmlv->iItem, lpnmlv->iSubItem), t, false)) {
+ if (lpnmlv->iSubItem > COL_PREVEND || !ParseTime(m_list.GetItemText(lpnmlv->iItem, lpnmlv->iSubItem), t, false)) {
t = m_sts[lpnmlv->iItem].start;
}
- REFERENCE_TIME rt =
- lpnmlv->iSubItem == COL_START ? ((REFERENCE_TIME)t*10000) :
- lpnmlv->iSubItem == COL_END ? ((REFERENCE_TIME)t*10000) :
- lpnmlv->iSubItem == COL_PREVSTART ? ((REFERENCE_TIME)t*10000) :
- lpnmlv->iSubItem == COL_PREVEND ? ((REFERENCE_TIME)t*10000) :
- ((REFERENCE_TIME)t*10000);
+ REFERENCE_TIME rt = (REFERENCE_TIME)t*10000;
pFrame->SeekTo(rt);
}
|