diff --git a/application/Caya.rdef b/application/Caya.rdef index a596d9c..17a59e2 100644 --- a/application/Caya.rdef +++ b/application/Caya.rdef @@ -264,3 +264,22 @@ resource(kExitMenuReplicant) #'VICN' array { $"00003FBBBB40CC7F4022220A05020203100117842004" }; +// Person icon + +resource(kPersonIcon) #'VICN' array { + $"6E636966080500020006023CADF43D104EBF02CA3EA2224AF02046648D00FFDB" + $"97FFFCAF29020006023A6496BA3F153EBCDD3EEA9146596AC09D5100FFF7EAFE" + $"FDD17B020006023AB3673751B2BC59783FD2D74AE3F146F85900C85805FFF063" + $"06020106033AC71C0000000000003AB6DB48D40045300000F2F2F2FFBCA184AB" + $"7D7A7A04016903A3290402000602388A2800000000000040000049E000000000" + $"00C85804FFDC952F090A0D2E302E4330453059345B365B365C3A5E4058404742" + $"454232352C0A0B2E302E4230453059345B365B365C3A5E3A4A3C4A3C360A062E" + $"303C3642323630BD5BB893352C0A083C4A3A4A3A5E40584047424542323C3602" + $"0438223B22352232283225322B382E352E3B2E3E283E2B3E250607FE1B3A5F44" + $"5F3F5F495FC738CAF4C569CAE4CB5ACB1BCA0FC8AACC99C976C888C82F4E5552" + $"574C544254580A043A4A3A5040473C4A0A03363042323A2E0A04345B365B364A" + $"34490A0A050105000A0001001001178400040A010101000A020102000A030103" + $"000A060106000A070107000A0001041001178400040A040104000A0301080815" + $"FF" +}; + diff --git a/application/CayaResources.h b/application/CayaResources.h index 3e25199..87b48d2 100644 --- a/application/CayaResources.h +++ b/application/CayaResources.h @@ -21,7 +21,9 @@ enum { kOfflineReplicant = 1300, kBusyReplicant = 1333, kAwayReplicant = 1400, - kExitMenuReplicant = 1401 + kExitMenuReplicant = 1401, + + kPersonIcon = 1500 }; #endif // _CAYA_RESOURCES_H diff --git a/application/ContactLinker.cpp b/application/ContactLinker.cpp index 448d038..10f7735 100644 --- a/application/ContactLinker.cpp +++ b/application/ContactLinker.cpp @@ -1,12 +1,14 @@ /* * Copyright 2009-2011, Andrea Anzani. All rights reserved. + * Copyright 2012, Dario Casalinuovo. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * Andrea Anzani, andrea.anzani@gmail.com + * Dario Casalinuovo */ -#include +#include #include "CayaProtocolAddOn.h" #include "ChatWindow.h" @@ -18,8 +20,12 @@ #include "RosterItem.h" #include "WindowsManager.h" +#include "CayaUtils.h" +#include "CayaResources.h" #include "CayaPreferences.h" +#include + ContactLinker::ContactLinker(BString id, BMessenger msgn) : @@ -203,11 +209,12 @@ ContactLinker::SetProtocolLooper(ProtocolLooper* looper) if (looper) { fLooper = looper; - // By default we use protocol icon as avatar icon - CayaProtocol* protocol = fLooper->Protocol(); - CayaProtocolAddOn* addOn - = ProtocolManager::Get()->ProtocolAddOn(protocol->Signature()); - SetNotifyAvatarBitmap(addOn->Icon()); + // By default we use the Person icon as avatar icon + BResources* res = CayaResources(); + BBitmap* bitmap = IconFromResources(res, + kPersonIcon, B_LARGE_ICON); + + SetNotifyAvatarBitmap(bitmap); } } diff --git a/application/ContactLinker.h b/application/ContactLinker.h index 019dcce..3438855 100644 --- a/application/ContactLinker.h +++ b/application/ContactLinker.h @@ -1,5 +1,6 @@ /* * Copyright 2009-2011, Andrea Anzani. All rights reserved. + * Copyright 2012, Dario Casalinuovo. All rights reserved. * Distributed under the terms of the MIT License. */ #ifndef _CONTACT_LINKER_H_ diff --git a/application/ProtocolSettings.cpp b/application/ProtocolSettings.cpp index ee3a548..62b780e 100644 --- a/application/ProtocolSettings.cpp +++ b/application/ProtocolSettings.cpp @@ -1,4 +1,4 @@ -/* + /* * Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved. * Copyright 2003-2009, IM Kit Team. All rights reserved. * Distributed under the terms of the MIT License.