summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-07-24 13:56:51 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-24 23:33:09 +0200
commit9c6a6ec047261aab6b0e4b9ac4f3206aebc0d192 (patch)
tree2d2e4b0b7ec2b2d02d0669755015c4a23b2df5fa /sc
parent5800c9aa3052aaa1429edb110e9b0291aa642cd7 (diff)
tubes: keep contacts dialog updated on contacts' presence changes
- make the dialog - TubeContacts static pointer, so there is only one Change-Id: I12f256bebc27ba31a82082d7107066de8079893c
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/collab/contacts.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/collab/contacts.cxx b/sc/source/ui/collab/contacts.cxx
index 5ade483c016f..80cb756d095f 100644
--- a/sc/source/ui/collab/contacts.cxx
+++ b/sc/source/ui/collab/contacts.cxx
@@ -190,6 +190,9 @@ public:
sHeader += String( ScResId( STR_HEADER_NAME ) );
sHeader += '\t';
maList.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_LEFT );
+
+ mpManager->getContactList()->sigContactListChanged.connect(
+ boost::bind( &TubeContacts::Populate, this ) );
}
virtual ~TubeContacts()
{
@@ -204,6 +207,8 @@ public:
void Populate()
{
+ SAL_INFO( "sc.tubes", "Populating contact list dialog" );
+ maList.Clear();
ContactList *pContacts = mpManager->getContactList();
if ( pContacts )
{
@@ -272,7 +277,7 @@ namespace tubes {
void createContacts()
{
#ifdef CONTACTS_DLG
- TubeContacts *pContacts = new TubeContacts();
+ static TubeContacts *pContacts = new TubeContacts();
pContacts->Populate();
#endif
}