choose a avatar when create a contact

This commit is contained in:
DenioD
2020-05-04 16:06:08 +02:00
parent 30a5403833
commit 5dbfe1e4ad
20 changed files with 99 additions and 28 deletions

View File

@@ -436,7 +436,9 @@ void MainWindow::setupSettingsModal() {
this->slot_change_currency(currency_name);
;
// Include Avatar
// Setup theme combo
@@ -461,7 +463,7 @@ void MainWindow::setupSettingsModal() {
// Tell the user to restart
QMessageBox::information(this, tr("Currency Change"), tr("This change can take a few seconds."), QMessageBox::Ok);
});
// Check for updates
settings.chkCheckUpdates->setChecked(Settings::getInstance()->getCheckForUpdates());
@@ -1468,6 +1470,26 @@ void MainWindow::slot_change_currency(const QString& currency_name)
}
}
void MainWindow::slot_change_avatar(const QString& avatar_name)
{
AddressBook::getInstance()->set_avatar_name(avatar_name);
// Include currency
QString saved_avatar_name;
try
{
saved_avatar_name = AddressBook::getInstance()->get_avatar_name();
}
catch (...)
{
saved_avatar_name = "Yoda";
}
}
void MainWindow::slot_change_theme(const QString& theme_name)