diff --git a/sflphone-client-kde/INSTALL b/sflphone-client-kde/INSTALL index 3f34eb11f87e0bf6684fd4f3126908caba8bae4b..d53870cafa091920ece773c92156d91055e61b35 100644 --- a/sflphone-client-kde/INSTALL +++ b/sflphone-client-kde/INSTALL @@ -52,4 +52,11 @@ You can change the prefix of the installation using: .config.sh --prefix="expected_prefix_directory" -By default, it is set to /usr. \ No newline at end of file +By default, it is set to /usr/local. + +****************************************************** + +You can enable debug messages using: + + .config.sh --with-debug + diff --git a/sflphone-client-kde/config.sh b/sflphone-client-kde/config.sh index b67afe8749994aeedc788631397b0a1b2d6d7720..6bb55134757218a630e5fc863d5a7c6566540a69 100755 --- a/sflphone-client-kde/config.sh +++ b/sflphone-client-kde/config.sh @@ -20,14 +20,24 @@ cd build # if $prefix # then options=$@" -DCMAKE_INSTALL_PREFIX="$prefix_env -options=`echo $@ | sed "s/--prefix=/-DCMAKE_INSTALL_PREFIX=/g"` +# debug=`echo $@ | grep -q "debug"` + +options=`echo $@ | sed "s/--prefix=/-DCMAKE_INSTALL_PREFIX=/g" | sed "s/--with-debug//g"` + +if `echo $@ | grep -q "\--with-debug"` +then echo "Enable debug messages" +options="$options -DCMAKE_BUILD_TYPE=\"Debug\"" +else echo "Disable debug messages" +options="$options -DCMAKE_BUILD_TYPE=\"Release\"" +fi + +echo "Passing argument '$options' to cmake" autocmd cmake $options .. -echo $options echo "**********************************************" echo "Configuration done!" -echo "Run \`cd build\' to go to the build directory." -echo "Then run \`make\'to build the software." +echo "Run \`cd build' to go to the build directory." +echo "Then run \`make'to build the software." echo "**********************************************" diff --git a/sflphone-client-kde/data/sflphone-client-kdeui.rc b/sflphone-client-kde/data/sflphone-client-kdeui.rc index bbba5e540290ace7ada71a9813b36262abd06c19..ac092044e6ee36bc6e3034fc4ea95fb08f319b71 100644 --- a/sflphone-client-kde/data/sflphone-client-kdeui.rc +++ b/sflphone-client-kde/data/sflphone-client-kdeui.rc @@ -1,11 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<gui name="tutorial3" +<!--<gui name="tutorial3" version="1" xmlns="http://www.kde.org/standards/kxmlgui/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0 http://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd" > + --> +<gui name="sflphone-client-kde" version="1"> + <MenuBar> <Menu name="Actions" > <text>Actions</text> @@ -37,4 +40,16 @@ </Menu> </MenuBar> + <!--<ToolBar name="mainToolBar" position="Top" noMerge="1" fullWidth="true" newline="true" > + <Action name="action_accept" /> + <Action name="action_refuse" /> + <Action name="action_hold" /> + <Action name="action_transfer" /> + <Action name="action_record" /> + <Separator /> + <Action name="action_history" /> + <Action name="action_addressBook" /> + <Separator /> + <Action name="action_mailBox" /> + </ToolBar> --> </gui> \ No newline at end of file diff --git a/sflphone-client-kde/src/AccountItemWidget.h b/sflphone-client-kde/src/AccountItemWidget.h index dacfa39b843f2ba44946d9fb8cf904b9501be6f5..1c9c36c82717385afb5c14cf0807da4091c924bc 100644 --- a/sflphone-client-kde/src/AccountItemWidget.h +++ b/sflphone-client-kde/src/AccountItemWidget.h @@ -28,7 +28,7 @@ #include <kled.h> /** - @author Jérémy Quentin <jeremy.quentin@gmail.com> + @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> */ class AccountItemWidget : public QWidget { diff --git a/sflphone-client-kde/src/AccountWizard.h b/sflphone-client-kde/src/AccountWizard.h index 0095856a18c523178e31eb77d9e1c1c863ddc1f0..afa7588db0ceaa37c9fa5adc890c2db37ca9a523 100644 --- a/sflphone-client-kde/src/AccountWizard.h +++ b/sflphone-client-kde/src/AccountWizard.h @@ -29,7 +29,7 @@ /** - @author Jérémy Quentin <jeremy.quentin@gmail.com> + @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> */ class AccountWizard : public QWizard { diff --git a/sflphone-client-kde/src/ActionSetAccountFirst.h b/sflphone-client-kde/src/ActionSetAccountFirst.h index dd8914f474aaf5ec01e63ff064f3213f31756ded..4e832e0ae45288fa9399da38884c6d0118822246 100644 --- a/sflphone-client-kde/src/ActionSetAccountFirst.h +++ b/sflphone-client-kde/src/ActionSetAccountFirst.h @@ -27,7 +27,7 @@ #include "Account.h" /** - @author Jérémy Quentin <jeremy.quentin@gmail.com> + @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> */ class ActionSetAccountFirst : public QAction { diff --git a/sflphone-client-kde/src/CMakeLists.txt b/sflphone-client-kde/src/CMakeLists.txt index 21d47e600bfddae56b3a5ae4e5d920c4772bbdc4..73894ff7da83adcc45c8fffddfa9cde0a03bcfdd 100644 --- a/sflphone-client-kde/src/CMakeLists.txt +++ b/sflphone-client-kde/src/CMakeLists.txt @@ -1,11 +1,25 @@ + ADD_DEFINITIONS(${KDE4_DEFINITIONS} ${QT_DEFINITIONS} -fexceptions -DDATA_INSTALL_DIR="\\\"${DATA_INSTALL_DIR}\\\"" ) -SET ( KDE4_KABC_LIBS -lkabc ) +# add_definitions ( -DKDE_DEFAULT_DEBUG_AREA=9000 ) + +# kde4_set_debug_area( 1234 ) +# IF(DEFINED DEBUG_DISABLED) +# MESSAGE("NO DEBUG OUTPUT") +# ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT ) +# ENDIF(DEFINED DEBUG_DISABLED) +MESSAGE("CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") +IF(${CMAKE_BUILD_TYPE} MATCHES Release) +MESSAGE("NO DEBUG OUTPUT") +ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT ) +ENDIF(DEFINED DEBUG_DISABLED) + +SET ( KDE4_KABC_LIBS -lkabc ) SET( sflphone_client_kde_SRCS diff --git a/sflphone-client-kde/src/Call.cpp b/sflphone-client-kde/src/Call.cpp index 10c9aa2dd1b23e3ebffa7532e11de46ee2e4bbaf..1b640e0ff91b200b5ffad6401a50894317d72369 100644 --- a/sflphone-client-kde/src/Call.cpp +++ b/sflphone-client-kde/src/Call.cpp @@ -68,17 +68,17 @@ const function Call::actionPerformedFunctionMap[11][5] = const call_state Call::stateChangedStateMap [11][6] = { // RINGING CURRENT BUSY HOLD HUNGUP FAILURE -/*INCOMING */ {CALL_STATE_INCOMING , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*RINGING */ {CALL_STATE_RINGING , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*CURRENT */ {CALL_STATE_CURRENT , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*DIALING */ {CALL_STATE_RINGING , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*HOLD */ {CALL_STATE_HOLD , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*FAILURE */ {CALL_STATE_FAILURE , CALL_STATE_FAILURE , CALL_STATE_BUSY , CALL_STATE_FAILURE , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*BUSY */ {CALL_STATE_BUSY , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_BUSY , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*TRANSFER */ {CALL_STATE_TRANSFER , CALL_STATE_TRANSFER , CALL_STATE_BUSY , CALL_STATE_TRANSF_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*TRANSF_HOLD */ {CALL_STATE_TRANSF_HOLD , CALL_STATE_TRANSFER , CALL_STATE_BUSY , CALL_STATE_TRANSF_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, -/*OVER */ {CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER }, -/*ERROR */ {CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR } +/*INCOMING */ {CALL_STATE_INCOMING , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*RINGING */ {CALL_STATE_RINGING , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*CURRENT */ {CALL_STATE_CURRENT , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*DIALING */ {CALL_STATE_RINGING , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*HOLD */ {CALL_STATE_HOLD , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*FAILURE */ {CALL_STATE_FAILURE , CALL_STATE_FAILURE , CALL_STATE_BUSY , CALL_STATE_FAILURE , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*BUSY */ {CALL_STATE_BUSY , CALL_STATE_CURRENT , CALL_STATE_BUSY , CALL_STATE_BUSY , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*TRANSFER */ {CALL_STATE_TRANSFER , CALL_STATE_TRANSFER , CALL_STATE_BUSY , CALL_STATE_TRANSF_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*TRANSF_HOLD */ {CALL_STATE_TRANSF_HOLD , CALL_STATE_TRANSFER , CALL_STATE_BUSY , CALL_STATE_TRANSF_HOLD , CALL_STATE_OVER , CALL_STATE_FAILURE }, +/*OVER */ {CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER , CALL_STATE_OVER }, +/*ERROR */ {CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR , CALL_STATE_ERROR } }; const function Call::stateChangedFunctionMap[11][6] = @@ -139,15 +139,6 @@ void Call::initCallItem() descr->addLayout(transfer); mainLayout->addLayout(descr); mainLayout->addItem(horizontalSpacer); - -// QGridLayout * mainLayout = new QGridLayout(itemWidget); -// mainLayout->setMargin(3); -// mainLayout->setSpacing(3); -// mainLayout->addWidget(labelIcon, 0, 0, 2, 1); -// mainLayout->addWidget(labelCallNumber, 0, 1, 1, 2); -// mainLayout->addWidget(labelTransferPrefix, 1, 1, 1, 1); -// mainLayout->addWidget(labelTransferNumber, 1, 2, 1, 2); -// mainLayout->addItem(horizontalSpacer, 0, 3, 1, 3); itemWidget->setLayout(mainLayout); } @@ -157,13 +148,6 @@ void Call::setItemIcon(const QString pixmap) labelIcon->setPixmap(QPixmap(pixmap)); } -// void Call::setPeerName(const QString peerName) -// { -// qDebug() << "setPeerName(" << peerName; -// this->peerName = peerName; -// if(!labelPeerName) labelPeerName = new QLabel(peerName + " : "); -// labelPeerName->setText(peerName + " : "); -// } Call::Call(call_state startState, QString callId, QString peerName, QString peerNumber, QString account) { @@ -619,17 +603,24 @@ void Call::changeCurrentState(call_state newState) void Call::updateItem() { - if(currentState == CALL_STATE_CURRENT && recording) - setItemIcon(ICON_CURRENT_REC); + if(currentState != CALL_STATE_OVER) + { + if(currentState == CALL_STATE_CURRENT && recording) + setItemIcon(ICON_CURRENT_REC); + else + { + QString str = QString(callStateIcons[currentState]); + setItemIcon(str); + } + bool transfer = currentState == CALL_STATE_TRANSFER || currentState == CALL_STATE_TRANSF_HOLD; + labelTransferPrefix->setVisible(transfer); + labelTransferNumber->setVisible(transfer); + if(!transfer) + labelTransferNumber->setText(""); + } else { - QString str = QString(callStateIcons[currentState]); - setItemIcon(str); + qDebug() << "Updating item of call of state OVER. Doing nothing."; } - bool transfer = currentState == CALL_STATE_TRANSFER || currentState == CALL_STATE_TRANSF_HOLD; - labelTransferPrefix->setVisible(transfer); - labelTransferNumber->setVisible(transfer); - if(!transfer) - labelTransferNumber->setText(""); } diff --git a/sflphone-client-kde/src/Contact.h b/sflphone-client-kde/src/Contact.h index 0d62657eab85f15e4ad24c9be9d7f0e9dd3d5483..383aaa688e72391c83621a22d4e5573f85fe39b4 100644 --- a/sflphone-client-kde/src/Contact.h +++ b/sflphone-client-kde/src/Contact.h @@ -31,7 +31,7 @@ using namespace KABC; /** - @author Jérémy Quentin <jeremy.quentin@gmail.com> + @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> */ class Contact{ private: diff --git a/sflphone-client-kde/src/ContactItemWidget.h b/sflphone-client-kde/src/ContactItemWidget.h index 491af56d961266b0a210c4edab5d23ad0f7341ed..a3d4e3d41ea41fb45b28ffc8bc27b69af78bc093 100644 --- a/sflphone-client-kde/src/ContactItemWidget.h +++ b/sflphone-client-kde/src/ContactItemWidget.h @@ -26,7 +26,7 @@ #include "Contact.h" /** - @author Jérémy Quentin <jeremy.quentin@gmail.com> + @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> */ class ContactItemWidget : public QWidget { diff --git a/sflphone-client-kde/src/SFLPhone.cpp b/sflphone-client-kde/src/SFLPhone.cpp index 7c9ac108d04e47200537dfbb4c7ef3901704745b..37a13c05aa59ff2a6bf6405aa6c5cba76d61df44 100644 --- a/sflphone-client-kde/src/SFLPhone.cpp +++ b/sflphone-client-kde/src/SFLPhone.cpp @@ -120,7 +120,7 @@ void SFLPhone::setupActions() toolbar->addAction(view->action_addressBook); toolbar->addSeparator(); toolbar->addAction(view->action_mailBox); - toolbar->setIconSize(QSize(24,24)); + toolbar->setIconSize(QSize(TOOLBAR_SIZE,TOOLBAR_SIZE)); trayIconMenu = new QMenu(this); diff --git a/sflphone-client-kde/src/instance_interface_singleton.h b/sflphone-client-kde/src/instance_interface_singleton.h index 25b25f2ec29a1c78ef02733c4c91e3e65ff6103c..8868b4ff30d0927d872346ccf96c81b5aa1af8e3 100644 --- a/sflphone-client-kde/src/instance_interface_singleton.h +++ b/sflphone-client-kde/src/instance_interface_singleton.h @@ -26,7 +26,7 @@ #include "instance_dbus_interface.h" /** - @author Jérémy Quentin <jeremy.quentin@gmail.com> + @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> */ class InstanceInterfaceSingleton { diff --git a/sflphone-client-kde/src/main.cpp b/sflphone-client-kde/src/main.cpp index e968c54774fbcc5a4f63c229c5466fe3b16afe09..e26c6203533beb84d0db07a0de009037c53cf76b 100644 --- a/sflphone-client-kde/src/main.cpp +++ b/sflphone-client-kde/src/main.cpp @@ -17,7 +17,6 @@ #include "sflphone_const.h" - static const char description[] = I18N_NOOP("A KDE 4 Client for SFLPhone"); static const char version[] = "0.9.5"; @@ -37,12 +36,12 @@ int main(int argc, char **argv) version, ki18n(description), KAboutData::License_GPL, - ki18n("(C) 2009 Jérémy Quentin"), + ki18n("(C) 2009 Savoir-faire Linux"), KLocalizedString(), 0, "jeremy.quentin@savoirfairelinux.com"); - about.addAuthor( ki18n("Jérémy Quentin"), KLocalizedString(), "jeremy.quentin@gmail.com" ); + about.addAuthor( ki18n("Jérémy Quentin"), KLocalizedString(), "jeremy.quentin@savoirfairelinux.com" ); KCmdLineArgs::init(argc, argv, &about); KCmdLineOptions options; //options.add("+[URL]", ki18n( "Document to open" )); diff --git a/sflphone-client-kde/src/qrc/resources.qrc b/sflphone-client-kde/src/qrc/resources.qrc index f80e0438fc2c2019112540a84841b9e7b38e608f..db22439d98b1410434876265ccd04a0a4f6ff8d0 100644 --- a/sflphone-client-kde/src/qrc/resources.qrc +++ b/sflphone-client-kde/src/qrc/resources.qrc @@ -5,46 +5,6 @@ <file>../icons/x-office-address-book.png</file> <file>../icons/add.png</file> <file>../icons/remove.png</file> - <file>../icons/del_off.png</file> - <file>../icons/del_on.png</file> - <file>../icons/accept.svg</file> - <file>../icons/busy.svg</file> - <file>../icons/call.svg</file> - <file>../icons/current.svg</file> - <file>../icons/dial.svg</file> - <file>../icons/fail.svg</file> - <file>../icons/hang_up.svg</file> - <file>../icons/history2.svg</file> - <file>../icons/history.svg</file> - <file>../icons/hold.svg</file> - <file>../icons/icon_accept.svg</file> - <file>../icons/icon_call.svg</file> - <file>../icons/icon_dialpad_off.svg</file> - <file>../icons/icon_dialpad.svg</file> - <file>../icons/icon_hangup.svg</file> - <file>../icons/icon_hold.svg</file> - <file>../icons/icon_rec.svg</file> - <file>../icons/icon_unhold.svg</file> - <file>../icons/icon_volume_off.svg</file> - <file>../icons/icon_volume.svg</file> - <file>../icons/incoming.svg</file> - <file>../icons/mailbox.svg</file> - <file>../icons/mic_25.svg</file> - <file>../icons/mic_50.svg</file> - <file>../icons/mic_75.svg</file> - <file>../icons/mic.svg</file> - <file>../icons/missed.svg</file> - <file>../icons/outgoing.svg</file> - <file>../icons/rec_call.svg</file> - <file>../icons/refuse.svg</file> - <file>../icons/ring.svg</file> - <file>../icons/speaker_25.svg</file> - <file>../icons/speaker_50.svg</file> - <file>../icons/speaker_75.svg</file> - <file>../icons/speaker.svg</file> - <file>../icons/stock_person.svg</file> - <file>../icons/transfert.svg</file> - <file>../icons/unhold.svg</file> <file>../icons/accept.svg</file> <file>../icons/busy.svg</file> <file>../icons/call.svg</file> diff --git a/sflphone-client-kde/src/sflphone_const.h b/sflphone-client-kde/src/sflphone_const.h index 96a56c7603cdcb8c67004cf70e073ecddee9e4e3..9583eb776ba43e429125a82e15f6be25c7f234c5 100644 --- a/sflphone-client-kde/src/sflphone_const.h +++ b/sflphone-client-kde/src/sflphone_const.h @@ -47,6 +47,8 @@ #define PAGE_ACCOUNTS 2 #define PAGE_AUDIO 3 +#define TOOLBAR_SIZE 22 + #define CONTACT_ITEM_HEIGHT 40 #define CONFIG_FILE_PATH "/.sflphone/sflphonedrc" diff --git a/sflphone-client-kde/src/sflphone_kdeview.h b/sflphone-client-kde/src/sflphone_kdeview.h index 20017b53fe277761ad7f46d94d4f9fbb3e0a2e16..3d7fadab154e456cfccc913ca3647ee28b3d9474 100644 --- a/sflphone-client-kde/src/sflphone_kdeview.h +++ b/sflphone-client-kde/src/sflphone_kdeview.h @@ -47,7 +47,7 @@ class ConfigurationDialog; * here. * * @short Main view - * @author Jérémy Quentin <jeremy.quentin@gmail.com> + * @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> * @version 0.1 */