aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/episodelistview.c3
-rw-r--r--c/main.c14
-rw-r--r--c/resource.h65
-rw-r--r--c/resource.rc10
-rw-r--r--pl/local_episodes.pl7
5 files changed, 55 insertions, 44 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c
index c432497..ad1fd36 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -119,7 +119,8 @@ ElvHandleNotify(LPARAM lParam)
term_t t;
t = T(1);
PI(t,LviElvFocus.lParam) break;
- P("local_episodes","open_episode",1,t);
+ P("local_episodes","open_episode_locally",1,t)
+ P("local_episodes","open_episode_online",1,t);
break;
}
case NM_RETURN: /* Open all selected episodes. */
diff --git a/c/main.c b/c/main.c
index 78af35c..4e13d7f 100644
--- a/c/main.c
+++ b/c/main.c
@@ -224,7 +224,7 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case IDM_FILE_RESET:
ElvSelectRecent();
break;
- case IDM_FILE_FETCH:
+ case IDM_FILE_FETCH_DATA:
{
term_t t;
t = T(0);
@@ -232,7 +232,7 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
ElvUpdate();
break;
}
- case IDM_FILE_SCREENWRITERS:
+ case IDM_FILE_FETCH_SCREENWRITERS:
{
term_t t;
t = T(0);
@@ -323,7 +323,8 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
ListView_EnsureVisible(HElv, iEpFocus, TRUE);
break;
}
- case IDM_WATCH:
+ case IDM_WATCH_LOCALLY:
+ case IDM_WATCH_ONLINE:
case IDM_TOGGLE:
case IDM_FORGET:
case IDM_LOOKUP:
@@ -356,8 +357,11 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PI(t,lvi.lParam) goto b;
switch (LOWORD(wParam)) {
- case IDM_WATCH:
- P("local_episode","open_episode",1,t);
+ case IDM_WATCH_LOCALLY:
+ P("local_episode","open_episode_locally",1,t);
+ break;
+ case IDM_WATCH_ONLINE:
+ P("local_episode","open_episode_online",1,t);
break;
case IDM_TOGGLE:
P("track_episodes","toggle_episode",1,t);
diff --git a/c/resource.h b/c/resource.h
index 6d4c090..0d626b8 100644
--- a/c/resource.h
+++ b/c/resource.h
@@ -1,37 +1,38 @@
#ifndef RESOURCE_H
#define RESOURCE_H
-#define ID_STATUS 11
-#define IDR_MENU 101
-#define IDR_POPUPMENU 102
-#define IDD_ABOUT 201
-#define IDC_ABOUTTEXT 301
-#define IDC_EPISODELISTVIEW 302
-#define IDC_DATALISTVIEW 303
-#define IDM_FILE_EXIT 401
-#define IDM_FILE_REFRESH 402
-#define IDM_FILE_RESET 403
-#define IDM_FILE_FETCH 404
-#define IDM_FILE_SCREENWRITERS 405
-#define IDM_FILE_ABOUT 411
-#define IDM_VIEW_WATCHED 421
-#define IDM_VIEW_TV_ORIGINAL 422
-#define IDM_VIEW_OTHERS 423
-#define IDM_WATCH 501
-#define IDM_TOGGLE 502
-#define IDM_FORGET 503
-#define IDM_LOOKUP 504
-#define IDM_WIKI 505
-#define IDM_RATE10 525
-#define IDM_RATE9 526
-#define IDM_RATE8 527
-#define IDM_RATE7 528
-#define IDM_RATE6 529
-#define IDM_RATE5 530
-#define IDM_RATE4 531
-#define IDM_RATE3 532
-#define IDM_RATE2 533
-#define IDM_RATE1 534
-#define IDM_RATE0 535
+#define ID_STATUS 11
+#define IDR_MENU 101
+#define IDR_POPUPMENU 102
+#define IDD_ABOUT 201
+#define IDC_ABOUTTEXT 301
+#define IDC_EPISODELISTVIEW 302
+#define IDC_DATALISTVIEW 303
+#define IDM_FILE_EXIT 401
+#define IDM_FILE_REFRESH 402
+#define IDM_FILE_RESET 403
+#define IDM_FILE_FETCH_DATA 404
+#define IDM_FILE_FETCH_SCREENWRITERS 405
+#define IDM_FILE_ABOUT 411
+#define IDM_VIEW_WATCHED 421
+#define IDM_VIEW_TV_ORIGINAL 422
+#define IDM_VIEW_OTHERS 423
+#define IDM_WATCH_LOCALLY 501
+#define IDM_WATCH_ONLINE 502
+#define IDM_TOGGLE 503
+#define IDM_FORGET 504
+#define IDM_LOOKUP 505
+#define IDM_WIKI 506
+#define IDM_RATE10 525
+#define IDM_RATE9 526
+#define IDM_RATE8 527
+#define IDM_RATE7 528
+#define IDM_RATE6 529
+#define IDM_RATE5 530
+#define IDM_RATE4 531
+#define IDM_RATE3 532
+#define IDM_RATE2 533
+#define IDM_RATE1 534
+#define IDM_RATE0 535
#endif
diff --git a/c/resource.rc b/c/resource.rc
index c6e1246..d0eef28 100644
--- a/c/resource.rc
+++ b/c/resource.rc
@@ -7,8 +7,11 @@ IDR_MENU MENU
BEGIN
POPUP "&File"
BEGIN
- MENUITEM "&Fetch", IDM_FILE_FETCH
- MENUITEM "Fetch Screen&writers", IDM_FILE_SCREENWRITERS
+ POPUP "&Fetch"
+ BEGIN
+ MENUITEM "&General Data", IDM_FILE_FETCH_DATA
+ MENUITEM "&Screenwriters", IDM_FILE_FETCH_SCREENWRITERS
+ END
MENUITEM "&Refresh", IDM_FILE_REFRESH
MENUITEM "Re&set", IDM_FILE_RESET
MENUITEM "E&xit", IDM_FILE_EXIT
@@ -29,7 +32,8 @@ IDR_POPUPMENU MENU DISCARDABLE
BEGIN
POPUP "Episode Menu"
BEGIN
- MENUITEM "&Watch", IDM_WATCH
+ MENUITEM "&Watch Locally", IDM_WATCH_LOCALLY
+ MENUITEM "Watch &Online", IDM_WATCH_ONLINE
MENUITEM "&Toggle", IDM_TOGGLE
MENUITEM "&Forget", IDM_FORGET
MENUITEM "&Lookup", IDM_LOOKUP
diff --git a/pl/local_episodes.pl b/pl/local_episodes.pl
index 0273bb3..68809a7 100644
--- a/pl/local_episodes.pl
+++ b/pl/local_episodes.pl
@@ -1,6 +1,7 @@
:- module(local_episodes, [local_episode//1,
episode_file/2,
- open_episode/1]).
+ open_episode_locally/1,
+ open_episode_online/1]).
:- use_module(library(dcg/basics)).
:- use_module(atom_dcg).
@@ -45,5 +46,5 @@ episode_file(N, F) :-
% Open episode.
episode_url(N) --> { with_codes(get_url(U)) }, string(U), integer(N).
-open_episode(N) :- episode_file(N, F), !, win_shell(open, F).
-open_episode(N) :- atom_phrase(episode_url(N), U), win_shell(open, U).
+open_episode_locally(N) :- episode_file(N, F), !, win_shell(open, F).
+open_episode_online(N) :- atom_phrase(episode_url(N), U), win_shell(open, U).