diff --git a/config.cc b/config.cc
index 892a8d34..019e24f6 100644
--- a/config.cc
+++ b/config.cc
@@ -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";
}
}
diff --git a/preferences.cc b/preferences.cc
index 02934e71..59eddea2 100644
--- a/preferences.cc
+++ b/preferences.cc
@@ -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()
diff --git a/preferences.hh b/preferences.hh
index 66e6227d..71142091 100644
--- a/preferences.hh
+++ b/preferences.hh
@@ -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();
};
diff --git a/preferences.ui b/preferences.ui
index c90a2779..ed810484 100644
--- a/preferences.ui
+++ b/preferences.ui
@@ -1800,10 +1800,10 @@ from mouse-over, selection, clipboard or command line
Input phrases longer than this size will be ignored
- 10000
+ 9999999
- 5
+ 10
1000