void ContactWrapper::setAccount(const Tp::AccountPtr& relatedAccount)
{
    kDebug() << "setting account to: " << relatedAccount->displayName();
    undoAccountConnects();
    m_account = relatedAccount;
    setupAccountConnects();
}
XTelepathyPasswordPrompt::XTelepathyPasswordPrompt(const Tp::AccountPtr &account, QWidget *parent)
    : QDialog(parent),
      ui(new Ui::XTelepathyPasswordPrompt)
{
    ui->setupUi(this);

    setAttribute(Qt::WA_ShowWithoutActivating);
    setWindowIcon(QIcon::fromTheme(QLatin1String("telepathy-kde")));

    ui->accountName->setText(account->displayName());
    ui->accountIcon->setPixmap(QIcon::fromTheme(QLatin1String("dialog-password")).pixmap(60, 60));
    ui->title->setPixmap(QIcon::fromTheme(account->iconName()).pixmap(22, 22));
    ui->passwordLineEdit->setFocus();

    ui->savePassword->setEnabled(true);

    QDialogButtonBox *dbb = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    connect(dbb, SIGNAL(accepted()), this, SLOT(accept()));
    connect(dbb, SIGNAL(rejected()), this, SLOT(reject()));

    ui->mainLayout->addWidget(dbb);
}