diff options
-rw-r--r-- | doc/kcontrol/tdehtml/index.docbook | 110 | ||||
-rw-r--r-- | kcontrol/konqhtml/CMakeLists.txt | 10 | ||||
-rw-r--r-- | kcontrol/konqhtml/Makefile.am | 8 | ||||
-rw-r--r-- | kcontrol/konqhtml/advancedTabDialog.cpp | 150 | ||||
-rw-r--r-- | kcontrol/konqhtml/advancedTabOptions.ui | 199 | ||||
-rw-r--r-- | kcontrol/konqhtml/htmlopts.cpp | 22 | ||||
-rw-r--r-- | kcontrol/konqhtml/htmlopts.h | 1 | ||||
-rw-r--r-- | kcontrol/konqhtml/main.cpp | 17 | ||||
-rw-r--r-- | kcontrol/konqhtml/tdehtml_userinterface.desktop | 18 | ||||
-rw-r--r-- | kcontrol/konqhtml/userInterConfig.cpp | 72 | ||||
-rw-r--r-- | kcontrol/konqhtml/userInterConfig.h | 44 | ||||
-rw-r--r-- | kcontrol/konqhtml/userInterOpts.ui | 195 | ||||
-rw-r--r-- | kcontrol/konqhtml/userInterOpts_impl.cpp | 127 | ||||
-rw-r--r-- | kcontrol/konqhtml/userInterOpts_impl.h (renamed from kcontrol/konqhtml/advancedTabDialog.h) | 48 | ||||
-rw-r--r-- | konqueror/konq_mainwindow.cc | 4 |
15 files changed, 566 insertions, 459 deletions
diff --git a/doc/kcontrol/tdehtml/index.docbook b/doc/kcontrol/tdehtml/index.docbook index 9f706188a..a07cceee9 100644 --- a/doc/kcontrol/tdehtml/index.docbook +++ b/doc/kcontrol/tdehtml/index.docbook @@ -34,12 +34,18 @@ integrated web browser of &tde;.</para> <sect2 id="kbrowse-html"> -<title>Behavior</title> +<title>Web Behavior</title> -<para>The first option you can enable on this page is <guilabel>Enable -completion of forms</guilabel>. If you check this box, &konqueror; will -try to remember what you answer to form questions, and will try to fill -in forms for you with the answers you previously used.</para> +<para>The first group of options control bookmarks. With <guilabel>Ask for +name and folder when adding bookmarks</guilabel>, you can change the title +of the bookmark and select a folder to store the bookmark. With +<guilabel>Show only marked bookmarks in bookmark folder</guilabel> you +can change the way &konqueror; shows bookmarks in the bookmark toolbar.</para> + +<para>The next group of options control form completion. The first option +is <guilabel>Enable completion of forms</guilabel>. If you check this box, +&konqueror; will try to remember what you answer to form questions, and will +try to fill in forms for you with the answers you previously used.</para> <para>You can configure the number of form items &konqueror; remembers with the slider below labelled <guilabel>Maximum @@ -54,28 +60,6 @@ will change (usually to a hand) whenever it moves over a hyperlink. This makes it easy to identify links, especially when they are in the form of images.</para> -<para>&konqueror; defaults to a single window per page, but has the -capability to open multiple <firstterm>tabs</firstterm> inside a -single window. &konqueror; also, by default, has a &MMB; shortcut to -open any link in a new window. If you enable <guilabel>Open links in -new tab instead of in new window</guilabel> you can &MMB; click on a -link to have it open in a new tab.</para> - -<para>If you are using tabbed browsing, you can choose if a newly -opened tab becomes the active (<quote>front</quote>) tab, or goes to -the back. On a slow internet connection, or while browsing a page -that has a list of headlines or other links in a list, you may like to -have the new tabs load in the background while you continue reading. -In this case, leave this setting disabled. If you prefer to go -straight to the new page, leaving the old one in the background to -return to later, enable it.</para> - -<para>If you close a window in &konqueror; that has multiple tabs -open, &konqueror; will ask you if you're sure that you meant to close -it. You can toggle on and off this behavior with the -<guilabel>Confirm when closing windows with multiple tabs</guilabel> -checkbox.</para> - <para>As a convenience feature, if you enable <guilabel>Right click goes back in history</guilabel>, then clicking an empty area (&ie; not a link) in the &konqueror; window will act as if you pressed the @@ -91,23 +75,23 @@ and then load the images if you need them.</para> <para>Enabling <guilabel>Allow automatic delayed reloading/redirecting</guilabel> allows websites to send you to -another page without your interaction. In many cases, this is a -convenience. For example, the website has moved to a new -<acronym>URL</acronym>. Many webmasters in this situation will put up +another page without your interaction. In many cases, this is a +convenience. For example, the website has moved to a new +<acronym>URL</acronym>. Many webmasters in this situation will put up a page on the old site, telling you that it has moved and you may like to change your bookmark, and then automatically move you along to the -new website. However, such features can be confusing, or annoying, +new website. However, such features can be confusing, or annoying, when misused, and so you may wish to disable it.</para> <para>The next setting is <guilabel>Underline links:</guilabel>. You can -choose to underline links <guilabel>Always</guilabel>. If this option +choose to underline links <guilabel>Always</guilabel>. If this option is selected, any text on web pages that acts as a link will be shown in an underlined font. While many web pages do use color to distinguish text that acts as a link, underlining makes it very easy to spot links.</para> <para>If you don't like underlined links, you can choose -<guilabel>Never</guilabel>, so that no links are underlined. Or you +<guilabel>Never</guilabel>, so that no links are underlined. Or you can choose a middle ground, <guilabel>Hover</guilabel>, so that links are underlined when the mouse cursor is resting over them, and not underlined the rest of the time.</para> @@ -115,13 +99,41 @@ underlined the rest of the time.</para> <para>Many web pages use animated gif images, and these can be very annoying, and in some cases, quite a drain on your system resources. The <guilabel>Animations</guilabel> option lets you choose when -animations are enabled. The default is enabled, but you can set this +animations are enabled. The default is enabled, but you can set this to disabled, or to run the animation only once, even if the file itself contains instructions that the animation should run more times, or continuously.</para> </sect2> +<sect2 id="userinterface"> + +<title>User Interface</title> + +<para>&konqueror; defaults to a single window per page, but has the +ability to open multiple <firstterm>tabs</firstterm> inside a +single window. By default, &konqueror; has a &MMB; shortcut to +open any link in a new window. If you enable <guilabel>Open links in +new tab instead of in new window</guilabel> you can &MMB; click on a +link to have it open in a new tab.</para> + +<para>If you are using tabbed browsing, you can choose if a newly +opened tab becomes the active (<quote>front</quote>) tab, or goes to +the back. On a slow internet connection, or while browsing a page +that has a list of headlines or other links in a list, you may like to +have the new tabs load in the background while you continue reading. +In this case, leave this setting disabled. If you prefer to go +straight to the new page, leaving the old one in the background to +return to later, enable it.</para> + +<para>If you close a window in &konqueror; that has multiple tabs +open, &konqueror; will ask you if you're sure that you meant to close +it. You can toggle on and off this behavior with the +<guilabel>Confirm when closing windows with multiple tabs</guilabel> +checkbox.</para> + +</sect2> + <sect2 id="kbrowse-appearance"> <title>Fonts</title> @@ -131,7 +143,7 @@ of fonts. Although the shapes and sizes of fonts are often part of the design of a web page, you can select some default settings for &konqueror; to use.</para> -<para>The first thing you can set here is the font size. There are two +<para>The first thing you can set here is the font size. There are two settings which work together to allow you a comfortable browsing experience.</para> @@ -140,10 +152,10 @@ This means, even if the font size is set specifically in the page you are viewing, &konqueror; will ignore that instruction and never show smaller fonts than you set here.</para> -<para>Next you can set a <guilabel>Medium Font Size</guilabel>. This is +<para>Next you can set a <guilabel>Medium Font Size</guilabel>. This is not only the default size of text, used when the page doesn't specify sizes, but it is also used as the base size that relative font sizes are -calculated against. That is, the <acronym>HTML</acronym> instruction +calculated against. That is, the <acronym>HTML</acronym> instruction <quote>smaller</quote>, it means smaller than the size you set for this option.</para> @@ -151,11 +163,11 @@ option.</para> using the up/down spin control (or just typing) next to the option label.</para> -<para>These options are independent of each other. Pages that do not +<para>These options are independent of each other. Pages that do not set a font size, or ask for the default, will display with the size you set from <guilabel>Medium Font Size</guilabel>, while any pages that ask for a size smaller than your <guilabel>Minimum Font -Size</guilabel> setting will instead show that size. The one does not +Size</guilabel> setting will instead show that size. The one does not affect the other.</para> <para>The remaining options are for the fonts to be associated with @@ -170,16 +182,16 @@ through all of the fonts.)</para> each <guilabel>Charset</guilabel>, by changing the character set in the first drop down box, and then selecting a font for each category below. This would take quite some time, so you may just want to set up the -fonts for your default character set. Most English speaking users will +fonts for your default character set. Most English speaking users will use iso8859-1</para> --> <para>Below this, you can set a <guilabel>Font size adjustment for this -encoding</guilabel>. Sometimes the fonts you want to use for a +encoding</guilabel>. Sometimes the fonts you want to use for a particular encoding or language are much larger or smaller than average, so you can use this setting to bring them into line.</para> <para>You can set a default encoding that &konqueror; should assume -pages are when rendering them. The default setting is <guilabel>Use +pages are when rendering them. The default setting is <guilabel>Use language encoding</guilabel>, but you can change it to any encoding available in the list.</para> @@ -230,7 +242,7 @@ diagnosing problems with &Java; applications.</para> transports for network connections.</para> <para><guilabel>Use security -manager</guilabel> is normally enabled by default. This setting will +manager</guilabel> is normally enabled by default. This setting will cause the <acronym>JVM</acronym> to run with a Security Manager in place. This will keep applets from being able to read and write to your file system, creating arbitrary sockets, and other actions which could be used to compromise @@ -241,9 +253,9 @@ more permissions.</para> <para>The <guilabel>Shutdown Applet Server when inactive</guilabel> checkbox allows you to save resources by closing the &Java; Applet Server when it is not in use, rather than leaving it running in the -background. Leaving this disabled may make &Java; applets start up +background. Leaving this disabled may make &Java; applets start up faster, but it will use system resources when you are not using a -&Java; applet. If you enable this, you can set a timeout.</para> +&Java; applet. If you enable this, you can set a timeout.</para> <para>You can either opt to have &konqueror; automatically detect the &Java; installation on your system, or specify the path to the @@ -288,13 +300,13 @@ current list to a compressed archive file, click the when a page uses JavaScript for specific actions.</para> <para>You can individually enable or disable the ability of JavaScript -to manipulate your windows by moving, resizing or changing focus. You +to manipulate your windows by moving, resizing or changing focus. You can also disable JavaScript from changing the status bar text, so that for instance, you can always see where links will take you when clicked.The choices for these options are <guilabel>Allow</guilabel> and <guilabel>Ignore</guilabel>.</para> -<para>For opening a new window, there is even more control. You can +<para>For opening a new window, there is even more control. You can set &konqueror; to <guilabel>Allow</guilabel> all such requests, <guilabel>Ask</guilabel> each time a request is made, or <guilabel>Deny</guilabel> all popup requests.</para> @@ -336,8 +348,8 @@ as comments and can be used to clarify or label a set of filters.</para> <title>Plugins</title> <para>The first setting here is <guilabel>Enable Plugins -globally</guilabel>. If you disable this checkbox, then &konqueror; -will not use any plugins. If you enable it, then any installed and +globally</guilabel>. If you disable this checkbox, then &konqueror; +will not use any plugins. If you enable it, then any installed and configured plugins that it can find will be used by &konqueror;</para> <para>You can also restrict &konqueror; to <guilabel>Only allow HTTP diff --git a/kcontrol/konqhtml/CMakeLists.txt b/kcontrol/konqhtml/CMakeLists.txt index 097ba8221..26cd535f5 100644 --- a/kcontrol/konqhtml/CMakeLists.txt +++ b/kcontrol/konqhtml/CMakeLists.txt @@ -26,6 +26,7 @@ link_directories( install( FILES tdehtml_behavior.desktop tdehtml_java_js.desktop tdehtml_fonts.desktop tdehtml_filter.desktop + tdehtml_userinterface.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) install( @@ -42,12 +43,11 @@ install( tde_add_kpart( kcm_konqhtml AUTOMOC SOURCES - advancedTabDialog.cpp htmlopts.cpp jsopts.cpp - javaopts.cpp pluginopts.cpp appearance.cpp - khttpoptdlg.cpp policydlg.cpp main.cpp + userInterOpts.ui userInterOpts_impl.cpp userInterConfig.cpp + htmlopts.cpp jsopts.cpp javaopts.cpp pluginopts.cpp + appearance.cpp khttpoptdlg.cpp policydlg.cpp main.cpp jspolicies.cpp nsconfigwidget.ui policies.cpp - domainlistview.cpp advancedTabOptions.ui - filteropts.cpp + domainlistview.cpp filteropts.cpp LINK tdehtml-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kcontrol/konqhtml/Makefile.am b/kcontrol/konqhtml/Makefile.am index 151e22aff..c1f276444 100644 --- a/kcontrol/konqhtml/Makefile.am +++ b/kcontrol/konqhtml/Makefile.am @@ -5,17 +5,17 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = kcm_konqhtml.la -kcm_konqhtml_la_SOURCES = advancedTabDialog.cpp htmlopts.cpp jsopts.cpp \ +kcm_konqhtml_la_SOURCES = userInterOpts.ui userInterOpts_impl.cpp \ + userInterConfig.cpp htmlopts.cpp jsopts.cpp \ javaopts.cpp pluginopts.cpp appearance.cpp \ khttpoptdlg.cpp policydlg.cpp main.cpp \ jspolicies.cpp nsconfigwidget.ui policies.cpp \ - domainlistview.cpp advancedTabOptions.ui \ - filteropts.cpp + domainlistview.cpp filteropts.cpp kcm_konqhtml_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined kcm_konqhtml_la_LIBADD = -ltdehtml -ltdeui -xdg_apps_DATA = tdehtml_behavior.desktop tdehtml_java_js.desktop tdehtml_fonts.desktop tdehtml_filter.desktop +xdg_apps_DATA = tdehtml_behavior.desktop tdehtml_java_js.desktop tdehtml_fonts.desktop tdehtml_filter.desktop tdehtml_userinterface.desktop messages: rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kcmkonqhtml.pot diff --git a/kcontrol/konqhtml/advancedTabDialog.cpp b/kcontrol/konqhtml/advancedTabDialog.cpp deleted file mode 100644 index 10e62fd53..000000000 --- a/kcontrol/konqhtml/advancedTabDialog.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - * advancedTabDialog.cpp - * - * Copyright (c) 2002 Aaron J. Seigo <aseigo@olympusproject.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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> -#include <tqcheckbox.h> -#include <tqlayout.h> -#include <tqpushbutton.h> -#include <tqradiobutton.h> -#include <tqslider.h> - -#include <tdeapplication.h> -#include <dcopclient.h> -#include <kcolorbutton.h> -#include <tdelocale.h> -#include <tdeconfig.h> - -#include "advancedTabDialog.h" -#include "advancedTabOptions.h" -#include "main.h" - -advancedTabDialog::advancedTabDialog(TQWidget* parent, TDEConfig* config, const char* name) - : KDialogBase(KDialogBase::Plain, - i18n("Advanced Options"), - KDialogBase::Ok | - KDialogBase::Apply | - KDialogBase::Cancel, - KDialogBase::Ok, - parent, - name, - true, true), - m_pConfig(config) -{ - connect(this, TQT_SIGNAL(applyClicked()), - this, TQT_SLOT(save())); - connect(this, TQT_SIGNAL(okClicked()), - this, TQT_SLOT(save())); - actionButton(Apply)->setEnabled(false); - TQFrame* page = plainPage(); - TQVBoxLayout* layout = new TQVBoxLayout(page); - m_advancedWidget = new advancedTabOptions(page); - layout->addWidget(m_advancedWidget); - 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())); - connect(m_advancedWidget->m_pTabCloseActivatePrevious, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(m_advancedWidget->m_pPermanentCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(m_advancedWidget->m_pHoverCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(m_advancedWidget->m_pKonquerorTabforExternalURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(m_advancedWidget->m_pPopupsWithinTabs, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - - load(); -} - -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", true ) ); - 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 ) ); - m_advancedWidget->m_pHoverCloseButton->setChecked( m_pConfig->readBoolEntry( "HoverCloseButton", false ) ); - m_advancedWidget->m_pKonquerorTabforExternalURL->setChecked( m_pConfig->readBoolEntry( "KonquerorTabforExternalURL", false ) ); - m_advancedWidget->m_pPopupsWithinTabs->setChecked( m_pConfig->readBoolEntry( "PopupsWithinTabs", false ) ); - m_advancedWidget->m_pTabCloseActivatePrevious->setChecked( m_pConfig->readBoolEntry( "TabCloseActivatePrevious", false ) ); - - m_pConfig->setGroup("Notification Messages"); - m_advancedWidget->m_pTabConfirm->setChecked( !m_pConfig->hasKey("MultipleTabConfirm") ); - - if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() ) - m_advancedWidget->m_pHoverCloseButton->setEnabled(false); - else - m_advancedWidget->m_pHoverCloseButton->setEnabled(true); - actionButton(Apply)->setEnabled(false); -} - -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() ); - m_pConfig->writeEntry( "HoverCloseButton", m_advancedWidget->m_pHoverCloseButton->isChecked() ); - m_pConfig->writeEntry( "KonquerorTabforExternalURL", m_advancedWidget->m_pKonquerorTabforExternalURL->isChecked() ); - m_pConfig->writeEntry( "PopupsWithinTabs", m_advancedWidget->m_pPopupsWithinTabs->isChecked() ); - m_pConfig->writeEntry( "TabCloseActivatePrevious", m_advancedWidget->m_pTabCloseActivatePrevious->isChecked() ); - m_pConfig->sync(); - - // It only matters whether the key is present, its value has no meaning - m_pConfig->setGroup("Notification Messages"); - if ( m_advancedWidget->m_pTabConfirm->isChecked() ) m_pConfig->deleteEntry( "MultipleTabConfirm" ); - else m_pConfig->writeEntry( "MultipleTabConfirm", true ); - - TQByteArray data; - if ( !TDEApplication::kApplication()->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - TDEApplication::kApplication()->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); - - if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() ) - m_advancedWidget->m_pHoverCloseButton->setEnabled(false); - else - m_advancedWidget->m_pHoverCloseButton->setEnabled(true); - actionButton(Apply)->setEnabled(false); -} - -void advancedTabDialog::changed() -{ - if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() ) - m_advancedWidget->m_pHoverCloseButton->setEnabled(false); - else - m_advancedWidget->m_pHoverCloseButton->setEnabled(true); - actionButton(Apply)->setEnabled(true); -} - -#include "advancedTabDialog.moc" diff --git a/kcontrol/konqhtml/advancedTabOptions.ui b/kcontrol/konqhtml/advancedTabOptions.ui deleted file mode 100644 index cd8331d27..000000000 --- a/kcontrol/konqhtml/advancedTabOptions.ui +++ /dev/null @@ -1,199 +0,0 @@ -<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> -<class>advancedTabOptions</class> -<widget class="TQWidget"> - <property name="name"> - <cstring>advancedTabOptions</cstring> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>644</width> - <height>208</height> - </rect> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>TextLabel3</cstring> - </property> - <property name="text"> - <string><b>Tab Options</b></string> - </property> - </widget> - <widget class="Line"> - <property name="name"> - <cstring>Line1</cstring> - </property> - <property name="frameShape"> - <enum>HLine</enum> - </property> - <property name="frameShadow"> - <enum>Sunken</enum> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>layout</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pShowMMBInTabs</cstring> - </property> - <property name="text"> - <string>Open &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>&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&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> - <property name="text"> - <string>O&pen new tabs in the background</string> - </property> - <property name="whatsThis" stdset="0"> - <string>This will open a new tab in the background, instead of in the foreground.</string> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pOpenAfterCurrentPage</cstring> - </property> - <property name="text"> - <string>Open &new tab after current tab</string> - </property> - <property name="whatsThis" stdset="0"> - <string>This will open a new tab opened from a page after the current tab, instead of after the last tab.</string> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pTabConfirm</cstring> - </property> - <property name="text"> - <string>Confirm &when closing windows with multiple tabs</string> - </property> - <property name="whatsThis" stdset="0"> - <string>This will ask you whether you are sure you want to close a window when it has multiple tabs opened in it.</string> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pPermanentCloseButton</cstring> - </property> - <property name="text"> - <string>&Show close button instead of website icon</string> - </property> - <property name="whatsThis" stdset="0"> - <string>This will display close buttons inside each tab instead of websites' icons.</string> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pHoverCloseButton</cstring> - </property> - <property name="text"> - <string>&Show close button instead of website icon with mouse hover</string> - </property> - <property name="whatsThis" stdset="0"> - <string>This will display a close button inside each tab instead of websites' icons when the mouse pointer hovers the icon.</string> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pPopupsWithinTabs</cstring> - </property> - <property name="text"> - <string>Open pop&ups in new tab instead of in new window</string> - </property> - <property name="whatsThis" stdset="0"> - <string>Whether or not JavaScript popups if allowed shall open in a new tab or in a new window.</string> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pTabCloseActivatePrevious</cstring> - </property> - <property name="text"> - <string>Activate previous used tab when closing the current tab</string> - </property> - <property name="whatsThis" stdset="0"> - <string>When checking this the previous used or opened tab will be activated when you close the current active tab instead of the one right to the current tab.</string> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>m_pKonquerorTabforExternalURL</cstring> - </property> - <property name="text"> - <string>Open as tab in existing Konqueror when URL is called externally</string> - </property> - <property name="whatsThis" stdset="0"> - <string>When you click a URL in another TDE program or call kfmclient to open a URL, the current desktop will be searched for a non-minimized Konqueror and, if found, the URL opened as a new tab within it. Otherwise a new Konqueror window will be opened with the required URL.</string> - </property> - </widget> - </vbox> - </widget> - <spacer> - <property name="name"> - <cstring>spacer</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </vbox> -</widget> -<includes> - <include location="local" impldecl="in implementation">kdialog.h</include> -</includes> -<layoutdefaults spacing="3" margin="6"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> -</UI> diff --git a/kcontrol/konqhtml/htmlopts.cpp b/kcontrol/konqhtml/htmlopts.cpp index 5ba1a8d9b..99bdb25a4 100644 --- a/kcontrol/konqhtml/htmlopts.cpp +++ b/kcontrol/konqhtml/htmlopts.cpp @@ -16,7 +16,6 @@ #include <tqpushbutton.h> #include "htmlopts.h" -#include "advancedTabDialog.h" #include <konq_defaults.h> // include default values directly from konqueror #include <tdeglobalsettings.h> // get default for DEFAULT_CHANGECURSOR @@ -83,19 +82,6 @@ KMiscHTMLOptions::KMiscHTMLOptions(TDEConfig *config, TQString group, TQWidget * lay->addMultiCellWidget( bgForm, row, row, 0, 1 ); row++; - // Tabbed Browsing - - TQGroupBox *bgTabbedBrowsing = new TQGroupBox( 0, Qt::Vertical, i18n("Tabbed Browsing"), this ); - 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())); - - lay->addMultiCellWidget( bgTabbedBrowsing, row, row, 0, 1 ); - row++; - // Mouse behavior TQVGroupBox *bgMouse = new TQVGroupBox( i18n("Mouse Beha&vior"), this ); @@ -386,7 +372,6 @@ void KMiscHTMLOptions::save() emit changed(false); } - void KMiscHTMLOptions::slotChanged() { m_pMaxFormCompletionItems->setEnabled( m_pFormCompletionCheckBox->isChecked() ); @@ -394,10 +379,3 @@ void KMiscHTMLOptions::slotChanged() } -void KMiscHTMLOptions::launchAdvancedTabDialog() -{ - advancedTabDialog* dialog = new advancedTabDialog(this, m_pConfig, "advancedTabDialog"); - dialog->exec(); -} - - diff --git a/kcontrol/konqhtml/htmlopts.h b/kcontrol/konqhtml/htmlopts.h index c318d0628..bdfa3cd81 100644 --- a/kcontrol/konqhtml/htmlopts.h +++ b/kcontrol/konqhtml/htmlopts.h @@ -48,7 +48,6 @@ public: private slots: void slotChanged(); - void launchAdvancedTabDialog(); private: TDEConfig* m_pConfig; diff --git a/kcontrol/konqhtml/main.cpp b/kcontrol/konqhtml/main.cpp index 7c248ec70..2f71a7bc5 100644 --- a/kcontrol/konqhtml/main.cpp +++ b/kcontrol/konqhtml/main.cpp @@ -36,6 +36,7 @@ #include "appearance.h" #include "htmlopts.h" #include "filteropts.h" +#include "userInterConfig.h" #include "main.h" #include <tdeaboutdata.h> @@ -67,11 +68,17 @@ extern "C" return new KPluginOptions(c, "Java/JavaScript Settings", parent, name); } - KDE_EXPORT TDECModule *create_tdehtml_filter(TQWidget *parent, const char *name ) - { - TDEConfig *c = new TDEConfig( "tdehtmlrc", false, false ); - return new KCMFilter(c, "Filter Settings", parent, name); - } + KDE_EXPORT TDECModule *create_tdehtml_filter(TQWidget *parent, const char *name ) + { + TDEConfig *c = new TDEConfig( "tdehtmlrc", false, false ); + return new KCMFilter(c, "Filter Settings", parent, name); + } + + KDE_EXPORT TDECModule *create_tdehtml_userinterface(TQWidget *parent, const char *name ) + { + TDEConfig *c = new TDEConfig( "konquerorrc", false, false ); + return new userInterConfig(c, "FMSettings", parent, name); + } } diff --git a/kcontrol/konqhtml/tdehtml_userinterface.desktop b/kcontrol/konqhtml/tdehtml_userinterface.desktop new file mode 100644 index 000000000..333cb036c --- /dev/null +++ b/kcontrol/konqhtml/tdehtml_userinterface.desktop @@ -0,0 +1,18 @@ +[Desktop Entry] +Type=Application +DocPath=kcontrol/tdehtml/index.html#userinterface +Icon=konqueror +Exec=tdecmshell tdehtml_userinterface + + +X-TDE-Library=konqhtml +X-TDE-FactoryName=tdehtml_userinterface + +Name=User Interface +Name[it]=Interfaccia utente +Comment=Configure user interface options +Comment[it]=Configura opzioni dell'interfaccia utente +Keywords=konqueror,kfm,user,interface,tabbed,browsing +Keywords[it]=konqueror,kfm,utente,interfaccia,linguette,navigazione + +Categories=Qt;TDE;X-TDE-settings-webbrowsing; diff --git a/kcontrol/konqhtml/userInterConfig.cpp b/kcontrol/konqhtml/userInterConfig.cpp new file mode 100644 index 000000000..4e18c6d38 --- /dev/null +++ b/kcontrol/konqhtml/userInterConfig.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2005 Stefan Nikolaus <stefan.nikolaus@kdemail.net> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + */ + +#include <tqlayout.h> +#include <tqtimer.h> + +#include <tdelocale.h> +#include <kdebug.h> + +#include "userInterOpts_impl.h" +#include "main.h" + +#include "userInterConfig.h" +#include "userInterConfig.moc" + +userInterConfig::userInterConfig(TDEConfig *config, TQString groupName, + TQWidget *parent, const char *name) + : TDECModule(parent, "kcmkonqhtml") +{ + TQVBoxLayout *layout = new TQVBoxLayout(this); + m_widget = new userInterOpts(config, groupName, this, name); + layout->addWidget(m_widget); + layout->addStretch(); + + connect(m_widget, TQT_SIGNAL(changed()), + this, TQT_SLOT(changed())); + + load(); + TQTimer::singleShot(0, this, TQT_SLOT(notChanged())); +} + +void userInterConfig::notChanged() +{ + emit changed(false); +} + +void userInterConfig::load() +{ + m_widget->load(); + TDECModule::load(); +} + +void userInterConfig::save() +{ + m_widget->save(); + TDECModule::save(); +} + +void userInterConfig::defaults() +{ + m_widget->defaults(); + TDECModule::defaults(); + + // TDEConfigDialogManager may queue an changed(false) signal, + // so we make sure, that the module is labeled as changed, + // while we manage some of the widgets ourselves + TQTimer::singleShot(0, this, TQT_SLOT(changed())); +} diff --git a/kcontrol/konqhtml/userInterConfig.h b/kcontrol/konqhtml/userInterConfig.h new file mode 100644 index 000000000..b87879e45 --- /dev/null +++ b/kcontrol/konqhtml/userInterConfig.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2005 Stefan Nikolaus <stefan.nikolaus@kdemail.net> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + */ + +#ifndef __USER_INTER_CONFIG_H__ +#define __USER_INTER_CONFIG_H__ + +#include <tdecmodule.h> + +class userInterOpts; + +class userInterConfig : public TDECModule +{ + Q_OBJECT + +public: + userInterConfig(TDEConfig *config, TQString group, + TQWidget *parent = 0, const char *name = 0); + + void load(); + void save(); + void defaults(); + +public slots: + void notChanged(); + +private: + userInterOpts *m_widget; +}; + +#endif // __USER_INTER_CONFIG_H__ diff --git a/kcontrol/konqhtml/userInterOpts.ui b/kcontrol/konqhtml/userInterOpts.ui new file mode 100644 index 000000000..8a6ebc3fe --- /dev/null +++ b/kcontrol/konqhtml/userInterOpts.ui @@ -0,0 +1,195 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>userInterOptsBase</class> +<widget class="TQWidget"> + <property name="name"> + <cstring>userInterOptsBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>644</width> + <height>208</height> + </rect> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="TQGroupBox"> + <property name="name"> + <cstring>m_group_1</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>4</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Tabbed Browsing</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLayoutWidget"> + <property name="name"> + <cstring>layout</cstring> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pShowMMBInTabs</cstring> + </property> + <property name="text"> + <string>Open &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>&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&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> + <property name="text"> + <string>O&pen new tabs in the background</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This will open a new tab in the background, instead of in the foreground.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pOpenAfterCurrentPage</cstring> + </property> + <property name="text"> + <string>Open &new tab after current tab</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This will open a new tab opened from a page after the current tab, instead of after the last tab.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pTabConfirm</cstring> + </property> + <property name="text"> + <string>Confirm &when closing windows with multiple tabs</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This will ask you whether you are sure you want to close a window when it has multiple tabs opened in it.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pPermanentCloseButton</cstring> + </property> + <property name="text"> + <string>&Show close button instead of website icon</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This will display close buttons inside each tab instead of websites' icons.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pHoverCloseButton</cstring> + </property> + <property name="text"> + <string>&Show close button instead of website icon with mouse hover</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This will display a close button inside each tab instead of websites' icons when the mouse pointer hovers the icon.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pPopupsWithinTabs</cstring> + </property> + <property name="text"> + <string>Open pop&ups in new tab instead of in new window</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Whether or not JavaScript popups if allowed shall open in a new tab or in a new window.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pKonquerorTabforExternalURL</cstring> + </property> + <property name="text"> + <string>Open as tab in existing Konqueror when URL is called externally</string> + </property> + <property name="whatsThis" stdset="0"> + <string>When you click a URL in another TDE program or call kfmclient to open a URL, the current desktop will be searched for a non-minimized Konqueror and, if found, the URL opened as a new tab within it. Otherwise a new Konqueror window will be opened with the required URL.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_pTabCloseActivatePrevious</cstring> + </property> + <property name="text"> + <string>Activate previous used tab when closing the current tab</string> + </property> + <property name="whatsThis" stdset="0"> + <string>When checking this the previous used or opened tab will be activated when you close the current active tab instead of the one right to the current tab.</string> + </property> + </widget> + </vbox> + </widget> + </grid> + </widget> + <spacer> + <property name="name"> + <cstring>spacer</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>16</height> + </size> + </property> + </spacer> + </vbox> +</widget> +<layoutdefaults spacing="3" margin="6"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</UI> diff --git a/kcontrol/konqhtml/userInterOpts_impl.cpp b/kcontrol/konqhtml/userInterOpts_impl.cpp new file mode 100644 index 000000000..efe3c7343 --- /dev/null +++ b/kcontrol/konqhtml/userInterOpts_impl.cpp @@ -0,0 +1,127 @@ +/* + * userInterOpts.cpp + * + * Copyright (c) 2002 Aaron J. Seigo <aseigo@olympusproject.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + */ + +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqslider.h> + +#include <tdeapplication.h> +#include <dcopclient.h> +#include <kcolorbutton.h> +#include <tdelocale.h> +#include <tdeconfig.h> + +#include "main.h" +#include "userInterOpts_impl.h" +#include "userInterOpts_impl.moc" + +userInterOpts::userInterOpts(TDEConfig *config, TQString groupName, + TQWidget* parent, const char* name) + : userInterOptsBase(parent, name), m_pConfig(config), m_groupName(groupName) +{ + // connections + connect(m_pShowMMBInTabs, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pDynamicTabbarHide, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pDynamicTabbarCycle, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pNewTabsInBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pOpenAfterCurrentPage, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pTabConfirm, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pPermanentCloseButton, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pHoverCloseButton, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pKonquerorTabforExternalURL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pPopupsWithinTabs, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(m_pTabCloseActivatePrevious, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); +} + +void userInterOpts::load() +{ + load(false); +} + +void userInterOpts::load(bool useDefaults) +{ + m_pConfig->setReadDefaults(useDefaults); + m_pConfig->setGroup(m_groupName); + + m_pShowMMBInTabs->setChecked( m_pConfig->readBoolEntry( "MMBOpensTab", false ) ); + m_pDynamicTabbarHide->setChecked( !(m_pConfig->readBoolEntry( "AlwaysTabbedMode", false )) ); + m_pDynamicTabbarCycle->setChecked( m_pConfig->readBoolEntry( "TabsCycleWheel", true ) ); + m_pNewTabsInBackground->setChecked( ! (m_pConfig->readBoolEntry( "NewTabsInFront", false )) ); + m_pOpenAfterCurrentPage->setChecked( m_pConfig->readBoolEntry( "OpenAfterCurrentPage", false ) ); + m_pPermanentCloseButton->setChecked( m_pConfig->readBoolEntry( "PermanentCloseButton", false ) ); + m_pHoverCloseButton->setChecked( m_pConfig->readBoolEntry( "HoverCloseButton", false ) ); + m_pKonquerorTabforExternalURL->setChecked( m_pConfig->readBoolEntry( "KonquerorTabforExternalURL", false ) ); + m_pPopupsWithinTabs->setChecked( m_pConfig->readBoolEntry( "PopupsWithinTabs", false ) ); + m_pTabCloseActivatePrevious->setChecked( m_pConfig->readBoolEntry( "TabCloseActivatePrevious", false ) ); + + m_pConfig->setGroup("Notification Messages"); + m_pTabConfirm->setChecked( !m_pConfig->hasKey("MultipleTabConfirm") ); + + if ( m_pPermanentCloseButton->isChecked() ) + m_pHoverCloseButton->setEnabled(false); + else + m_pHoverCloseButton->setEnabled(true); +} + +void userInterOpts::save() +{ + m_pConfig->setGroup(m_groupName); + + m_pConfig->writeEntry( "MMBOpensTab", (m_pShowMMBInTabs->isChecked()) ); + m_pConfig->writeEntry( "AlwaysTabbedMode", ( !(m_pDynamicTabbarHide->isChecked())) ); + m_pConfig->writeEntry( "TabsCycleWheel", (m_pDynamicTabbarCycle->isChecked()) ); + m_pConfig->writeEntry( "NewTabsInFront", !(m_pNewTabsInBackground->isChecked()) ); + m_pConfig->writeEntry( "OpenAfterCurrentPage", m_pOpenAfterCurrentPage->isChecked() ); + m_pConfig->writeEntry( "PermanentCloseButton", m_pPermanentCloseButton->isChecked() ); + m_pConfig->writeEntry( "HoverCloseButton", m_pHoverCloseButton->isChecked() ); + m_pConfig->writeEntry( "KonquerorTabforExternalURL", m_pKonquerorTabforExternalURL->isChecked() ); + m_pConfig->writeEntry( "PopupsWithinTabs", m_pPopupsWithinTabs->isChecked() ); + m_pConfig->writeEntry( "TabCloseActivatePrevious", m_pTabCloseActivatePrevious->isChecked() ); + m_pConfig->sync(); + + // It only matters whether the key is present, its value has no meaning + m_pConfig->setGroup("Notification Messages"); + if ( m_pTabConfirm->isChecked() ) m_pConfig->deleteEntry( "MultipleTabConfirm" ); + else m_pConfig->writeEntry( "MultipleTabConfirm", true ); + + TQByteArray data; + if ( !TDEApplication::kApplication()->dcopClient()->isAttached() ) + kapp->dcopClient()->attach(); + TDEApplication::kApplication()->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); + + if ( m_pPermanentCloseButton->isChecked() ) + m_pHoverCloseButton->setEnabled(false); + else + m_pHoverCloseButton->setEnabled(true); +} + +void userInterOpts::defaults() +{ + load(true); +} + +void userInterOpts::slotChanged() +{ + emit changed(); +} + + diff --git a/kcontrol/konqhtml/advancedTabDialog.h b/kcontrol/konqhtml/userInterOpts_impl.h index 8951b01e1..763b640b9 100644 --- a/kcontrol/konqhtml/advancedTabDialog.h +++ b/kcontrol/konqhtml/userInterOpts_impl.h @@ -1,5 +1,5 @@ /* - * advancedTabDialog.h + * userInterOpts_impl.h * * Copyright (c) 2002 Aaron J. Seigo <aseigo@olympusproject.org> * @@ -17,29 +17,33 @@ * along with this program; if not, write to the Free Software */ -#ifndef __ADVANCEDTABDIALOG_H -#define __ADVANCEDTABDIALOG_H +#ifndef __USERINTERFACE_OPTIONS_IMPL_H +#define __USERINTERFACE_OPTIONS_IMPL_H -#include <kdialogbase.h> - -class advancedTabOptions; - -class advancedTabDialog : public KDialogBase +#include "userInterOpts.h" + +class userInterOpts : public userInterOptsBase { - Q_OBJECT - - public: - advancedTabDialog(TQWidget* parent, TDEConfig *config, const char* name); - ~advancedTabDialog(); - - protected slots: - void load(); - void save(); - void changed(); - - private: - TDEConfig* m_pConfig; - advancedTabOptions* m_advancedWidget; + Q_OBJECT + + public: + userInterOpts(TDEConfig *config, TQString groupName, + TQWidget* parent =0, const char* name =0); + + void load(); + void load(bool useDefaults); + void save(); + void defaults(); + + signals: + void changed(); + + protected: + TDEConfig *m_pConfig; + TQString m_groupName; + + private slots: + void slotChanged(); }; #endif diff --git a/konqueror/konq_mainwindow.cc b/konqueror/konq_mainwindow.cc index 90e6c0c54..ecd78b7cf 100644 --- a/konqueror/konq_mainwindow.cc +++ b/konqueror/konq_mainwindow.cc @@ -3875,8 +3875,8 @@ void KonqMainWindow::initActions() m_configureModules << "kde-filebehavior.desktop" << "kde-fileappearance.desktop" << "kde-filepreviews.desktop" << "tde-filetypes.desktop" << - "tde-tdehtml_behavior.desktop" << "tde-tdehtml_java_js.desktop" << - "tde-tdehtml_filter.desktop" << + "tde-tdehtml_behavior.desktop" << "tde-tdehtml_userinterface.desktop" << + "tde-tdehtml_java_js.desktop" << "tde-tdehtml_filter.desktop" << "tde-tdehtml_fonts.desktop" << "tde-ebrowsing.desktop" << "tde-kcmhistory.desktop" << "tde-cookies.desktop" << "tde-cache.desktop" << "tde-proxy.desktop" << "tde-kcmcss.desktop" << |