summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pica-client/accountswindow.cpp7
-rw-r--r--pica-client/contacts.cpp3
2 files changed, 9 insertions, 1 deletions
diff --git a/pica-client/accountswindow.cpp b/pica-client/accountswindow.cpp
index b5c6806..b89200f 100644
--- a/pica-client/accountswindow.cpp
+++ b/pica-client/accountswindow.cpp
@@ -166,6 +166,13 @@ void AccountsWindow::CreateAccount(QString CertFilename, QString PkeyFilename, b
mbx.setText(accounts.GetLastError());
mbx.exec();
}
+ else
+ {
+ QMessageBox mbx;
+ mbx.setTextFormat(Qt::RichText);
+ mbx.setText(tr("New account<br> Pica Pica ID: <b>%1</b><br> is created.").arg(id.toBase64().constData()));
+ mbx.exec();
+ }
LoadAccounts();
}
diff --git a/pica-client/contacts.cpp b/pica-client/contacts.cpp
index 657ab12..0ae0338 100644
--- a/pica-client/contacts.cpp
+++ b/pica-client/contacts.cpp
@@ -59,9 +59,10 @@ void Contacts::Add(QByteArray id, ContactType type)
if (!Exists(id))
{
- query.prepare("insert into contacts (id, name, cert_pem, account_id) values (:id, NULL, NULL, :account_id)");
+ query.prepare("insert into contacts (id, name, cert_pem, account_id, type) values (:id, NULL, NULL, :account_id, :type)");
query.bindValue(":id",id);
query.bindValue(":account_id",account_id_);
+ query.bindValue(":type", type);
query.exec();
}
else