diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-07 10:59:58 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-08 10:04:17 +0200 |
commit | b870f1420ea926f231502272eec08c45e9da4cc5 (patch) | |
tree | c47bd194512b1450408a50cfd70049e372d87b7b /tubes/source/contacts.cxx | |
parent | 34c6421bddddb2128dd59acc867f73739ac1ca62 (diff) |
tubes: make contacts dialog a member of Collaboration class
Change-Id: Ib50b550f9486bc1abfeefd5d1aac57c0d712ec04
Diffstat (limited to 'tubes/source/contacts.cxx')
-rw-r--r-- | tubes/source/contacts.cxx | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/tubes/source/contacts.cxx b/tubes/source/contacts.cxx index 508322a69257..c6037f42bd96 100644 --- a/tubes/source/contacts.cxx +++ b/tubes/source/contacts.cxx @@ -35,7 +35,6 @@ #include <tubes/conference.hxx> #include <tubes/collaboration.hxx> #include <tubes/contact-list.hxx> -#include <tubes/contacts.hxx> #include <tubes/manager.hxx> #include <unotools/confignode.hxx> #include <vcl/fixed.hxx> @@ -282,34 +281,13 @@ 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 ) -{ - sal_uInt64 Id = pCollaboration->GetId(); - if (aDialogsMap.find( Id ) == aDialogsMap.end()) - aDialogsMap[ Id ] = new TubeContacts( pCollaboration ); - return aDialogsMap[ Id ]; -} - } // anonymous namespace -namespace tubes { -void createContacts( Collaboration* pCollaboration ) +void Collaboration::DisplayContacts() { - TubeContacts* pContacts = ContactsFactory( pCollaboration ); - pContacts->Populate(); -} - -void reDrawAllContacts() -{ - for (DialogsMap::const_iterator it = aDialogsMap.begin(); - it != aDialogsMap.end(); ++it) - it->second->Populate(); -} - + if (!mpContacts) + mpContacts = new TubeContacts( this ); + reinterpret_cast<TubeContacts*> (mpContacts)->Populate(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |