Diffstat (limited to 'noncore/settings/netsystemtime/settingstabwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/settingstabwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/netsystemtime/settingstabwidget.cpp b/noncore/settings/netsystemtime/settingstabwidget.cpp index 3bb0ec3..b26e751 100644 --- a/noncore/settings/netsystemtime/settingstabwidget.cpp +++ b/noncore/settings/netsystemtime/settingstabwidget.cpp | |||
@@ -82,51 +82,51 @@ SettingsTabWidget::SettingsTabWidget( QWidget *parent ) | |||
82 | chNtpTab = new QCheckBox( tr( "Display time server information" ), container ); | 82 | chNtpTab = new QCheckBox( tr( "Display time server information" ), container ); |
83 | connect( chNtpTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayNTPTab(bool) ) ); | 83 | connect( chNtpTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayNTPTab(bool) ) ); |
84 | layout->addMultiCellWidget( chNtpTab, 5, 5, 0, 1 ); | 84 | layout->addMultiCellWidget( chNtpTab, 5, 5, 0, 1 ); |
85 | 85 | ||
86 | // Display time prediction information selector | 86 | // Display time prediction information selector |
87 | chPredictTab = new QCheckBox( tr( "Display time prediction information" ), container ); | 87 | chPredictTab = new QCheckBox( tr( "Display time prediction information" ), container ); |
88 | connect( chPredictTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayPredictTab(bool) ) ); | 88 | connect( chPredictTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayPredictTab(bool) ) ); |
89 | layout->addMultiCellWidget( chPredictTab, 6, 6, 0, 1 ); | 89 | layout->addMultiCellWidget( chPredictTab, 6, 6, 0, 1 ); |
90 | 90 | ||
91 | // Space filler | 91 | // Space filler |
92 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 7, 0 ); | 92 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 7, 0 ); |
93 | 93 | ||
94 | // Initialize values | 94 | // Initialize values |
95 | QString ntpSrvsFile = QPEApplication::qpeDir(); | 95 | QString ntpSrvsFile = QPEApplication::qpeDir(); |
96 | ntpSrvsFile.append( "etc/ntpservers" ); | 96 | ntpSrvsFile.append( "etc/ntpservers" ); |
97 | Config ntpSrvs( ntpSrvsFile, Config::File ); | 97 | Config ntpSrvs( ntpSrvsFile, Config::File ); |
98 | ntpSrvs.setGroup( "servers" ); | 98 | ntpSrvs.setGroup( "servers" ); |
99 | int srvCount = ntpSrvs.readNumEntry( "count", 0 ); | 99 | int srvCount = ntpSrvs.readNumEntry( "count", 0 ); |
100 | for ( int i = 0; i < srvCount; i++ ) | 100 | for ( int i = 0; i < srvCount; i++ ) |
101 | { | 101 | { |
102 | ntpSrvs.setGroup( QString::number( i ) ); | 102 | ntpSrvs.setGroup( QString::number( i ) ); |
103 | cbTimeServer->insertItem( ntpSrvs.readEntry( "name" ) ); | 103 | cbTimeServer->insertItem( ntpSrvs.readEntry( "name" ) ); |
104 | } | 104 | } |
105 | if ( srvCount==0 ) { | 105 | if ( srvCount==0 ) { |
106 | cbTimeServer->insertItem( "time.fu-berlin.de" ); | 106 | cbTimeServer->insertItem( "0.pool.ntp.org" ); |
107 | cbTimeServer->insertItem( "time-a.nist.gov" ); | 107 | cbTimeServer->insertItem( "1.pool.ntp.org" ); |
108 | cbTimeServer->insertItem( "ntp.bri.connect.com.au" ); | 108 | cbTimeServer->insertItem( "2.pool.ntp.org" ); |
109 | } | 109 | } |
110 | Config config( "ntp" ); | 110 | Config config( "ntp" ); |
111 | config.setGroup( "settings" ); | 111 | config.setGroup( "settings" ); |
112 | sbPredictDelay->setValue( config.readNumEntry( "minLookupDiff", 720 ) ); | 112 | sbPredictDelay->setValue( config.readNumEntry( "minLookupDiff", 720 ) ); |
113 | sbNtpDelay->setValue( config.readNumEntry( "ntpRefreshFreq", 1440 ) ); | 113 | sbNtpDelay->setValue( config.readNumEntry( "ntpRefreshFreq", 1440 ) ); |
114 | cbTimeServer->setCurrentItem( config.readNumEntry( "ntpServer", 0 ) ); | 114 | cbTimeServer->setCurrentItem( config.readNumEntry( "ntpServer", 0 ) ); |
115 | chNtpTab->setChecked( config.readBoolEntry( "displayNtpTab", FALSE ) ); | 115 | chNtpTab->setChecked( config.readBoolEntry( "displayNtpTab", FALSE ) ); |
116 | chPredictTab->setChecked( config.readBoolEntry( "displayPredictTab", FALSE ) ); | 116 | chPredictTab->setChecked( config.readBoolEntry( "displayPredictTab", FALSE ) ); |
117 | } | 117 | } |
118 | 118 | ||
119 | SettingsTabWidget::~SettingsTabWidget() | 119 | SettingsTabWidget::~SettingsTabWidget() |
120 | { | 120 | { |
121 | } | 121 | } |
122 | 122 | ||
123 | void SettingsTabWidget::saveSettings() | 123 | void SettingsTabWidget::saveSettings() |
124 | { | 124 | { |
125 | int srvCount = cbTimeServer->count(); | 125 | int srvCount = cbTimeServer->count(); |
126 | bool serversChanged = TRUE; | 126 | bool serversChanged = TRUE; |
127 | int curSrv = cbTimeServer->currentItem(); | 127 | int curSrv = cbTimeServer->currentItem(); |
128 | QString edit = cbTimeServer->currentText(); | 128 | QString edit = cbTimeServer->currentText(); |
129 | for ( int i = 0; i < srvCount; i++ ) | 129 | for ( int i = 0; i < srvCount; i++ ) |
130 | { | 130 | { |
131 | if ( edit == cbTimeServer->text( i ) ) | 131 | if ( edit == cbTimeServer->text( i ) ) |
132 | serversChanged = FALSE; | 132 | serversChanged = FALSE; |