aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index 15d7ba4..8273e08 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -33,22 +33,19 @@ EpisodeListView::EpisodeListView() : ListView((HMENU)IDC_EPISODELISTVIEW, 0)
m_iSort = 1;
}
-void
-EpisodeListView::DoSort()
+void EpisodeListView::DoSort()
{
ListView_SortItemsEx(m_hWnd, ElvSort, (LPARAM)this);
}
-void
-EpisodeListView::EnsureFocusVisible()
+void EpisodeListView::EnsureFocusVisible()
{
int iEpFocus = ListView_GetNextItem(m_hWnd, -1, LVNI_FOCUSED);
if (iEpFocus == -1) return;
ListView_EnsureVisible(m_hWnd, iEpFocus, TRUE);
}
-LRESULT
-EpisodeListView::HandleNotify(LPARAM lParam)
+LRESULT EpisodeListView::HandleNotify(LPARAM lParam)
{
LPNMLISTVIEW lpNmLv = (LPNMLISTVIEW)lParam;
@@ -141,15 +138,13 @@ EpisodeListView::HandleNotify(LPARAM lParam)
return 0;
}
-void
-EpisodeListView::Redraw()
+void EpisodeListView::Redraw()
{
RedrawWindow(m_hWnd, NULL, NULL,
RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_ALLCHILDREN);
}
-void
-EpisodeListView::SaveFocus()
+void EpisodeListView::SaveFocus()
{
LVITEM lvi;
lvi.mask = LVIF_PARAM;
@@ -158,8 +153,7 @@ EpisodeListView::SaveFocus()
Pl("cfg","set_focus","I",lvi.lParam);
}
-void
-EpisodeListView::SetTop(int iItem)
+void EpisodeListView::SetTop(int iItem)
{
int iLast = ListView_GetItemCount(m_hWnd)-1;
ListView_EnsureVisible(m_hWnd, iLast, TRUE);
@@ -167,8 +161,7 @@ EpisodeListView::SetTop(int iItem)
}
/* Select previously focused episode. */
-void
-EpisodeListView::RestoreFocus()
+void EpisodeListView::RestoreFocus()
{
int i, iEpisode, iItem;
LVFINDINFO lvfi;
@@ -202,8 +195,7 @@ s: ListView_SetItemState(m_hWnd, -1, LVIF_STATE, LVIS_SELECTED);
}
/* Select next/previous unwatched episode. */
-void
-EpisodeListView::SelectUnwatched(int iDir)
+void EpisodeListView::SelectUnwatched(int iDir)
{
/* Get focused episode. */
LVITEM lviFocus;
@@ -239,8 +231,7 @@ EpisodeListView::SelectUnwatched(int iDir)
} while (i++ < 1000);
}
-void
-EpisodeListView::ShowFocus()
+void EpisodeListView::ShowFocus()
{
int iEpFocus = ListView_GetNextItem(m_hWnd, -1, LVNI_FOCUSED);
if (iEpFocus == -1) return;
@@ -248,8 +239,7 @@ EpisodeListView::ShowFocus()
}
/* Update episode list. */
-void
-EpisodeListView::Update()
+void EpisodeListView::Update()
{
int cEp, i, iEp, iEpFocus, iItem, iItemMark, iItemTopNew;
LVITEM lvi, lviEpisode, lviTop;
@@ -360,8 +350,7 @@ EpisodeListView::Update()
}
/* Update episode name and rating. */
-void
-EpisodeListView::UpdateItem(LPLVITEM lpLvi)
+void EpisodeListView::UpdateItem(LPLVITEM lpLvi)
{
char *szName;
int iRating;
@@ -389,8 +378,7 @@ r: if (!Pl("episode_data","episode_rating","Ii",lpLvi->lParam,&iRating)) {
f: if (tszName) free(tszName);
}
-LRESULT CALLBACK
-EpisodeListView::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+LRESULT CALLBACK EpisodeListView::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
case WM_GETDLGCODE:
@@ -413,8 +401,7 @@ EpisodeListView::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return ListView::WndProc(hWnd, uMsg, wParam, lParam);
}
-int CALLBACK
-ElvSort(LPARAM iItem1, LPARAM iItem2, LPARAM lExtra)
+int CALLBACK ElvSort(LPARAM iItem1, LPARAM iItem2, LPARAM lExtra)
{
EpisodeListView *lpElv = (EpisodeListView *)lExtra;