Move Konqueror Tabbed Browsing Advanced dialog to separate stand-alone module named User Interface.
This is part of bug report 1683.pull/2/head
parent
5a0403a212
commit
a0e3f4ae50
@ -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"
|
@ -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>
|
@ -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;
|
@ -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()));
|
||||
}
|
@ -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__
|
@ -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>
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue