2010-05-07 04:47:10 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009-2010, Pier Luigi Fiorini. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <View.h>
|
|
|
|
|
|
|
|
#include "AccountListItem.h"
|
|
|
|
#include "ProtocolSettings.h"
|
|
|
|
|
|
|
|
|
2010-05-20 16:31:55 -05:00
|
|
|
AccountListItem::AccountListItem(ProtocolSettings* settings,
|
|
|
|
const char* account)
|
|
|
|
:
|
|
|
|
BStringItem(account),
|
2010-05-16 16:02:50 -05:00
|
|
|
fSettings(settings),
|
2010-05-07 04:47:10 -05:00
|
|
|
fAccount(account),
|
|
|
|
fBaselineOffset(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AccountListItem::~AccountListItem()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ProtocolSettings*
|
|
|
|
AccountListItem::Settings() const
|
|
|
|
{
|
|
|
|
return fSettings;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-16 16:02:50 -05:00
|
|
|
const char*
|
|
|
|
AccountListItem::Account() const
|
2010-05-07 04:47:10 -05:00
|
|
|
{
|
2010-05-16 16:02:50 -05:00
|
|
|
return fAccount.String();
|
2010-05-07 04:47:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-16 16:02:50 -05:00
|
|
|
void
|
|
|
|
AccountListItem::SetAccount(const char* name)
|
2010-05-07 04:47:10 -05:00
|
|
|
{
|
2010-05-16 16:02:50 -05:00
|
|
|
fAccount = name;
|
|
|
|
SetText(fAccount);
|
2010-05-07 04:47:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|