diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index 2de31028ac..d79ea307c4 100644 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -148,6 +148,7 @@ void PresentWindowsEffect::reconfigure( ReconfigureFlags ) m_layoutMode = conf.readEntry( "LayoutMode", int( LayoutNatural )); m_showCaptions = conf.readEntry( "DrawWindowCaptions", true ); m_showIcons = conf.readEntry( "DrawWindowIcons", true ); + m_doNotCloseWindows = !conf.readEntry( "AllowClosingWindows", true ); m_tabBoxAllowed = conf.readEntry( "TabBox", false ); m_tabBoxAlternativeAllowed = conf.readEntry( "TabBoxAlternative", false ); m_ignoreMinimized = conf.readEntry( "IgnoreMinimized", false ); @@ -1784,6 +1785,8 @@ void PresentWindowsEffect::setHighlightedWindow( EffectWindow *w ) void PresentWindowsEffect::updateCloseWindow() { + if ( m_doNotCloseWindows ) + return; if( m_closeView->isVisible() ) return; if( !m_highlightedWindow ) diff --git a/effects/presentwindows/presentwindows.h b/effects/presentwindows/presentwindows.h index 43ff179b7f..43151bd3de 100644 --- a/effects/presentwindows/presentwindows.h +++ b/effects/presentwindows/presentwindows.h @@ -210,6 +210,7 @@ class PresentWindowsEffect int m_layoutMode; bool m_showCaptions; bool m_showIcons; + bool m_doNotCloseWindows; bool m_tabBoxAllowed; bool m_tabBoxAlternativeAllowed; int m_accuracy; diff --git a/effects/presentwindows/presentwindows_config.cpp b/effects/presentwindows/presentwindows_config.cpp index 58e117725e..1197f96990 100644 --- a/effects/presentwindows/presentwindows_config.cpp +++ b/effects/presentwindows/presentwindows_config.cpp @@ -73,7 +73,7 @@ PresentWindowsEffectConfig::PresentWindowsEffectConfig(QWidget* parent, const QV connect( m_ui->layoutCombo, SIGNAL( currentIndexChanged( int )), this, SLOT( changed() )); connect( m_ui->displayTitleBox, SIGNAL( stateChanged( int )), this, SLOT( changed() )); connect( m_ui->displayIconBox, SIGNAL( stateChanged( int )), this, SLOT( changed() )); - connect( m_ui->switchingBox, SIGNAL( stateChanged( int )), this, SLOT( changed() )); + connect( m_ui->allowClosing, SIGNAL( stateChanged( int )), this, SLOT( changed() )); connect( m_ui->ignoreMinimizedBox, SIGNAL( stateChanged( int )), this, SLOT( changed() )); connect( m_ui->showPanelBox, SIGNAL( stateChanged( int )), this, SLOT( changed() )); connect( m_ui->accuracySlider, SIGNAL( valueChanged( int )), this, SLOT( changed() )); @@ -110,8 +110,8 @@ void PresentWindowsEffectConfig::load() bool displayIcon = conf.readEntry( "DrawWindowIcons", true ); m_ui->displayIconBox->setChecked( displayIcon ); - bool switching = conf.readEntry( "TabBox", false ); - m_ui->switchingBox->setChecked( switching ); + bool allowClosing = conf.readEntry( "AllowClosingWindows", true ); + m_ui->allowClosing->setChecked( allowClosing ); bool ignoreMinimized = conf.readEntry( "IgnoreMinimized", false ); m_ui->ignoreMinimizedBox->setChecked( ignoreMinimized ); @@ -153,7 +153,7 @@ void PresentWindowsEffectConfig::save() conf.writeEntry( "DrawWindowCaptions", m_ui->displayTitleBox->isChecked() ); conf.writeEntry( "DrawWindowIcons", m_ui->displayIconBox->isChecked() ); - conf.writeEntry( "TabBox", m_ui->switchingBox->isChecked() ); + conf.writeEntry( "AllowClosingWindows", m_ui->allowClosing->isChecked() ); conf.writeEntry( "IgnoreMinimized", m_ui->ignoreMinimizedBox->isChecked() ); conf.writeEntry( "ShowPanel", m_ui->showPanelBox->isChecked() ); @@ -189,7 +189,7 @@ void PresentWindowsEffectConfig::defaults() m_ui->layoutCombo->setCurrentIndex( int( PresentWindowsEffect::LayoutNatural )); m_ui->displayTitleBox->setChecked( true ); m_ui->displayIconBox->setChecked( true ); - m_ui->switchingBox->setChecked( false ); + m_ui->allowClosing->setChecked( true ); m_ui->ignoreMinimizedBox->setChecked( false ); m_ui->showPanelBox->setChecked( false ); m_ui->accuracySlider->setSliderPosition( 1 ); diff --git a/effects/presentwindows/presentwindows_config.ui b/effects/presentwindows/presentwindows_config.ui index c30619efa1..d1e027c48b 100644 --- a/effects/presentwindows/presentwindows_config.ui +++ b/effects/presentwindows/presentwindows_config.ui @@ -416,13 +416,6 @@ - - - - Use for window &switching - - - @@ -462,29 +455,36 @@ + + + + Provide buttons to close the windows + + + + + KComboBox + QComboBox +
kcombobox.h
+
KWin::GlobalShortcutsEditor QWidget
kwineffects.h
1
- - KComboBox - QComboBox -
kcombobox.h
-
layoutCombo displayTitleBox displayIconBox - switchingBox + allowClosing ignoreMinimizedBox accuracySlider fillGapsBox