diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-06-29 19:30:46 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 16:40:18 +0200 |
commit | 05c8c686a0c7dcbd58fac67a6a2c9b957f4159ad (patch) | |
tree | d2ac370d48eb977af7db734784d19370524652d7 /sc | |
parent | ac08e4b3369131e75fbd6780c2b1cd10231f508d (diff) |
tubes: fallback to master mode when not possible to init TeleManager as slave
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/collab/contacts.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/ui/collab/contacts.cxx b/sc/source/ui/collab/contacts.cxx index aedbf9a930fe..d1f27ec87596 100644 --- a/sc/source/ui/collab/contacts.cxx +++ b/sc/source/ui/collab/contacts.cxx @@ -76,7 +76,18 @@ class TubeContacts : public ModelessDialog pSender = new ScDocFuncSend( *pScDocShell, pReceiver ); pDocFunc = pSender; } - pSender->InitTeleManager( false ); + // This is a hack to work around: + // `error registering client handler: Name + // 'org.freedesktop.Telepathy.Client.LibreOffice' already in use by another process` + // This happens when there is already slave instance running, + // so we try to init TeleManager as master. + bool bIsMaster = false; + if (!pSender->InitTeleManager( bIsMaster )) + { + fprintf( stderr, "Trying to initialize TeleManager as master..\n" ); + bIsMaster = true; + pSender->InitTeleManager( bIsMaster ); + } } void StartBuddySession() |