Skip to content
Snippets Groups Projects
Commit 1903730e authored by Jérémy Quentin's avatar Jérémy Quentin
Browse files

[#1775] Can't modify account information for account created with the wizard

parent bb9b378f
Branches
Tags
No related merge requests found
...@@ -87,6 +87,11 @@ SFLPhone::SFLPhone(QWidget *parent) ...@@ -87,6 +87,11 @@ SFLPhone::SFLPhone(QWidget *parent)
show(); show();
} }
if(configurationManager.getAccountList().value().isEmpty())
{
(new AccountWizard())->show();
}
} }
SFLPhone::~SFLPhone() SFLPhone::~SFLPhone()
......
...@@ -76,12 +76,14 @@ void ConfigurationDialogKDE::updateWidgets() ...@@ -76,12 +76,14 @@ void ConfigurationDialogKDE::updateWidgets()
{ {
qDebug() << "updateWidgets"; qDebug() << "updateWidgets";
dlgAudio->updateWidgets(); dlgAudio->updateWidgets();
dlgAccounts->updateWidgets();
} }
void ConfigurationDialogKDE::updateSettings() void ConfigurationDialogKDE::updateSettings()
{ {
qDebug() << "updateSettings"; qDebug() << "updateSettings";
dlgAudio->updateSettings(); dlgAudio->updateSettings();
dlgAccounts->updateSettings();
qDebug() << "yo " << ConfigurationSkeleton::self()->alsaPlugin(); qDebug() << "yo " << ConfigurationSkeleton::self()->alsaPlugin();
} }
......
...@@ -38,6 +38,7 @@ DlgAccounts::DlgAccounts(KConfigDialog *parent) ...@@ -38,6 +38,7 @@ DlgAccounts::DlgAccounts(KConfigDialog *parent)
button_accountDown->setIcon(KIcon("go-down")); button_accountDown->setIcon(KIcon("go-down"));
button_accountAdd->setIcon(KIcon("list-add")); button_accountAdd->setIcon(KIcon("list-add"));
button_accountRemove->setIcon(KIcon("list-remove")); button_accountRemove->setIcon(KIcon("list-remove"));
accountList = new AccountList(false);
loadAccountList(); loadAccountList();
accountListHasChanged = false; accountListHasChanged = false;
toolButton_accountsApply->setEnabled(false); toolButton_accountsApply->setEnabled(false);
...@@ -187,7 +188,7 @@ void DlgAccounts::loadAccount(QListWidgetItem * item) ...@@ -187,7 +188,7 @@ void DlgAccounts::loadAccount(QListWidgetItem * item)
void DlgAccounts::loadAccountList() void DlgAccounts::loadAccountList()
{ {
qDebug() << "loadAccountList"; qDebug() << "loadAccountList";
accountList = new AccountList(); accountList->updateAccounts();
//initialize the QListWidget object with the AccountList //initialize the QListWidget object with the AccountList
listWidget_accountList->clear(); listWidget_accountList->clear();
for (int i = 0; i < accountList->size(); ++i){ for (int i = 0; i < accountList->size(); ++i){
...@@ -358,3 +359,13 @@ bool DlgAccounts::hasChanged() ...@@ -358,3 +359,13 @@ bool DlgAccounts::hasChanged()
return accountListHasChanged; return accountListHasChanged;
} }
void DlgAccounts::updateSettings()
{
}
void DlgAccounts::updateWidgets()
{
loadAccountList();
}
...@@ -51,6 +51,8 @@ public slots: ...@@ -51,6 +51,8 @@ public slots:
void applyCustomSettings(); void applyCustomSettings();
bool hasChanged(); bool hasChanged();
void updateSettings();
void updateWidgets();
private slots: private slots:
void changedAccountList(); void changedAccountList();
......
...@@ -53,21 +53,11 @@ int main(int argc, char **argv) ...@@ -53,21 +53,11 @@ int main(int argc, char **argv)
//configuration dbus //configuration dbus
registerCommTypes(); registerCommTypes();
SFLPhone * fenetre = new SFLPhone();
if(!QFile(QDir::homePath() + CONFIG_FILE_PATH).exists())
{
(new AccountWizard())->show();
}
InstanceInterface & instance = InstanceInterfaceSingleton::getInstance(); InstanceInterface & instance = InstanceInterfaceSingleton::getInstance();
instance.Register(getpid(), APP_NAME); instance.Register(getpid(), APP_NAME);
SFLPhone * fenetre = new SFLPhone();
// ConfigurationDialogKDE * dlg = new ConfigurationDialogKDE(fenetre->getView());
// dlg->show();
return app.exec(); return app.exec();
} }
catch(const char * msg) catch(const char * msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment