summaryrefslogtreecommitdiff
path: root/tubes/source
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-03-26 14:22:25 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-17 16:40:00 +0200
commit70ecadfcffc780f5024c1ed99b18b7939ea0609f (patch)
tree1ab627d237239e041bac4024596b3ea81e7603de /tubes/source
parent114542a8b2d48b85721ba5699c5951810473f507 (diff)
tubes: quick hack to allow running two instances
To record a screencast, I wanted to get two instances of LibreOffice running in the same session. But the Client object(s) claim D-Bus names, so initializing the second instance failed. This patch changes things so that if LIBO_TUBES=master, no Client objects are created. As a result, only the slave can receive files.
Diffstat (limited to 'tubes/source')
-rw-r--r--tubes/source/manager.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index b9f9744c2f0f..21d0d4186349 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -357,8 +357,9 @@ static void TeleManager_AccountManagerReadyHandler(
}
-TeleManager::TeleManager( bool bCreateOwnGMainLoop )
+TeleManager::TeleManager( bool bAcceptIncoming, bool bCreateOwnGMainLoop )
:
+ mbAcceptIncoming( bAcceptIncoming ),
mbChannelReadyHandlerInvoked( false)
{
// The glib object types need to be initialized, else we aren't going
@@ -390,11 +391,11 @@ TeleManager::~TeleManager()
}
TeleManager *
-TeleManager::get()
+TeleManager::get( bool bAcceptIncoming )
{
MutexGuard aGuard( GetAnotherMutex());
if (!pSingleton)
- pSingleton = new TeleManager();
+ pSingleton = new TeleManager(bAcceptIncoming);
nAnotherRefCount++;
return pSingleton;
@@ -446,6 +447,9 @@ bool TeleManager::connect()
pImpl->mpContactList = new ContactList(pAccountManager);
+ if (!mbAcceptIncoming)
+ return true;
+
pImpl->mpClient = tp_simple_handler_new_with_factory(
TP_SIMPLE_CLIENT_FACTORY (pFactory), // factory
FALSE, // bypass_approval