diff --git a/sflphone-client-kde/src/ConfigDialog.cpp b/sflphone-client-kde/src/ConfigDialog.cpp index 0721c809f5ece8a0c6cead28c32eaaba05497f45..308576a75a62ffaa6b5451ac54407e7567f75bbf 100644 --- a/sflphone-client-kde/src/ConfigDialog.cpp +++ b/sflphone-client-kde/src/ConfigDialog.cpp @@ -70,17 +70,17 @@ ConfigurationDialog::ConfigurationDialog(sflphone_kdeView *parent) : QDialog(par connect(&configurationManager, SIGNAL(accountsChanged()), this, SLOT(on1_accountsChanged())); - connect(edit1_alias, SIGNAL(textChanged(const QString &)), + connect(edit1_alias, SIGNAL(textEdited(const QString &)), this, SLOT(changedAccountList())); connect(edit2_protocol, SIGNAL(currentIndexChanged(int)), this, SLOT(changedAccountList())); - connect(edit3_server, SIGNAL(textChanged(const QString &)), + connect(edit3_server, SIGNAL(textEdited(const QString &)), this, SLOT(changedAccountList())); - connect(edit4_user, SIGNAL(textChanged(const QString &)), + connect(edit4_user, SIGNAL(textEdited(const QString &)), this, SLOT(changedAccountList())); - connect(edit5_password, SIGNAL(textChanged(const QString &)), + connect(edit5_password, SIGNAL(textEdited(const QString &)), this, SLOT(changedAccountList())); - connect(edit6_mailbox, SIGNAL(textChanged(const QString &)), + connect(edit6_mailbox, SIGNAL(textEdited(const QString &)), this, SLOT(changedAccountList())); connect(button_accountUp, SIGNAL(clicked()), this, SLOT(changedAccountList())); @@ -683,7 +683,7 @@ void ConfigurationDialog::on_button_accountUp_clicked() listWidget_accountList->insertItem(currentRow - 1 , item); listWidget_accountList->setItemWidget(item, widget); listWidget_accountList->setCurrentItem(item); - changedAccountList(); +// changedAccountList(); } void ConfigurationDialog::on_button_accountDown_clicked() @@ -700,7 +700,7 @@ void ConfigurationDialog::on_button_accountDown_clicked() listWidget_accountList->insertItem(currentRow + 1 , item); listWidget_accountList->setItemWidget(item, widget); listWidget_accountList->setCurrentItem(item); - changedAccountList(); +// changedAccountList(); } void ConfigurationDialog::on_button_accountAdd_clicked() @@ -715,7 +715,7 @@ void ConfigurationDialog::on_button_accountAdd_clicked() listWidget_accountList->setCurrentRow(r); frame2_editAccounts->setEnabled(true); } - changedAccountList(); +// changedAccountList(); } void ConfigurationDialog::on_button_accountRemove_clicked() @@ -725,7 +725,7 @@ void ConfigurationDialog::on_button_accountRemove_clicked() QListWidgetItem * item = listWidget_accountList->takeItem(r); accountList->removeAccount(item); listWidget_accountList->setCurrentRow( (r >= listWidget_accountList->count()) ? r-1 : r ); - changedAccountList(); +// changedAccountList(); } void ConfigurationDialog::on_toolButton_accountsApply_clicked() diff --git a/sflphone-client-kde/src/sflphone_kdeview.cpp b/sflphone-client-kde/src/sflphone_kdeview.cpp index 4b697a15f295c3f5404b09032c78cfd152aaf103..221756b90598860f4c866282205b0e5cba7088fb 100644 --- a/sflphone-client-kde/src/sflphone_kdeview.cpp +++ b/sflphone-client-kde/src/sflphone_kdeview.cpp @@ -147,7 +147,6 @@ void sflphone_kdeView::loadWindow() updateVolumeControls(); updateDialpad(); updateSearchHistory(); - updateSearchAddressBook(); } QString sflphone_kdeView::firstAccountId() @@ -461,7 +460,7 @@ void sflphone_kdeView::updateWindowCallState() bool recordActivated = false; //tells whether the call can be recorded in the state it is right now bool recordEnabled = false; - enabledActions[5] = ! firstRegisteredAccount()->getAccountDetail(ACCOUNT_MAILBOX).isEmpty(); + enabledActions[5] = firstRegisteredAccount() && ! firstRegisteredAccount()->getAccountDetail(ACCOUNT_MAILBOX).isEmpty(); if(stackedWidget_screen->currentWidget() == page_callList) { item = listWidget_callList->currentItem(); @@ -634,11 +633,6 @@ void sflphone_kdeView::updateSearchHistory() lineEdit_searchHistory->setVisible(!lineEdit_searchHistory->text().isEmpty()); } -void sflphone_kdeView::updateSearchAddressBook() -{ - qDebug() << "updateAddressBookSearch"; - lineEdit_addressBook->setVisible(!lineEdit_addressBook->text().isEmpty()); -} void sflphone_kdeView::updateCallHistory() { @@ -912,7 +906,6 @@ void sflphone_kdeView::on_lineEdit_searchHistory_textChanged() void sflphone_kdeView::on_lineEdit_addressBook_textChanged() { qDebug() << "on_lineEdit_addressBook_textEdited"; - updateSearchAddressBook(); updateAddressBook(); updateWindowCallState(); } @@ -1331,9 +1324,10 @@ void sflphone_kdeView::on_action_addressBook_triggered(bool checked) { if(checked == true) { - action_history->setChecked(false); stackedWidget_screen->setCurrentWidget(page_addressBook); + if(lineEdit_addressBook->text().isEmpty()) + { lineEdit_addressBook->setFocus(Qt::OtherFocusReason); } } else { diff --git a/sflphone-client-kde/src/sflphone_kdeview.h b/sflphone-client-kde/src/sflphone_kdeview.h index 9c92eb67a08572f33d6708ad83204aa216a4930f..eb3f9651acd89bd83bbb4e67d8c32b3739cfd02d 100644 --- a/sflphone-client-kde/src/sflphone_kdeview.h +++ b/sflphone-client-kde/src/sflphone_kdeview.h @@ -117,7 +117,6 @@ private slots: void updateCallItem(Call * call); void updateWindowCallState(); void updateSearchHistory(); - void updateSearchAddressBook(); void updateCallHistory(); void updateAddressBook(); void updateRecordButton();