Remove window switching combo box from compositing UI
Reduces duplication of settings in different areas and was only providing a small subset of the possible window switching capabilities. With BoxSwitch being possible to be rendered as a "normal" window switcher it does not make much sense anyway.icc-effect-5.14.5
parent
571a87a0b7
commit
95430bc741
|
@ -106,7 +106,6 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
|||
connect(ui.effectSelector, SIGNAL(configCommitted(QByteArray)),
|
||||
this, SLOT(reparseConfiguration(QByteArray)));
|
||||
|
||||
connect(ui.windowSwitchingCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(ui.desktopSwitchingCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(ui.animationSpeedCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
|
||||
|
@ -149,20 +148,7 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
|||
// search the effect names
|
||||
KServiceTypeTrader* trader = KServiceTypeTrader::self();
|
||||
KService::List services;
|
||||
QString boxswitch, presentwindows, coverswitch, flipswitch, slide, cube, fadedesktop;
|
||||
// window switcher
|
||||
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_boxswitch'");
|
||||
if (!services.isEmpty())
|
||||
boxswitch = services.first()->name();
|
||||
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_presentwindows'");
|
||||
if (!services.isEmpty())
|
||||
presentwindows = services.first()->name();
|
||||
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_coverswitch'");
|
||||
if (!services.isEmpty())
|
||||
coverswitch = services.first()->name();
|
||||
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_flipswitch'");
|
||||
if (!services.isEmpty())
|
||||
flipswitch = services.first()->name();
|
||||
QString slide, cube, fadedesktop;
|
||||
// desktop switcher
|
||||
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_slide'");
|
||||
if (!services.isEmpty())
|
||||
|
@ -173,12 +159,6 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
|||
services = trader->query("KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_fadedesktop'");
|
||||
if (!services.isEmpty())
|
||||
fadedesktop = services.first()->name();
|
||||
// init the combo boxes
|
||||
ui.windowSwitchingCombo->addItem(i18n("No Effect"));
|
||||
ui.windowSwitchingCombo->addItem(boxswitch);
|
||||
ui.windowSwitchingCombo->addItem(presentwindows);
|
||||
ui.windowSwitchingCombo->addItem(coverswitch);
|
||||
ui.windowSwitchingCombo->addItem(flipswitch);
|
||||
|
||||
ui.desktopSwitchingCombo->addItem(i18n("No Effect"));
|
||||
ui.desktopSwitchingCombo->addItem(slide);
|
||||
|
@ -298,22 +278,6 @@ void KWinCompositingConfig::loadGeneralTab()
|
|||
ui.effectAnimations->setChecked(LOAD_EFFECT_CONFIG("minimizeanimation"));
|
||||
#undef LOAD_EFFECT_CONFIG
|
||||
|
||||
// window switching
|
||||
// Set current option to "none" if no plugin is activated.
|
||||
ui.windowSwitchingCombo->setCurrentIndex(0);
|
||||
KConfigGroup boxswitchconfig(mKWinConfig, "Effect-BoxSwitch");
|
||||
if (effectEnabled("boxswitch", effectconfig) && boxswitchconfig.readEntry("TabBox", true))
|
||||
ui.windowSwitchingCombo->setCurrentIndex(1);
|
||||
KConfigGroup coverswitchconfig(mKWinConfig, "Effect-CoverSwitch");
|
||||
if (effectEnabled("coverswitch", effectconfig) && coverswitchconfig.readEntry("TabBox", false))
|
||||
ui.windowSwitchingCombo->setCurrentIndex(3);
|
||||
KConfigGroup flipswitchconfig(mKWinConfig, "Effect-FlipSwitch");
|
||||
if (effectEnabled("flipswitch", effectconfig) && flipswitchconfig.readEntry("TabBox", false))
|
||||
ui.windowSwitchingCombo->setCurrentIndex(4);
|
||||
KConfigGroup presentwindowsconfig(mKWinConfig, "Effect-PresentWindows");
|
||||
if (effectEnabled("presentwindows", effectconfig) && presentwindowsconfig.readEntry("TabBox", false))
|
||||
ui.windowSwitchingCombo->setCurrentIndex(2);
|
||||
|
||||
// desktop switching
|
||||
// Set current option to "none" if no plugin is activated.
|
||||
ui.desktopSwitchingCombo->setCurrentIndex(0);
|
||||
|
@ -457,49 +421,6 @@ void KWinCompositingConfig::saveGeneralTab()
|
|||
WRITE_EFFECT_CONFIG("minimizeanimation", ui.effectAnimations);
|
||||
#undef WRITE_EFFECT_CONFIG
|
||||
|
||||
int windowSwitcher = ui.windowSwitchingCombo->currentIndex();
|
||||
bool boxSwitch = false;
|
||||
bool presentWindowSwitching = false;
|
||||
bool coverSwitch = false;
|
||||
bool flipSwitch = false;
|
||||
switch(windowSwitcher) {
|
||||
case 1:
|
||||
boxSwitch = true;
|
||||
break;
|
||||
case 2:
|
||||
presentWindowSwitching = true;
|
||||
break;
|
||||
case 3:
|
||||
coverSwitch = true;
|
||||
break;
|
||||
case 4:
|
||||
flipSwitch = true;
|
||||
break;
|
||||
default:
|
||||
break; // nothing
|
||||
}
|
||||
// activate effects if not active
|
||||
if (boxSwitch)
|
||||
effectconfig.writeEntry("kwin4_effect_boxswitchEnabled", true);
|
||||
if (presentWindowSwitching)
|
||||
effectconfig.writeEntry("kwin4_effect_presentwindowsEnabled", true);
|
||||
if (coverSwitch)
|
||||
effectconfig.writeEntry("kwin4_effect_coverswitchEnabled", true);
|
||||
if (flipSwitch)
|
||||
effectconfig.writeEntry("kwin4_effect_flipswitchEnabled", true);
|
||||
KConfigGroup boxswitchconfig(mKWinConfig, "Effect-BoxSwitch");
|
||||
boxswitchconfig.writeEntry("TabBox", boxSwitch);
|
||||
boxswitchconfig.sync();
|
||||
KConfigGroup presentwindowsconfig(mKWinConfig, "Effect-PresentWindows");
|
||||
presentwindowsconfig.writeEntry("TabBox", presentWindowSwitching);
|
||||
presentwindowsconfig.sync();
|
||||
KConfigGroup coverswitchconfig(mKWinConfig, "Effect-CoverSwitch");
|
||||
coverswitchconfig.writeEntry("TabBox", coverSwitch);
|
||||
coverswitchconfig.sync();
|
||||
KConfigGroup flipswitchconfig(mKWinConfig, "Effect-FlipSwitch");
|
||||
flipswitchconfig.writeEntry("TabBox", flipSwitch);
|
||||
flipswitchconfig.sync();
|
||||
|
||||
int desktopSwitcher = ui.desktopSwitchingCombo->currentIndex();
|
||||
switch(desktopSwitcher) {
|
||||
case 0:
|
||||
|
@ -699,7 +620,6 @@ void KWinCompositingConfig::defaults()
|
|||
ui.effectWinManagement->setChecked(true);
|
||||
ui.effectAnimations->setChecked(true);
|
||||
|
||||
ui.windowSwitchingCombo->setCurrentIndex(1);
|
||||
ui.desktopSwitchingCombo->setCurrentIndex(1);
|
||||
ui.animationSpeedCombo->setCurrentIndex(3);
|
||||
|
||||
|
|
|
@ -254,42 +254,6 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Effect for window switching:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>windowSwitchingCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="KComboBox" name="windowSwitchingCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Effect for desktop switching:</string>
|
||||
|
@ -302,7 +266,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="KComboBox" name="desktopSwitchingCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
|
@ -312,7 +276,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<item row="2" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
@ -325,7 +289,7 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Animation speed:</string>
|
||||
|
@ -338,7 +302,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="KComboBox" name="animationSpeedCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
|
@ -386,7 +350,7 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<item row="3" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
@ -399,14 +363,14 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="3">
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
|
|
Loading…
Reference in New Issue