Commit 24c90366 authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

[ #13801 ] Fix about 200 Krazy2 notification/warning/comments

parent 3a099cd3
...@@ -229,7 +229,7 @@ bool ManagerImpl::outgoingCall(const std::string& account_id, ...@@ -229,7 +229,7 @@ bool ManagerImpl::outgoingCall(const std::string& account_id,
if (hasCurrentCall()) { if (hasCurrentCall()) {
DEBUG("Has current call (%s) put it onhold", current_call_id.c_str()); DEBUG("Has current call (%s) put it onhold", current_call_id.c_str());
// if this is not a conferenceand this and is not a conference participant // if this is not a conference and this and is not a conference participant
if (not isConference(current_call_id) and not isConferenceParticipant(current_call_id)) if (not isConference(current_call_id) and not isConferenceParticipant(current_call_id))
onHoldCall(current_call_id); onHoldCall(current_call_id);
else if (isConference(current_call_id) and not isConferenceParticipant(call_id)) else if (isConference(current_call_id) and not isConferenceParticipant(call_id))
...@@ -474,12 +474,12 @@ void ManagerImpl::offHoldCall(const std::string& callId) ...@@ -474,12 +474,12 @@ void ManagerImpl::offHoldCall(const std::string& callId)
std::string currentCallId(getCurrentCallId()); std::string currentCallId(getCurrentCallId());
//Place current call on hold if it isn't //Place current call on hold if it isn't
if (hasCurrentCall()) { if (hasCurrentCall()) {
if (not currentCallId.empty() and not isConference(currentCallId) and not isConferenceParticipant(currentCallId)) {
if (not isConference(currentCallId) and not isConferenceParticipant(currentCallId)) {
DEBUG("Has current call (%s), put on hold", currentCallId.c_str()); DEBUG("Has current call (%s), put on hold", currentCallId.c_str());
onHoldCall(currentCallId); onHoldCall(currentCallId);
} else if (isConference(currentCallId) && callId != currentCallId) {
holdConference(currentCallId);
} else if (isConference(currentCallId) and not isConferenceParticipant(callId)) } else if (isConference(currentCallId) and not isConferenceParticipant(callId))
detachParticipant(MainBuffer::DEFAULT_ID, currentCallId); detachParticipant(MainBuffer::DEFAULT_ID, currentCallId);
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
**************************************************************************/ **************************************************************************/
#include "AccountWizard.h"
//Unix //Unix
#include <unistd.h> #include <unistd.h>
...@@ -36,7 +37,6 @@ ...@@ -36,7 +37,6 @@
#include <KDebug> #include <KDebug>
//SFLphone //SFLphone
#include "AccountWizard.h"
#include "lib/sflphone_const.h" #include "lib/sflphone_const.h"
#include "lib/configurationmanager_interface_singleton.h" #include "lib/configurationmanager_interface_singleton.h"
...@@ -153,7 +153,7 @@ rest_account get_rest_account(QString host, QString email) ...@@ -153,7 +153,7 @@ rest_account get_rest_account(QString host, QString email)
kDebug() << "HOST: " << host; kDebug() << "HOST: " << host;
int res = sendRequest(host, 80, req, ret); int res = sendRequest(host, 80, req, ret);
if (res != -1) { if (res != -1) {
QStringList list = ret.split("\n"); QStringList list = ret.split('\n');
ra.user = list[0]; ra.user = list[0];
ra.passwd = list[1];\ ra.passwd = list[1];\
ra.success = true; ra.success = true;
...@@ -240,8 +240,8 @@ void AccountWizard::accept() ...@@ -240,8 +240,8 @@ void AccountWizard::accept()
rest_account acc = get_rest_account(SFL_ACCOUNT_HOST, charEmailAddress); rest_account acc = get_rest_account(SFL_ACCOUNT_HOST, charEmailAddress);
if(acc.success) { if(acc.success) {
ret += i18n("This assistant is now finished.") + "\n"; ret += i18n("This assistant is now finished.") + '\n';
field( FIELD_SIP_ALIAS ) = QString( acc.user) + "@" + SFL_ACCOUNT_HOST; field( FIELD_SIP_ALIAS ) = QString( acc.user) + '@' + SFL_ACCOUNT_HOST;
field( FIELD_SIP_VOICEMAIL ) = QString( ); field( FIELD_SIP_VOICEMAIL ) = QString( );
field( FIELD_SIP_SERVER ) = QString( SFL_ACCOUNT_HOST ); field( FIELD_SIP_SERVER ) = QString( SFL_ACCOUNT_HOST );
field( FIELD_SIP_PASSWORD ) = QString( acc.passwd ); field( FIELD_SIP_PASSWORD ) = QString( acc.passwd );
...@@ -262,7 +262,7 @@ void AccountWizard::accept() ...@@ -262,7 +262,7 @@ void AccountWizard::accept()
} }
} }
else if(field(FIELD_SIP_ACCOUNT).toBool()) { //sip else if(field(FIELD_SIP_ACCOUNT).toBool()) { //sip
ret += i18n("This assistant is now finished.") + "\n"; ret += i18n("This assistant is now finished.") + '\n';
alias = field ( FIELD_SIP_ALIAS ).toString(); alias = field ( FIELD_SIP_ALIAS ).toString();
enabled = QString ( REGISTRATION_ENABLED_TRUE ) ; enabled = QString ( REGISTRATION_ENABLED_TRUE ) ;
...@@ -277,7 +277,7 @@ void AccountWizard::accept() ...@@ -277,7 +277,7 @@ void AccountWizard::accept()
} }
else { // iax else { // iax
ret += i18n("This assistant is now finished.") + "\n"; ret += i18n("This assistant is now finished.") + '\n';
alias = field ( FIELD_IAX_ALIAS ).toString(); alias = field ( FIELD_IAX_ALIAS ).toString();
enabled = QString ( REGISTRATION_ENABLED_TRUE ) ; enabled = QString ( REGISTRATION_ENABLED_TRUE ) ;
...@@ -317,12 +317,12 @@ void AccountWizard::accept() ...@@ -317,12 +317,12 @@ void AccountWizard::accept()
locale_interface = ifaceList.at(0); locale_interface = ifaceList.at(0);
published_address = ifaceList.at(0); published_address = ifaceList.at(0);
ret += i18n( "Alias" ) + " : " + alias + "\n"; ret += i18n( "Alias" ) + " : " + alias + '\n';
ret += i18n( "Server" ) + " : " + server + "\n"; ret += i18n( "Server" ) + " : " + server + '\n';
ret += i18n( "Username" ) + " : " + user + "\n"; ret += i18n( "Password" ) + " : " + password + '\n';
ret += i18n( "Password" ) + " : " + password + "\n"; ret += i18n( "Protocol" ) + " : " + protocol + '\n';
ret += i18n( "Protocol" ) + " : " + protocol + "\n"; ret += i18n( "Voicemail number" ) + " : " + mailbox + '\n';
ret += i18n( "Voicemail number" ) + " : " + mailbox + "\n"; ret += i18nc( "SIP Account username","Username" ) + " : " + user + '\n';
} }
if(is_create_account) { if(is_create_account) {
...@@ -507,10 +507,10 @@ WizardAccountSIPFormPage::WizardAccountSIPFormPage(QWidget *parent) ...@@ -507,10 +507,10 @@ WizardAccountSIPFormPage::WizardAccountSIPFormPage(QWidget *parent)
label_alias = new QLabel( i18n( "Alias" ) + " *" ); label_alias = new QLabel( i18n( "Alias" ) + " *" );
label_server = new QLabel( i18n( "Server" ) + " *" ); label_server = new QLabel( i18n( "Server" ) + " *" );
label_user = new QLabel( i18n( "Username" ) + " *" );
label_password = new QLabel( i18n( "Password" ) + " *" ); label_password = new QLabel( i18n( "Password" ) + " *" );
label_voicemail = new QLabel( i18n( "Voicemail number" ) ); label_voicemail = new QLabel( i18n( "Voicemail number" ) );
label_enableZrtp = new QLabel( i18n( "Secure with ZRTP" ) ); label_enableZrtp = new QLabel( i18n( "Secure with ZRTP" ) );
label_user = new QLabel( i18nc( "SIP Account Username","Username") + " *" );
lineEdit_alias = new QLineEdit; lineEdit_alias = new QLineEdit;
lineEdit_server = new QLineEdit; lineEdit_server = new QLineEdit;
...@@ -521,10 +521,10 @@ WizardAccountSIPFormPage::WizardAccountSIPFormPage(QWidget *parent) ...@@ -521,10 +521,10 @@ WizardAccountSIPFormPage::WizardAccountSIPFormPage(QWidget *parent)
lineEdit_password->setEchoMode(QLineEdit::Password); lineEdit_password->setEchoMode(QLineEdit::Password);
registerField(QString( FIELD_SIP_ALIAS) + "*" , lineEdit_alias ); registerField(QString( FIELD_SIP_ALIAS) + '*' , lineEdit_alias );
registerField(QString( FIELD_SIP_SERVER) + "*" , lineEdit_server ); registerField(QString( FIELD_SIP_SERVER) + '*' , lineEdit_server );
registerField(QString( FIELD_SIP_USER) + "*" , lineEdit_user ); registerField(QString( FIELD_SIP_USER) + '*' , lineEdit_user );
registerField(QString( FIELD_SIP_PASSWORD) + "*" , lineEdit_password ); registerField(QString( FIELD_SIP_PASSWORD) + '*' , lineEdit_password );
registerField(QString( FIELD_SIP_VOICEMAIL) , lineEdit_voicemail ); registerField(QString( FIELD_SIP_VOICEMAIL) , lineEdit_voicemail );
registerField(QString( FIELD_ZRTP_ENABLED) , checkBox_enableZrtp ); registerField(QString( FIELD_ZRTP_ENABLED) , checkBox_enableZrtp );
...@@ -582,9 +582,9 @@ WizardAccountIAXFormPage::WizardAccountIAXFormPage(QWidget *parent) ...@@ -582,9 +582,9 @@ WizardAccountIAXFormPage::WizardAccountIAXFormPage(QWidget *parent)
label_alias = new QLabel(i18n("Alias") + " *" ); label_alias = new QLabel(i18n("Alias") + " *" );
label_server = new QLabel(i18n("Server") + " *" ); label_server = new QLabel(i18n("Server") + " *" );
label_user = new QLabel(i18n("Username") + " *" );
label_password = new QLabel(i18n("Password") + " *" ); label_password = new QLabel(i18n("Password") + " *" );
label_voicemail = new QLabel(i18n("Voicemail number" )); label_voicemail = new QLabel(i18n("Voicemail number" ));
label_user = new QLabel(i18nc("SIP Account Username","Username") + " *" );
lineEdit_alias = new QLineEdit; lineEdit_alias = new QLineEdit;
lineEdit_server = new QLineEdit; lineEdit_server = new QLineEdit;
...@@ -594,10 +594,10 @@ WizardAccountIAXFormPage::WizardAccountIAXFormPage(QWidget *parent) ...@@ -594,10 +594,10 @@ WizardAccountIAXFormPage::WizardAccountIAXFormPage(QWidget *parent)
lineEdit_password->setEchoMode(QLineEdit::Password); lineEdit_password->setEchoMode(QLineEdit::Password);
registerField( QString( FIELD_IAX_ALIAS ) + "*", lineEdit_alias ); registerField( QString( FIELD_IAX_ALIAS ) + '*', lineEdit_alias );
registerField( QString( FIELD_IAX_SERVER ) + "*", lineEdit_server ); registerField( QString( FIELD_IAX_SERVER ) + '*', lineEdit_server );
registerField( QString( FIELD_IAX_USER ) + "*", lineEdit_user ); registerField( QString( FIELD_IAX_USER ) + '*', lineEdit_user );
registerField( QString( FIELD_IAX_PASSWORD ) + "*", lineEdit_password ); registerField( QString( FIELD_IAX_PASSWORD ) + '*', lineEdit_password );
registerField( QString( FIELD_IAX_VOICEMAIL ) , lineEdit_voicemail ); registerField( QString( FIELD_IAX_VOICEMAIL ) , lineEdit_voicemail );
QFormLayout *layout = new QFormLayout; QFormLayout *layout = new QFormLayout;
......
...@@ -35,7 +35,7 @@ private: ...@@ -35,7 +35,7 @@ private:
Account* account; Account* account;
public: public:
ActionSetAccountFirst(Account * account, QObject *parent = 0); explicit ActionSetAccountFirst(Account * account, QObject *parent = 0);
~ActionSetAccountFirst(); ~ActionSetAccountFirst();
private slots: private slots:
......
...@@ -107,3 +107,4 @@ INSTALL( FILES icons/transfertarrow.svg DESTINATION ${DATA_INSTALL_DIR}/sflpho ...@@ -107,3 +107,4 @@ INSTALL( FILES icons/transfertarrow.svg DESTINATION ${DATA_INSTALL_DIR}/sflpho
INSTALL( FILES icons/confBlackWhite.svg DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde ) INSTALL( FILES icons/confBlackWhite.svg DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde )
INSTALL( FILES icons/confBlackWhite.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde ) INSTALL( FILES icons/confBlackWhite.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde )
INSTALL( FILES icons/voicemail.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde ) INSTALL( FILES icons/voicemail.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde )
INSTALL( FILES icons/conf-small.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde )
...@@ -163,6 +163,7 @@ CallTreeItemDelegate(CallView* widget) ...@@ -163,6 +163,7 @@ CallTreeItemDelegate(CallView* widget)
if (option.state & QStyle::State_Selected) { if (option.state & QStyle::State_Selected) {
QStyleOptionViewItem opt2(option); QStyleOptionViewItem opt2(option);
opt2.rect.setWidth(opt2.rect.width()-15); opt2.rect.setWidth(opt2.rect.width()-15);
//Check if it is the last item
if (index.parent().isValid() && !index.parent().child(index.row()+1,0).isValid()) { if (index.parent().isValid() && !index.parent().child(index.row()+1,0).isValid()) {
opt2.rect.setHeight(opt2.rect.height()-15); opt2.rect.setHeight(opt2.rect.height()-15);
QStyledItemDelegate::paint(painter,opt2,index); QStyledItemDelegate::paint(painter,opt2,index);
...@@ -410,7 +411,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime ...@@ -410,7 +411,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime
if (!QString(encodedPhoneNumber).isEmpty()) { if (!QString(encodedPhoneNumber).isEmpty()) {
Contact* contact = AkonadiBackend::getInstance()->getContactByPhone(encodedPhoneNumber,true); Contact* contact = AkonadiBackend::getInstance()->getContactByPhone(encodedPhoneNumber,true);
QString name; QString name;
name = (contact)?contact->getFormattedName():i18n("Unknown"); name = (contact)?contact->getFormattedName():i18nc("Unknown peer","Unknown");
Call* call2 = SFLPhone::model()->addDialingCall(name, AccountList::getCurrentAccount()); Call* call2 = SFLPhone::model()->addDialingCall(name, AccountList::getCurrentAccount());
if (call2) { if (call2) {
call2->appendText(QString(encodedPhoneNumber)); call2->appendText(QString(encodedPhoneNumber));
...@@ -528,10 +529,10 @@ QMimeData* CallView::mimeData( const QList<QTreeWidgetItem *> items) const ...@@ -528,10 +529,10 @@ QMimeData* CallView::mimeData( const QList<QTreeWidgetItem *> items) const
} }
//Plain text for other applications //Plain text for other applications
mimeData->setData(MIME_PLAIN_TEXT, QString(SFLPhone::model()->getCall(items[0])->getPeerName()+"\n"+SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber()).toAscii()); mimeData->setData(MIME_PLAIN_TEXT, QString(SFLPhone::model()->getCall(items[0])->getPeerName()+'\n'+SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber()).toAscii());
//TODO Comment this line if you don't want to see ugly artefact, but the caller details will not be visible while dragged //TODO Comment this line if you don't want to see ugly artefact, but the caller details will not be visible while dragged
items[0]->setText(0, SFLPhone::model()->getCall(items[0])->getPeerName() + "\n" + SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber()); items[0]->setText(0, SFLPhone::model()->getCall(items[0])->getPeerName() + '\n' + SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber());
return mimeData; return mimeData;
} //mimeData } //mimeData
...@@ -806,9 +807,9 @@ Call* CallView::addConference(Call* conf) ...@@ -806,9 +807,9 @@ Call* CallView::addConference(Call* conf)
setCurrentItem(confItem); setCurrentItem(confItem);
CallManagerInterface& callManager = CallManagerInterfaceSingleton::getInstance(); CallManagerInterface& callManager = CallManagerInterfaceSingleton::getInstance();
QStringList callList = callManager.getParticipantList(conf->getConfId()); const QStringList callList = callManager.getParticipantList(conf->getConfId());
foreach (QString callId, callList) { foreach (const QString& callId, callList) {
kDebug() << "Adding " << callId << "to the conversation"; kDebug() << "Adding " << callId << "to the conversation";
insertItem(extractItem(SFLPhone::model()->getIndex(callId)),confItem); insertItem(extractItem(SFLPhone::model()->getIndex(callId)),confItem);
} }
...@@ -823,10 +824,10 @@ bool CallView::conferenceChanged(Call* conf) ...@@ -823,10 +824,10 @@ bool CallView::conferenceChanged(Call* conf)
kDebug() << "Conference changed"; kDebug() << "Conference changed";
CallManagerInterface& callManager = CallManagerInterfaceSingleton::getInstance(); CallManagerInterface& callManager = CallManagerInterfaceSingleton::getInstance();
QStringList callList = callManager.getParticipantList(conf->getConfId()); const QStringList callList = callManager.getParticipantList(conf->getConfId());
QList<QTreeWidgetItem*> buffer; QList<QTreeWidgetItem*> buffer;
foreach (QString callId, callList) { foreach (const QString& callId, callList) {
if (SFLPhone::model()->getCall(callId)) { if (SFLPhone::model()->getCall(callId)) {
QTreeWidgetItem* item3 = extractItem(SFLPhone::model()->getIndex(callId)); QTreeWidgetItem* item3 = extractItem(SFLPhone::model()->getIndex(callId));
insertItem(item3, SFLPhone::model()->getIndex(conf)); insertItem(item3, SFLPhone::model()->getIndex(conf));
...@@ -973,3 +974,4 @@ void CallViewOverlay::setAccessMessage(QString message) ...@@ -973,3 +974,4 @@ void CallViewOverlay::setAccessMessage(QString message)
{ {
m_accessMessage = message; m_accessMessage = message;
} }
...@@ -30,4 +30,4 @@ OrgKdeKSpeechInterface* KSpeechInterfaceSingleton::getInstance() { ...@@ -30,4 +30,4 @@ OrgKdeKSpeechInterface* KSpeechInterfaceSingleton::getInstance() {
m_pInstance->setApplicationName("SFLPhone KDE"); m_pInstance->setApplicationName("SFLPhone KDE");
} }
return m_pInstance; return m_pInstance;
} }
\ No newline at end of file
...@@ -29,4 +29,4 @@ private: ...@@ -29,4 +29,4 @@ private:
static OrgKdeKSpeechInterface* m_pInstance; static OrgKdeKSpeechInterface* m_pInstance;
}; };
#endif #endif
\ No newline at end of file
...@@ -527,4 +527,4 @@ void SFLPhone::displayVideoDock(VideoRenderer* r) ...@@ -527,4 +527,4 @@ void SFLPhone::displayVideoDock(VideoRenderer* r)
m_pVideoDW->setRenderer(r); m_pVideoDW->setRenderer(r);
m_pVideoDW->show(); m_pVideoDW->show();
} }
#endif #endif
\ No newline at end of file
...@@ -157,4 +157,4 @@ private slots: ...@@ -157,4 +157,4 @@ private slots:
#endif #endif
}; };
#endif #endif
\ No newline at end of file
...@@ -59,9 +59,9 @@ SFLPhoneAccessibility* SFLPhoneAccessibility::getInstance() ...@@ -59,9 +59,9 @@ SFLPhoneAccessibility* SFLPhoneAccessibility::getInstance()
void SFLPhoneAccessibility::listCall() void SFLPhoneAccessibility::listCall()
{ {
if (SFLPhone::model()->getCallList().size()>0) { if (SFLPhone::model()->getCallList().size()>0) {
KSpeechInterfaceSingleton::getInstance()->say(i18n("You currently have %1 calls").arg(QString::number(SFLPhone::model()->getCallList().size())), KSpeech::soPlainText); KSpeechInterfaceSingleton::getInstance()->say(i18n("You currently have <numid>%1</numid> calls",SFLPhone::model()->getCallList().size()), KSpeech::soPlainText);
foreach (Call* call,SFLPhone::model()->getCallList()) { foreach (Call* call,SFLPhone::model()->getCallList()) {
KSpeechInterfaceSingleton::getInstance()->say(i18n("Call from %1, number %2").arg(call->getPeerName()).arg(numberToDigit((!call->getPeerPhoneNumber().isEmpty())?call->getPeerPhoneNumber():call->getCallNumber())), KSpeech::soPlainText); KSpeechInterfaceSingleton::getInstance()->say(i18n("Call from %1, number %2",call->getPeerName(),numberToDigit((!call->getPeerPhoneNumber().isEmpty())?call->getPeerPhoneNumber():call->getCallNumber())), KSpeech::soPlainText);
} }
} }
else { else {
...@@ -75,7 +75,7 @@ QString SFLPhoneAccessibility::numberToDigit(QString number) ...@@ -75,7 +75,7 @@ QString SFLPhoneAccessibility::numberToDigit(QString number)
QString toReturn; QString toReturn;
for(int i=0;i<number.count();i++) { for(int i=0;i<number.count();i++) {
if (i+1 < number.count() && (number[i] >= 0x30 && number[i] <= 0x39) && (number[i+1] >= 0x30 && number[i+1] <= 0x39)) if (i+1 < number.count() && (number[i] >= 0x30 && number[i] <= 0x39) && (number[i+1] >= 0x30 && number[i+1] <= 0x39))
toReturn += number[i]+" "; toReturn += QString(number[i])+' ';
else else
toReturn += number[i]; toReturn += number[i];
} }
...@@ -87,17 +87,17 @@ void SFLPhoneAccessibility::currentCallDetails() ...@@ -87,17 +87,17 @@ void SFLPhoneAccessibility::currentCallDetails()
{ {
foreach (Call* call,SFLPhone::model()->getCallList()) { foreach (Call* call,SFLPhone::model()->getCallList()) {
if (call->isSelected()) { if (call->isSelected()) {
QString toSay = i18n("The current call is %1").arg( i18n(call->toHumanStateName().toAscii() )); QString toSay = i18n("The current call is %1",i18n(call->toHumanStateName().toAscii() ));
if (!call->getPeerName().trimmed().isEmpty()) if (!call->getPeerName().trimmed().isEmpty())
toSay += i18n(",Your peer is %1").arg( numberToDigit(call->getPeerName()) ); toSay += i18n(",Your peer is %1",numberToDigit(call->getPeerName()));
if (!call->getPeerPhoneNumber().isEmpty()) if (!call->getPeerPhoneNumber().isEmpty())
toSay += i18n(", the peer phone number is %1 ").arg( numberToDigit(call->getPeerPhoneNumber()) ); toSay += i18n(", the peer phone number is %1 ",numberToDigit(call->getPeerPhoneNumber()) );
else if (!call->getCallNumber().isEmpty()) else if (!call->getCallNumber().isEmpty())
toSay += i18n(", the phone number is %1 ").arg( numberToDigit(call->getCallNumber()) ); toSay += i18n(", the phone number is %1 ",numberToDigit(call->getCallNumber()));
int nSec = QDateTime::fromTime_t(call->getStartTimeStamp().toInt()).time().secsTo( QTime::currentTime() ); int nSec = QDateTime::fromTime_t(call->getStartTimeStamp().toInt()).time().secsTo( QTime::currentTime() );
if (nSec>0) if (nSec>0)
toSay += i18n(" and you have been talking since %1 seconds").arg( nSec ); toSay += i18n(" and you have been talking since %1 seconds",nSec );
KSpeechInterfaceSingleton::getInstance()->say(toSay, KSpeech::soPlainText); KSpeechInterfaceSingleton::getInstance()->say(toSay, KSpeech::soPlainText);
} }
...@@ -108,4 +108,4 @@ void SFLPhoneAccessibility::currentCallDetails() ...@@ -108,4 +108,4 @@ void SFLPhoneAccessibility::currentCallDetails()
void SFLPhoneAccessibility::say(QString message) void SFLPhoneAccessibility::say(QString message)
{ {
KSpeechInterfaceSingleton::getInstance()->say(message, KSpeech::soPlainText); KSpeechInterfaceSingleton::getInstance()->say(message, KSpeech::soPlainText);
} }
\ No newline at end of file
...@@ -40,4 +40,4 @@ public slots: ...@@ -40,4 +40,4 @@ public slots:
void say(QString message); void say(QString message);
}; };
#endif #endif
\ No newline at end of file
...@@ -348,8 +348,8 @@ bool SFLPhoneView::selectCallPhoneNumber(Call** call2,Contact* contact) ...@@ -348,8 +348,8 @@ bool SFLPhoneView::selectCallPhoneNumber(Call** call2,Contact* contact)
QHash<QString,QString> map ; QHash<QString,QString> map ;
QStringList list ; QStringList list ;
foreach (Contact::PhoneNumber* number, contact->getPhoneNumbers()) { foreach (Contact::PhoneNumber* number, contact->getPhoneNumbers()) {
map[number->getType()+" ("+number->getNumber()+")"] = number->getNumber(); map[number->getType()+" ("+number->getNumber()+')'] = number->getNumber();
list << number->getType()+" ("+number->getNumber()+")"; list << number->getType()+" ("+number->getNumber()+')';
} }
QString result = QInputDialog::getItem (this, i18n("Select phone number"), i18n("This contact have many phone number, please select the one you wish to call"), list, 0, false, &ok); QString result = QInputDialog::getItem (this, i18n("Select phone number"), i18n("This contact have many phone number, please select the one you wish to call"), list, 0, false, &ok);
if (ok) { if (ok) {
...@@ -595,7 +595,7 @@ void SFLPhoneView::updateStatusMessage() ...@@ -595,7 +595,7 @@ void SFLPhoneView::updateStatusMessage()
else { else {
emit statusMessageChangeAsked(i18n("Using account") emit statusMessageChangeAsked(i18n("Using account")
+ " \'" + account->getAlias() + " \'" + account->getAlias()
+ "\' (" + account->getAccountRegistrationStatus() + ")"); + "\' (" + account->getAccountRegistrationStatus() + ')');
} }
} }
...@@ -893,4 +893,4 @@ void SFLPhoneView::sendMessage() ...@@ -893,4 +893,4 @@ void SFLPhoneView::sendMessage()
m_pSendMessageLE->clear(); m_pSendMessageLE->clear();
} }
#include "SFLPhoneView.moc" #include "SFLPhoneView.moc"
\ No newline at end of file
...@@ -207,8 +207,6 @@ signals: ...@@ -207,8 +207,6 @@ signals:
void recordCheckStateChangeAsked ( bool recordCheckState ); void recordCheckStateChangeAsked ( bool recordCheckState );
///When a new call is comming ///When a new call is comming
void incomingCall(const Call * call); void incomingCall(const Call * call);
}; };
#endif // SFLPHONEVIEW_H #endif // SFLPHONEVIEW_H
...@@ -84,8 +84,6 @@ void SFLPhoneApplication::initializeMainWindow() ...@@ -84,8 +84,6 @@ void SFLPhoneApplication::initializeMainWindow()
} }
} }
/** /**
* Initialize additional paths * Initialize additional paths
*/ */
......
...@@ -53,16 +53,16 @@ ConfigurationDialog::ConfigurationDialog(SFLPhoneView *parent) ...@@ -53,16 +53,16 @@ ConfigurationDialog::ConfigurationDialog(SFLPhoneView *parent)
dlgVideo = new DlgVideo (this); dlgVideo = new DlgVideo (this);
#endif #endif
addPage( dlgGeneral , i18n("General") , "sflphone-client-kde" ); addPage( dlgGeneral , i18nc("General settings","General") , "sflphone-client-kde" );
addPage( dlgDisplay , i18n("Display") , "applications-graphics" );
addPage( dlgAccounts , i18n("Accounts") , "user-identity" ); addPage( dlgAccounts , i18n("Accounts") , "user-identity" );
addPage( dlgAudio , i18n("Audio") , "audio-headset" ); addPage( dlgAudio , i18n("Audio") , "audio-headset" );
addPage( dlgAddressBook , i18n("Address Book") , "x-office-address-book" ); addPage( dlgAddressBook , i18n("Address Book") , "x-office-address-book" );
addPage( dlgHooks , i18n("Hooks") , "insert-link" ); addPage( dlgHooks , i18n("Hooks") , "insert-link" );
addPage( dlgAccessibility , i18n("Accessibility") , "preferences-desktop-accessibility" ); addPage( dlgAccessibility , i18n("Accessibility") , "preferences-desktop-accessibility" );
#ifdef ENABLE_VIDEO #ifdef ENABLE_VIDEO
addPage( dlgVideo , i18n("Video") , "camera-web" ); addPage( dlgVideo , i18nc("Video conversation","Video") , "camera-web" );
#endif #endif
addPage( dlgDisplay , i18nc("User interterface settings","Display") , "applications-graphics" );
connect(this, SIGNAL(applyClicked()), this, SLOT(applyCustomSettings())); connect(this, SIGNAL(applyClicked()), this, SLOT(applyCustomSettings()));
connect(this, SIGNAL(okClicked()), this, SLOT(applyCustomSettings())); connect(this, SIGNAL(okClicked()), this, SLOT(applyCustomSettings()));
......
...@@ -44,4 +44,4 @@ void DlgAccessibility::updateSettings() ...@@ -44,4 +44,4 @@ void DlgAccessibility::updateSettings()
void DlgAccessibility::updateWidgets() void DlgAccessibility::updateWidgets()
{ {
} }
\ No newline at end of file
...@@ -731,4 +731,4 @@ void DlgAccounts::enablePublished() ...@@ -731,4 +731,4 @@ void DlgAccounts::enablePublished()
spinBox_pa_published_port->setDisabled(radioButton_pa_same_as_local->isChecked()); spinBox_pa_published_port->setDisabled(radioButton_pa_same_as_local->isChecked());
} }
//#include <dlgaccount.moc> //#include <dlgaccount.moc>
\ No newline at end of file
...@@ -103,4 +103,4 @@ void DlgAudio::loadAlsaSettings() ...@@ -103,4 +103,4 @@ void DlgAudio::loadAlsaSettings()
else { else {
groupBox_alsa->setEnabled(false); groupBox_alsa->setEnabled(false);
} }
} }
\ No newline at end of file
...@@ -30,5 +30,3 @@ DlgDisplay::DlgDisplay(QWidget *parent) ...@@ -30,5 +30,3 @@ DlgDisplay::DlgDisplay(QWidget *parent)
DlgDisplay::~DlgDisplay() DlgDisplay::~DlgDisplay()
{ {
} }
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
<widget class="QCheckBox" name="kcfg_notifOnCalls"> <widget class="QCheckBox" name="kcfg_notifOnCalls">
<property name="accessibleDescription">
<string comment="Enable notification on incoming calls"/>