Merge pull request #1317 from vedgy/minor-preferences-improvements

Minor Preferences improvements
This commit is contained in:
Abs62 2020-11-19 19:15:44 +03:00 committed by GitHub
commit 06177c31f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 5 deletions

View file

@ -210,9 +210,13 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
ui.confirmFavoritesDeletion->setChecked( p.confirmFavoritesDeletion );
ui.collapseBigArticles->setChecked( p.collapseBigArticles );
on_collapseBigArticles_toggled( ui.collapseBigArticles->isChecked() );
ui.articleSizeLimit->setValue( p.articleSizeLimit );
ui.limitInputPhraseLength->setChecked( p.limitInputPhraseLength );
on_limitInputPhraseLength_toggled( ui.limitInputPhraseLength->isChecked() );
ui.inputPhraseLengthLimit->setValue( p.inputPhraseLengthLimit );
ui.ignoreDiacritics->setChecked( p.ignoreDiacritics );
ui.synonymSearchEnabled->setChecked( p.synonymSearchEnabled );
@ -654,6 +658,16 @@ void Preferences::on_maxNetworkCacheSize_valueChanged( int value )
ui.clearNetworkCacheOnExit->setEnabled( value != 0 );
}
void Preferences::on_collapseBigArticles_toggled( bool checked )
{
ui.articleSizeLimit->setEnabled( checked );
}
void Preferences::on_limitInputPhraseLength_toggled( bool checked )
{
ui.inputPhraseLengthLimit->setEnabled( checked );
}
void Preferences::helpRequested()
{
if( !helpWindow )

View file

@ -54,6 +54,9 @@ private slots:
void customProxyToggled( bool );
void on_maxNetworkCacheSize_valueChanged( int value );
void on_collapseBigArticles_toggled( bool checked );
void on_limitInputPhraseLength_toggled( bool checked );
void helpRequested();
void closeHelp();
};

View file

@ -1800,10 +1800,10 @@ from mouse-over, selection, clipboard or command line</string>
<string>Input phrases longer than this size will be ignored</string>
</property>
<property name="maximum">
<number>10000</number>
<number>9999999</number>
</property>
<property name="singleStep">
<number>5</number>
<number>10</number>
</property>
<property name="value">
<number>1000</number>