Commit 59951e2d authored by Emmanuel Lepage's avatar Emmanuel Lepage

Add support for some more advanced config options and add missing config dialog icons

parent 8f3bbf3c
...@@ -43,12 +43,12 @@ ConfigurationDialog::ConfigurationDialog(SFLPhoneView *parent) ...@@ -43,12 +43,12 @@ ConfigurationDialog::ConfigurationDialog(SFLPhoneView *parent)
dlgAddressBook = new DlgAddressBook(this); dlgAddressBook = new DlgAddressBook(this);
dlgHooks = new DlgHooks(this); dlgHooks = new DlgHooks(this);
addPage( dlgGeneral , i18n("General") , "sflphone-client-kde" ); addPage( dlgGeneral , i18n("General") , "sflphone-client-kde" );
addPage( dlgDisplay , i18n("Display") , "applications-graphics" ); addPage( dlgDisplay , i18n("Display") , "applications-graphics" );
addPage( dlgAccounts , i18n("Accounts") , "personal" ); addPage( dlgAccounts , i18n("Accounts") , "user-identity" );
addPage( dlgAudio , i18n("Audio") , "voicecall" ); addPage( dlgAudio , i18n("Audio") , "audio-headset" );
addPage( dlgAddressBook , i18n("Address Book") , "x-office-address-book" ); addPage( dlgAddressBook , i18n("Address Book") , "x-office-address-book" );
addPage( dlgHooks , i18n("Hooks") , "insert-link" ); addPage( dlgHooks , i18n("Hooks") , "insert-link" );
connect(this, SIGNAL(applyClicked()), this, SLOT(applyCustomSettings())); connect(this, SIGNAL(applyClicked()), this, SLOT(applyCustomSettings()));
connect(this, SIGNAL(okClicked()), this, SLOT(applyCustomSettings())); connect(this, SIGNAL(okClicked()), this, SLOT(applyCustomSettings()));
......
...@@ -41,7 +41,7 @@ DlgAccounts::DlgAccounts(KConfigDialog* parent) ...@@ -41,7 +41,7 @@ DlgAccounts::DlgAccounts(KConfigDialog* parent)
button_accountRemove->setIcon(KIcon("list-remove")); button_accountRemove->setIcon(KIcon("list-remove"));
accountList = new ConfigAccountList(false); accountList = new ConfigAccountList(false);
loadAccountList(); loadAccountList();
loadCodecList(); loadCodecList();
accountListHasChanged = false; accountListHasChanged = false;
//toolButton_accountsApply->setEnabled(false); //toolButton_accountsApply->setEnabled(false);
...@@ -59,6 +59,8 @@ DlgAccounts::DlgAccounts(KConfigDialog* parent) ...@@ -59,6 +59,8 @@ DlgAccounts::DlgAccounts(KConfigDialog* parent)
this, SLOT(changedAccountList())); this, SLOT(changedAccountList()));
connect(spinbox_regExpire, SIGNAL(editingFinished()), connect(spinbox_regExpire, SIGNAL(editingFinished()),
this, SLOT(changedAccountList())); this, SLOT(changedAccountList()));
connect(comboBox_ni_local_address, SIGNAL(currentIndexChanged (int)),
this, SLOT(changedAccountList()));
connect(checkBox_conformRFC, SIGNAL(clicked(bool)), connect(checkBox_conformRFC, SIGNAL(clicked(bool)),
this, SLOT(changedAccountList())); this, SLOT(changedAccountList()));
connect(button_accountUp, SIGNAL(clicked()), connect(button_accountUp, SIGNAL(clicked()),
...@@ -246,7 +248,7 @@ void DlgAccounts::saveAccount(QListWidgetItem * item) ...@@ -246,7 +248,7 @@ void DlgAccounts::saveAccount(QListWidgetItem * item)
account->setAccountDetail(ACCOUNT_SIP_STUN_SERVER, line_stun->text()); account->setAccountDetail(ACCOUNT_SIP_STUN_SERVER, line_stun->text());
account->setAccountDetail(PUBLISHED_SAMEAS_LOCAL, radioButton_pa_same_as_local->isChecked()?"true":"false"); account->setAccountDetail(PUBLISHED_SAMEAS_LOCAL, radioButton_pa_same_as_local->isChecked()?"true":"false");
//account->setAccountDetail(PUBLISHED_PORT, spinBox_pa_published_port->value()); //TODO fix account->setAccountDetail(PUBLISHED_PORT, QString::number(spinBox_pa_published_port->value()));
account->setAccountDetail(PUBLISHED_ADDRESS, lineEdit_pa_published_address ->text()); account->setAccountDetail(PUBLISHED_ADDRESS, lineEdit_pa_published_address ->text());
account->setAccountDetail(LOCAL_PORT,QString::number(spinBox_pa_published_port->value())); account->setAccountDetail(LOCAL_PORT,QString::number(spinBox_pa_published_port->value()));
...@@ -370,15 +372,20 @@ void DlgAccounts::loadAccount(QListWidgetItem * item) ...@@ -370,15 +372,20 @@ void DlgAccounts::loadAccount(QListWidgetItem * item)
radioButton_pa_same_as_local->setChecked((account->getAccountDetail(PUBLISHED_SAMEAS_LOCAL) == "true")?1:0); radioButton_pa_same_as_local->setChecked((account->getAccountDetail(PUBLISHED_SAMEAS_LOCAL) == "true")?1:0);
radioButton_pa_custom->setChecked((account->getAccountDetail(PUBLISHED_SAMEAS_LOCAL) == "true")?1:0); radioButton_pa_custom->setChecked((account->getAccountDetail(PUBLISHED_SAMEAS_LOCAL) == "true")?1:0);
//spinBox_pa_published_port->setValue(account->getAccountDetail(PUBLISHED_PORT)); //TODO fix spinBox_pa_published_port->setValue(account->getAccountDetail(PUBLISHED_PORT).toUInt()); //TODO fix
lineEdit_pa_published_address->setText(account->getAccountDetail(PUBLISHED_ADDRESS)); lineEdit_pa_published_address->setText(account->getAccountDetail(PUBLISHED_ADDRESS));
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
comboBox_ni_local_address->clear();
QStringList interfaceList = configurationManager.getAllIpInterfaceByName();
comboBox_ni_local_address->addItems(interfaceList);
spinBox_pa_published_port->setValue(account->getAccountDetail(LOCAL_PORT).toInt()); spinBox_pa_published_port->setValue(account->getAccountDetail(LOCAL_PORT).toInt());
//comboBox_ni_local_address->setCurentText(account->getAccountDetail(LOCAL_INTERFACE)); //TODO need to load the list first comboBox_ni_local_address->setCurrentIndex(comboBox_ni_local_address->findText(account->getAccountDetail(LOCAL_INTERFACE))); //TODO need to load the list first
keditlistbox_codec->clear();
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
QStringList activeCodecList = configurationManager.getActiveAudioCodecList(account->getAccountDetail(ACCOUNT_ID)); QStringList activeCodecList = configurationManager.getActiveAudioCodecList(account->getAccountDetail(ACCOUNT_ID));
keditlistbox_codec->clear();
qDebug() << "Active codecs" << activeCodecList; qDebug() << "Active codecs" << activeCodecList;
foreach (QString aCodec, activeCodecList) { foreach (QString aCodec, activeCodecList) {
foreach (StringHash _aCodec, codecList) { foreach (StringHash _aCodec, codecList) {
......
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