Index: /trunk/BNC/src/bncwindow.cpp
===================================================================
--- /trunk/BNC/src/bncwindow.cpp	(revision 6765)
+++ /trunk/BNC/src/bncwindow.cpp	(revision 6766)
@@ -81,4 +81,7 @@
 bncWindow::bncWindow() {
 
+  const static QPalette paletteWhite(QColor(255, 255, 255));
+  const static QPalette paletteGray(QColor(230, 230, 230));
+
 #ifdef GNSSCENTER_PLUGIN
   BNC_CORE->setConfFileName("");
@@ -460,17 +463,13 @@
   if (iRow > 0) {
     enableWidget(true, _cmbMethodComboBox);
-    _cmbMaxresLineEdit->setStyleSheet("background-color: white");
-    _cmbSamplSpinBox->setStyleSheet("background-color: white");
-    _cmbMaxresLineEdit->setEnabled(true);
-    _cmbSamplSpinBox->setEnabled(true);
-    _cmbUseGlonass->setEnabled(true);
+    enableWidget(true, _cmbMaxresLineEdit);
+    enableWidget(true, _cmbSamplSpinBox);
+    enableWidget(true, _cmbUseGlonass);
   } 
   else {
     enableWidget(false, _cmbMethodComboBox);
-    _cmbMaxresLineEdit->setStyleSheet("background-color: lightGray");
-    _cmbSamplSpinBox->setStyleSheet("background-color: lightGray");
-    _cmbMaxresLineEdit->setEnabled(false);
-    _cmbSamplSpinBox->setEnabled(false);
-    _cmbUseGlonass->setEnabled(false);
+    enableWidget(false, _cmbMaxresLineEdit);
+    enableWidget(false, _cmbSamplSpinBox);
+    enableWidget(false, _cmbUseGlonass);
   }
 
@@ -2142,5 +2141,5 @@
 //  Bnc Text
 //////////////////////////////////////////////////////////////////////////// 
-void bncWindow::slotBncTextChanged(){ // weber
+void bncWindow::slotBncTextChanged(){
 
   const static QPalette paletteWhite(QColor(255, 255, 255));
@@ -2252,22 +2251,14 @@
   if (sender() == 0 || sender() == _uploadEphHostLineEdit) {
     if (!_uploadEphHostLineEdit->text().isEmpty()) {
-      _uploadEphPortLineEdit->setStyleSheet("background-color: white");
-      _uploadEphMountpointLineEdit->setStyleSheet("background-color: white");
-      _uploadEphPasswordLineEdit->setStyleSheet("background-color: white");
-      _uploadEphSampleSpinBox->setStyleSheet("background-color: white");
-      _uploadEphPortLineEdit->setEnabled(true);
-      _uploadEphMountpointLineEdit->setEnabled(true);
-      _uploadEphPasswordLineEdit->setEnabled(true);
-      _uploadEphSampleSpinBox->setEnabled(true);
+      enableWidget(enable, _uploadEphPortLineEdit);
+      enableWidget(enable, _uploadEphMountpointLineEdit);
+      enableWidget(enable, _uploadEphPasswordLineEdit);
+      enableWidget(enable, _uploadEphSampleSpinBox);
     } 
     else {
-      _uploadEphPortLineEdit->setStyleSheet("background-color: lightGray");
-      _uploadEphMountpointLineEdit->setStyleSheet("background-color: lightGray");
-      _uploadEphPasswordLineEdit->setStyleSheet("background-color: lightGray");
-      _uploadEphSampleSpinBox->setStyleSheet("background-color: lightGray");
-      _uploadEphPortLineEdit->setEnabled(false);
-      _uploadEphMountpointLineEdit->setEnabled(false);
-      _uploadEphPasswordLineEdit->setEnabled(false);
-      _uploadEphSampleSpinBox->setEnabled(false);
+      enableWidget(false, _uploadEphPortLineEdit);
+      enableWidget(false, _uploadEphMountpointLineEdit);
+      enableWidget(false, _uploadEphPasswordLineEdit);
+      enableWidget(false, _uploadEphSampleSpinBox);
     }
   }
@@ -2279,17 +2270,13 @@
     if (iRow > 0) {
       enableWidget(true, _cmbMethodComboBox);
-      _cmbMaxresLineEdit->setStyleSheet("background-color: white");
-      _cmbSamplSpinBox->setStyleSheet("background-color: white");
-      _cmbMaxresLineEdit->setEnabled(true);
-      _cmbSamplSpinBox->setEnabled(true);
-      _cmbUseGlonass->setEnabled(true);
+      enableWidget(true, _cmbMaxresLineEdit);
+      enableWidget(true, _cmbSamplSpinBox);
+      enableWidget(true, _cmbUseGlonass);
     } 
     else {
       enableWidget(false, _cmbMethodComboBox);
-      _cmbMaxresLineEdit->setStyleSheet("background-color: lightGray");
-      _cmbSamplSpinBox->setStyleSheet("background-color: lightGray");
-      _cmbMaxresLineEdit->setEnabled(false);
-      _cmbSamplSpinBox->setEnabled(false);
-      _cmbUseGlonass->setEnabled(false);
+      enableWidget(false, _cmbMaxresLineEdit);
+      enableWidget(false, _cmbSamplSpinBox);
+      enableWidget(false, _cmbUseGlonass);
     }
   }
@@ -2340,5 +2327,5 @@
 
   enableStartStop();
-} // weber
+}
 
 // 
@@ -2356,4 +2343,7 @@
 void bncWindow::slotDelCmbRow() {
 
+  const static QPalette paletteWhite(QColor(255, 255, 255));
+  const static QPalette paletteGray(QColor(230, 230, 230));
+
   int nRows = _cmbTable->rowCount();
   bool flg[nRows];
@@ -2374,9 +2364,7 @@
   if (nRows < 1) {
     enableWidget(false, _cmbMethodComboBox);
-    _cmbMaxresLineEdit->setStyleSheet("background-color: lightGray");
-    _cmbSamplSpinBox->setStyleSheet("background-color: lightGray");
-    _cmbMaxresLineEdit->setEnabled(false);
-    _cmbSamplSpinBox->setEnabled(false);
-    _cmbUseGlonass->setEnabled(false);
+    enableWidget(false, _cmbMaxresLineEdit);
+    enableWidget(false, _cmbSamplSpinBox);
+    enableWidget(false, _cmbUseGlonass);
   }
 }
