From a4b01362de1dda1653759545b1049bbdebe8d663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sun, 16 Jan 2011 20:50:48 +0100 Subject: [PATCH] Fix a bug in account creation --- src/view/PreferencesPanel.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/view/PreferencesPanel.cpp b/src/view/PreferencesPanel.cpp index 92447b7..508076f 100644 --- a/src/view/PreferencesPanel.cpp +++ b/src/view/PreferencesPanel.cpp @@ -238,6 +238,12 @@ void PreferencesPanel::AddAccount(int line, Account ac) _accountsGrid->SetReadOnly(line, ACCOUNT_DEFAULT, true); _accountsGrid->SetReadOnly(line, ACCOUNT_BLOCKED, true); } + else + { + _accountsGrid->SetReadOnly(line, ACCOUNT_DEFAULT, false); + _accountsGrid->SetReadOnly(line, ACCOUNT_BLOCKED, false); + _accountsGrid->SetReadOnly(line, ACCOUNT_DELETE, false); + } } else { @@ -488,6 +494,7 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event) new_account.shared = false; new_account.blocked = false; + new_account.is_owner = true; AddAccount(row, new_account); _kiss->AddAccount(new_account); @@ -495,7 +502,7 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event) _accountsGrid->AppendRows(); new_account.id = wxT("0"); - AddAccount(row, new_account); + AddAccount(row+1, new_account); } _wxUI->Layout();