From 033b458da94d66b75b70f54f74bba7e847e79347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Quentin?= <jquentin@jquentin-laptop-kub2.(none)> Date: Mon, 1 Jun 2009 10:35:40 -0400 Subject: [PATCH] [#1551] remove default mailbox number in wizard and disable mailbox button when first account doesn't have mailbox number [#1552] record icon on calls behaves an inverted way (active when not recording) [#1553] account up, down, add and remove buttons should enable Apply button --- sflphone-client-kde/src/AccountWizard.cpp | 2 +- sflphone-client-kde/src/Call.cpp | 5 +++-- sflphone-client-kde/src/ConfigDialog.cpp | 4 ++++ sflphone-client-kde/src/sflphone_kdeview.cpp | 13 ++----------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/sflphone-client-kde/src/AccountWizard.cpp b/sflphone-client-kde/src/AccountWizard.cpp index 4745593e5e..40285de366 100644 --- a/sflphone-client-kde/src/AccountWizard.cpp +++ b/sflphone-client-kde/src/AccountWizard.cpp @@ -233,7 +233,7 @@ void AccountWizard::accept() } if(createAccount) { - mailbox = ACCOUNT_MAILBOX_DEFAULT_VALUE; +// mailbox = ACCOUNT_MAILBOX_DEFAULT_VALUE; enabled = ACCOUNT_ENABLED_TRUE; ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); QString accountId = configurationManager.addAccount(accountDetails); diff --git a/sflphone-client-kde/src/Call.cpp b/sflphone-client-kde/src/Call.cpp index d7aacb2949..10c9aa2dd1 100644 --- a/sflphone-client-kde/src/Call.cpp +++ b/sflphone-client-kde/src/Call.cpp @@ -530,9 +530,10 @@ void Call::switchRecord() void Call::setRecord() { CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); - qDebug() << "Setting record for call. callId : " << callId; + qDebug() << "Setting record " << !recording << " for call. callId : " << callId; callManager.setRecording(callId); recording = !recording; + updateItem(); } void Call::start() @@ -622,7 +623,7 @@ void Call::updateItem() setItemIcon(ICON_CURRENT_REC); else { - QString str(callStateIcons[currentState]); + QString str = QString(callStateIcons[currentState]); setItemIcon(str); } bool transfer = currentState == CALL_STATE_TRANSFER || currentState == CALL_STATE_TRANSF_HOLD; diff --git a/sflphone-client-kde/src/ConfigDialog.cpp b/sflphone-client-kde/src/ConfigDialog.cpp index 0a51beea9f..773803df86 100644 --- a/sflphone-client-kde/src/ConfigDialog.cpp +++ b/sflphone-client-kde/src/ConfigDialog.cpp @@ -678,6 +678,7 @@ void ConfigurationDialog::on_button_accountUp_clicked() listWidget_accountList->insertItem(currentRow - 1 , item); listWidget_accountList->setItemWidget(item, widget); listWidget_accountList->setCurrentItem(item); + changedAccountList(); } void ConfigurationDialog::on_button_accountDown_clicked() @@ -694,6 +695,7 @@ void ConfigurationDialog::on_button_accountDown_clicked() listWidget_accountList->insertItem(currentRow + 1 , item); listWidget_accountList->setItemWidget(item, widget); listWidget_accountList->setCurrentItem(item); + changedAccountList(); } void ConfigurationDialog::on_button_accountAdd_clicked() @@ -708,6 +710,7 @@ void ConfigurationDialog::on_button_accountAdd_clicked() listWidget_accountList->setCurrentRow(r); frame2_editAccounts->setEnabled(true); } + changedAccountList(); } void ConfigurationDialog::on_button_accountRemove_clicked() @@ -717,6 +720,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(); } 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 46ce96c459..95ea9a1c40 100644 --- a/sflphone-client-kde/src/sflphone_kdeview.cpp +++ b/sflphone-client-kde/src/sflphone_kdeview.cpp @@ -159,23 +159,13 @@ void sflphone_kdeView::addCallToCallList(Call * call) void sflphone_kdeView::addCallToCallHistory(Call * call) { - qDebug() << "addCallToCallHistory1"; QListWidgetItem * item = call->getHistoryItem(); - qDebug() << "addCallToCallHistory2"; QWidget * widget = call->getHistoryItemWidget(); - qDebug() << "addCallToCallHistory3"; if(item && widget) { - qDebug() << "addCallToCallHistory4"; listWidget_callHistory->addItem(item); - qDebug() << "addCallToCallHistory5"; - qDebug() << "item = " << item; - qDebug() << "widget = " << widget; - qDebug() << "itemWidget(item) = " << listWidget_callHistory->itemWidget(item); listWidget_callHistory->setItemWidget(item, widget); - qDebug() << "addCallToCallHistory6"; } - qDebug() << "addCallToCallHistory7"; } void sflphone_kdeView::addContactToContactList(Contact * contact) @@ -417,7 +407,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(); if(stackedWidget_screen->currentWidget() == page_callList) { item = listWidget_callList->currentItem(); @@ -561,6 +551,7 @@ void sflphone_kdeView::updateWindowCallState() enabledActions[1] = true; } } + action_accept->setEnabled(enabledActions[0]); action_refuse->setEnabled(enabledActions[1]); action_hold->setEnabled(enabledActions[2]); -- GitLab