From ff76a556a7974e6bc13e639905186c25b00589ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sat, 14 Aug 2010 15:01:28 +0000 Subject: [PATCH] * print the header of the tab into the comment before the tab starts. --- webcit/subst.c | 2 +- webcit/tabs.c | 23 ++++++++++++++++------- webcit/webcit.h | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/webcit/subst.c b/webcit/subst.c index ee0e324e7..02d9fa550 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -2741,7 +2741,7 @@ void tmpl_do_tabbed(StrBuf *Target, WCTemplputParams *TP) StrTabbedDialog(Target, nTabs, TabNames); for (i = 0; i < ntabs; i++) { - StrBeginTab(Target, i, nTabs); + StrBeginTab(Target, i, nTabs, TabNames); DoTemplate(TKEY(i * 2 + 1), Target, TP); StrEndTab(Target, i, nTabs); } diff --git a/webcit/tabs.c b/webcit/tabs.c index 2adaaec9a..d6172de36 100644 --- a/webcit/tabs.c +++ b/webcit/tabs.c @@ -158,22 +158,31 @@ void StrTabbedDialog(StrBuf *Target, int num_tabs, StrBuf *tabnames[]) { * num_tabs: total number oftabs to be printed * */ -void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs) { +void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs, StrBuf **Names) { if (tabnum == num_tabs) { StrBufAppendBufPlain( Target, - HKEY( - "\n" - "
"), 0); + HKEY("\n
"), 0); } else { + StrBufAppendBufPlain( + Target, + HKEY("\n" - "
", - tabnum, num_tabs, + "] -->\n
", tabnum, ( (tabnum == 0) ? "block" : "none" ) ); diff --git a/webcit/webcit.h b/webcit/webcit.h index 279c540e2..730739485 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -807,7 +807,7 @@ long unescape_input(char *buf); void check_thread_pool_size(void); void spawn_another_worker_thread(void); void StrEndTab(StrBuf *Target, int tabnum, int num_tabs); -void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs); +void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs, StrBuf **Names); void StrTabbedDialog(StrBuf *Target, int num_tabs, StrBuf *tabnames[]); void tabbed_dialog(int num_tabs, char *tabnames[]); void begin_tab(int tabnum, int num_tabs); -- 2.30.2