From 585ef3c19faddb6d12045ee94eeff0b793a02178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 30 Oct 2011 16:24:06 +0100 Subject: [PATCH] Drop all obsoleted config options from kwintabbox kcm --- kcmkwin/kwintabbox/layoutconfig.cpp | 70 ---------- kcmkwin/kwintabbox/layoutconfig.ui | 206 +--------------------------- 2 files changed, 1 insertion(+), 275 deletions(-) diff --git a/kcmkwin/kwintabbox/layoutconfig.cpp b/kcmkwin/kwintabbox/layoutconfig.cpp index 058f398c60..6c758f7df3 100644 --- a/kcmkwin/kwintabbox/layoutconfig.cpp +++ b/kcmkwin/kwintabbox/layoutconfig.cpp @@ -62,21 +62,7 @@ LayoutConfig::LayoutConfig(QWidget* parent) d->ui.itemLayoutCombo->addItem(i18n("Text Only")); // TODO: user defined layouts - // init the selected item layout combo box - d->ui.selectedItemLayoutCombo->addItem(i18n("Informative")); - d->ui.selectedItemLayoutCombo->addItem(i18n("Compact")); - d->ui.selectedItemLayoutCombo->addItem(i18n("Small Icons")); - d->ui.selectedItemLayoutCombo->addItem(i18n("Large Icons")); - d->ui.selectedItemLayoutCombo->addItem(i18n("Text Only")); - - connect(d->ui.minWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(d->ui.minHeightSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changed())); connect(d->ui.itemLayoutCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(d->ui.layoutCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(d->ui.selectedItemCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(d->ui.selectedItemLayoutCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(d->ui.selectedItemBox, SIGNAL(clicked(bool)), this, SLOT(changed())); - } LayoutConfig::~LayoutConfig() @@ -92,14 +78,6 @@ TabBoxConfig& LayoutConfig::config() const void LayoutConfig::setConfig(const KWin::TabBox::TabBoxConfig& config) { d->config = config; - d->ui.selectedItemBox->setChecked(config.selectedItemViewPosition() != TabBoxConfig::NonePosition); - - d->ui.layoutCombo->setCurrentIndex(config.layout()); - d->ui.selectedItemCombo->setCurrentIndex(config.selectedItemViewPosition() - 1); - - d->ui.minWidthSpinBox->setValue(config.minWidth()); - d->ui.minHeightSpinBox->setValue(config.minHeight()); - // item layouts if (config.layoutName().compare("Default", Qt::CaseInsensitive) == 0) { d->ui.itemLayoutCombo->setCurrentIndex(0); @@ -115,29 +93,10 @@ void LayoutConfig::setConfig(const KWin::TabBox::TabBoxConfig& config) // TODO: user defined layouts } - if (config.selectedItemLayoutName().compare("Default", Qt::CaseInsensitive) == 0) { - d->ui.selectedItemLayoutCombo->setCurrentIndex(0); - } else if (config.selectedItemLayoutName().compare("Compact", Qt::CaseInsensitive) == 0) { - d->ui.selectedItemLayoutCombo->setCurrentIndex(1); - } else if (config.selectedItemLayoutName().compare("Small Icons", Qt::CaseInsensitive) == 0) { - d->ui.selectedItemLayoutCombo->setCurrentIndex(2); - } else if (config.selectedItemLayoutName().compare("Big Icons", Qt::CaseInsensitive) == 0) { - d->ui.selectedItemLayoutCombo->setCurrentIndex(3); - } else if (config.selectedItemLayoutName().compare("Text", Qt::CaseInsensitive) == 0) { - d->ui.selectedItemLayoutCombo->setCurrentIndex(4); - } else { - // TODO: user defined layouts - } - } void LayoutConfig::changed() { - // it's actually overkill but we just sync all options - d->config.setMinWidth(d->ui.minWidthSpinBox->value()); - d->config.setMinHeight(d->ui.minHeightSpinBox->value()); - d->config.setLayout(TabBoxConfig::LayoutMode(d->ui.layoutCombo->currentIndex())); - QString layout; switch(d->ui.itemLayoutCombo->currentIndex()) { case 0: @@ -160,35 +119,6 @@ void LayoutConfig::changed() break; } d->config.setLayoutName(layout); - - if (d->ui.selectedItemBox->isChecked()) { - d->config.setSelectedItemViewPosition(TabBoxConfig::SelectedItemViewPosition( - d->ui.selectedItemCombo->currentIndex() + 1)); - QString selectedLayout; - switch(d->ui.selectedItemLayoutCombo->currentIndex()) { - case 0: - selectedLayout = "Default"; - break; - case 1: - selectedLayout = "Compact"; - break; - case 2: - selectedLayout = "Small Icons"; - break; - case 3: - selectedLayout = "Big Icons"; - break; - case 4: - selectedLayout = "Text"; - break; - default: - // TODO: user defined layouts - break; - } - d->config.setSelectedItemLayoutName(selectedLayout); - } else { - d->config.setSelectedItemViewPosition(TabBoxConfig::NonePosition); - } } } // namespace KWin diff --git a/kcmkwin/kwintabbox/layoutconfig.ui b/kcmkwin/kwintabbox/layoutconfig.ui index 81017baa7f..55f392f3cc 100644 --- a/kcmkwin/kwintabbox/layoutconfig.ui +++ b/kcmkwin/kwintabbox/layoutconfig.ui @@ -17,41 +17,6 @@ Item Layout - - - - Layout: - - - layoutCombo - - - - - - - - 0 - 0 - - - - - Vertical - - - - - Horizontal - - - - - Tabular - - - - @@ -75,172 +40,9 @@ - - - - Minimum Size - - - - QFormLayout::ExpandingFieldsGrow - - - - - Width: - - - minWidthSpinBox - - - - - - - - 0 - 0 - - - - Minimum width, as a percentage of screen width. - - - % - - - 100 - - - - - - - Height: - - - minHeightSpinBox - - - - - - - - 0 - 0 - - - - Minimum height, as a percentage of screen height. - - - % - - - 100 - - - - - - - - - - Show Selected Item - - - true - - - - QFormLayout::ExpandingFieldsGrow - - - - - Selected item view: - - - selectedItemCombo - - - - - - - - 0 - 0 - - - - - Top - - - - - Bottom - - - - - Left - - - - - Right - - - - - - - - Selected item layout: - - - selectedItemLayoutCombo - - - - - - - - 0 - 0 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - + - - KIntSpinBox - QSpinBox -
knuminput.h
-
KComboBox QComboBox @@ -248,13 +50,7 @@
- layoutCombo itemLayoutCombo - selectedItemBox - selectedItemCombo - selectedItemLayoutCombo - minWidthSpinBox - minHeightSpinBox