option out close button, remove redundant tabbox config item

svn path=/trunk/KDE/kdebase/workspace/; revision=1195636
This commit is contained in:
Thomas Lübking 2010-11-11 17:04:42 +00:00
parent 97cf4863ff
commit 267ce1942b
4 changed files with 22 additions and 18 deletions

View file

@ -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 )

View file

@ -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;

View file

@ -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 );

View file

@ -416,13 +416,6 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="switchingBox">
<property name="text">
<string>Use for window &amp;switching</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="ignoreMinimizedBox">
<property name="text">
@ -462,29 +455,36 @@
</item>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="allowClosing">
<property name="text">
<string>Provide buttons to close the windows</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>KWin::GlobalShortcutsEditor</class>
<extends>QWidget</extends>
<header location="global">kwineffects.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>layoutCombo</tabstop>
<tabstop>displayTitleBox</tabstop>
<tabstop>displayIconBox</tabstop>
<tabstop>switchingBox</tabstop>
<tabstop>allowClosing</tabstop>
<tabstop>ignoreMinimizedBox</tabstop>
<tabstop>accuracySlider</tabstop>
<tabstop>fillGapsBox</tabstop>