--- as_slot.cpp 2003/02/13 18:22:32 1.119
+++ as_slot.cpp 2003/02/13 19:49:02 1.120
@@ -227,12 +227,10 @@
m_pRemark->setEnabled(true);
// And optionally the RPC actions, too
-#ifdef HAVE_MICO
- m_pSynciiopact->setEnabled(true);
-#endif // HAVE_MICO
-#ifdef HAVE_ESOAP
- m_pSyncsoapact->setEnabled(true);
-#endif // HAVE_ESOAP
+#if defined HAVE_MICO || defined HAVE_ESOAP
+ m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)
+ | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
+#endif // HAVE_MICO || defined HAVE_ESOAP
}
}
@@ -287,12 +285,9 @@
m_pRemark->setEnabled(false);
// And optionally dim the RPC actions
-#ifdef HAVE_MICO
- m_pSynciiopact->setEnabled(false);
-#endif // HAVE_MICO
-#ifdef HAVE_ESOAP
- m_pSyncsoapact->setEnabled(false);
-#endif // HAVE_ESOAP
+#if defined HAVE_MICO || defined HAVE_ESOAP
+ m_pSyncact->setEnabled(false);
+#endif // HAVE_MICO || defined HAVE_ESOAP
}
}
@@ -1173,6 +1168,13 @@
m_pPrefs->setBool(TITRAQ_PREFBAKON, pUserpanel->getBackon());
m_pPrefs->setBool(TITRAQ_PREFEXTENDON, pUserpanel->getExtendon());
+ // Dim the lights if no RPC transports are available
+ if (this->isOpen())
+ m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)
+ | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
+ else
+ m_pSyncact->setEnabled(false);
+
// Get the selected style which can be more complicated due to mapping...
if (pUserpanel->getStyle() == TITRAQ_STRCDE)
m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE);
@@ -1558,6 +1560,10 @@
void Titraqform::syncIiop(void)
{
#ifdef HAVE_MICO
+ // Short circuit if user has disabled CORBA transmission in prefs
+ if (!m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON))
+ return;
+
char **ppcInargv = NULL; // Parameters to the ORB
CORBA::ORB_var Orb; // The ORB iself
@@ -1691,6 +1697,10 @@
void Titraqform::syncSoap(void)
{
#ifdef HAVE_ESOAP
+ // Short circuit if user has disabled SOAP transmission in prefs
+ if (!m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON))
+ return;
+
USING_EASYSOAP_NAMESPACE
try {
|