Drop all obsoleted config options from kwintabbox kcm
This commit is contained in:
parent
aa17081fe8
commit
585ef3c19f
2 changed files with 1 additions and 275 deletions
|
@ -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
|
||||
|
|
|
@ -17,41 +17,6 @@
|
|||
<string>Item Layout</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Layout:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>layoutCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="layoutCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Vertical</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Horizontal</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Tabular</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
|
@ -75,172 +40,9 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Minimum Size</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>minWidthSpinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KIntSpinBox" name="minWidthSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Minimum width, as a percentage of screen width.</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> %</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>minHeightSpinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KIntSpinBox" name="minHeightSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Minimum height, as a percentage of screen height.</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> %</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="selectedItemBox">
|
||||
<property name="title">
|
||||
<string>Show Selected Item</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Selected item view:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>selectedItemCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="selectedItemCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Right</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Selected item layout:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>selectedItemLayoutCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="selectedItemLayoutCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KIntSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>knuminput.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>KComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
|
@ -248,13 +50,7 @@
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>layoutCombo</tabstop>
|
||||
<tabstop>itemLayoutCombo</tabstop>
|
||||
<tabstop>selectedItemBox</tabstop>
|
||||
<tabstop>selectedItemCombo</tabstop>
|
||||
<tabstop>selectedItemLayoutCombo</tabstop>
|
||||
<tabstop>minWidthSpinBox</tabstop>
|
||||
<tabstop>minHeightSpinBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
|
Loading…
Reference in a new issue