aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/episodelistview.c8
-rw-r--r--c/main.c20
-rw-r--r--c/resource.h17
-rw-r--r--c/resource.rc5
4 files changed, 41 insertions, 9 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c
index 843ef78..601f2b7 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -27,7 +27,7 @@ ElvCreate()
lvc.iSubItem = 1;
lvc.pszText = TEXT("/");
- lvc.cx = Dpi(20);
+ lvc.cx = Dpi(30);
ListView_InsertColumn(HElv, 1, &lvc);
lvc.iSubItem = 2;
@@ -375,8 +375,9 @@ ElvUpdateItem(LPLVITEM lpLvi)
{
char *szName;
int iRating;
- TCHAR *tszName, tszRating[3];
+ TCHAR *tszName;
term_t t, t2;
+ static TCHAR tszRating[3];
t = T(2);
tszName = NULL;
@@ -397,7 +398,8 @@ r: t2 = T(2);
goto f;
}
GI(t2+1,&iRating) goto f;
- _itot(iRating % 11, tszRating, sizeof(tszRating));
+
+ _stprintf_s(tszRating, sizeof(tszRating), TEXT("%d"), iRating);
ListView_SetItemText(HElv, lpLvi->iItem, 1, tszRating);
f: if (tszName) free(tszName);
diff --git a/c/main.c b/c/main.c
index 259a526..2676e01 100644
--- a/c/main.c
+++ b/c/main.c
@@ -266,6 +266,11 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case IDM_TOGGLE:
case IDM_FORGET:
case IDM_LOOKUP:
+ case IDM_RATE10:
+ case IDM_RATE9:
+ case IDM_RATE8:
+ case IDM_RATE7:
+ case IDM_RATE6:
case IDM_RATE5:
case IDM_RATE4:
case IDM_RATE3:
@@ -307,6 +312,21 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
ElvRedraw();
DlvShowEpisode(lvi.lParam);
break;
+ case IDM_RATE10:
+ PI(t+1,10) break;
+ goto r;
+ case IDM_RATE9:
+ PI(t+1,9) break;
+ goto r;
+ case IDM_RATE8:
+ PI(t+1,8) break;
+ goto r;
+ case IDM_RATE7:
+ PI(t+1,7) break;
+ goto r;
+ case IDM_RATE6:
+ PI(t+1,6) break;
+ goto r;
case IDM_RATE5:
PI(t+1,5) break;
goto r;
diff --git a/c/resource.h b/c/resource.h
index b31a3cf..dc6b576 100644
--- a/c/resource.h
+++ b/c/resource.h
@@ -19,11 +19,16 @@
#define IDM_TOGGLE 502
#define IDM_FORGET 503
#define IDM_LOOKUP 504
-#define IDM_RATE5 525
-#define IDM_RATE4 526
-#define IDM_RATE3 527
-#define IDM_RATE2 528
-#define IDM_RATE1 529
-#define IDM_RATE0 530
+#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 94f2ff2..82b4eaa 100644
--- a/c/resource.rc
+++ b/c/resource.rc
@@ -33,6 +33,11 @@ BEGIN
MENUITEM "&Lookup", IDM_LOOKUP
POPUP "&Rate"
BEGIN
+ MENUITEM "&10", IDM_RATE10
+ MENUITEM "&9", IDM_RATE9
+ MENUITEM "&8", IDM_RATE8
+ MENUITEM "&7", IDM_RATE7
+ MENUITEM "&6", IDM_RATE6
MENUITEM "&5", IDM_RATE5
MENUITEM "&4", IDM_RATE4
MENUITEM "&3", IDM_RATE3