diff --git a/fscomm/mainwindow.cpp b/fscomm/mainwindow.cpp index 3ff3b4f695..10544f2686 100644 --- a/fscomm/mainwindow.cpp +++ b/fscomm/mainwindow.cpp @@ -168,7 +168,6 @@ void MainWindow::coreLoadingError(QString err) void MainWindow::accountAdd(QSharedPointer acc) { - qDebug() << "Adding: " << acc.data()->getName(); ui->tableAccounts->setRowCount(ui->tableAccounts->rowCount()+1); QTableWidgetItem *gwField = new QTableWidgetItem(acc.data()->getName()); QTableWidgetItem *stField = new QTableWidgetItem(acc.data()->getStateName()); @@ -181,7 +180,6 @@ void MainWindow::accountAdd(QSharedPointer acc) void MainWindow::accountDel(QSharedPointer acc) { - qDebug() << "Deleting: " << acc.data()->getName(); foreach (QTableWidgetItem *i, ui->tableAccounts->findItems(acc.data()->getName(), Qt::MatchExactly)) { if (i->text() == acc.data()->getName()) diff --git a/fscomm/preferences/accountdialog.cpp b/fscomm/preferences/accountdialog.cpp index 1d0783881a..7470c5e324 100644 --- a/fscomm/preferences/accountdialog.cpp +++ b/fscomm/preferences/accountdialog.cpp @@ -8,14 +8,18 @@ AccountDialog::AccountDialog(QString accId, QWidget *parent) : QDialog(parent), _accId(accId), ui(new Ui::AccountDialog) -{ +{ ui->setupUi(this); _settings = new QSettings; connect(this, SIGNAL(accepted()), this, SLOT(writeConfig())); connect(ui->sofiaExtraParamAddBtn, SIGNAL(clicked()), this, SLOT(addExtraParam())); connect(ui->sofiaExtraParamRemBtn, SIGNAL(clicked()), this, SLOT(remExtraParam())); + connect(ui->clidSettingsCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(clidSettingsComboChanged(int))); + connect(ui->codecSettingsCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(codecSettingsComboChanged(int))); ui->sofiaExtraParamTable->horizontalHeader()->setStretchLastSection(true); + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->codecPage)); + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->clidPage)); } AccountDialog::~AccountDialog() @@ -23,6 +27,23 @@ AccountDialog::~AccountDialog() delete ui; } +void AccountDialog::codecSettingsComboChanged(int index) +{ + if (index == 0) + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->codecPage)); + else + ui->tabWidget->insertTab(1,ui->codecPage,tr("Codecs")); + +} + +void AccountDialog::clidSettingsComboChanged(int index) +{ + if (index == 0) + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->clidPage)); + else + ui->tabWidget->insertTab(1,ui->clidPage,tr("Caller ID")); +} + void AccountDialog::remExtraParam() { QList sel = ui->sofiaExtraParamTable->selectedRanges(); @@ -75,7 +96,6 @@ void AccountDialog::readConfig() ui->sofiaGwUsernameEdit->setText(_settings->value("username").toString()); ui->sofiaGwRealmEdit->setText(_settings->value("realm").toString()); ui->sofiaGwPasswordEdit->setText(_settings->value("password").toString()); - ui->sofiaGwExtensionEdit->setText(_settings->value("extension").toString()); ui->sofiaGwExpireSecondsSpin->setValue(_settings->value("expire-seconds").toInt()); ui->sofiaGwRegisterCombo->setCurrentIndex(ui->sofiaGwRegisterCombo->findText(_settings->value("register").toString(), Qt::MatchExactly)); @@ -127,7 +147,6 @@ void AccountDialog::writeConfig() _settings->setValue("username", ui->sofiaGwUsernameEdit->text()); _settings->setValue("realm", ui->sofiaGwRealmEdit->text()); _settings->setValue("password", ui->sofiaGwPasswordEdit->text()); - _settings->setValue("extension", ui->sofiaGwExtensionEdit->text()); _settings->setValue("expire-seconds", ui->sofiaGwExpireSecondsSpin->value()); _settings->setValue("register", ui->sofiaGwRegisterCombo->currentText()); _settings->setValue("register-transport", ui->sofiaGwRegisterTransportCombo->currentText()); @@ -158,7 +177,6 @@ void AccountDialog::clear() ui->sofiaGwUsernameEdit->clear(); ui->sofiaGwRealmEdit->clear(); ui->sofiaGwPasswordEdit->clear(); - ui->sofiaGwExtensionEdit->clear(); ui->sofiaGwExpireSecondsSpin->setValue(60); ui->sofiaGwRegisterCombo->setCurrentIndex(0); ui->sofiaGwRegisterTransportCombo->setCurrentIndex(0); diff --git a/fscomm/preferences/accountdialog.h b/fscomm/preferences/accountdialog.h index 9be1b6e26f..40831f56b6 100644 --- a/fscomm/preferences/accountdialog.h +++ b/fscomm/preferences/accountdialog.h @@ -25,6 +25,8 @@ private slots: void writeConfig(); void addExtraParam(); void remExtraParam(); + void codecSettingsComboChanged(int); + void clidSettingsComboChanged(int); protected: void changeEvent(QEvent *e); diff --git a/fscomm/preferences/accountdialog.ui b/fscomm/preferences/accountdialog.ui index 9323f68993..309102a821 100644 --- a/fscomm/preferences/accountdialog.ui +++ b/fscomm/preferences/accountdialog.ui @@ -10,7 +10,7 @@ 0 0 389 - 394 + 427 @@ -33,7 +33,7 @@ - name + Account Name @@ -43,7 +43,7 @@ - username + Usernane @@ -53,7 +53,7 @@ - realm + Domain @@ -63,46 +63,49 @@ - password + Password - + + + Account password + + + QLineEdit::Password + + - + - extension + Expire - - - - - - expire-seconds - - - - + + Seconds before account expires + 60 - + - register + Register - + + + Account must register or must not register + true @@ -115,15 +118,18 @@ - + - register-transport + Transport - + + + What transport to use for this account + udp @@ -136,20 +142,103 @@ - + - retry-seconds + Retry - + + + How many seconds to retry registration + 30 + + + + Codec Settings + + + + + + + CallerID Settings + + + + + + + false + + + + Global + + + + + Custom + + + + + + + + false + + + + Global + + + + + Custom + + + + + + + + + Codecs + + + + + CallerID + + + + + + CallerID Name: + + + + + + + + + + CallerID Number: + + + + + + @@ -230,8 +319,8 @@ accept() - 257 - 563 + 266 + 417 157 @@ -246,8 +335,8 @@ reject() - 325 - 563 + 334 + 417 286