From 0014712b085cecda712bbbdd31e618a1ada2a4e3 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 10 Oct 2014 14:55:30 -0500 Subject: Add handbookSection support to tabbed "Internet & Network" TDEControl modules This relates to Bug 1850 --- kcontrol/tdeio/kcookiesmain.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'kcontrol/tdeio/kcookiesmain.cpp') diff --git a/kcontrol/tdeio/kcookiesmain.cpp b/kcontrol/tdeio/kcookiesmain.cpp index 417eb9e46..9869c6c92 100644 --- a/kcontrol/tdeio/kcookiesmain.cpp +++ b/kcontrol/tdeio/kcookiesmain.cpp @@ -19,6 +19,10 @@ KCookiesMain::KCookiesMain(TQWidget *parent) : TDECModule(parent, "kcmtdeio") { + int currentTabNumber = 0; + policiesTabNumber = -1; + managementTabNumber = -1; + management = 0; bool managerOK = true; @@ -33,19 +37,23 @@ KCookiesMain::KCookiesMain(TQWidget *parent) "You will not be able to manage the cookies that " "are stored on your computer.")); } - + TQVBoxLayout *layout = new TQVBoxLayout(this); tab = new TQTabWidget(this); layout->addWidget(tab); policies = new KCookiesPolicies(this); tab->addTab(policies, i18n("&Policy")); + policiesTabNumber = currentTabNumber; + currentTabNumber++; connect(policies, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); if( managerOK ) { management = new KCookiesManagement(this); tab->addTab(management, i18n("&Management")); + managementTabNumber = currentTabNumber; + currentTabNumber++; connect(management, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); } } @@ -96,4 +104,19 @@ TQString KCookiesMain::quickHelp() const " every time TDE receives a cookie." ); } +TQString KCookiesMain::handbookSection() const +{ + int index = tab->currentPageIndex(); + if (index == policiesTabNumber) { + //return "cookie-policy"; + return TQString::null; + } + else if (index == managementTabNumber) { + return "cookie-management"; + } + else { + return TQString::null; + } +} + #include "kcookiesmain.moc" -- cgit v1.2.1