summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2013-10-19 18:42:28 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-10-19 20:32:05 +0200
commit36ba7f534562e55ba880e3e2699c2aea5a5377f8 (patch)
treeea824d4dea37eafc1b8848390eaab43f967530a1 /kcontrol
parent1041337c62d0bd9d9b503c77b04fd825936fb784 (diff)
downloadtdebase-36ba7f534562e55ba880e3e2699c2aea5a5377f8.tar.gz
tdebase-36ba7f534562e55ba880e3e2699c2aea5a5377f8.zip
Add check box to control tabbar mouse wheel in konqueror
Move tabbed browsing options into single dialog This resolves Bug 910
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/konqhtml/advancedTabDialog.cpp14
-rw-r--r--kcontrol/konqhtml/advancedTabOptions.ui35
-rw-r--r--kcontrol/konqhtml/htmlopts.cpp39
-rw-r--r--kcontrol/konqhtml/htmlopts.h7
4 files changed, 60 insertions, 35 deletions
diff --git a/kcontrol/konqhtml/advancedTabDialog.cpp b/kcontrol/konqhtml/advancedTabDialog.cpp
index f58bb9836..d9a995588 100644
--- a/kcontrol/konqhtml/advancedTabDialog.cpp
+++ b/kcontrol/konqhtml/advancedTabDialog.cpp
@@ -15,6 +15,11 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
+
+ --------------------------------------------------------------
+ Additional changes:
+ - 2013/10/16 Michele Calgaro
+ * centralized "tabbed browsing" options in this dialog
*/
#include <tqbuttongroup.h>
@@ -58,6 +63,9 @@ advancedTabDialog::advancedTabDialog(TQWidget* parent, TDEConfig* config, const
layout->addSpacing( 20 );
layout->addStretch();
+ connect(m_advancedWidget->m_pShowMMBInTabs, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect(m_advancedWidget->m_pDynamicTabbarHide, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect(m_advancedWidget->m_pDynamicTabbarCycle, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
connect(m_advancedWidget->m_pNewTabsInBackground, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
connect(m_advancedWidget->m_pOpenAfterCurrentPage, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
connect(m_advancedWidget->m_pTabConfirm, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
@@ -77,6 +85,9 @@ advancedTabDialog::~advancedTabDialog()
void advancedTabDialog::load()
{
m_pConfig->setGroup("FMSettings");
+ m_advancedWidget->m_pShowMMBInTabs->setChecked( m_pConfig->readBoolEntry( "MMBOpensTab", false ) );
+ m_advancedWidget->m_pDynamicTabbarHide->setChecked( !(m_pConfig->readBoolEntry( "AlwaysTabbedMode", false )) );
+ m_advancedWidget->m_pDynamicTabbarCycle->setChecked( m_pConfig->readBoolEntry( "TabsCycleWheel", false ) );
m_advancedWidget->m_pNewTabsInBackground->setChecked( ! (m_pConfig->readBoolEntry( "NewTabsInFront", false )) );
m_advancedWidget->m_pOpenAfterCurrentPage->setChecked( m_pConfig->readBoolEntry( "OpenAfterCurrentPage", false ) );
m_advancedWidget->m_pPermanentCloseButton->setChecked( m_pConfig->readBoolEntry( "PermanentCloseButton", false ) );
@@ -98,6 +109,9 @@ void advancedTabDialog::load()
void advancedTabDialog::save()
{
m_pConfig->setGroup("FMSettings");
+ m_pConfig->writeEntry( "MMBOpensTab", (m_advancedWidget->m_pShowMMBInTabs->isChecked()) );
+ m_pConfig->writeEntry( "AlwaysTabbedMode", ( !(m_advancedWidget->m_pDynamicTabbarHide->isChecked())) );
+ m_pConfig->writeEntry( "TabsCycleWheel", (m_advancedWidget->m_pDynamicTabbarCycle->isChecked()) );
m_pConfig->writeEntry( "NewTabsInFront", !(m_advancedWidget->m_pNewTabsInBackground->isChecked()) );
m_pConfig->writeEntry( "OpenAfterCurrentPage", m_advancedWidget->m_pOpenAfterCurrentPage->isChecked() );
m_pConfig->writeEntry( "PermanentCloseButton", m_advancedWidget->m_pPermanentCloseButton->isChecked() );
diff --git a/kcontrol/konqhtml/advancedTabOptions.ui b/kcontrol/konqhtml/advancedTabOptions.ui
index df4419e95..3e4acb644 100644
--- a/kcontrol/konqhtml/advancedTabOptions.ui
+++ b/kcontrol/konqhtml/advancedTabOptions.ui
@@ -24,7 +24,7 @@
<cstring>TextLabel3</cstring>
</property>
<property name="text">
- <string>&lt;b&gt;Advanced Options&lt;/b&gt;</string>
+ <string>&lt;b&gt;Tab Options&lt;/b&gt;</string>
</property>
</widget>
<widget class="Line">
@@ -50,6 +50,39 @@
<cstring>unnamed</cstring>
</property>
<widget class="TQCheckBox">
+ <property name="name">
+ <cstring>m_pShowMMBInTabs</cstring>
+ </property>
+ <property name="text">
+ <string>Open &amp;links in new tab instead of in new window</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This will open a new tab instead of a new window in various situations, such as choosing a link or a folder with the middle mouse button.</string>
+ </property>
+ </widget>
+ <widget class="TQCheckBox">
+ <property name="name">
+ <cstring>m_pDynamicTabbarHide</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Hide the tab bar when only one tab is open</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This will display the tab bar only if there are two or more tabs. Otherwise it will always be displayed.</string>
+ </property>
+ </widget>
+ <widget class="TQCheckBox">
+ <property name="name">
+ <cstring>m_pDynamicTabbarCycle</cstring>
+ </property>
+ <property name="text">
+ <string>C&amp;ycle tabs with mouse wheel</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This will cycle through tabs when there are two or more tabs using the mouse wheel.</string>
+ </property>
+ </widget>
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_pNewTabsInBackground</cstring>
</property>
diff --git a/kcontrol/konqhtml/htmlopts.cpp b/kcontrol/konqhtml/htmlopts.cpp
index f8731f60d..5ba1a8d9b 100644
--- a/kcontrol/konqhtml/htmlopts.cpp
+++ b/kcontrol/konqhtml/htmlopts.cpp
@@ -4,6 +4,10 @@
// (c) Sven Radej 1998
// (c) David Faure 1998
// (c) 2001 Waldo Bastian <bastian@kde.org>
+//
+// --------------------------------------------------------------
+// - 2013/10/16 Michele Calgaro
+// Move some options to the 'advancedTabDialog' dialog
#include <tqlayout.h>//CT - 12Nov1998
#include <tqwhatsthis.h>
@@ -82,26 +86,9 @@ KMiscHTMLOptions::KMiscHTMLOptions(TDEConfig *config, TQString group, TQWidget *
// Tabbed Browsing
TQGroupBox *bgTabbedBrowsing = new TQGroupBox( 0, Qt::Vertical, i18n("Tabbed Browsing"), this );
- TQVBoxLayout *laygroup = new TQVBoxLayout(bgTabbedBrowsing->layout(), KDialog::spacingHint() );
-
- m_pShowMMBInTabs = new TQCheckBox( i18n( "Open &links in new tab instead of in new window" ), bgTabbedBrowsing );
- TQWhatsThis::add( m_pShowMMBInTabs, i18n("This will open a new tab instead of a new window in various situations, "
- "such as choosing a link or a folder with the middle mouse button.") );
- connect(m_pShowMMBInTabs, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
- laygroup->addWidget(m_pShowMMBInTabs);
-
- m_pDynamicTabbarHide = new TQCheckBox( i18n( "Hide the tab bar when only one tab is open" ), bgTabbedBrowsing );
- TQWhatsThis::add( m_pDynamicTabbarHide, i18n("This will display the tab bar only if there are two or more tabs. Otherwise it will always be displayed.") );
- connect(m_pDynamicTabbarHide, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
- laygroup->addWidget(m_pDynamicTabbarHide);
-
- m_pDynamicTabbarCycle = new TQCheckBox( i18n( "C&ycle tabs with mouse wheel" ), bgTabbedBrowsing );
- TQWhatsThis::add( m_pDynamicTabbarCycle, i18n("This will cycle through tabs when there are two or more tabs.") );
- connect(m_pDynamicTabbarCycle, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
- laygroup->addWidget(m_pDynamicTabbarCycle);
-
- TQHBoxLayout *laytab = new TQHBoxLayout(laygroup, KDialog::spacingHint());
- TQPushButton *advancedTabButton = new TQPushButton( i18n( "Advanced Options"), bgTabbedBrowsing );
+ TQHBoxLayout *laytab = new TQHBoxLayout(bgTabbedBrowsing->layout(), KDialog::spacingHint());
+
+ TQPushButton *advancedTabButton = new TQPushButton( i18n( "Show &tab options"), bgTabbedBrowsing );
laytab->addWidget(advancedTabButton);
laytab->addStretch();
connect(advancedTabButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(launchAdvancedTabDialog()));
@@ -299,14 +286,9 @@ void KMiscHTMLOptions::load( bool useDefaults )
m_pMaxFormCompletionItems->setValue( m_pConfig->readNumEntry( "MaxFormCompletionItems", 10 ) );
m_pMaxFormCompletionItems->setEnabled( m_pFormCompletionCheckBox->isChecked() );
- m_pConfig->setGroup("FMSettings");
- m_pShowMMBInTabs->setChecked( m_pConfig->readBoolEntry( "MMBOpensTab", false ) );
- m_pDynamicTabbarHide->setChecked( ! (m_pConfig->readBoolEntry( "AlwaysTabbedMode", false )) );
- m_pDynamicTabbarCycle->setChecked( m_pConfig->readBoolEntry( "TabsCycleWheel", true ) );
-
TDEConfig config("kbookmarkrc", true, false);
config.setReadDefaults( useDefaults );
- config.setGroup("Bookmarks");
+ config.setGroup("Bookmarks");
m_pAdvancedAddBookmarkCheckBox->setChecked( config.readBoolEntry("AdvancedAddBookmarkDialog", false) );
m_pOnlyMarkedBookmarksCheckBox->setChecked( config.readBoolEntry("FilteredToolbar", false) );
@@ -372,11 +354,6 @@ void KMiscHTMLOptions::save()
m_pConfig->writeEntry( "FormCompletion", m_pFormCompletionCheckBox->isChecked() );
m_pConfig->writeEntry( "MaxFormCompletionItems", m_pMaxFormCompletionItems->value() );
-
- m_pConfig->setGroup("FMSettings");
- m_pConfig->writeEntry( "MMBOpensTab", m_pShowMMBInTabs->isChecked() );
- m_pConfig->writeEntry( "AlwaysTabbedMode", !(m_pDynamicTabbarHide->isChecked()) );
- m_pConfig->writeEntry( "TabsCycleWheel", m_pDynamicTabbarCycle->isChecked() );
m_pConfig->sync();
TDEConfig config("kbookmarkrc", false, false);
diff --git a/kcontrol/konqhtml/htmlopts.h b/kcontrol/konqhtml/htmlopts.h
index 43ba62cee..c318d0628 100644
--- a/kcontrol/konqhtml/htmlopts.h
+++ b/kcontrol/konqhtml/htmlopts.h
@@ -4,6 +4,10 @@
//
// (c) Sven Radej 1998
// (c) David Faure 1998
+//
+// --------------------------------------------------------------
+// - 2013/10/16 Michele Calgaro
+// Move some options to the 'advancedTabDialog' dialog
#ifndef __KMISCHTML_OPTIONS_H
#define __KMISCHTML_OPTIONS_H
@@ -60,10 +64,7 @@ private:
TQCheckBox* m_pAutoRedirectCheckBox;
TQCheckBox* m_pOpenMiddleClick;
TQCheckBox* m_pBackRightClick;
- TQCheckBox* m_pShowMMBInTabs;
TQCheckBox* m_pFormCompletionCheckBox;
- TQCheckBox* m_pDynamicTabbarHide;
- TQCheckBox* m_pDynamicTabbarCycle;
TQCheckBox* m_pAdvancedAddBookmarkCheckBox;
TQCheckBox* m_pOnlyMarkedBookmarksCheckBox;
KIntNumInput* m_pMaxFormCompletionItems;