diff options
Diffstat (limited to 'c/main.cpp')
-rw-r--r-- | c/main.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
@@ -110,7 +110,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, ShowWindow(hWnd, nCmdShow); /* Populate episode list view. */ - Pl("track_episodes", "update_tracked_episodes", ""); + Pl("track_episodes", "update_tracked_episodes"); g_lpElv->Update(); g_lpElv->RestoreFocus(); @@ -150,9 +150,9 @@ static LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) /* Get saved view settings. */ char *sz; - Pl("cfg","get_view_watched","i",&g_bViewWatched); - Pl("cfg","get_view_tv_original","i",&g_bViewTVOriginal); - if (Pl("cfg","get_limit_screenwriter","s",&sz)) + Pl("cfg","get_view_watched",&g_bViewWatched); + Pl("cfg","get_view_tv_original",&g_bViewTVOriginal); + if (Pl("cfg","get_limit_screenwriter",&sz)) strcpy_s(g_szLimitScreenwriter, sizeof(g_szLimitScreenwriter), sz); return 0; } @@ -218,7 +218,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WA_ACTIVE: case WA_CLICKACTIVE: SetFocus(g_hFocus); - Pl("track_episodes","update_tracked_episodes",""); + Pl("track_episodes","update_tracked_episodes"); g_lpElv->Redraw(); } break; @@ -236,7 +236,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) /* Animate ellipsis in status bar while doing * work in other thread. */ - if (Pl("episode_data","thread_running","A",g_aThread)) { + if (Pl("episode_data","thread_running",g_aThread)) { i = (i+1)%4; SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), (LPARAM)(i==0? TEXT("."): @@ -262,11 +262,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) break; case IDM_FILE_FETCH_DATA: if (g_bThread) break; - Pl("episode_data","thread_create","Sa","update_episode_data",&g_aThread); + Pl("episode_data","thread_create","update_episode_data",&g_aThread); goto t; case IDM_FILE_FETCH_SCREENWRITERS: if (g_bThread) break; - Pl("episode_data","thread_create","Sa","update_screenwriters",&g_aThread); + Pl("episode_data","thread_create","update_screenwriters",&g_aThread); t: KillTimer(hWnd, IDT_TIMER); SetTimer(hWnd, IDT_TIMER, 500, NULL); SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), (LPARAM)TEXT(".")); @@ -285,7 +285,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) CheckMenuItem(GetMenu(hWnd), IDM_VIEW_WATCHED, g_bViewWatched? MF_UNCHECKED: MF_CHECKED); g_bViewWatched = !g_bViewWatched; - Pl("cfg","set_view_watched","I",g_bViewWatched); + Pl("cfg","set_view_watched",g_bViewWatched); g_lpElv->Update(); g_lpElv->EnsureFocusVisible(); break; @@ -295,7 +295,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) CheckMenuItem(GetMenu(hWnd), IDM_VIEW_TV_ORIGINAL, g_bViewTVOriginal? MF_UNCHECKED: MF_CHECKED); g_bViewTVOriginal = !g_bViewTVOriginal; - Pl("cfg","set_view_tv_original","I",g_bViewTVOriginal); + Pl("cfg","set_view_tv_original",g_bViewTVOriginal); g_lpElv->Update(); g_lpElv->EnsureFocusVisible(); break; @@ -317,14 +317,14 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (!ListView_GetItem(g_lpElv->HWnd(), &lvi)) break; char *sz; - if (!Pl("episode_data","episode_datum","ISs",lvi.lParam,"Screenwriter",&sz)) + if (!Pl("episode_data","episode_datum",lvi.lParam,"Screenwriter",&sz)) break; strcpy_s(g_szLimitScreenwriter, sizeof(g_szLimitScreenwriter), sz); CheckMenuItem(GetMenu(hWnd), IDM_VIEW_OTHERS, MF_UNCHECKED); } - Pl("cfg","set_limit_screenwriter","S",g_szLimitScreenwriter); + Pl("cfg","set_limit_screenwriter",g_szLimitScreenwriter); g_lpElv->Update(); g_lpElv->EnsureFocusVisible(); break; @@ -361,28 +361,28 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) switch (LOWORD(wParam)) { case IDM_WATCH_LOCALLY: - Pl("local_episode","open_episode_locally","I",lvi.lParam); + Pl("local_episode","open_episode_locally",lvi.lParam); break; case IDM_WATCH_ONLINE: - Pl("local_episode","open_episode_online","I",lvi.lParam); + Pl("local_episode","open_episode_online",lvi.lParam); break; case IDM_TOGGLE: - Pl("track_episodes","toggle_episode","I",lvi.lParam); + Pl("track_episodes","toggle_episode",lvi.lParam); g_lpElv->Redraw(); break; case IDM_FORGET: - Pl("track_episodes","forget_episode","I",lvi.lParam); - Pl("track_episodes","update_tracked_episodes",""); + Pl("track_episodes","forget_episode",lvi.lParam); + Pl("track_episodes","update_tracked_episodes"); g_lpElv->Redraw(); break; case IDM_LOOKUP: - Pl("episode_data","retract_episode","I",lvi.lParam); + Pl("episode_data","retract_episode",lvi.lParam); g_lpElv->UpdateItem(&lvi); g_lpElv->Redraw(); g_lpDlv->ShowEpisode(lvi.lParam); break; case IDM_WIKI: - Pl("episode_data","open_episode_wiki","I",lvi.lParam); + Pl("episode_data","open_episode_wiki",lvi.lParam); break; case IDM_RATE10: iRating = 10; @@ -416,7 +416,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) goto r; case IDM_RATE0: iRating = 0; - r: Pl("episode_data","rate_episode","II",lvi.lParam,iRating); + r: Pl("episode_data","rate_episode",lvi.lParam,iRating); g_lpElv->UpdateItem(&lvi); break; } @@ -489,8 +489,8 @@ HWND CreateStatusBar(HWND hWndParent, HINSTANCE hInstance) /* Attach persistent databases. */ int Attach() { - if (!Pl("track_episodes","attach","")) return 0; - if (!Pl("episode_data","attach","")) return 0; + if (!Pl("track_episodes","attach")) return 0; + if (!Pl("episode_data","attach")) return 0; return 1; } |