diff --git a/kde/CMakeLists.txt b/kde/CMakeLists.txt index 094f39f450db3e4a88fddb258027b55ea175ceff..f341f560706db11238e62d5b8bac3b2523cf3872 100755 --- a/kde/CMakeLists.txt +++ b/kde/CMakeLists.txt @@ -2,17 +2,16 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(sflphone-client-kde) -SET(LOCAL_CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/") -SET(CMAKE_MODULE_PATH "${LOCAL_CMAKE_MODULE_PATH}") +SET(LOCAL_CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ) +SET(CMAKE_MODULE_PATH "${LOCAL_CMAKE_MODULE_PATH}" ) # --- custom targets: --- INCLUDE( ${LOCAL_CMAKE_MODULE_PATH}/TargetDistclean.cmake REQUIRED) -FIND_PACKAGE ( Kabc REQUIRED ) -FIND_PACKAGE ( KdepimLibs REQUIRED ) -# FIND_PACKAGE ( PkgConfig REQUIRED ) -FIND_PACKAGE ( KDE4 REQUIRED ) -FIND_PACKAGE ( Qt4 REQUIRED QT_USE_QT* ) +FIND_PACKAGE ( Kabc REQUIRED ) +FIND_PACKAGE ( KdepimLibs REQUIRED ) +FIND_PACKAGE ( KDE4 REQUIRED ) +FIND_PACKAGE ( Qt4 REQUIRED QT_USE_QT* ) set(AKONADI_MIN_VERSION 1.0) find_package(Akonadi QUIET NO_MODULE ${AKONADI_MIN_VERSION}) @@ -27,16 +26,17 @@ INCLUDE ( ${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake ) INCLUDE( ${QT_USE_FILE} ) -add_subdirectory(data) -add_subdirectory(src) -add_subdirectory(doc) -add_subdirectory(man) -add_subdirectory(po) -add_subdirectory(plasma) +add_subdirectory( data ) +add_subdirectory( src ) +add_subdirectory( doc ) +add_subdirectory( man ) +add_subdirectory( po ) +add_subdirectory( plasma ) set(PROJECT_VERSION "1.1.0") set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}) - add_custom_target(dist - COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD - | gzip > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + +add_custom_target(dist + COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD + | gzip > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) diff --git a/kde/src/AccountListModel.cpp b/kde/src/AccountListModel.cpp index 82d53a05002b366bc419c82b167f27b6df279fc2..48ec1f8a6e92f791321e00ee93017cfdce526d54 100755 --- a/kde/src/AccountListModel.cpp +++ b/kde/src/AccountListModel.cpp @@ -67,11 +67,11 @@ QVariant AccountListModel::data ( const QModelIndex& index, int role) const return QVariant(account->isEnabled() ? Qt::Checked : Qt::Unchecked); else if(index.column() == 0 && role == Qt::DecorationRole) { if(! account->isEnabled()) - return QVariant(QIcon(ICON_ACCOUNT_LED_GRAY)); + return QVariant( QIcon( ICON_ACCOUNT_LED_GRAY )); else if(account->isRegistered()) - return QVariant(QIcon(ICON_ACCOUNT_LED_GREEN)); + return QVariant( QIcon( ICON_ACCOUNT_LED_GREEN )); else - return QVariant(QIcon(ICON_ACCOUNT_LED_RED)); + return QVariant( QIcon( ICON_ACCOUNT_LED_RED )); } return QVariant(); } //data diff --git a/kde/src/AccountWizard.cpp b/kde/src/AccountWizard.cpp index 291d3808e5ae5b47df84e9c1f36d1f59ebb57eb5..1f55ba4700c694cf7f544878f15ac8a299d9b46b 100755 --- a/kde/src/AccountWizard.cpp +++ b/kde/src/AccountWizard.cpp @@ -204,25 +204,25 @@ void AccountWizard::accept() QString ret; MapStringString accountDetails; - QString& alias = accountDetails[ QString(ACCOUNT_ALIAS) ]; - QString& enabled = accountDetails[ QString(ACCOUNT_ENABLED) ]; - QString& mailbox = accountDetails[ QString(ACCOUNT_MAILBOX) ]; - QString& protocol = accountDetails[ QString(ACCOUNT_TYPE) ]; - QString& server = accountDetails[ QString(ACCOUNT_HOSTNAME) ]; - QString& user = accountDetails[ QString(ACCOUNT_USERNAME) ]; - QString& password = accountDetails[ QString(ACCOUNT_PASSWORD) ]; + QString& alias = accountDetails[ QString( ACCOUNT_ALIAS ) ]; + QString& enabled = accountDetails[ QString( ACCOUNT_ENABLED ) ]; + QString& mailbox = accountDetails[ QString( ACCOUNT_MAILBOX ) ]; + QString& protocol = accountDetails[ QString( ACCOUNT_TYPE ) ]; + QString& server = accountDetails[ QString( ACCOUNT_HOSTNAME ) ]; + QString& user = accountDetails[ QString( ACCOUNT_USERNAME ) ]; + QString& password = accountDetails[ QString( ACCOUNT_PASSWORD ) ]; // sip only parameters QString& stun_enabled = accountDetails[ QString(ACCOUNT_SIP_STUN_ENABLED) ]; QString& stun_server = accountDetails[ QString(ACCOUNT_SIP_STUN_SERVER) ]; // zrtp only parameters - QString& srtp_enabled = accountDetails[ QString(ACCOUNT_SRTP_ENABLED) ]; - QString& key_exchange = accountDetails[ QString(ACCOUNT_KEY_EXCHANGE) ]; - QString& zrtp_display_sas = accountDetails[ QString(ACCOUNT_ZRTP_DISPLAY_SAS) ]; - QString& zrtp_not_supp_warning = accountDetails[ QString(ACCOUNT_ZRTP_NOT_SUPP_WARNING) ]; - QString& zrtp_hello_hash = accountDetails[ QString(ACCOUNT_ZRTP_HELLO_HASH) ]; - QString& display_sas_once = accountDetails[ QString(ACCOUNT_DISPLAY_SAS_ONCE) ]; + QString& srtp_enabled = accountDetails[ QString( ACCOUNT_SRTP_ENABLED ) ]; + QString& key_exchange = accountDetails[ QString( ACCOUNT_KEY_EXCHANGE ) ]; + QString& zrtp_display_sas = accountDetails[ QString( ACCOUNT_ZRTP_DISPLAY_SAS ) ]; + QString& zrtp_not_supp_warning = accountDetails[ QString( ACCOUNT_ZRTP_NOT_SUPP_WARNING ) ]; + QString& zrtp_hello_hash = accountDetails[ QString( ACCOUNT_ZRTP_HELLO_HASH ) ]; + QString& display_sas_once = accountDetails[ QString( ACCOUNT_DISPLAY_SAS_ONCE ) ]; // interface paramters QString& locale_interface = accountDetails[ QString(LOCAL_INTERFACE) ]; @@ -550,17 +550,17 @@ WizardAccountSIPFormPage::WizardAccountSIPFormPage(QWidget *parent) WizardAccountSIPFormPage::~WizardAccountSIPFormPage() { - delete label_alias; - delete label_server; - delete label_user; - delete label_password; - delete label_voicemail; - delete label_enableZrtp; - delete lineEdit_alias; - delete lineEdit_server; - delete lineEdit_user; - delete lineEdit_password; - delete lineEdit_voicemail; + delete label_alias ; + delete label_server ; + delete label_user ; + delete label_password ; + delete label_voicemail ; + delete label_enableZrtp ; + delete lineEdit_alias ; + delete lineEdit_server ; + delete lineEdit_user ; + delete lineEdit_password ; + delete lineEdit_voicemail ; delete checkBox_enableZrtp; } @@ -619,15 +619,15 @@ WizardAccountIAXFormPage::WizardAccountIAXFormPage(QWidget *parent) WizardAccountIAXFormPage::~WizardAccountIAXFormPage() { - delete label_alias; - delete label_server; - delete label_user; - delete label_password; - delete label_voicemail; - delete lineEdit_alias; - delete lineEdit_server; - delete lineEdit_user; - delete lineEdit_password; + delete label_alias ; + delete label_server ; + delete label_user ; + delete label_password ; + delete label_voicemail ; + delete lineEdit_alias ; + delete lineEdit_server ; + delete lineEdit_user ; + delete lineEdit_password ; delete lineEdit_voicemail; } @@ -668,7 +668,7 @@ WizardAccountStunPage::WizardAccountStunPage(QWidget *parent) WizardAccountStunPage::~WizardAccountStunPage() { delete checkBox_enableStun; - delete label_StunServer; + delete label_StunServer ; delete lineEdit_StunServer; } diff --git a/kde/src/AccountWizard.h b/kde/src/AccountWizard.h index f63663bee7d0665aa056ef430d65dc422c5f87a3..fddf116b1c581e63a9b33be8ff7ab43e5934d11d 100755 --- a/kde/src/AccountWizard.h +++ b/kde/src/AccountWizard.h @@ -81,8 +81,8 @@ public: int nextId() const; private: - QRadioButton * radioButton_SFL; - QRadioButton * radioButton_manual; + QRadioButton* radioButton_SFL; + QRadioButton* radioButton_manual; }; /*************************************************************************** @@ -100,8 +100,8 @@ public: int nextId() const; private: - QRadioButton * radioButton_SIP; - QRadioButton * radioButton_IAX; + QRadioButton* radioButton_SIP; + QRadioButton* radioButton_IAX; }; /*************************************************************************** @@ -143,19 +143,19 @@ public: private: int type; - QLabel * label_alias; - QLabel * label_server; - QLabel * label_user; - QLabel * label_password; - QLabel * label_voicemail; - QLabel * label_enableZrtp; - - QLineEdit * lineEdit_alias; - QLineEdit * lineEdit_server; - QLineEdit * lineEdit_user; - QLineEdit * lineEdit_password; - QLineEdit * lineEdit_voicemail; - QCheckBox * checkBox_enableZrtp; + QLabel* label_alias ; + QLabel* label_server ; + QLabel* label_user ; + QLabel* label_password ; + QLabel* label_voicemail ; + QLabel* label_enableZrtp ; + + QLineEdit* lineEdit_alias ; + QLineEdit* lineEdit_server ; + QLineEdit* lineEdit_user ; + QLineEdit* lineEdit_password ; + QLineEdit* lineEdit_voicemail ; + QCheckBox* checkBox_enableZrtp; }; /*************************************************************************** @@ -176,17 +176,17 @@ public: private: int type; - QLabel * label_alias; - QLabel * label_server; - QLabel * label_user; - QLabel * label_password; - QLabel * label_voicemail; - - QLineEdit * lineEdit_alias; - QLineEdit * lineEdit_server; - QLineEdit * lineEdit_user; - QLineEdit * lineEdit_password; - QLineEdit * lineEdit_voicemail; + QLabel* label_alias ; + QLabel* label_server ; + QLabel* label_user ; + QLabel* label_password ; + QLabel* label_voicemail ; + + QLineEdit* lineEdit_alias ; + QLineEdit* lineEdit_server ; + QLineEdit* lineEdit_user ; + QLineEdit* lineEdit_password ; + QLineEdit* lineEdit_voicemail; }; /*************************************************************************** @@ -204,9 +204,9 @@ public: int nextId() const; private: - QCheckBox * checkBox_enableStun; - QLabel * label_StunServer; - QLineEdit * lineEdit_StunServer; + QCheckBox* checkBox_enableStun; + QLabel* label_StunServer ; + QLineEdit* lineEdit_StunServer; }; /*************************************************************************** diff --git a/kde/src/CallView.cpp b/kde/src/CallView.cpp index b28546b530da6506d61f9e8b8b6a47d76da4b4bb..96a02cc78ccb6fff11defa8522d423b9c2a78c27 100644 --- a/kde/src/CallView.cpp +++ b/kde/src/CallView.cpp @@ -70,7 +70,7 @@ CallView::CallView(QWidget* parent) : QTreeWidget(parent),m_pActiveOverlay(0),m_ m_pTransferOverlay->resize(size()); m_pTransferOverlay->setCornerWidget(lblImg); - m_pTransferB->setText("Transfer"); + m_pTransferB->setText(i18n("Transfer")); m_pTransferB->setMaximumSize(70,9000); gl->addItem (new QSpacerItem(0,0,QSizePolicy::Expanding,QSizePolicy::Minimum), 0 , 0 , 1 , 3 ); @@ -227,7 +227,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime if (contact) name = contact->getFormattedName(); else - name = "Unknow"; + name = i18n("Unknow"); Call* call2 = SFLPhone::model()->addDialingCall(name, SFLPhone::model()->getCurrentAccountId()); call2->appendText(QString(encodedPhoneNumber)); if (!parent) { @@ -648,7 +648,7 @@ bool CallView::conferenceChanged(Call* conf) insertItem(extractItem(SFLPhone::model()->getIndex(conf)->child(j))); } - Q_ASSERT_X(SFLPhone::model()->getIndex(conf)->childCount() == 0,"changind conference","A conference can't have no participants"); + Q_ASSERT_X(SFLPhone::model()->getIndex(conf)->childCount() == 0,"changing conference","A conference can't have no participants"); return true; } //conferenceChanged diff --git a/kde/src/Codec.h b/kde/src/Codec.h index 8617cc86f9c9ae41ec5e0a834b39c951478dba3a..d577f639142f6007b15a51edc1bc46ce3e4dd2e2 100755 --- a/kde/src/Codec.h +++ b/kde/src/Codec.h @@ -48,7 +48,7 @@ public: void setFrequency ( const QString& frequency ); void setBitrate ( const QString& bitrate ); void setBandwidth ( const QString& bandwidth ); - void setEnabled ( bool enabled ); + void setEnabled ( bool enabled ); private: //Attributes diff --git a/kde/src/SFLPhone.cpp b/kde/src/SFLPhone.cpp index 1c6ab6178405ae59ffeacd6cd0c0005e6a15763a..8cadd64f4577d586fc561fdee08b9c9d90ff455c 100755 --- a/kde/src/SFLPhone.cpp +++ b/kde/src/SFLPhone.cpp @@ -404,7 +404,7 @@ void SFLPhone::on_m_pView_incomingCall(const Call * call) { Contact* contact = AkonadiBackend::getInstance()->getContactByPhone(call->getPeerPhoneNumber()); if (contact && call) { - KNotification::event(KNotification::Notification, "New incomming call", "New call from: \n" + call->getPeerName().isEmpty() ? call->getPeerPhoneNumber() : call->getPeerName(),(contact->getPhoto())?*contact->getPhoto():NULL); + KNotification::event(KNotification::Notification, i18n("New incomming call"), i18n("New call from: \n") + (call->getPeerName().isEmpty() ? call->getPeerPhoneNumber() : call->getPeerName()),((contact->getPhoto())?*contact->getPhoto():NULL)); } - KNotification::event(KNotification::Notification, "New incomming call", "New call from: \n" + call->getPeerName().isEmpty() ? call->getPeerPhoneNumber() : call->getPeerName()); + KNotification::event(KNotification::Notification, i18n("New incomming call"), i18n("New call from: \n") + (call->getPeerName().isEmpty() ? call->getPeerPhoneNumber() : call->getPeerName())); } diff --git a/kde/src/SFLPhoneView.cpp b/kde/src/SFLPhoneView.cpp index 2707a24d6b902f1d0de7bba3061e0e00c3357327..4c7dccdedede859316023834c2c584ec033ee2cb 100755 --- a/kde/src/SFLPhoneView.cpp +++ b/kde/src/SFLPhoneView.cpp @@ -258,7 +258,7 @@ bool SFLPhoneView::selectCallPhoneNumber(Call* call2,Contact* contact) map[number->getType()+" ("+number->getNumber()+")"] = number->getNumber(); list << number->getType()+" ("+number->getNumber()+")"; } - QString result = QInputDialog::getItem (this, QString("Select phone number"), QString("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) { call2 = SFLPhone::model()->addDialingCall(contact->getFormattedName(), SFLPhone::model()->getCurrentAccountId()); call2->appendText(map[result]); @@ -325,7 +325,7 @@ void SFLPhoneView::updateWindowCallState() break; case CALL_STATE_CURRENT: buttonIconFiles [ SFLPhone::Record ] = ICON_REC_DEL_ON ; - m_pMessageBoxW->setVisible(true); + m_pMessageBoxW->setVisible(true) ; break; case CALL_STATE_DIALING: enabledActions [ SFLPhone::Hold ] = false ; @@ -337,7 +337,7 @@ void SFLPhoneView::updateWindowCallState() case CALL_STATE_HOLD: buttonIconFiles [ SFLPhone::Hold ] = ICON_UNHOLD ; actionTexts [ SFLPhone::Hold ] = ACTION_LABEL_UNHOLD ; - m_pMessageBoxW->setVisible(true); + m_pMessageBoxW->setVisible(true) ; break; case CALL_STATE_FAILURE: enabledActions [ SFLPhone::Accept ] = false ; @@ -481,10 +481,10 @@ void SFLPhoneView::updateVolumeControls() //SFLPhone::app()->action_displayVolumeControls->setChecked(display); //widget_recVol->setVisible(display); //widget_sndVol->setVisible(display); - toolButton_recVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); - toolButton_sndVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); - slider_recVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); - slider_sndVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); + toolButton_recVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); + toolButton_sndVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); + slider_recVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); + slider_sndVol->setVisible ( SFLPhone::app()->action_displayVolumeControls->isChecked() && ConfigurationSkeleton::displayVolume() ); } diff --git a/kde/src/conf/dlgaccounts.cpp b/kde/src/conf/dlgaccounts.cpp index 7e69292d1aa85dfe9199031b1f40af77f0e542be..d04e80067fd975086facf8c73db0cb051984e227 100755 --- a/kde/src/conf/dlgaccounts.cpp +++ b/kde/src/conf/dlgaccounts.cpp @@ -741,8 +741,8 @@ void DlgAccounts::saveCredential(QString accountId) { void DlgAccounts::addCredential() { QListWidgetItem* newItem = new QListWidgetItem(); - newItem->setText("New credential"); - credentialInfo[newItem] = {newItem, "New credential", "",""}; + newItem->setText(i18n("New credential")); + credentialInfo[newItem] = {newItem, i18n("New credential"), "",""}; selectCredential(newItem,list_credential->currentItem()); list_credential->addItem(newItem); diff --git a/kde/src/klib/HelperFunctions.cpp b/kde/src/klib/HelperFunctions.cpp index 24a539d6c4d0f1f5266ac0f808951e942ead54fe..b7e2a1ce2a9ed5b2b5dccd9a444bffc7958fc41e 100644 --- a/kde/src/klib/HelperFunctions.cpp +++ b/kde/src/klib/HelperFunctions.cpp @@ -24,6 +24,9 @@ #include <QtCore/QString> #include <QtCore/QVariant> +//KDE +#include <KLocale> + //SFLPhone #include "../lib/Contact.h" @@ -39,7 +42,7 @@ ContactHash HelperFunctions::toHash(QList<Contact*> contacts) { conth["phoneType" ] = cont->getPhoneNumbers()[0]->getType(); } else { - conth["phoneNumber"] = QString::number(cont->getPhoneNumbers().size())+" numbers"; + conth["phoneNumber"] = QString::number(cont->getPhoneNumbers().size())+i18n(" numbers"); conth["phoneType" ] = ""; } hash[contacts[i]->getUid()] = conth; diff --git a/kde/src/klib/SortableDockCommon.cpp b/kde/src/klib/SortableDockCommon.cpp index 85f229c969a4ab6132de0202d95bb7a9a57acf13..64d8b92d1bd85853dd4eb65a16cac9bdd31677d5 100644 --- a/kde/src/klib/SortableDockCommon.cpp +++ b/kde/src/klib/SortableDockCommon.cpp @@ -24,6 +24,10 @@ #include <QtCore/QDateTime> #include <QtCore/QStringList> #include <QtCore/QTimer> +#include <QtCore/QString> + +//KDE +#include <KLocale> //SFLPhone #include "../lib/Call.h" @@ -44,30 +48,30 @@ StaticEventHandler::StaticEventHandler(QObject* parent, QStringList* list) : QOb void StaticEventHandler::update() { (*m_pList)= { - "Today" ,//0 - "Yesterday" ,//1 - QDate::currentDate().addDays(-2).toString("dddd"),//2 - QDate::currentDate().addDays(-3).toString("dddd"),//3 - QDate::currentDate().addDays(-4).toString("dddd"),//4 - QDate::currentDate().addDays(-5).toString("dddd"),//5 - QDate::currentDate().addDays(-6).toString("dddd"),//6 - "Last week" ,//7 - "Two weeks ago" ,//8 - "Three weeks ago" ,//9 - "Last month" ,//10 - "Two months ago" ,//11 - "Three months ago" ,//12 - "Four months ago" ,//13 - "Five months ago" ,//14 - "Six months ago" ,//15 - "Seven months ago" ,//16 - "Eight months ago" ,//17 - "Nine months ago" ,//18 - "Ten months ago" ,//19 - "Eleven months ago" ,//20 - "Twelve months ago" ,//21 - "Last year" ,//22 - "Very long time ago" ,//23 - "Never" //24 + i18n("Today" ),//0 + i18n("Yesterday" ),//1 + i18n(QDate::currentDate().addDays(-2).toString("dddd").toAscii()),//2 + i18n(QDate::currentDate().addDays(-3).toString("dddd").toAscii()),//3 + i18n(QDate::currentDate().addDays(-4).toString("dddd").toAscii()),//4 + i18n(QDate::currentDate().addDays(-5).toString("dddd").toAscii()),//5 + i18n(QDate::currentDate().addDays(-6).toString("dddd").toAscii()),//6 + i18n("Last week" ),//7 + i18n("Two weeks ago" ),//8 + i18n("Three weeks ago" ),//9 + i18n("Last month" ),//10 + i18n("Two months ago" ),//11 + i18n("Three months ago" ),//12 + i18n("Four months ago" ),//13 + i18n("Five months ago" ),//14 + i18n("Six months ago" ),//15 + i18n("Seven months ago" ),//16 + i18n("Eight months ago" ),//17 + i18n("Nine months ago" ),//18 + i18n("Ten months ago" ),//19 + i18n("Eleven months ago" ),//20 + i18n("Twelve months ago" ),//21 + i18n("Last year" ),//22 + i18n("Very long time ago" ),//23 + i18n("Never" ) //24 }; } diff --git a/kde/src/klib/SortableDockCommon.hpp b/kde/src/klib/SortableDockCommon.hpp index b6b18874a00010437d5011b1c8bb89af151e5378..fdd3b50706b6763ab90c6985806c44943a3b77a2 100644 --- a/kde/src/klib/SortableDockCommon.hpp +++ b/kde/src/klib/SortableDockCommon.hpp @@ -22,6 +22,10 @@ #include <QtCore/QDateTime> #include <QtCore/QStringList> #include <QtCore/QTimer> +#include <QtCore/QString> + +//KDE +#include <KLocale> //SFLPhone #include "../lib/Call.h" @@ -143,7 +147,7 @@ CALLMODEL_TEMPLATE void SORTABLE_T::setHistoryCategory(QList<Call*>& calls,Histo } break; case HistorySortingMode::Length: - category = "TODO"; + category = i18n("TODO"); break; default: break; @@ -185,7 +189,7 @@ CALLMODEL_TEMPLATE void SORTABLE_T::setContactCategory(QList<Contact*> contacts, category = QString(cont->getFormattedName()[0]); break; case ContactSortingMode::Organisation: - category = (cont->getOrganization().isEmpty())?"Unknow":cont->getOrganization(); + category = (cont->getOrganization().isEmpty())?i18n("Unknow"):cont->getOrganization(); break; case ContactSortingMode::Recently_used: if (recentlyUsed.find(cont) != recentlyUsed.end()) @@ -194,10 +198,10 @@ CALLMODEL_TEMPLATE void SORTABLE_T::setContactCategory(QList<Contact*> contacts, category = m_slHistoryConst[Never]; break; case ContactSortingMode::Group: - category = "TODO"; + category = i18n("TODO"); break; case ContactSortingMode::Department: - category = (cont->getDepartment().isEmpty())?"Unknow":cont->getDepartment();; + category = (cont->getDepartment().isEmpty())?i18n("Unknow"):cont->getDepartment();; break; default: break; diff --git a/kde/src/widgets/BookmarkDock.cpp b/kde/src/widgets/BookmarkDock.cpp index 38f821289f0b96fc6b26c0dc8a0f57d1f5af2792..72b63cb6c10435c8382f712d5cc3a516a183545a 100644 --- a/kde/src/widgets/BookmarkDock.cpp +++ b/kde/src/widgets/BookmarkDock.cpp @@ -81,7 +81,7 @@ BookmarkDock::BookmarkDock(QWidget* parent) : QDockWidget(parent) QWidget* mainWidget = new QWidget(this); setWidget(mainWidget); - m_pMostUsedCK->setText("Show most called contacts"); + m_pMostUsedCK->setText(i18n("Show most called contacts")); QVBoxLayout* mainLayout = new QVBoxLayout(mainWidget); @@ -121,8 +121,8 @@ void BookmarkDock::addBookmark_internal(const QString& phone) HistoryTreeItem* widget = new HistoryTreeItem(m_pItemView,phone); QTreeWidgetItem* item = NULL; - if (widget->getName() == "Unknow" || widget->getName().isEmpty()) { - item = m_pItemView->addItem<QNumericTreeWidgetItem>("Unknow"); + if (widget->getName() == i18n("Unknow") || widget->getName().isEmpty()) { + item = m_pItemView->addItem<QNumericTreeWidgetItem>(i18n("Unknow")); } else { item = m_pItemView->addItem<QNumericTreeWidgetItem>(QString(widget->getName()[0])); @@ -156,14 +156,14 @@ void BookmarkDock::reload() { m_pItemView->clear(); m_pBookmark.clear(); - m_pItemView->addCategory("Popular"); + m_pItemView->addCategory(i18n("Popular")); for (int i=65;i<=90;i++) { m_pItemView->addCategory(QString(i)); } if (m_pMostUsedCK->isChecked()) { QStringList cl = SFLPhone::model()->getNumbersByPopularity(); for (int i=0;i < ((cl.size() < 10)?cl.size():10);i++) { - QNumericTreeWidgetItem* item = m_pItemView->addItem<QNumericTreeWidgetItem>("Popular"); + QNumericTreeWidgetItem* item = m_pItemView->addItem<QNumericTreeWidgetItem>(i18n("Popular")); HistoryTreeItem* widget = new HistoryTreeItem(m_pItemView,cl[i]); widget->setItem(item); m_pItemView->setItemWidget(item,0,widget); diff --git a/kde/src/widgets/CallTreeItem.cpp b/kde/src/widgets/CallTreeItem.cpp index 1ce85a0e151c46777b3e7246907d2ac4b0d2b9b1..ef7825a3eb318f7caedd22b7248374dc95b404fc 100644 --- a/kde/src/widgets/CallTreeItem.cpp +++ b/kde/src/widgets/CallTreeItem.cpp @@ -124,12 +124,12 @@ void CallTreeItem::setCall(Call *call) m_pBtnConf = new TranslucentButtons(this); m_pBtnConf->setVisible(false); m_pBtnConf->setParent(this); - m_pBtnConf->setText("Conference"); + m_pBtnConf->setText(i18n("Conference")); m_pBtnConf->setPixmap(new QImage(KStandardDirs::locate("data","sflphone-client-kde/confBlackWhite.png"))); connect(m_pBtnConf,SIGNAL(dataDropped(QMimeData*)),this,SLOT(conversationEvent(QMimeData*))); m_pBtnTrans = new TranslucentButtons(this); - m_pBtnTrans->setText("Transfer"); + m_pBtnTrans->setText(i18n("Transfer")); m_pBtnTrans->setVisible(false); m_pBtnTrans->setPixmap(new QImage(KStandardDirs::locate("data","sflphone-client-kde/transferarraw.png"))); connect(m_pBtnTrans,SIGNAL(dataDropped(QMimeData*)),this,SLOT(transferEvent(QMimeData*))); diff --git a/kde/src/widgets/ContactDock.cpp b/kde/src/widgets/ContactDock.cpp index 9feb0825011f84fee4c2113260d192257fee2bcb..fd93f720d50f5f3f6e5f0a44e6b443ec5b61b557 100644 --- a/kde/src/widgets/ContactDock.cpp +++ b/kde/src/widgets/ContactDock.cpp @@ -93,7 +93,7 @@ ContactDock::ContactDock(QWidget* parent) : QDockWidget(parent) QStringList sortType; - sortType << "Name" << "Organisation" << "Recently used" << "Group" << "Department"; + sortType << i18n("Name") << i18n("Organisation") << i18n("Recently used") << i18n("Group") << i18n("Department"); m_pSortByCBB->addItems(sortType); //m_pSortByCBB->setDisabled(true); @@ -187,7 +187,7 @@ void ContactDock::reloadContact() category = QString(cont->getFormattedName()[0]); break; case Organisation: - category = (cont->getOrganization().isEmpty())?"Unknow":cont->getOrganization(); + category = (cont->getOrganization().isEmpty())?i18n("Unknow"):cont->getOrganization(); break; case Recently_used: if (recentlyUsed.find(cont) != recentlyUsed.end()) @@ -196,10 +196,10 @@ void ContactDock::reloadContact() category = m_slHistoryConst[Never]; break; case Group: - category = "TODO"; + category = i18n("TODO"); break; case Department: - category = (cont->getDepartment().isEmpty())?"Unknow":cont->getDepartment();; + category = (cont->getDepartment().isEmpty())?i18n("Unknow"):cont->getDepartment();; break; } QNumericTreeWidgetItem_hist* item = m_pContactView->addItem<QNumericTreeWidgetItem_hist>(category); diff --git a/kde/src/widgets/ContactDock.h b/kde/src/widgets/ContactDock.h index d76f09bc63f0ea5ed42d8d45ada85024eedcc730..7a69a8b428fa6f38783f90e5cd18b8b83dda9053 100644 --- a/kde/src/widgets/ContactDock.h +++ b/kde/src/widgets/ContactDock.h @@ -75,7 +75,7 @@ private: QListWidget* m_pCallView ; QComboBox* m_pSortByCBB ; QCheckBox* m_pShowHistoCK; - QList<ContactItemWidget*> m_Contacts; + QList<ContactItemWidget*> m_Contacts ; public slots: virtual void keyPressEvent(QKeyEvent* event); diff --git a/kde/src/widgets/Dialpad.cpp b/kde/src/widgets/Dialpad.cpp index 95bc32bf3cfa348db474e53f664b7ca20a82fde5..0b9e0348948959d7c09f6f6452429bf5c107f041 100755 --- a/kde/src/widgets/Dialpad.cpp +++ b/kde/src/widgets/Dialpad.cpp @@ -48,10 +48,10 @@ Dialpad::Dialpad(QWidget *parent) QLabel* number = new QLabel ( m_pNumbers[i] ); QLabel* text = new QLabel ( m_pTexts[i] ); m_pButtons[i]->setMinimumHeight(30); - gridLayout->addWidget(m_pButtons[i],i/3,i%3); - number->setFont(QFont("", m_NumberSize)); - number->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - text->setFont(QFont("", m_TextSize)); + gridLayout->addWidget( m_pButtons[i],i/3,i%3 ); + number->setFont ( QFont("", m_NumberSize) ); + number->setAlignment ( Qt::AlignRight | Qt::AlignVCenter ); + text->setFont ( QFont("", m_TextSize) ); layout->setSpacing ( m_Spacing ); layout->addWidget ( number ); layout->addWidget ( text ); diff --git a/kde/src/widgets/HistoryDock.cpp b/kde/src/widgets/HistoryDock.cpp index a656ef860bc66e38b66622c2cbf4767514e977b8..1a42e99f0f02218dfda68353354671d18c214c8c 100644 --- a/kde/src/widgets/HistoryDock.cpp +++ b/kde/src/widgets/HistoryDock.cpp @@ -89,16 +89,16 @@ HistoryDock::HistoryDock(QWidget* parent) : QDockWidget(parent) setObjectName("historyDock"); setMinimumSize(250,0); setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); - m_pFilterLE = new KLineEdit(); - m_pItemView = new HistoryTree(this); - m_pSortByCBB = new QComboBox(); - m_pSortByL = new QLabel(i18n("Sort by:")); - m_pFromL = new QLabel(i18n("From:")); - m_pToL = new QLabel(i18n("To:")); - m_pFromDW = new KDateWidget(); - m_pToDW = new KDateWidget(); - m_pAllTimeCB = new QCheckBox(i18n("Display all")); - m_pLinkPB = new QPushButton(this); + m_pFilterLE = new KLineEdit ( ); + m_pItemView = new HistoryTree ( this ); + m_pSortByCBB = new QComboBox ( ); + m_pSortByL = new QLabel ( i18n("Sort by:") ); + m_pFromL = new QLabel ( i18n("From:") ); + m_pToL = new QLabel ( i18n("To:") ); + m_pFromDW = new KDateWidget ( ); + m_pToDW = new KDateWidget ( ); + m_pAllTimeCB = new QCheckBox ( i18n("Display all")); + m_pLinkPB = new QPushButton ( this ); m_pAllTimeCB->setChecked(ConfigurationSkeleton::displayDataRange()); enableDateRange(ConfigurationSkeleton::displayDataRange()); @@ -122,7 +122,7 @@ HistoryDock::HistoryDock(QWidget* parent) : QDockWidget(parent) m_pFilterLE->setClearButtonShown(true); QStringList sortBy; - sortBy << "Date" << "Name" << "Popularity" << "Length"; + sortBy << i18n("Date") << i18n("Name") << i18n("Popularity") << i18n("Length"); m_pSortByCBB->addItems(sortBy); QWidget* mainWidget = new QWidget(this); diff --git a/kde/src/widgets/HistoryDock.h b/kde/src/widgets/HistoryDock.h index 51ce18b1ec07b05ff5a84f19b8b00956703db9c2..c5ccab15f094df72f3a0efbd9dfa871a1947d85a 100644 --- a/kde/src/widgets/HistoryDock.h +++ b/kde/src/widgets/HistoryDock.h @@ -85,11 +85,11 @@ public slots: virtual void keyPressEvent(QKeyEvent* event); private slots: - void filter (QString text ); - void updateLinkedFromDate (QDate date ); - void updateLinkedToDate (QDate date ); - void reload ( ); - void updateContactInfo ( ); + void filter ( QString text ); + void updateLinkedFromDate ( QDate date ); + void updateLinkedToDate ( QDate date ); + void reload ( ); + void updateContactInfo ( ); }; diff --git a/kde/src/widgets/HistoryTreeItem.cpp b/kde/src/widgets/HistoryTreeItem.cpp index f014e1bd269d8832eca1cbaa85971ce8128b6dd4..5bc7a2d3822f98d222e73018e6a3bbd9d9838764 100644 --- a/kde/src/widgets/HistoryTreeItem.cpp +++ b/kde/src/widgets/HistoryTreeItem.cpp @@ -155,7 +155,7 @@ HistoryTreeItem::HistoryTreeItem(QWidget *parent ,QString phone) m_pMainLayout->addItem ( verticalSpacer , 4 , 1 ); m_pMainLayout->addWidget ( m_pPlay , 0 , 2 , 4 , 1 ); m_pMainLayout->addWidget ( m_pRemove , 0 , 3 , 4 , 1 ); - m_pMainLayout->addWidget ( m_pLengthL , 0 , 4 , 4 , 1 ); + m_pMainLayout->addWidget ( m_pLengthL , 0 , 4 , 4 , 1 ); setLayout(m_pMainLayout); setMinimumSize(QSize(50, 30)); setMaximumSize(QSize(300,99999)); @@ -276,7 +276,7 @@ void HistoryTreeItem::bookmark() void HistoryTreeItem::removeRecording() { - int ret = KMessageBox::questionYesNo(this, "Are you sure you want to delete this recording?", "Delete recording"); + int ret = KMessageBox::questionYesNo(this, i18n("Are you sure you want to delete this recording?"), i18n("Delete recording")); if (ret == KMessageBox::Yes) { kDebug() << "Deleting file"; QFile::remove(m_pItemCall->getRecordingPath()); @@ -398,10 +398,10 @@ void HistoryTreeItem::stateChanged(Phonon::State newState, Phonon::State /* oldS switch (newState) { case Phonon::ErrorState: if (m_pMediaObject->errorType() == Phonon::FatalError) { - QMessageBox::warning(this, tr("Fatal Error"), + QMessageBox::warning(this, i18n("Fatal Error"), m_pMediaObject->errorString()); } else { - QMessageBox::warning(this, tr("Error"), + QMessageBox::warning(this, i18n("Error"), m_pMediaObject->errorString()); } break; @@ -409,11 +409,11 @@ void HistoryTreeItem::stateChanged(Phonon::State newState, Phonon::State /* oldS m_pPause->setIcon(KIcon("media-playback-pause")); break; case Phonon::StoppedState: - m_pPause->setIcon(KIcon("media-playback-play")); + m_pPause->setIcon(KIcon("media-playback-play" )); m_pTimePlayedL->setText("00:00"); break; case Phonon::PausedState: - m_pPause->setIcon(KIcon("media-playback-play")); + m_pPause->setIcon(KIcon("media-playback-play" )); break; case Phonon::BufferingState: break; @@ -427,7 +427,7 @@ void HistoryTreeItem::metaStateChanged(Phonon::State newState, Phonon::State old { Q_UNUSED(oldState); if (newState == Phonon::ErrorState) { - QMessageBox::warning(this, tr("Error opening files"), + QMessageBox::warning(this, i18n("Error opening files"), m_pMetaInformationResolver->errorString()); while (!m_lSources.isEmpty() && !(m_lSources.takeLast() == m_pMetaInformationResolver->currentSource())) {} /* loop */; @@ -561,7 +561,7 @@ QString HistoryTreeItem::getName() else if (!m_Name.isEmpty()){ return m_Name; } - return "Unknow"; + return i18n("Unknow"); } ///Return the caller peer number diff --git a/kde/src/widgets/HistoryTreeItem.h b/kde/src/widgets/HistoryTreeItem.h index 5289947441dc9e641252dbb3089edb01a0e60e82..4f9ab4ae8a51cd14b86bff9e3b6aa6d5e3e29e46 100644 --- a/kde/src/widgets/HistoryTreeItem.h +++ b/kde/src/widgets/HistoryTreeItem.h @@ -65,7 +65,7 @@ class HistoryTreeItem : public QWidget //Getters Call* call () const; uint getTimeStamp (); - uint getLength (); + uint getLength (); QString getName (); QString getPhoneNumber (); QTreeWidgetItem* getItem (); @@ -132,20 +132,20 @@ public slots: bool getContactInfo(QString phone); private slots: + void sendEmail (); + void callAgain (); + void copy (); + void addContact (); + void addToContact (); + void bookmark (); + void removeRecording (); + void showRecordPlayer (); + void stopPlayer (); + void playPausePlayer (); + void editNote (); + void tick(qint64 time); void showContext(const QPoint& pos); - void sendEmail(); - void callAgain(); - void copy(); - void addContact(); - void addToContact(); - void bookmark(); - void removeRecording(); - void showRecordPlayer(); - void stopPlayer(); - void playPausePlayer(); - void editNote(); void metaStateChanged(Phonon::State newState, Phonon::State oldState); - void tick(qint64 time); void stateChanged(Phonon::State newState, Phonon::State /* oldState */); signals: