Modified: freeswitch/trunk/fscomm/mainwindow.cpp (16506 => 16507)
--- freeswitch/trunk/fscomm/mainwindow.cpp 2010-01-24 21:12:04 UTC (rev 16506)
+++ freeswitch/trunk/fscomm/mainwindow.cpp 2010-01-25 06:18:35 UTC (rev 16507)
@@ -168,7 +168,6 @@
void MainWindow::accountAdd(QSharedPointer<Account> 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::accountDel(QSharedPointer<Account> acc)
{
- qDebug() << "Deleting: " << acc.data()->getName();
foreach (QTableWidgetItem *i, ui->tableAccounts->findItems(acc.data()->getName(), Qt::MatchExactly))
{
if (i->text() == acc.data()->getName())
Modified: freeswitch/trunk/fscomm/preferences/accountdialog.cpp (16506 => 16507)
--- freeswitch/trunk/fscomm/preferences/accountdialog.cpp 2010-01-24 21:12:04 UTC (rev 16506)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.cpp 2010-01-25 06:18:35 UTC (rev 16507)
@@ -8,14 +8,18 @@
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 @@
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<QTableWidgetSelectionRange> sel = ui->sofiaExtraParamTable->selectedRanges();
@@ -75,7 +96,6 @@
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 @@
_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 @@
ui->sofiaGwUsernameEdit->clear();
ui->sofiaGwRealmEdit->clear();
ui->sofiaGwPasswordEdit->clear();
- ui->sofiaGwExtensionEdit->clear();
ui->sofiaGwExpireSecondsSpin->setValue(60);
ui->sofiaGwRegisterCombo->setCurrentIndex(0);
ui->sofiaGwRegisterTransportCombo->setCurrentIndex(0);
Modified: freeswitch/trunk/fscomm/preferences/accountdialog.h (16506 => 16507)
--- freeswitch/trunk/fscomm/preferences/accountdialog.h 2010-01-24 21:12:04 UTC (rev 16506)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.h 2010-01-25 06:18:35 UTC (rev 16507)
@@ -25,6 +25,8 @@
void writeConfig();
void addExtraParam();
void remExtraParam();
+ void codecSettingsComboChanged(int);
+ void clidSettingsComboChanged(int);
protected:
void changeEvent(QEvent *e);
Modified: freeswitch/trunk/fscomm/preferences/accountdialog.ui (16506 => 16507)
--- freeswitch/trunk/fscomm/preferences/accountdialog.ui 2010-01-24 21:12:04 UTC (rev 16506)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.ui 2010-01-25 06:18:35 UTC (rev 16507)
@@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>389</width>
- <height>394</height>
+ <height>427</height>
</rect>
</property>
<property name="windowTitle">
@@ -33,7 +33,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
- <string>name</string>
+ <string>Account Name</string>
</property>
</widget>
</item>
@@ -43,7 +43,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
- <string>username</string>
+ <string>Usernane</string>
</property>
</widget>
</item>
@@ -53,7 +53,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
- <string>realm</string>
+ <string>Domain</string>
</property>
</widget>
</item>
@@ -63,46 +63,49 @@
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
- <string>password</string>
+ <string>Password</string>
</property>
</widget>
</item>
<item row="3" column="1">
- <widget class="QLineEdit" name="sofiaGwPasswordEdit"/>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>extension</string>
+ <widget class="QLineEdit" name="sofiaGwPasswordEdit">
+ <property name="toolTip">
+ <string>Account password </string>
</property>
+ <property name="echoMode">
+ <enum>QLineEdit::Password</enum>
+ </property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="QLineEdit" name="sofiaGwExtensionEdit"/>
- </item>
- <item row="5" column="0">
+ <item row="4" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
- <string>expire-seconds</string>
+ <string>Expire</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="4" column="1">
<widget class="QSpinBox" name="sofiaGwExpireSecondsSpin">
+ <property name="toolTip">
+ <string>Seconds before account expires</string>
+ </property>
<property name="value">
<number>60</number>
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="5" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
- <string>register</string>
+ <string>Register</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="5" column="1">
<widget class="QComboBox" name="sofiaGwRegisterCombo">
+ <property name="toolTip">
+ <string>Account must register or must not register</string>
+ </property>
<item>
<property name="text">
<string>true</string>
@@ -115,15 +118,18 @@
</item>
</widget>
</item>
- <item row="7" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
- <string>register-transport</string>
+ <string>Transport</string>
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="6" column="1">
<widget class="QComboBox" name="sofiaGwRegisterTransportCombo">
+ <property name="toolTip">
+ <string>What transport to use for this account</string>
+ </property>
<item>
<property name="text">
<string>udp</string>
@@ -136,22 +142,105 @@
</item>
</widget>
</item>
- <item row="8" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
- <string>retry-seconds</string>
+ <string>Retry</string>
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="7" column="1">
<widget class="QSpinBox" name="sofiaGwRetrySecondsSpin">
+ <property name="toolTip">
+ <string>How many seconds to retry registration</string>
+ </property>
<property name="value">
<number>30</number>
</property>
</widget>
</item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Codec Settings</string>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>CallerID Settings</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QComboBox" name="codecSettingsCombo">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <item>
+ <property name="text">
+ <string>Global</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Custom</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="9" column="1">
+ <widget class="QComboBox" name="clidSettingsCombo">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <item>
+ <property name="text">
+ <string>Global</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Custom</string>
+ </property>
+ </item>
+ </widget>
+ </item>
</layout>
</widget>
+ <widget class="QWidget" name="codecPage">
+ <attribute name="title">
+ <string>Codecs</string>
+ </attribute>
+ </widget>
+ <widget class="QWidget" name="clidPage">
+ <attribute name="title">
+ <string>CallerID</string>
+ </attribute>
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>CallerID Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="sofiaCallerIDName"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>CallerID Number:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="sofiaCallerIDNum"/>
+ </item>
+ </layout>
+ </widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Advanced</string>
@@ -230,8 +319,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
- <x>257</x>
- <y>563</y>
+ <x>266</x>
+ <y>417</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
@@ -246,8 +335,8 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
- <x>325</x>
- <y>563</y>
+ <x>334</x>
+ <y>417</y>
</hint>
<hint type="destinationlabel">
<x>286</x>