Setted the Person icon from haiku artwork as default contact icon.

This commit is contained in:
barrett 2012-05-01 21:09:56 +00:00
parent 9df2b09f45
commit 493fed2f80
5 changed files with 37 additions and 8 deletions

View File

@ -264,3 +264,22 @@ resource(kExitMenuReplicant) #'VICN' array {
$"00003FBBBB40CC7F4022220A05020203100117842004" $"00003FBBBB40CC7F4022220A05020203100117842004"
}; };
// Person icon
resource(kPersonIcon) #'VICN' array {
$"6E636966080500020006023CADF43D104EBF02CA3EA2224AF02046648D00FFDB"
$"97FFFCAF29020006023A6496BA3F153EBCDD3EEA9146596AC09D5100FFF7EAFE"
$"FDD17B020006023AB3673751B2BC59783FD2D74AE3F146F85900C85805FFF063"
$"06020106033AC71C0000000000003AB6DB48D40045300000F2F2F2FFBCA184AB"
$"7D7A7A04016903A3290402000602388A2800000000000040000049E000000000"
$"00C85804FFDC952F090A0D2E302E4330453059345B365B365C3A5E4058404742"
$"454232352C0A0B2E302E4230453059345B365B365C3A5E3A4A3C4A3C360A062E"
$"303C3642323630BD5BB893352C0A083C4A3A4A3A5E40584047424542323C3602"
$"0438223B22352232283225322B382E352E3B2E3E283E2B3E250607FE1B3A5F44"
$"5F3F5F495FC738CAF4C569CAE4CB5ACB1BCA0FC8AACC99C976C888C82F4E5552"
$"574C544254580A043A4A3A5040473C4A0A03363042323A2E0A04345B365B364A"
$"34490A0A050105000A0001001001178400040A010101000A020102000A030103"
$"000A060106000A070107000A0001041001178400040A040104000A0301080815"
$"FF"
};

View File

@ -21,7 +21,9 @@ enum {
kOfflineReplicant = 1300, kOfflineReplicant = 1300,
kBusyReplicant = 1333, kBusyReplicant = 1333,
kAwayReplicant = 1400, kAwayReplicant = 1400,
kExitMenuReplicant = 1401 kExitMenuReplicant = 1401,
kPersonIcon = 1500
}; };
#endif // _CAYA_RESOURCES_H #endif // _CAYA_RESOURCES_H

View File

@ -1,12 +1,14 @@
/* /*
* Copyright 2009-2011, Andrea Anzani. All rights reserved. * Copyright 2009-2011, Andrea Anzani. All rights reserved.
* Copyright 2012, Dario Casalinuovo. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
* Andrea Anzani, andrea.anzani@gmail.com * Andrea Anzani, andrea.anzani@gmail.com
* Dario Casalinuovo
*/ */
#include <stdio.h> #include <libinterface/BitmapUtils.h>
#include "CayaProtocolAddOn.h" #include "CayaProtocolAddOn.h"
#include "ChatWindow.h" #include "ChatWindow.h"
@ -18,8 +20,12 @@
#include "RosterItem.h" #include "RosterItem.h"
#include "WindowsManager.h" #include "WindowsManager.h"
#include "CayaUtils.h"
#include "CayaResources.h"
#include "CayaPreferences.h" #include "CayaPreferences.h"
#include <stdio.h>
ContactLinker::ContactLinker(BString id, BMessenger msgn) ContactLinker::ContactLinker(BString id, BMessenger msgn)
: :
@ -203,11 +209,12 @@ ContactLinker::SetProtocolLooper(ProtocolLooper* looper)
if (looper) { if (looper) {
fLooper = looper; fLooper = looper;
// By default we use protocol icon as avatar icon // By default we use the Person icon as avatar icon
CayaProtocol* protocol = fLooper->Protocol(); BResources* res = CayaResources();
CayaProtocolAddOn* addOn BBitmap* bitmap = IconFromResources(res,
= ProtocolManager::Get()->ProtocolAddOn(protocol->Signature()); kPersonIcon, B_LARGE_ICON);
SetNotifyAvatarBitmap(addOn->Icon());
SetNotifyAvatarBitmap(bitmap);
} }
} }

View File

@ -1,5 +1,6 @@
/* /*
* Copyright 2009-2011, Andrea Anzani. All rights reserved. * Copyright 2009-2011, Andrea Anzani. All rights reserved.
* Copyright 2012, Dario Casalinuovo. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _CONTACT_LINKER_H_ #ifndef _CONTACT_LINKER_H_

View File

@ -1,4 +1,4 @@
/* /*
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved. * Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
* Copyright 2003-2009, IM Kit Team. All rights reserved. * Copyright 2003-2009, IM Kit Team. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.