diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-03 15:22:26 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-04 01:57:12 +0200 |
commit | b7e077787849a91efbc81fbbf5fd885b7cd0f3e1 (patch) | |
tree | 2b7eb663357e7954917072b6ab413dccf00cc7d9 /tubes/source/contacts.cxx | |
parent | tubes: create contacts dialog instance for each document separately (diff) | |
download | core-b7e077787849a91efbc81fbbf5fd885b7cd0f3e1.tar.gz core-b7e077787849a91efbc81fbbf5fd885b7cd0f3e1.zip |
tubes: do not use boost::signal here; call function directly
Change-Id: Iaab997f3d56d76fe98d70f8cffdbb44a34500901
Diffstat (limited to 'tubes/source/contacts.cxx')
-rw-r--r-- | tubes/source/contacts.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tubes/source/contacts.cxx b/tubes/source/contacts.cxx index 9245b55284b4..ff42df38e567 100644 --- a/tubes/source/contacts.cxx +++ b/tubes/source/contacts.cxx @@ -182,9 +182,6 @@ public: sHeader += String( TubesResId( STR_HEADER_NAME ) ); sHeader += '\t'; maList.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_LEFT ); - - mpManager->getContactList()->sigContactListChanged.connect( - boost::bind( &TubeContacts::Populate, this ) ); } virtual ~TubeContacts() { @@ -263,10 +260,12 @@ IMPL_LINK_NOARG( TubeContacts, BtnListenHdl ) return 0; } +// Mapping contacts dialog instance for each document +typedef std::map< sal_uInt64, TubeContacts* > DialogsMap; +static DialogsMap aDialogsMap; + TubeContacts* ContactsFactory( Collaboration* pCollaboration ) { - // Mapping contacts dialog instance for each document - static std::map< sal_uInt64, TubeContacts* > aDialogsMap; sal_uInt64 Id = pCollaboration->GetId(); if (aDialogsMap.find( Id ) == aDialogsMap.end()) aDialogsMap[ Id ] = new TubeContacts( pCollaboration ); @@ -281,6 +280,14 @@ void createContacts( Collaboration* pCollaboration ) TubeContacts* pContacts = ContactsFactory( pCollaboration ); pContacts->Populate(); } + +void reDrawAllContacts() +{ + for (DialogsMap::const_iterator it = aDialogsMap.begin(); + it != aDialogsMap.end(); ++it) + it->second->Populate(); +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |