Some warnings, and changed automatic filling of description.
svn path=/trunk/kdebase/kwin/; revision=329159
This commit is contained in:
parent
afb63436c5
commit
0d04f6a458
1 changed files with 9 additions and 5 deletions
|
@ -325,10 +325,7 @@ void RulesWidget::setRules( Rules* rules )
|
||||||
{
|
{
|
||||||
Rules tmp;
|
Rules tmp;
|
||||||
if( rules == NULL )
|
if( rules == NULL )
|
||||||
{
|
|
||||||
tmp.description = i18n( "New Entry" );
|
|
||||||
rules = &tmp; // empty
|
rules = &tmp; // empty
|
||||||
}
|
|
||||||
description->setText( rules->description );
|
description->setText( rules->description );
|
||||||
wmclass->setText( rules->wmclass );
|
wmclass->setText( rules->wmclass );
|
||||||
whole_wmclass->setChecked( rules->wmclasscomplete );
|
whole_wmclass->setChecked( rules->wmclasscomplete );
|
||||||
|
@ -415,7 +412,7 @@ Rules* RulesWidget::rules() const
|
||||||
rules->windowrolematch = static_cast< Rules::StringMatch >( role_match->currentItem());
|
rules->windowrolematch = static_cast< Rules::StringMatch >( role_match->currentItem());
|
||||||
rules->types = 0;
|
rules->types = 0;
|
||||||
bool all_types = true;
|
bool all_types = true;
|
||||||
for( int i = 0;
|
for( unsigned int i = 0;
|
||||||
i < types->count();
|
i < types->count();
|
||||||
++i )
|
++i )
|
||||||
if( !types->isSelected( i ))
|
if( !types->isSelected( i ))
|
||||||
|
@ -516,8 +513,15 @@ void RulesWidget::detected( bool ok )
|
||||||
|
|
||||||
bool RulesWidget::finalCheck()
|
bool RulesWidget::finalCheck()
|
||||||
{
|
{
|
||||||
|
if( description->text().isEmpty())
|
||||||
|
{
|
||||||
|
if( !wmclass->text().isEmpty())
|
||||||
|
description->setText( i18n( "Settings for %1" ).arg( wmclass->text()));
|
||||||
|
else
|
||||||
|
description->setText( i18n( "Unnamed entry" ));
|
||||||
|
}
|
||||||
bool all_types = true;
|
bool all_types = true;
|
||||||
for( int i = 0;
|
for( unsigned int i = 0;
|
||||||
i < types->count();
|
i < types->count();
|
||||||
++i )
|
++i )
|
||||||
if( !types->isSelected( i ))
|
if( !types->isSelected( i ))
|
||||||
|
|
Loading…
Reference in a new issue