2009-09-13 15:36:45 +04:00
|
|
|
/********************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2009 Martin Gräßlin <kde@martin-graesslin.com>
|
|
|
|
|
|
|
|
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, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
// Qt
|
|
|
|
#include <QtDBus/QtDBus>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
// KDE
|
|
|
|
#include <KAboutApplicationDialog>
|
|
|
|
#include <KAction>
|
|
|
|
#include <KActionCollection>
|
|
|
|
#include <KCModuleProxy>
|
|
|
|
#include <KPluginFactory>
|
|
|
|
#include <KPluginInfo>
|
|
|
|
#include <KPluginLoader>
|
|
|
|
#include <KTabWidget>
|
|
|
|
#include <KTitleWidget>
|
|
|
|
#include <KServiceTypeTrader>
|
|
|
|
#include <KShortcutsEditor>
|
|
|
|
|
|
|
|
// own
|
|
|
|
#include "tabboxconfig.h"
|
|
|
|
#include "layoutconfig.h"
|
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
K_PLUGIN_FACTORY(KWinTabBoxConfigFactory, registerPlugin<KWin::KWinTabBoxConfig>();)
|
|
|
|
K_EXPORT_PLUGIN(KWinTabBoxConfigFactory("kcm_kwintabbox"))
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
KWinTabBoxConfigForm::KWinTabBoxConfigForm(QWidget* parent)
|
|
|
|
: QWidget(parent)
|
|
|
|
{
|
|
|
|
setupUi(this);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args)
|
|
|
|
: KCModule(KWinTabBoxConfigFactory::componentData(), parent, args)
|
|
|
|
, m_config(KSharedConfig::openConfig("kwinrc"))
|
|
|
|
{
|
|
|
|
KGlobal::locale()->insertCatalog("kwin_effects");
|
|
|
|
KTabWidget* tabWidget = new KTabWidget(this);
|
|
|
|
m_primaryTabBoxUi = new KWinTabBoxConfigForm(tabWidget);
|
|
|
|
m_alternativeTabBoxUi = new KWinTabBoxConfigForm(tabWidget);
|
2009-11-16 15:21:06 +03:00
|
|
|
m_alternativeTabBoxUi->description->setText(
|
2011-01-30 17:34:42 +03:00
|
|
|
i18n("These settings are used by the \"Walk Through Windows Alternative\" actions."));
|
|
|
|
tabWidget->addTab(m_primaryTabBoxUi, i18n("Main"));
|
|
|
|
tabWidget->addTab(m_alternativeTabBoxUi, i18n("Alternative"));
|
|
|
|
QVBoxLayout* layout = new QVBoxLayout(this);
|
|
|
|
KTitleWidget* infoLabel = new KTitleWidget(tabWidget);
|
|
|
|
infoLabel->setText(i18n("Focus policy settings limit the functionality of navigating through windows."),
|
|
|
|
KTitleWidget::InfoMessage);
|
|
|
|
infoLabel->setPixmap(KTitleWidget::InfoMessage, KTitleWidget::ImageLeft);
|
|
|
|
layout->addWidget(infoLabel);
|
|
|
|
layout->addWidget(tabWidget);
|
|
|
|
|
|
|
|
m_editor = new KShortcutsEditor(m_primaryTabBoxUi, KShortcutsEditor::GlobalAction);
|
2009-09-13 15:36:45 +04:00
|
|
|
// Shortcut config. The shortcut belongs to the component "kwin"!
|
2011-01-30 17:34:42 +03:00
|
|
|
m_actionCollection = new KActionCollection(this, KComponentData("kwin"));
|
|
|
|
m_actionCollection->setConfigGroup("Navigation");
|
|
|
|
m_actionCollection->setConfigGlobal(true);
|
|
|
|
KAction* a = qobject_cast<KAction*>(m_actionCollection->addAction("Walk Through Windows"));
|
2009-09-13 15:36:45 +04:00
|
|
|
a->setProperty("isConfigurationAction", true);
|
2011-01-30 17:34:42 +03:00
|
|
|
a->setText(i18n("Walk Through Windows"));
|
|
|
|
a->setGlobalShortcut(KShortcut(Qt::ALT + Qt::Key_Tab));
|
|
|
|
a = qobject_cast<KAction*>(m_actionCollection->addAction("Walk Through Windows (Reverse)"));
|
2009-09-13 15:36:45 +04:00
|
|
|
a->setProperty("isConfigurationAction", true);
|
2011-01-30 17:34:42 +03:00
|
|
|
a->setText(i18n("Walk Through Windows (Reverse)"));
|
|
|
|
a->setGlobalShortcut(KShortcut(Qt::ALT + Qt::SHIFT + Qt::Key_Backtab));
|
|
|
|
a = qobject_cast<KAction*>(m_actionCollection->addAction("Walk Through Windows Alternative"));
|
2009-09-13 15:36:45 +04:00
|
|
|
a->setProperty("isConfigurationAction", true);
|
2011-01-30 17:34:42 +03:00
|
|
|
a->setText(i18n("Walk Through Windows Alternative"));
|
|
|
|
a->setGlobalShortcut(KShortcut(), KAction::ActiveShortcut);
|
|
|
|
a = qobject_cast<KAction*>(m_actionCollection->addAction("Walk Through Windows Alternative (Reverse)"));
|
2009-09-13 15:36:45 +04:00
|
|
|
a->setProperty("isConfigurationAction", true);
|
2011-01-30 17:34:42 +03:00
|
|
|
a->setText(i18n("Walk Through Windows Alternative (Reverse)"));
|
|
|
|
a->setGlobalShortcut(KShortcut(), KAction::ActiveShortcut);
|
|
|
|
m_editor->addCollection(m_actionCollection, i18n("Navigation"));
|
|
|
|
layout->addWidget(m_editor);
|
|
|
|
setLayout(layout);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// search the effect names
|
|
|
|
// TODO: way to recognize if a effect is not found
|
|
|
|
KServiceTypeTrader* trader = KServiceTypeTrader::self();
|
|
|
|
KService::List services;
|
|
|
|
QString boxswitch;
|
|
|
|
QString presentwindows;
|
|
|
|
QString coverswitch;
|
|
|
|
QString flipswitch;
|
|
|
|
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_boxswitch'");
|
2011-01-30 17:34:42 +03:00
|
|
|
if (!services.isEmpty())
|
2009-09-13 15:36:45 +04:00
|
|
|
boxswitch = services.first()->name();
|
|
|
|
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_presentwindows'");
|
2011-01-30 17:34:42 +03:00
|
|
|
if (!services.isEmpty())
|
2009-09-13 15:36:45 +04:00
|
|
|
presentwindows = services.first()->name();
|
|
|
|
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_coverswitch'");
|
2011-01-30 17:34:42 +03:00
|
|
|
if (!services.isEmpty())
|
2009-09-13 15:36:45 +04:00
|
|
|
coverswitch = services.first()->name();
|
|
|
|
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_flipswitch'");
|
2011-01-30 17:34:42 +03:00
|
|
|
if (!services.isEmpty())
|
2009-09-13 15:36:45 +04:00
|
|
|
flipswitch = services.first()->name();
|
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
m_primaryTabBoxUi->effectCombo->addItem(i18n("No Effect"));
|
|
|
|
m_primaryTabBoxUi->effectCombo->addItem(boxswitch);
|
|
|
|
m_primaryTabBoxUi->effectCombo->addItem(presentwindows);
|
|
|
|
m_primaryTabBoxUi->effectCombo->addItem(coverswitch);
|
|
|
|
m_primaryTabBoxUi->effectCombo->addItem(flipswitch);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
m_alternativeTabBoxUi->effectCombo->addItem(i18n("No Effect"));
|
|
|
|
m_alternativeTabBoxUi->effectCombo->addItem(boxswitch);
|
|
|
|
m_alternativeTabBoxUi->effectCombo->addItem(presentwindows);
|
|
|
|
m_alternativeTabBoxUi->effectCombo->addItem(coverswitch);
|
|
|
|
m_alternativeTabBoxUi->effectCombo->addItem(flipswitch);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// effect config and info button
|
2011-01-30 17:34:42 +03:00
|
|
|
m_primaryTabBoxUi->effectInfoButton->setIcon(KIcon("dialog-information"));
|
|
|
|
m_primaryTabBoxUi->effectConfigButton->setIcon(KIcon("configure"));
|
|
|
|
m_alternativeTabBoxUi->effectInfoButton->setIcon(KIcon("dialog-information"));
|
|
|
|
m_alternativeTabBoxUi->effectConfigButton->setIcon(KIcon("configure"));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// combo boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_primaryTabBoxUi->listModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_primaryTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_primaryTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
2009-09-13 15:36:45 +04:00
|
|
|
// check boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_primaryTabBoxUi->showOutlineCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_primaryTabBoxUi->showTabBox, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
|
|
|
connect(m_primaryTabBoxUi->highlightWindowCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_primaryTabBoxUi->showDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
2009-09-13 15:36:45 +04:00
|
|
|
// combo boxes alternative
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_alternativeTabBoxUi->listModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_alternativeTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_alternativeTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
2009-09-13 15:36:45 +04:00
|
|
|
// check boxes alternative
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_alternativeTabBoxUi->showOutlineCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_alternativeTabBoxUi->showTabBox, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
|
|
|
connect(m_alternativeTabBoxUi->highlightWindowCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
|
|
|
connect(m_alternativeTabBoxUi->showDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// effects
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_primaryTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotEffectSelectionChanged(int)));
|
|
|
|
connect(m_primaryTabBoxUi->effectInfoButton, SIGNAL(clicked(bool)), this, SLOT(slotAboutEffectClicked()));
|
|
|
|
connect(m_primaryTabBoxUi->effectConfigButton, SIGNAL(clicked(bool)), this, SLOT(slotConfigureEffectClicked()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_primaryTabBoxUi->layoutConfigButton, SIGNAL(clicked(bool)), this, SLOT(slotConfigureLayoutClicked()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// effects alternative
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_alternativeTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotEffectSelectionChangedAlternative(int)));
|
|
|
|
connect(m_alternativeTabBoxUi->effectInfoButton, SIGNAL(clicked(bool)), this, SLOT(slotAboutEffectClickedAlternative()));
|
|
|
|
connect(m_alternativeTabBoxUi->effectConfigButton, SIGNAL(clicked(bool)), this, SLOT(slotConfigureEffectClickedAlternative()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
connect(m_alternativeTabBoxUi->layoutConfigButton, SIGNAL(clicked(bool)), this, SLOT(slotConfigureLayoutClickedAlternative()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// check focus policy - we don't offer configs for unreasonable focus policies
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup config(m_config, "Windows");
|
|
|
|
QString policy = config.readEntry("FocusPolicy", "ClickToFocus");
|
|
|
|
if ((policy == "FocusUnderMouse") || (policy == "FocusStrictlyUnderMouse")) {
|
|
|
|
tabWidget->setEnabled(false);
|
2009-09-13 15:36:45 +04:00
|
|
|
infoLabel->show();
|
2011-01-30 17:34:42 +03:00
|
|
|
} else
|
2009-09-13 15:36:45 +04:00
|
|
|
infoLabel->hide();
|
2011-01-30 17:34:42 +03:00
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
KWinTabBoxConfig::~KWinTabBoxConfig()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::load()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
KCModule::load();
|
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup config(m_config, "TabBox");
|
|
|
|
KConfigGroup alternativeConfig(m_config, "TabBoxAlternative");
|
|
|
|
loadConfig(config, m_tabBoxConfig);
|
|
|
|
loadConfig(alternativeConfig, m_tabBoxAlternativeConfig);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// sync to ui
|
2011-01-30 17:34:42 +03:00
|
|
|
updateUiFromConfig(m_primaryTabBoxUi, m_tabBoxConfig);
|
|
|
|
updateUiFromConfig(m_alternativeTabBoxUi, m_tabBoxAlternativeConfig);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// effects
|
|
|
|
// Set current option to "none" if no plugin is activated.
|
2011-01-30 17:34:42 +03:00
|
|
|
m_primaryTabBoxUi->effectCombo->setCurrentIndex(0);
|
|
|
|
m_alternativeTabBoxUi->effectCombo->setCurrentIndex(0);
|
|
|
|
KConfigGroup effectconfig(m_config, "Plugins");
|
|
|
|
KConfigGroup boxswitchconfig(m_config, "Effect-BoxSwitch");
|
|
|
|
if (effectEnabled("boxswitch", effectconfig)) {
|
|
|
|
if (boxswitchconfig.readEntry("TabBox", true))
|
|
|
|
m_primaryTabBoxUi->effectCombo->setCurrentIndex(1);
|
|
|
|
if (boxswitchconfig.readEntry("TabBoxAlternative", false))
|
|
|
|
m_alternativeTabBoxUi->effectCombo->setCurrentIndex(1);
|
2009-09-13 15:36:45 +04:00
|
|
|
}
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup presentwindowsconfig(m_config, "Effect-PresentWindows");
|
|
|
|
if (effectEnabled("presentwindows", effectconfig)) {
|
|
|
|
if (presentwindowsconfig.readEntry("TabBox", false))
|
|
|
|
m_primaryTabBoxUi->effectCombo->setCurrentIndex(2);
|
|
|
|
if (presentwindowsconfig.readEntry("TabBoxAlternative", false))
|
|
|
|
m_alternativeTabBoxUi->effectCombo->setCurrentIndex(2);
|
2009-09-13 15:36:45 +04:00
|
|
|
}
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup coverswitchconfig(m_config, "Effect-CoverSwitch");
|
|
|
|
if (effectEnabled("coverswitch", effectconfig)) {
|
|
|
|
if (coverswitchconfig.readEntry("TabBox", false))
|
|
|
|
m_primaryTabBoxUi->effectCombo->setCurrentIndex(3);
|
|
|
|
if (coverswitchconfig.readEntry("TabBoxAlternative", false))
|
|
|
|
m_alternativeTabBoxUi->effectCombo->setCurrentIndex(3);
|
|
|
|
}
|
|
|
|
KConfigGroup flipswitchconfig(m_config, "Effect-FlipSwitch");
|
|
|
|
if (effectEnabled("flipswitch", effectconfig)) {
|
|
|
|
if (flipswitchconfig.readEntry("TabBox", false))
|
|
|
|
m_primaryTabBoxUi->effectCombo->setCurrentIndex(4);
|
|
|
|
if (flipswitchconfig.readEntry("TabBoxAlternative", false))
|
|
|
|
m_alternativeTabBoxUi->effectCombo->setCurrentIndex(4);
|
|
|
|
}
|
|
|
|
slotEffectSelectionChanged(m_primaryTabBoxUi->effectCombo->currentIndex());
|
|
|
|
slotEffectSelectionChangedAlternative(m_alternativeTabBoxUi->effectCombo->currentIndex());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
emit changed(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
void KWinTabBoxConfig::loadConfig(const KConfigGroup& config, KWin::TabBox::TabBoxConfig& tabBoxConfig)
|
|
|
|
{
|
|
|
|
tabBoxConfig.setClientListMode(TabBox::TabBoxConfig::ClientListMode(
|
|
|
|
config.readEntry<int>("ListMode", TabBox::TabBoxConfig::defaultListMode())));
|
|
|
|
tabBoxConfig.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(
|
|
|
|
config.readEntry<int>("SwitchingMode", TabBox::TabBoxConfig::defaultSwitchingMode())));
|
|
|
|
tabBoxConfig.setLayout(TabBox::TabBoxConfig::LayoutMode(
|
|
|
|
config.readEntry<int>("LayoutMode", TabBox::TabBoxConfig::defaultLayoutMode())));
|
|
|
|
tabBoxConfig.setSelectedItemViewPosition(TabBox::TabBoxConfig::SelectedItemViewPosition(
|
|
|
|
config.readEntry<int>("SelectedItem", TabBox::TabBoxConfig::defaultSelectedItemViewPosition())));
|
|
|
|
tabBoxConfig.setShowDesktop(config.readEntry<bool>("ShowDesktop",
|
|
|
|
TabBox::TabBoxConfig::defaultShowDesktop()));
|
|
|
|
|
|
|
|
tabBoxConfig.setShowOutline(config.readEntry<bool>("ShowOutline",
|
|
|
|
TabBox::TabBoxConfig::defaultShowOutline()));
|
|
|
|
tabBoxConfig.setShowTabBox(config.readEntry<bool>("ShowTabBox",
|
|
|
|
TabBox::TabBoxConfig::defaultShowTabBox()));
|
|
|
|
tabBoxConfig.setHighlightWindows(config.readEntry<bool>("HighlightWindows",
|
|
|
|
TabBox::TabBoxConfig::defaultHighlightWindow()));
|
|
|
|
|
|
|
|
tabBoxConfig.setMinWidth(config.readEntry<int>("MinWidth",
|
|
|
|
TabBox::TabBoxConfig::defaultMinWidth()));
|
|
|
|
tabBoxConfig.setMinHeight(config.readEntry<int>("MinHeight",
|
|
|
|
TabBox::TabBoxConfig::defaultMinHeight()));
|
|
|
|
|
|
|
|
tabBoxConfig.setLayoutName(config.readEntry<QString>("LayoutName", TabBox::TabBoxConfig::defaultLayoutName()));
|
|
|
|
tabBoxConfig.setSelectedItemLayoutName(config.readEntry<QString>("SelectedLayoutName", TabBox::TabBoxConfig::defaultSelectedItemLayoutName()));
|
|
|
|
}
|
|
|
|
|
|
|
|
void KWinTabBoxConfig::saveConfig(KConfigGroup& config, const KWin::TabBox::TabBoxConfig& tabBoxConfig)
|
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
// combo boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
config.writeEntry("ListMode", int(tabBoxConfig.clientListMode()));
|
|
|
|
config.writeEntry("SwitchingMode", int(tabBoxConfig.clientSwitchingMode()));
|
|
|
|
config.writeEntry("LayoutMode", int(tabBoxConfig.layout()));
|
|
|
|
config.writeEntry("SelectedItem", int(tabBoxConfig.selectedItemViewPosition()));
|
|
|
|
config.writeEntry("LayoutName", tabBoxConfig.layoutName());
|
|
|
|
config.writeEntry("SelectedLayoutName", tabBoxConfig.selectedItemLayoutName());
|
|
|
|
config.writeEntry("ShowDesktop", tabBoxConfig.isShowDesktop());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// check boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
config.writeEntry("ShowOutline", tabBoxConfig.isShowOutline());
|
|
|
|
config.writeEntry("ShowTabBox", tabBoxConfig.isShowTabBox());
|
|
|
|
config.writeEntry("HighlightWindows", tabBoxConfig.isHighlightWindows());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// spin boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
config.writeEntry("MinWidth", tabBoxConfig.minWidth());
|
|
|
|
config.writeEntry("MinHeight", tabBoxConfig.minHeight());
|
2009-09-13 15:36:45 +04:00
|
|
|
config.sync();
|
2011-01-30 17:34:42 +03:00
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::save()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
KCModule::save();
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup config(m_config, "TabBox");
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// sync ui to config
|
2011-01-30 17:34:42 +03:00
|
|
|
updateConfigFromUi(m_primaryTabBoxUi, m_tabBoxConfig);
|
|
|
|
updateConfigFromUi(m_alternativeTabBoxUi, m_tabBoxAlternativeConfig);
|
|
|
|
saveConfig(config, m_tabBoxConfig);
|
|
|
|
config = KConfigGroup(m_config, "TabBoxAlternative");
|
|
|
|
saveConfig(config, m_tabBoxAlternativeConfig);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// effects
|
|
|
|
bool boxSwitch = false;
|
|
|
|
bool presentWindowSwitching = false;
|
|
|
|
bool coverSwitch = false;
|
|
|
|
bool flipSwitch = false;
|
|
|
|
bool boxSwitchAlternative = false;
|
|
|
|
bool presentWindowSwitchingAlternative = false;
|
|
|
|
bool coverSwitchAlternative = false;
|
|
|
|
bool flipSwitchAlternative = false;
|
2011-01-30 17:34:42 +03:00
|
|
|
switch(m_primaryTabBoxUi->effectCombo->currentIndex()) {
|
|
|
|
case 1:
|
|
|
|
boxSwitch = true;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
presentWindowSwitching = true;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
coverSwitch = true;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
flipSwitch = true;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break; // nothing
|
|
|
|
}
|
|
|
|
switch(m_alternativeTabBoxUi->effectCombo->currentIndex()) {
|
|
|
|
case 1:
|
|
|
|
boxSwitchAlternative = true;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
presentWindowSwitchingAlternative = true;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
coverSwitchAlternative = true;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
flipSwitchAlternative = true;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break; // nothing
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
// activate effects if not active
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup effectconfig(m_config, "Plugins");
|
|
|
|
if (boxSwitch || boxSwitchAlternative)
|
2009-09-13 15:36:45 +04:00
|
|
|
effectconfig.writeEntry("kwin4_effect_boxswitchEnabled", true);
|
2011-01-30 17:34:42 +03:00
|
|
|
if (presentWindowSwitching || presentWindowSwitchingAlternative)
|
2009-09-13 15:36:45 +04:00
|
|
|
effectconfig.writeEntry("kwin4_effect_presentwindowsEnabled", true);
|
2011-01-30 17:34:42 +03:00
|
|
|
if (coverSwitch || coverSwitchAlternative)
|
2009-09-13 15:36:45 +04:00
|
|
|
effectconfig.writeEntry("kwin4_effect_coverswitchEnabled", true);
|
2011-01-30 17:34:42 +03:00
|
|
|
if (flipSwitch || flipSwitchAlternative)
|
2009-09-13 15:36:45 +04:00
|
|
|
effectconfig.writeEntry("kwin4_effect_flipswitchEnabled", true);
|
|
|
|
effectconfig.sync();
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup boxswitchconfig(m_config, "Effect-BoxSwitch");
|
|
|
|
boxswitchconfig.writeEntry("TabBox", boxSwitch);
|
|
|
|
boxswitchconfig.writeEntry("TabBoxAlternative", boxSwitchAlternative);
|
2009-09-13 15:36:45 +04:00
|
|
|
boxswitchconfig.sync();
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup presentwindowsconfig(m_config, "Effect-PresentWindows");
|
|
|
|
presentwindowsconfig.writeEntry("TabBox", presentWindowSwitching);
|
|
|
|
presentwindowsconfig.writeEntry("TabBoxAlternative", presentWindowSwitchingAlternative);
|
2009-09-13 15:36:45 +04:00
|
|
|
presentwindowsconfig.sync();
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup coverswitchconfig(m_config, "Effect-CoverSwitch");
|
|
|
|
coverswitchconfig.writeEntry("TabBox", coverSwitch);
|
|
|
|
coverswitchconfig.writeEntry("TabBoxAlternative", coverSwitchAlternative);
|
2009-09-13 15:36:45 +04:00
|
|
|
coverswitchconfig.sync();
|
2011-01-30 17:34:42 +03:00
|
|
|
KConfigGroup flipswitchconfig(m_config, "Effect-FlipSwitch");
|
|
|
|
flipswitchconfig.writeEntry("TabBox", flipSwitch);
|
|
|
|
flipswitchconfig.writeEntry("TabBoxAlternative", flipSwitchAlternative);
|
2009-09-13 15:36:45 +04:00
|
|
|
flipswitchconfig.sync();
|
|
|
|
|
|
|
|
m_editor->save();
|
|
|
|
|
|
|
|
// Reload KWin.
|
2011-01-30 17:34:42 +03:00
|
|
|
QDBusMessage message = QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
|
|
QDBusConnection::sessionBus().send(message);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
emit changed(false);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::defaults()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
// combo boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
m_primaryTabBoxUi->listModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultListMode());
|
|
|
|
m_primaryTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// checkboxes
|
2011-01-30 17:34:42 +03:00
|
|
|
m_primaryTabBoxUi->showOutlineCheck->setChecked(TabBox::TabBoxConfig::defaultShowOutline());
|
|
|
|
m_primaryTabBoxUi->showTabBox->setChecked(TabBox::TabBoxConfig::defaultShowTabBox());
|
|
|
|
m_primaryTabBoxUi->highlightWindowCheck->setChecked(TabBox::TabBoxConfig::defaultHighlightWindow());
|
|
|
|
m_primaryTabBoxUi->showDesktopBox->setChecked(TabBox::TabBoxConfig::defaultShowDesktop());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// effects
|
2011-01-30 17:34:42 +03:00
|
|
|
m_primaryTabBoxUi->effectCombo->setCurrentIndex(1);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// alternative
|
|
|
|
// combo boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
m_alternativeTabBoxUi->listModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultListMode());
|
|
|
|
m_alternativeTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// checkboxes
|
2011-01-30 17:34:42 +03:00
|
|
|
m_alternativeTabBoxUi->showOutlineCheck->setChecked(TabBox::TabBoxConfig::defaultShowOutline());
|
|
|
|
m_alternativeTabBoxUi->showTabBox->setChecked(TabBox::TabBoxConfig::defaultShowTabBox());
|
|
|
|
m_alternativeTabBoxUi->highlightWindowCheck->setChecked(TabBox::TabBoxConfig::defaultHighlightWindow());
|
|
|
|
m_alternativeTabBoxUi->showDesktopBox->setChecked(TabBox::TabBoxConfig::defaultShowDesktop());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// effects
|
2011-01-30 17:34:42 +03:00
|
|
|
m_alternativeTabBoxUi->effectCombo->setCurrentIndex(0);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
m_editor->allDefault();
|
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
emit changed(true);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
bool KWinTabBoxConfig::effectEnabled(const QString& effect, const KConfigGroup& cfg) const
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
KService::List services = KServiceTypeTrader::self()->query(
|
2011-01-30 17:34:42 +03:00
|
|
|
"KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_" + effect + '\'');
|
|
|
|
if (services.isEmpty())
|
2009-09-13 15:36:45 +04:00
|
|
|
return false;
|
2011-01-30 17:34:42 +03:00
|
|
|
QVariant v = services.first()->property("X-KDE-PluginInfo-EnabledByDefault");
|
|
|
|
return cfg.readEntry("kwin4_effect_" + effect + "Enabled", v.toBool());
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
void KWinTabBoxConfig::updateUiFromConfig(KWinTabBoxConfigForm* ui, const KWin::TabBox::TabBoxConfig& config)
|
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
// combo boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
ui->listModeCombo->setCurrentIndex(config.clientListMode());
|
|
|
|
ui->switchingModeCombo->setCurrentIndex(config.clientSwitchingMode());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
// check boxes
|
2011-01-30 17:34:42 +03:00
|
|
|
ui->showOutlineCheck->setChecked(config.isShowOutline());
|
|
|
|
ui->showTabBox->setChecked(config.isShowTabBox());
|
|
|
|
ui->highlightWindowCheck->setChecked(config.isHighlightWindows());
|
|
|
|
ui->showDesktopBox->setChecked(config.isShowDesktop());
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
void KWinTabBoxConfig::updateConfigFromUi(const KWin::KWinTabBoxConfigForm* ui, TabBox::TabBoxConfig& config)
|
|
|
|
{
|
|
|
|
config.setClientListMode(TabBox::TabBoxConfig::ClientListMode(ui->listModeCombo->currentIndex()));
|
|
|
|
config.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(ui->switchingModeCombo->currentIndex()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
config.setShowOutline(ui->showOutlineCheck->isChecked());
|
|
|
|
config.setShowTabBox(ui->showTabBox->isChecked());
|
|
|
|
config.setHighlightWindows(ui->highlightWindowCheck->isChecked());
|
|
|
|
config.setShowDesktop(ui->showDesktopBox->isChecked());
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
void KWinTabBoxConfig::slotEffectSelectionChanged(int index)
|
|
|
|
{
|
|
|
|
effectSelectionChanged(m_primaryTabBoxUi, index);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
void KWinTabBoxConfig::slotEffectSelectionChangedAlternative(int index)
|
|
|
|
{
|
|
|
|
effectSelectionChanged(m_alternativeTabBoxUi, index);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
void KWinTabBoxConfig::effectSelectionChanged(KWinTabBoxConfigForm* ui, int index)
|
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
bool enabled = false;
|
2011-01-30 17:34:42 +03:00
|
|
|
if (index > 0)
|
2009-09-13 15:36:45 +04:00
|
|
|
enabled = true;
|
2011-01-30 17:34:42 +03:00
|
|
|
ui->effectInfoButton->setEnabled(enabled);
|
|
|
|
ui->effectConfigButton->setEnabled(enabled);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotAboutEffectClicked()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
|
|
|
aboutEffectClicked(m_primaryTabBoxUi);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotAboutEffectClickedAlternative()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
|
|
|
aboutEffectClicked(m_alternativeTabBoxUi);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
void KWinTabBoxConfig::aboutEffectClicked(KWinTabBoxConfigForm* ui)
|
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
KServiceTypeTrader* trader = KServiceTypeTrader::self();
|
|
|
|
KService::List services;
|
|
|
|
QString effect;
|
2011-01-30 17:34:42 +03:00
|
|
|
switch(ui->effectCombo->currentIndex()) {
|
|
|
|
case 1:
|
|
|
|
effect = "boxswitch";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
effect = "presentwindows";
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
effect = "coverswitch";
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
effect = "flipswitch";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-09-15 14:35:45 +04:00
|
|
|
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_" + effect + '\'');
|
2011-01-30 17:34:42 +03:00
|
|
|
if (services.isEmpty())
|
2009-09-13 15:36:45 +04:00
|
|
|
return;
|
2011-01-30 17:34:42 +03:00
|
|
|
KPluginInfo pluginInfo(services.first());
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
const QString name = pluginInfo.name();
|
|
|
|
const QString comment = pluginInfo.comment();
|
|
|
|
const QString author = pluginInfo.author();
|
|
|
|
const QString email = pluginInfo.email();
|
|
|
|
const QString website = pluginInfo.website();
|
|
|
|
const QString version = pluginInfo.version();
|
|
|
|
const QString license = pluginInfo.license();
|
|
|
|
const QString icon = pluginInfo.icon();
|
|
|
|
|
|
|
|
KAboutData aboutData(name.toUtf8(), name.toUtf8(), ki18n(name.toUtf8()), version.toUtf8(), ki18n(comment.toUtf8()), KAboutLicense::byKeyword(license).key(), ki18n(QByteArray()), ki18n(QByteArray()), website.toLatin1());
|
2011-01-30 17:34:42 +03:00
|
|
|
aboutData.setProgramIconName(icon);
|
2009-09-13 15:36:45 +04:00
|
|
|
const QStringList authors = author.split(',');
|
|
|
|
const QStringList emails = email.split(',');
|
|
|
|
int i = 0;
|
2011-01-30 17:34:42 +03:00
|
|
|
if (authors.count() == emails.count()) {
|
|
|
|
foreach (const QString & author, authors) {
|
|
|
|
if (!author.isEmpty()) {
|
2009-09-13 15:36:45 +04:00
|
|
|
aboutData.addAuthor(ki18n(author.toUtf8()), ki18n(QByteArray()), emails[i].toUtf8(), 0);
|
|
|
|
}
|
2011-01-30 17:34:42 +03:00
|
|
|
i++;
|
2009-09-13 15:36:45 +04:00
|
|
|
}
|
2011-01-30 17:34:42 +03:00
|
|
|
}
|
|
|
|
QPointer< KAboutApplicationDialog > aboutPlugin = new KAboutApplicationDialog(&aboutData, this);
|
2009-09-15 14:31:52 +04:00
|
|
|
aboutPlugin->exec();
|
|
|
|
delete aboutPlugin;
|
2011-01-30 17:34:42 +03:00
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotConfigureEffectClicked()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
|
|
|
configureEffectClicked(m_primaryTabBoxUi);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotConfigureEffectClickedAlternative()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
|
|
|
configureEffectClicked(m_alternativeTabBoxUi);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
void KWinTabBoxConfig::configureEffectClicked(KWinTabBoxConfigForm* ui)
|
|
|
|
{
|
2009-09-13 15:36:45 +04:00
|
|
|
QString effect;
|
2011-01-30 17:34:42 +03:00
|
|
|
switch(ui->effectCombo->currentIndex()) {
|
|
|
|
case 1:
|
|
|
|
effect = "boxswitch_config";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
effect = "presentwindows_config";
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
effect = "coverswitch_config";
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
effect = "flipswitch_config";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
KCModuleProxy* proxy = new KCModuleProxy(effect);
|
|
|
|
QPointer< KDialog > configDialog = new KDialog(this);
|
|
|
|
configDialog->setWindowTitle(ui->effectCombo->currentText());
|
|
|
|
configDialog->setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default);
|
2009-09-15 14:31:52 +04:00
|
|
|
connect(configDialog, SIGNAL(defaultClicked()), proxy, SLOT(defaults()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
QWidget *showWidget = new QWidget(configDialog);
|
2009-09-13 15:36:45 +04:00
|
|
|
QVBoxLayout *layout = new QVBoxLayout;
|
2011-01-30 17:34:42 +03:00
|
|
|
showWidget->setLayout(layout);
|
|
|
|
layout->addWidget(proxy);
|
|
|
|
layout->insertSpacing(-1, KDialog::marginHint());
|
|
|
|
configDialog->setMainWidget(showWidget);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
if (configDialog->exec() == QDialog::Accepted) {
|
2009-09-13 15:36:45 +04:00
|
|
|
proxy->save();
|
2011-01-30 17:34:42 +03:00
|
|
|
} else {
|
2009-09-13 15:36:45 +04:00
|
|
|
proxy->load();
|
|
|
|
}
|
2011-01-30 17:34:42 +03:00
|
|
|
delete configDialog;
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotConfigureLayoutClicked()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
|
|
|
QPointer<KDialog> dialog = new KDialog(this);
|
|
|
|
dialog->setCaption(i18n("Configure Layout"));
|
|
|
|
dialog->setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default);
|
|
|
|
connect(dialog, SIGNAL(okClicked()), this, SLOT(slotLayoutChanged()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
m_configForm = new TabBox::LayoutConfig(dialog);
|
2011-10-31 11:41:07 +04:00
|
|
|
m_configForm->setLayout(m_tabBoxConfig.layoutName());
|
2011-01-30 17:34:42 +03:00
|
|
|
dialog->setMainWidget(m_configForm);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2009-09-15 14:31:52 +04:00
|
|
|
dialog->exec();
|
|
|
|
delete dialog;
|
2011-01-30 17:34:42 +03:00
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotLayoutChanged()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
2011-10-31 11:41:07 +04:00
|
|
|
m_tabBoxConfig.setLayoutName(m_configForm->selectedLayout());
|
2011-01-30 17:34:42 +03:00
|
|
|
emit changed(true);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotConfigureLayoutClickedAlternative()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
|
|
|
QPointer<KDialog> dialog = new KDialog(this);
|
|
|
|
dialog->setCaption(i18n("Configure Layout"));
|
|
|
|
dialog->setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default);
|
|
|
|
connect(dialog, SIGNAL(okClicked()), this, SLOT(slotLayoutChangedAlternative()));
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2011-01-30 17:34:42 +03:00
|
|
|
m_configForm = new TabBox::LayoutConfig(dialog);
|
2011-10-31 11:41:07 +04:00
|
|
|
m_configForm->setLayout(m_tabBoxAlternativeConfig.layoutName());
|
2011-01-30 17:34:42 +03:00
|
|
|
dialog->setMainWidget(m_configForm);
|
2009-09-13 15:36:45 +04:00
|
|
|
|
2009-09-15 14:31:52 +04:00
|
|
|
dialog->exec();
|
|
|
|
delete dialog;
|
2011-01-30 17:34:42 +03:00
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
void KWinTabBoxConfig::slotLayoutChangedAlternative()
|
2011-01-30 17:34:42 +03:00
|
|
|
{
|
2011-10-31 11:41:07 +04:00
|
|
|
m_tabBoxAlternativeConfig.setLayoutName(m_configForm->selectedLayout());
|
2011-01-30 17:34:42 +03:00
|
|
|
emit changed(true);
|
|
|
|
}
|
2009-09-13 15:36:45 +04:00
|
|
|
|
|
|
|
} // namespace
|