mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Merge pull request #1317 from vedgy/minor-preferences-improvements
Minor Preferences improvements
This commit is contained in:
commit
06177c31f6
|
@ -944,7 +944,7 @@ Class load() THROW_SPEC( exError )
|
|||
c.preferences.articleSizeLimit = preferences.namedItem( "articleSizeLimit" ).toElement().text().toInt();
|
||||
|
||||
if ( !preferences.namedItem( "limitInputPhraseLength" ).isNull() )
|
||||
c.preferences.limitInputPhraseLength = ( preferences.namedItem( "limitInputPhraseLength" ).toElement().text() == "1" );
|
||||
c.preferences.limitInputPhraseLength = ( preferences.namedItem( "limitInputPhraseLength" ).toElement().text() == "1" );
|
||||
|
||||
if ( !preferences.namedItem( "inputPhraseLengthLimit" ).isNull() )
|
||||
c.preferences.inputPhraseLengthLimit = preferences.namedItem( "inputPhraseLengthLimit" ).toElement().text().toInt();
|
||||
|
@ -2322,7 +2322,7 @@ QString getCacheDir() throw()
|
|||
|
||||
QString getNetworkCacheDir() throw()
|
||||
{
|
||||
return getCacheDir() + "/network";
|
||||
return getCacheDir() + "/network";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
@ -651,7 +655,17 @@ void Preferences::customProxyToggled( bool )
|
|||
|
||||
void Preferences::on_maxNetworkCacheSize_valueChanged( int value )
|
||||
{
|
||||
ui.clearNetworkCacheOnExit->setEnabled( value != 0 );
|
||||
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()
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue