Commit 101f310c authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Guillaume Roguez

gnome: save account immediately when toggling state

When toggling the account enabled checkbox in the account
settings, the change in state is applied immediately by
saving the account.

Refs #71834

Change-Id: Iebe9afd43e318bf5f94f2f90997fc0215a71719a
parent 16cc8bd1
......@@ -192,8 +192,11 @@ account_active_toggled(GtkCellRendererToggle *renderer, gchar *path, AccountView
if (idx.isValid()) {
/* check if it is the IP2IP account, as we don't want to be able to disable it */
QVariant alias =<int>(Account::Role::Alias));
if (strcmp(alias.value<QString>().toLocal8Bit().constData(), "IP2IP") != 0)
if (strcmp(alias.value<QString>().toLocal8Bit().constData(), "IP2IP") != 0) {
AccountModel::instance()->setData(idx, QVariant(toggle), Qt::CheckStateRole);
/* save the account to apply the changed state right away */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment