Revision
16411
Author
jmesquita
Date
2010-01-19 17:54:32 -0600 (Tue, 19 Jan 2010)

Log Message

Fix a bug where we were setting default settings no matter what and do some minor UI enhancements.

Modified Paths

Diff

Modified: freeswitch/trunk/fscomm/fshost.cpp (16410 => 16411)


--- freeswitch/trunk/fscomm/fshost.cpp	2010-01-19 18:54:33 UTC (rev 16410)
+++ freeswitch/trunk/fscomm/fshost.cpp	2010-01-19 23:54:32 UTC (rev 16411)
@@ -366,7 +366,7 @@
             }
             else
             {
-                //qDebug() << QString("We got a not treated custom event: %1\n").arg(!zstr(event->subclass_name) ? event->subclass_name : "NULL"));
+                printEventHeaders(event);
             }
             break;
         }

Modified: freeswitch/trunk/fscomm/main.cpp (16410 => 16411)


--- freeswitch/trunk/fscomm/main.cpp	2010-01-19 18:54:33 UTC (rev 16410)
+++ freeswitch/trunk/fscomm/main.cpp	2010-01-19 23:54:32 UTC (rev 16411)
@@ -46,7 +46,6 @@
     QObject::connect(&g_FSHost, SIGNAL(ready()), splash, SLOT(close()));
     MainWindow w;    
     QObject::connect(&g_FSHost, SIGNAL(ready()), &w, SLOT(show()));
-    QObject::connect(&g_FSHost, SIGNAL(ready()), &w, SLOT(print()));
     g_FSHost.start();
     return a.exec();
 }

Modified: freeswitch/trunk/fscomm/mainwindow.cpp (16410 => 16411)


--- freeswitch/trunk/fscomm/mainwindow.cpp	2010-01-19 18:54:33 UTC (rev 16410)
+++ freeswitch/trunk/fscomm/mainwindow.cpp	2010-01-19 23:54:32 UTC (rev 16411)
@@ -98,6 +98,9 @@
     /* Set the context menus */
     ui->tableAccounts->addAction(ui->actionSetDefaultAccount);
 
+    /* Set other properties */
+    ui->tableAccounts->horizontalHeader()->setStretchLastSection(true);
+
 }
 
 MainWindow::~MainWindow()

Modified: freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp (16410 => 16411)


--- freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp	2010-01-19 18:54:33 UTC (rev 16410)
+++ freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp	2010-01-19 23:54:32 UTC (rev 16411)
@@ -180,8 +180,13 @@
     switch_xml_free(xml);
 
     QSettings settings;
-    if (!settings.allKeys().contains("FreeSWITCH/conf"))
+    settings.beginGroup("FreeSWITCH/conf");
+    if (settings.childGroups().isEmpty())
+    {
+        qDebug() << "We are settings default.";
         setQSettingsDefaults();
+    }
+    settings.endGroup();
     setGlobals();
 
     return SWITCH_STATUS_SUCCESS;

Modified: freeswitch/trunk/fscomm/preferences/accountdialog.cpp (16410 => 16411)


--- freeswitch/trunk/fscomm/preferences/accountdialog.cpp	2010-01-19 18:54:33 UTC (rev 16410)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.cpp	2010-01-19 23:54:32 UTC (rev 16411)
@@ -14,6 +14,8 @@
     connect(this, SIGNAL(accepted()), this, SLOT(writeConfig()));
     connect(ui->sofiaExtraParamAddBtn, SIGNAL(clicked()), this, SLOT(addExtraParam()));
     connect(ui->sofiaExtraParamRemBtn, SIGNAL(clicked()), this, SLOT(remExtraParam()));
+
+    ui->sofiaExtraParamTable->horizontalHeader()->setStretchLastSection(true);
 }
 
 AccountDialog::~AccountDialog()
@@ -55,6 +57,9 @@
     ui->sofiaExtraParamTable->setRowCount(ui->sofiaExtraParamTable->rowCount()+1);
     ui->sofiaExtraParamTable->setItem(ui->sofiaExtraParamTable->rowCount()-1,0,paramNameItem);
     ui->sofiaExtraParamTable->setItem(ui->sofiaExtraParamTable->rowCount()-1,1,paramValItem);
+    ui->sofiaExtraParamTable->resizeColumnsToContents();
+    ui->sofiaExtraParamTable->resizeRowsToContents();
+    ui->sofiaExtraParamTable->horizontalHeader()->setStretchLastSection(true);
 }
 
 void AccountDialog::readConfig()
@@ -95,6 +100,10 @@
 
     _settings->endGroup();
     _settings->endGroup();
+
+    ui->sofiaExtraParamTable->resizeColumnsToContents();
+    ui->sofiaExtraParamTable->resizeRowsToContents();
+    ui->sofiaExtraParamTable->horizontalHeader()->setStretchLastSection(true);
 }
 
 void AccountDialog::writeConfig()

Modified: freeswitch/trunk/fscomm/preferences/prefaccounts.cpp (16410 => 16411)


--- freeswitch/trunk/fscomm/preferences/prefaccounts.cpp	2010-01-19 18:54:33 UTC (rev 16410)
+++ freeswitch/trunk/fscomm/preferences/prefaccounts.cpp	2010-01-19 23:54:32 UTC (rev 16411)
@@ -11,6 +11,8 @@
     connect(_ui->sofiaGwAddBtn, SIGNAL(clicked()), this, SLOT(addAccountBtnClicked()));
     connect(_ui->sofiaGwRemBtn, SIGNAL(clicked()), this, SLOT(remAccountBtnClicked()));
     connect(_ui->sofiaGwEditBtn, SIGNAL(clicked()), this, SLOT(editAccountBtnClicked()));
+
+    _ui->accountsTable->horizontalHeader()->setStretchLastSection(true);
 }
 
 void PrefAccounts::addAccountBtnClicked()
@@ -131,6 +133,9 @@
         _ui->accountsTable->setItem(_ui->accountsTable->rowCount()-1, 0, item0);
         _ui->accountsTable->setItem(_ui->accountsTable->rowCount()-1, 1, item1);
     }
+    _ui->accountsTable->resizeRowsToContents();
+    _ui->accountsTable->resizeColumnsToContents();
+    _ui->accountsTable->horizontalHeader()->setStretchLastSection(true);
 
     _settings->endGroup();