Index: trunk/BNC/bncwindow.cpp
===================================================================
--- trunk/BNC/bncwindow.cpp	(revision 2127)
+++ trunk/BNC/bncwindow.cpp	(revision 2128)
@@ -126,4 +126,7 @@
   _proxyPortLineEdit  = new QLineEdit(settings.value("proxyPort").toString());
 
+  connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)), 
+          this, SLOT(slotBncTextChanged()));
+
   // General Options
   // ---------------
@@ -165,4 +168,7 @@
   _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
 
+  connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)), 
+          this, SLOT(slotBncTextChanged()));
+
   // RINEX Ephemeris Options
   // -----------------------
@@ -179,4 +185,10 @@
   _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
 
+  connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
+
   // Broadcast Corrections Options
   // -----------------------------
@@ -196,4 +208,10 @@
   _corrTimeSpinBox->setSuffix(" sec");
   _corrTimeSpinBox->setValue(settings.value("corrTime").toInt());
+
+  connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
 
   // Feed Engine Options
@@ -215,4 +233,10 @@
   _outUPortLineEdit   = new QLineEdit(settings.value("outUPort").toString());
 
+  connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
+
   // Serial Output Options
   // ---------------------
@@ -258,4 +282,10 @@
   _serialFileNMEALineEdit    = new QLineEdit(settings.value("serialFileNMEA").toString());
   _serialHeightNMEALineEdit  = new QLineEdit(settings.value("serialHeightNMEA").toString());
+
+  connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
 
   // Outages Options
@@ -282,4 +312,7 @@
   _adviseScriptLineEdit    = new QLineEdit(settings.value("adviseScript").toString());
 
+  connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
+
   // Miscellaneous Options
   // ---------------------
@@ -295,4 +328,7 @@
   _scanRTCMCheckBox->setCheckState(Qt::CheckState(
                                     settings.value("scanRTCM").toInt()));
+
+  connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
 
   // PPP Options
@@ -309,4 +345,7 @@
   _pppEstTropoCheckBox->setCheckState(Qt::CheckState(
                                       settings.value("pppEstTropo").toInt()));
+
+  connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
+          this, SLOT(slotBncTextChanged()));
 
   // Streams
@@ -438,12 +477,4 @@
   pgroup->setLayout(pLayout);
 
-
-  connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-  if (_proxyHostLineEdit->text().isEmpty()) { 
-    _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
-    _proxyPortLineEdit->setEnabled(false);
-  }
- 
   // General Tab
   // -----------
@@ -486,7 +517,4 @@
   ogroup->setLayout(oLayout);
 
-  connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-
   // RINEX Ephemeris
   // ---------------
@@ -508,8 +536,4 @@
   egroup->setLayout(eLayout);
 
-  connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-  connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
 
   // Broadcast Corrections
@@ -533,13 +557,4 @@
   cLayout->addWidget(new QLabel("    "),5,0);
   cgroup->setLayout(cLayout);
-
-  connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-  connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-  if (_corrPathLineEdit->text().isEmpty()) { 
-    _corrIntrComboBox->setStyleSheet("background-color: lightGray");
-    _corrIntrComboBox->setEnabled(false);
-  }
 
   // Feed Engine
@@ -565,15 +580,4 @@
   sLayout->addWidget(new QLabel("    "),5,0);
   sgroup->setLayout(sLayout);
-
-  connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-  connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-  if (_outPortLineEdit->text().isEmpty() && _outFileLineEdit->text().isEmpty()) { 
-    _waitTimeSpinBox->setStyleSheet("background-color: lightGray");
-    _binSamplSpinBox->setStyleSheet("background-color: lightGray");
-    _waitTimeSpinBox->setEnabled(false);
-    _binSamplSpinBox->setEnabled(false);
-  }
 
   // Serial Output
@@ -611,38 +615,4 @@
   serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver."),5,0,1,30);
 
-  connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
-  connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
-          this, SLOT(bncText(const QString)));
-  if (_serialMountPointLineEdit->text().isEmpty()) { 
-    _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
-    _serialBaudRateComboBox->setStyleSheet("background-color: lightGray");
-    _serialParityComboBox->setStyleSheet("background-color: lightGray");
-    _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
-    _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
-    _serialFlowControlComboBox->setStyleSheet("background-color: lightGray");
-    _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray");
-    _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");
-    _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
-    _serialPortNameLineEdit->setEnabled(false);
-    _serialBaudRateComboBox->setEnabled(false);
-    _serialParityComboBox->setEnabled(false);
-    _serialDataBitsComboBox->setEnabled(false);
-    _serialStopBitsComboBox->setEnabled(false);
-    _serialFlowControlComboBox->setEnabled(false);
-    _serialAutoNMEAComboBox->setEnabled(false);
-    _serialFileNMEALineEdit->setEnabled(false);
-    _serialHeightNMEALineEdit->setEnabled(false);
-  } else {
-    if (_serialAutoNMEAComboBox->currentText() == "Auto" ) {
-      _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
-      _serialHeightNMEALineEdit->setEnabled(false);
-    } 
-    if (_serialAutoNMEAComboBox->currentText() != "Auto" ) {
-      _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");
-      _serialFileNMEALineEdit->setEnabled(false);
-    } 
-  }
-
   sergroup->setLayout(serLayout);
 
@@ -666,15 +636,4 @@
   agroup->setLayout(aLayout);
 
-  connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
-          this, SLOT(bncText(const QString)));
-  if (_obsRateComboBox->currentText().isEmpty()) { 
-    _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
-    _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
-    _adviseScriptLineEdit->setStyleSheet("background-color: lightGray");
-    _adviseFailSpinBox->setEnabled(false);
-    _adviseRecoSpinBox->setEnabled(false);
-    _adviseScriptLineEdit->setEnabled(false);
-  }
-
   // Miscellaneous
   // -------------
@@ -693,7 +652,4 @@
   rLayout->addWidget(new QLabel("    "),                          5, 0);
   rgroup->setLayout(rLayout);
-
-  connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
 
   // PPP Client
@@ -716,7 +672,4 @@
   pppLayout->addWidget(new QLabel("    "),                5, 0);
   pppgroup->setLayout(pppLayout);
-
-  connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
-          this, SLOT(bncText(const QString &)));
 
   // Main Layout
@@ -1356,7 +1309,5 @@
 //  Bnc Text
 ////////////////////////////////////////////////////////////////////////////
-void bncWindow::bncText(const QString &text){
-
-  bool isEmpty = text.isEmpty();
+void bncWindow::slotBncTextChanged(){
 
   QPalette palette_white(QColor(255, 255, 255));
@@ -1365,9 +1316,10 @@
   // Proxy
   //------
-  if (_aogroup->currentIndex() == 0) {
-    if (!isEmpty) {
+  if (sender() == _proxyHostLineEdit) {
+    if (!_proxyHostLineEdit->text().isEmpty()) {
       _proxyPortLineEdit->setStyleSheet("background-color: white");
       _proxyPortLineEdit->setEnabled(true);
-    } else {
+    } 
+    else {
       _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
       _proxyPortLineEdit->setEnabled(false);
@@ -1377,6 +1329,6 @@
   // RINEX Observations
   // ------------------
-  if (_aogroup->currentIndex() == 2) {
-    if (!isEmpty) {
+  if (sender() == _rnxPathLineEdit) {
+    if (!_rnxPathLineEdit->text().isEmpty()) {
       _rnxSamplSpinBox->setStyleSheet("background-color: white");
       _rnxSkelLineEdit->setStyleSheet("background-color: white");
@@ -1389,5 +1341,6 @@
       _rnxV3CheckBox->setEnabled(true);
       _rnxIntrComboBox->setEnabled(true);
-    } else {
+    } 
+    else {
       _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
       _rnxSkelLineEdit->setStyleSheet("background-color: lightGray");
@@ -1405,6 +1358,7 @@
   // RINEX Ephemeris
   // ---------------
-  if (_aogroup->currentIndex() == 3) {
-    if (!_ephPathLineEdit->text().isEmpty() && !_outEphPortLineEdit->text().isEmpty()) { 
+  if (sender() == _ephPathLineEdit || sender() == _outEphPortLineEdit) {
+    if (!_ephPathLineEdit->text().isEmpty() || 
+        !_outEphPortLineEdit->text().isEmpty()) { 
       _ephIntrComboBox->setStyleSheet("background-color: white");
       _ephV3CheckBox->setPalette(palette_white);
@@ -1412,17 +1366,5 @@
       _ephV3CheckBox->setEnabled(true);
     }
-    if (_ephPathLineEdit->text().isEmpty() && !_outEphPortLineEdit->text().isEmpty()) { 
-      _ephIntrComboBox->setStyleSheet("background-color: lightGray");
-      _ephV3CheckBox->setPalette(palette_gray);
-      _ephIntrComboBox->setEnabled(false);
-      _ephV3CheckBox->setEnabled(true);
-    }
-    if (!_ephPathLineEdit->text().isEmpty() && _outEphPortLineEdit->text().isEmpty()) { 
-      _ephIntrComboBox->setStyleSheet("background-color: white");
-      _ephV3CheckBox->setPalette(palette_white);
-      _ephIntrComboBox->setEnabled(true);
-      _ephV3CheckBox->setEnabled(true);
-    }
-    if (_ephPathLineEdit->text().isEmpty() && _outEphPortLineEdit->text().isEmpty()) { 
+    else {
       _ephIntrComboBox->setStyleSheet("background-color: lightGray");
       _ephV3CheckBox->setPalette(palette_gray);
@@ -1434,17 +1376,13 @@
   // Broadcast Corrections
   // ---------------------
-  if (_aogroup->currentIndex() == 4) {
-    if (!isEmpty) {
-      if (!_corrPathLineEdit->text().isEmpty()) {
+  if (sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) {
+    if (!_corrPathLineEdit->text().isEmpty() || 
+        !_corrPortLineEdit->text().isEmpty()) { 
       _corrIntrComboBox->setStyleSheet("background-color: white");
-      _corrPortLineEdit->setStyleSheet("background-color: white");
       _corrIntrComboBox->setEnabled(true);
-      _corrPortLineEdit->setEnabled(true);
-      }
-    } else {
-      if (_corrPathLineEdit->text().isEmpty()) {
+    } 
+    else {
       _corrIntrComboBox->setStyleSheet("background-color: lightGray");
       _corrIntrComboBox->setEnabled(false); 
-      }
     }
   }
@@ -1452,11 +1390,13 @@
   // Feed Engine
   // -----------
-  if (_aogroup->currentIndex() == 5) {
-    if ( !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty()) {
+  if (sender() == _outPortLineEdit || sender() == _outFileLineEdit) {
+    if ( !_outPortLineEdit->text().isEmpty() || 
+         !_outFileLineEdit->text().isEmpty()) {
       _waitTimeSpinBox->setStyleSheet("background-color: white");
       _binSamplSpinBox->setStyleSheet("background-color: white");
       _waitTimeSpinBox->setEnabled(true);
       _binSamplSpinBox->setEnabled(true);
-    } else {
+    } 
+    else {
       _waitTimeSpinBox->setStyleSheet("background-color: lightGray");
       _binSamplSpinBox->setStyleSheet("background-color: lightGray");
@@ -1468,6 +1408,7 @@
   // Serial Output
   // -------------
-  if (_aogroup->currentIndex() == 6) {
-    if (!isEmpty) {
+  if (sender() == _serialMountPointLineEdit || 
+      sender() == _serialAutoNMEAComboBox) {
+    if (!_serialMountPointLineEdit->text().isEmpty()) {
       _serialPortNameLineEdit->setStyleSheet("background-color: white");
       _serialBaudRateComboBox->setStyleSheet("background-color: white");
@@ -1489,5 +1430,6 @@
         _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");
         _serialFileNMEALineEdit->setEnabled(false);
-      } else {
+      } 
+      else {
         _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
         _serialHeightNMEALineEdit->setEnabled(false);
@@ -1495,5 +1437,6 @@
         _serialFileNMEALineEdit->setEnabled(true);
       }
-    } else {
+    } 
+    else {
       _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
       _serialBaudRateComboBox->setStyleSheet("background-color: lightGray");
@@ -1519,6 +1462,6 @@
   // Outages
   // -------
-  if (_aogroup->currentIndex() == 7) {
-    if (!isEmpty) {
+  if (sender() == _obsRateComboBox) {
+    if (!_obsRateComboBox->currentText().isEmpty()) {
       _adviseScriptLineEdit->setStyleSheet("background-color: white");
       _adviseFailSpinBox->setStyleSheet("background-color: white");
@@ -1539,6 +1482,6 @@
   // Miscellaneous
   // -------------
-  if (_aogroup->currentIndex() == 8) {
-    if (!isEmpty) {
+  if (sender() == _miscMountLineEdit) {
+    if (!_miscMountLineEdit->text().isEmpty()) {
       _perfIntrComboBox->setStyleSheet("background-color: white");
       _scanRTCMCheckBox->setPalette(palette_white);
@@ -1555,6 +1498,6 @@
   // PPP Client
   // ----------
-  if (_aogroup->currentIndex() == 9) {
-    if (!isEmpty) {
+  if (sender() == _pppMountLineEdit) {
+    if (!_pppMountLineEdit->text().isEmpty()) {
       _pppNMEALineEdit->setPalette(palette_white);
       _pppStaticCheckBox->setPalette(palette_white);
Index: trunk/BNC/bncwindow.h
===================================================================
--- trunk/BNC/bncwindow.h	(revision 2127)
+++ trunk/BNC/bncwindow.h	(revision 2128)
@@ -61,5 +61,5 @@
   public slots:  
     void slotMountPointsRead(QList<bncGetThread*>);
-    void bncText(const QString &text);
+    void slotBncTextChanged();
 
   private slots:
