Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b7e07778
Kaydet (Commit)
b7e07778
authored
Agu 03, 2012
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tubes: do not use boost::signal here; call function directly
Change-Id: Iaab997f3d56d76fe98d70f8cffdbb44a34500901
üst
4e648b8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
contact-list.hxx
tubes/inc/tubes/contact-list.hxx
+0
-4
contact-list.cxx
tubes/source/contact-list.cxx
+5
-2
contacts.cxx
tubes/source/contacts.cxx
+12
-5
No files found.
tubes/inc/tubes/contact-list.hxx
Dosyayı görüntüle @
b7e07778
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include <vector>
#include <vector>
#include "tubes/tubesdllapi.h"
#include "tubes/tubesdllapi.h"
#include <tubes/warnings_guard_boost_signals2.hpp>
typedef
struct
_TpAccount
TpAccount
;
typedef
struct
_TpAccount
TpAccount
;
typedef
struct
_TpContact
TpContact
;
typedef
struct
_TpContact
TpContact
;
...
@@ -51,9 +50,6 @@ public:
...
@@ -51,9 +50,6 @@ public:
AccountContactPairV
getContacts
();
AccountContactPairV
getContacts
();
/** Emitted when a contact changes its presence. */
boost
::
signals2
::
signal
<
void
()
>
sigContactListChanged
;
private
:
private
:
TpAccountManager
*
mpAccountManager
;
TpAccountManager
*
mpAccountManager
;
std
::
set
<
TpContact
*
>
maRegistered
;
std
::
set
<
TpContact
*
>
maRegistered
;
...
...
tubes/source/contact-list.cxx
Dosyayı görüntüle @
b7e07778
...
@@ -92,13 +92,16 @@ tb_contact_is_online (TpContact *contact)
...
@@ -92,13 +92,16 @@ tb_contact_is_online (TpContact *contact)
}
}
}
}
namespace
tubes
{
void
reDrawAllContacts
();
}
static
void
presence_changed_cb
(
TpContact
*
/* contact */
,
static
void
presence_changed_cb
(
TpContact
*
/* contact */
,
guint
/* type */
,
guint
/* type */
,
gchar
*
/* status */
,
gchar
*
/* status */
,
gchar
*
/* message */
,
gchar
*
/* message */
,
gpointer
pContactList
)
gpointer
/* pContactList*/
)
{
{
reinterpret_cast
<
ContactList
*>
(
pContactList
)
->
sigContactListChanged
();
tubes
::
reDrawAllContacts
();
}
}
AccountContactPairV
ContactList
::
getContacts
()
AccountContactPairV
ContactList
::
getContacts
()
...
...
tubes/source/contacts.cxx
Dosyayı görüntüle @
b7e07778
...
@@ -182,9 +182,6 @@ public:
...
@@ -182,9 +182,6 @@ public:
sHeader
+=
String
(
TubesResId
(
STR_HEADER_NAME
)
);
sHeader
+=
String
(
TubesResId
(
STR_HEADER_NAME
)
);
sHeader
+=
'\t'
;
sHeader
+=
'\t'
;
maList
.
InsertHeaderEntry
(
sHeader
,
HEADERBAR_APPEND
,
HIB_LEFT
);
maList
.
InsertHeaderEntry
(
sHeader
,
HEADERBAR_APPEND
,
HIB_LEFT
);
mpManager
->
getContactList
()
->
sigContactListChanged
.
connect
(
boost
::
bind
(
&
TubeContacts
::
Populate
,
this
)
);
}
}
virtual
~
TubeContacts
()
virtual
~
TubeContacts
()
{
{
...
@@ -263,10 +260,12 @@ IMPL_LINK_NOARG( TubeContacts, BtnListenHdl )
...
@@ -263,10 +260,12 @@ IMPL_LINK_NOARG( TubeContacts, BtnListenHdl )
return
0
;
return
0
;
}
}
// Mapping contacts dialog instance for each document
typedef
std
::
map
<
sal_uInt64
,
TubeContacts
*
>
DialogsMap
;
static
DialogsMap
aDialogsMap
;
TubeContacts
*
ContactsFactory
(
Collaboration
*
pCollaboration
)
TubeContacts
*
ContactsFactory
(
Collaboration
*
pCollaboration
)
{
{
// Mapping contacts dialog instance for each document
static
std
::
map
<
sal_uInt64
,
TubeContacts
*
>
aDialogsMap
;
sal_uInt64
Id
=
pCollaboration
->
GetId
();
sal_uInt64
Id
=
pCollaboration
->
GetId
();
if
(
aDialogsMap
.
find
(
Id
)
==
aDialogsMap
.
end
())
if
(
aDialogsMap
.
find
(
Id
)
==
aDialogsMap
.
end
())
aDialogsMap
[
Id
]
=
new
TubeContacts
(
pCollaboration
);
aDialogsMap
[
Id
]
=
new
TubeContacts
(
pCollaboration
);
...
@@ -281,6 +280,14 @@ void createContacts( Collaboration* pCollaboration )
...
@@ -281,6 +280,14 @@ void createContacts( Collaboration* pCollaboration )
TubeContacts
*
pContacts
=
ContactsFactory
(
pCollaboration
);
TubeContacts
*
pContacts
=
ContactsFactory
(
pCollaboration
);
pContacts
->
Populate
();
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: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment