diff --git a/application/ProtocolSettings.cpp b/application/ProtocolSettings.cpp index 5942f9a..ee3a548 100644 --- a/application/ProtocolSettings.cpp +++ b/application/ProtocolSettings.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -37,8 +38,6 @@ #include "ProtocolManager.h" #include "ProtocolSettings.h" -#define _T(str) (str) - const float kDividerWidth = 1.0f; @@ -71,10 +70,10 @@ ProtocolSettings::AddOn() const } -List +BObjectList ProtocolSettings::Accounts() const { - List list; + BObjectList list(true); BPath path(CayaAccountPath(fAddOn->Signature())); if (path.InitCheck() != B_OK) @@ -89,7 +88,7 @@ ProtocolSettings::Accounts() const if (msg.Unflatten(&file) == B_OK) { char buffer[B_PATH_NAME_LENGTH]; if (entry.GetName(buffer) == B_OK) - list.AddItem(BString(buffer)); + list.AddItem(new BString(buffer)); } } @@ -230,7 +229,7 @@ ProtocolSettings::Load(const char* account, BView* parent) active = false; } - control = new BCheckBox(name, _T(desc), NULL); + control = new BCheckBox(name, desc, NULL); if (active) dynamic_cast(control)->SetValue(B_CONTROL_ON); break; @@ -245,26 +244,25 @@ ProtocolSettings::Load(const char* account, BView* parent) if (!control) { if (freeText) { if (!multiLine) { - control = new BTextControl(name, _T(desc), value, NULL); + control = new BTextControl(name, desc, value, NULL); if (secret) { dynamic_cast(control)->TextView()->HideTyping(true); - dynamic_cast(control)->SetText( - _T(value)); + dynamic_cast(control)->SetText(value); } dynamic_cast(control)->SetDivider( kDividerWidth); } else { - BStringView* label = new BStringView("NA", _T(desc), + BStringView* label = new BStringView("NA", desc, B_WILL_DRAW); layout.Add(label); NotifyingTextView* textView = new NotifyingTextView(name); control = new BScrollView("NA", textView, 0, false, true); - textView->SetText(_T(value)); + textView->SetText(value); } } else { - control = new BMenuField(name, _T(desc), menu); + control = new BMenuField(name, desc, menu); dynamic_cast(control)->SetDivider(kDividerWidth); } } diff --git a/application/ProtocolSettings.h b/application/ProtocolSettings.h index 087588c..be25d7c 100644 --- a/application/ProtocolSettings.h +++ b/application/ProtocolSettings.h @@ -6,7 +6,7 @@ #ifndef _PROTOCOL_SETTINGS_H #define _PROTOCOL_SETTINGS_H -#include +#include class BMessage; class CayaProtocolAddOn; @@ -19,7 +19,7 @@ public: status_t InitCheck() const; CayaProtocolAddOn* AddOn() const; - List Accounts() const; + BObjectList Accounts() const; status_t LoadTemplate(BView* parent); status_t Load(const char* account, BView* parent); diff --git a/application/preferences/PreferencesAccounts.cpp b/application/preferences/PreferencesAccounts.cpp index 7295fae..bf175dd 100644 --- a/application/preferences/PreferencesAccounts.cpp +++ b/application/preferences/PreferencesAccounts.cpp @@ -227,13 +227,13 @@ PreferencesAccounts::_LoadListView(ProtocolSettings* settings) if (!settings) return; - List accounts = settings->Accounts(); + BObjectList accounts = settings->Accounts(); // Add accounts to list view - for (uint32 i = 0; i < accounts.CountItems(); i++) { - BString account = accounts.ItemAt(i); + for (int32 i = 0; i < accounts.CountItems(); i++) { + BString* account = accounts.ItemAt(i); AccountListItem* listItem - = new AccountListItem(settings, account.String()); + = new AccountListItem(settings, account->String()); fListView->AddItem(listItem); } } diff --git a/protocols/aim/AIM.cpp b/protocols/aim/AIM.cpp index 8eafbe1..9a1df77 100644 --- a/protocols/aim/AIM.cpp +++ b/protocols/aim/AIM.cpp @@ -298,7 +298,7 @@ AIMProtocol::WaitForData(void* aimProtocol) void -AIMProtocol::GotMessage(void* imcomm, char* who, int auto, char* recvmsg) +AIMProtocol::GotMessage(void* imcomm, char* who, char* recvmsg) { BMessage msg(IM_MESSAGE); msg.AddInt32("im_what", IM_MESSAGE_RECEIVED); diff --git a/protocols/aim/AIM.h b/protocols/aim/AIM.h index df016e3..8ac4f25 100644 --- a/protocols/aim/AIM.h +++ b/protocols/aim/AIM.h @@ -37,7 +37,7 @@ public: static int32 WaitForData(void*); - static void GotMessage(void*, char*, int, char*); + static void GotMessage(void*, char*, char*); static void BuddyOnline(void*, char*); static void BuddyOffline(void*, char*); static void BuddyAway(void*, char*); diff --git a/protocols/aim/main.cpp b/protocols/aim/main.cpp index 7a68f53..4048692 100644 --- a/protocols/aim/main.cpp +++ b/protocols/aim/main.cpp @@ -5,9 +5,11 @@ #include "AIM.h" -extern "C" __declspec(dllexport) CayaProtocol* protocol(); -extern "C" __declspec(dllexport) const char* signature(); -extern "C" __declspec(dllexport) const char* friendly_signature(); +extern "C" { + CayaProtocol* protocol(); + const char* signature(); + const char* friendly_signature(); +}; CayaProtocol* protocol()