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
6766c6a2
Kaydet (Commit)
6766c6a2
authored
Agu 07, 2012
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tubes: re-use typedefs from contact-list.hxx
Change-Id: I7b1ac653d22275a64d00913f014ca2536be3ffed
üst
510576b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
contacts.cxx
tubes/source/contacts.cxx
+16
-20
No files found.
tubes/source/contacts.cxx
Dosyayı görüntüle @
6766c6a2
...
...
@@ -43,7 +43,6 @@
#include <map>
#include <vector>
#include <boost/ptr_container/ptr_vector.hpp>
#include <telepathy-glib/telepathy-glib.h>
namespace
{
...
...
@@ -76,25 +75,18 @@ class TubeContacts : public ModelessDialog
DECL_LINK
(
BtnInviteHdl
,
void
*
);
DECL_LINK
(
BtnListenHdl
,
void
*
);
struct
AccountContact
{
TpAccount
*
mpAccount
;
TpContact
*
mpContact
;
AccountContact
(
TpAccount
*
pAccount
,
TpContact
*
pContact
)
:
mpAccount
(
pAccount
),
mpContact
(
pContact
)
{}
};
boost
::
ptr_vector
<
AccountContact
>
maACs
;
AccountContactPairV
maACs
;
void
Invite
()
{
AccountContact
*
pAC
=
NULL
;
AccountContact
Pair
*
pAC
=
NULL
;
if
(
maList
.
FirstSelected
())
pAC
=
static_cast
<
AccountContact
*>
(
maList
.
FirstSelected
()
->
GetUserData
());
pAC
=
static_cast
<
AccountContact
Pair
*>
(
maList
.
FirstSelected
()
->
GetUserData
());
if
(
pAC
)
{
if
(
mpCollaboration
->
GetConference
())
{
TpContact
*
pContact
=
pAC
->
mpContact
;
TpContact
*
pContact
=
pAC
->
second
;
mpCollaboration
->
GetConference
()
->
invite
(
pContact
);
mpCollaboration
->
SaveAndSendFile
(
pContact
,
OStringToOUString
(
mpCollaboration
->
GetConference
()
->
getUuid
(),
RTL_TEXTENCODING_UTF8
)
);
...
...
@@ -123,13 +115,13 @@ class TubeContacts : public ModelessDialog
void
StartBuddySession
()
{
AccountContact
*
pAC
=
NULL
;
AccountContact
Pair
*
pAC
=
NULL
;
if
(
maList
.
FirstSelected
())
pAC
=
static_cast
<
AccountContact
*>
(
maList
.
FirstSelected
()
->
GetUserData
());
pAC
=
static_cast
<
AccountContact
Pair
*>
(
maList
.
FirstSelected
()
->
GetUserData
());
if
(
pAC
)
{
TpAccount
*
pAccount
=
pAC
->
mpAccoun
t
;
TpContact
*
pContact
=
pAC
->
mpContact
;
TpAccount
*
pAccount
=
pAC
->
firs
t
;
TpContact
*
pContact
=
pAC
->
second
;
SAL_INFO
(
"tubes"
,
"picked "
<<
tp_contact_get_identifier
(
pContact
)
);
TeleConference
*
pConference
=
TeleManager
::
startBuddySession
(
pAccount
,
pContact
);
if
(
!
pConference
)
...
...
@@ -146,12 +138,12 @@ class TubeContacts : public ModelessDialog
void
StartGroupSession
()
{
AccountContact
*
pAC
=
NULL
;
AccountContact
Pair
*
pAC
=
NULL
;
if
(
maList
.
FirstSelected
())
pAC
=
static_cast
<
AccountContact
*>
(
maList
.
FirstSelected
()
->
GetUserData
());
pAC
=
static_cast
<
AccountContact
Pair
*>
(
maList
.
FirstSelected
()
->
GetUserData
());
if
(
pAC
)
{
TpAccount
*
pAccount
=
pAC
->
mpAccoun
t
;
TpAccount
*
pAccount
=
pAC
->
firs
t
;
SAL_INFO
(
"tubes"
,
"picked "
<<
tp_account_get_display_name
(
pAccount
)
);
TeleConference
*
pConference
=
TeleManager
::
startGroupSession
(
pAccount
,
rtl
::
OUString
(
"liboroom"
),
rtl
::
OUString
(
"conference.jabber.org"
)
);
...
...
@@ -211,11 +203,15 @@ public:
{
SAL_INFO
(
"sc.tubes"
,
"Populating contact list dialog"
);
maList
.
Clear
();
maACs
.
clear
();
ContactList
*
pContacts
=
TeleManager
::
getContactList
();
if
(
pContacts
)
{
AccountContactPairV
aPairs
=
pContacts
->
getContacts
();
AccountContactPairV
::
iterator
it
;
// make sure we have enough memory to not need re-allocation
// which would invalidate pointers stored in maList entries
maACs
.
reserve
(
aPairs
.
size
()
);
for
(
it
=
aPairs
.
begin
();
it
!=
aPairs
.
end
();
++
it
)
{
Image
aImage
;
...
...
@@ -240,7 +236,7 @@ public:
aEntry
.
append
(
sal_Unicode
(
'\t'
)
);
SvLBoxEntry
*
pEntry
=
maList
.
InsertEntry
(
aEntry
.
makeStringAndClear
(),
aImage
,
aImage
);
// FIXME: ref the TpAccount, TpContact ...
maACs
.
push_back
(
new
AccountContact
(
it
->
first
,
it
->
second
)
);
maACs
.
push_back
(
AccountContactPair
(
it
->
first
,
it
->
second
)
);
pEntry
->
SetUserData
(
&
maACs
.
back
()
);
}
}
...
...
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