summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-20 01:37:20 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-20 01:37:20 +0800
commit2d9324e29de2b225a53e90f558606a0579fc7481 (patch)
tree53b1c386e9512afcb88ee21d4e4d34f66ae1d740
parent15c5c61f826858f81502122106a9ac9b14f95c07 (diff)
downloadpttbbs-2d9324e29de2b225a53e90f558606a0579fc7481.tar
pttbbs-2d9324e29de2b225a53e90f558606a0579fc7481.tar.gz
pttbbs-2d9324e29de2b225a53e90f558606a0579fc7481.tar.bz2
pttbbs-2d9324e29de2b225a53e90f558606a0579fc7481.tar.lz
pttbbs-2d9324e29de2b225a53e90f558606a0579fc7481.tar.xz
pttbbs-2d9324e29de2b225a53e90f558606a0579fc7481.tar.zst
pttbbs-2d9324e29de2b225a53e90f558606a0579fc7481.zip
- add 'top boards' in ZA selection.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4211 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/proto.h10
-rw-r--r--mbbsd/board.c11
-rw-r--r--mbbsd/menu.c9
3 files changed, 23 insertions, 7 deletions
diff --git a/include/proto.h b/include/proto.h
index b4ca4ff6..a4681e02 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -98,15 +98,17 @@ int check_cooldown(boardheader_t *bp);
#define setutmpbid(bid) currutmp->brc_id=bid;
int enter_board(const char *boardname);
int HasBoardPerm(boardheader_t *bptr);
-int b_config();
-int New(void);
-int Favorite(void);
-int Class(void);
void save_brdbuf(void);
void init_brdbuf(void);
#ifdef CRITICAL_MEMORY
void sigfree(int);
#endif
+int b_config();
+// Board Selections
+int New(void);
+int Favorite(void);
+int Class(void);
+int TopBoards(void);
/* brc */
int brc_initialize(void);
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 98d6669a..5c25f87d 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1982,6 +1982,16 @@ Class(void)
}
int
+TopBoards(void)
+{
+ init_brdbuf();
+ class_bid = -1;
+ LIST_BRD();
+ choose_board(0);
+ return 0;
+}
+
+int
Favorite(void)
{
init_brdbuf();
@@ -1991,7 +2001,6 @@ Favorite(void)
return 0;
}
-
int
New(void)
{
diff --git a/mbbsd/menu.c b/mbbsd/menu.c
index c1f2186f..4e2d3e20 100644
--- a/mbbsd/menu.c
+++ b/mbbsd/menu.c
@@ -128,6 +128,8 @@ showtitle(const char *title, const char *mid)
}
+int TopBoards(void);
+
/* Ctrl-Z Anywhere Fast Switch, not ZG. */
static char zacmd = 0;
@@ -146,13 +148,13 @@ ZA_Select(void)
// TODO refresh status bar?
vs_footer(VCLR_ZA_CAPTION " ★快速切換: ",
- " (b)文章列表 (c)分類看板 (f)我的最愛 (m)信箱 (u)使用者名單");
+ " (b)文章列表 (c)分類 (t)熱門 (f)我的最愛 (m)信箱 (u)使用者名單");
k = vkey();
if (k < ' ' || k >= 'z') return 0;
k = tolower(k);
- if(strchr("bcfmu", k) == NULL)
+ if(strchr("bcfmut", k) == NULL)
return 0;
zacmd = k;
@@ -177,6 +179,9 @@ ZA_Enter(void)
case 'c':
Class();
break;
+ case 't':
+ TopBoards();
+ break;
case 'f':
Favorite();
break;