summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-06-29 19:30:46 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-17 16:40:18 +0200
commit05c8c686a0c7dcbd58fac67a6a2c9b957f4159ad (patch)
treed2ac370d48eb977af7db734784d19370524652d7
parenttubes: unref TeleManager if we do not store the pointer (diff)
downloadcore-05c8c686a0c7dcbd58fac67a6a2c9b957f4159ad.tar.gz
core-05c8c686a0c7dcbd58fac67a6a2c9b957f4159ad.zip
tubes: fallback to master mode when not possible to init TeleManager as slave
-rw-r--r--sc/source/ui/collab/contacts.cxx13
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()