From 695c37fa8f043a220bbfb0358d1d3614f61277e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Quentin?=
 <jquentin@jquentin-laptop-kub2.(none)>
Date: Mon, 20 Apr 2009 14:20:37 -0400
Subject: [PATCH] Address book functionnal with photo displayed.

---
 sflphone_kde/Account.cpp                |  18 +-
 sflphone_kde/AccountList.cpp            |   5 +-
 sflphone_kde/CMakeLists.txt             |   1 +
 sflphone_kde/Call.cpp                   | 122 ++++-
 sflphone_kde/Call.h                     |  38 +-
 sflphone_kde/CallList.cpp               |  14 +-
 sflphone_kde/CallList.h                 |   3 +-
 sflphone_kde/ConfigDialog.cpp           |  10 +-
 sflphone_kde/ConfigDialog.h             |   1 -
 sflphone_kde/Contact.cpp                |  37 +-
 sflphone_kde/Contact.h                  |   9 +-
 sflphone_kde/ContactItemWidget.cpp      |  95 ++++
 sflphone_kde/ContactItemWidget.h        |  50 ++
 sflphone_kde/SFLPhone.cpp               | 126 +++++-
 sflphone_kde/SFLPhone.h                 |   6 +-
 sflphone_kde/icons/application-exit.png | Bin 0 -> 1760 bytes
 sflphone_kde/main.cpp                   |  22 +-
 sflphone_kde/resources.qrc              |   2 +
 sflphone_kde/sflphone-qt.ui             | 579 ------------------------
 sflphone_kde/sflphone_const.h           |   7 +-
 sflphone_kde/sflphone_kdeui.rc          |  46 +-
 sflphone_kde/sflphone_kdeview.cpp       | 222 ++++++---
 sflphone_kde/sflphone_kdeview.h         |   9 +-
 sflphone_kde/sflphone_kdeview_base.ui   | 156 ++++++-
 24 files changed, 852 insertions(+), 726 deletions(-)
 create mode 100644 sflphone_kde/ContactItemWidget.cpp
 create mode 100644 sflphone_kde/ContactItemWidget.h
 create mode 100644 sflphone_kde/icons/application-exit.png
 delete mode 100644 sflphone_kde/sflphone-qt.ui

diff --git a/sflphone_kde/Account.cpp b/sflphone_kde/Account.cpp
index 4d79eb7a22..3b6cc5843b 100644
--- a/sflphone_kde/Account.cpp
+++ b/sflphone_kde/Account.cpp
@@ -64,15 +64,15 @@ void Account::initAccountItem()
 	item = new QListWidgetItem();
 	item->setSizeHint(QSize(140,25));
 	item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsDragEnabled|Qt::ItemIsDropEnabled|Qt::ItemIsEnabled);
-	bool enabled = getAccountDetail(*(new QString(ACCOUNT_ENABLED))) == ACCOUNT_ENABLED_TRUE;
-	setItemText(getAccountDetail(*(new QString(ACCOUNT_ALIAS))));
+	bool enabled = getAccountDetail(ACCOUNT_ENABLED) == ACCOUNT_ENABLED_TRUE;
+	setItemText(getAccountDetail(ACCOUNT_ALIAS));
 	itemWidget = new AccountItemWidget();
 	itemWidget->setEnabled(enabled);
 	if(isNew() || !enabled)
 	{
 		itemWidget->setState(AccountItemWidget::Unregistered);
 	}
-	else if(getAccountDetail(* new QString(ACCOUNT_STATUS)) == ACCOUNT_STATE_REGISTERED)
+	else if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED)
 	{
 		itemWidget->setState(AccountItemWidget::Registered);
 	}
@@ -152,14 +152,14 @@ QListWidgetItem * Account::renewItem()
 AccountItemWidget * Account::getItemWidget()
 {
 	delete itemWidget;
-	bool enabled = getAccountDetail(*(new QString(ACCOUNT_ENABLED))) == ACCOUNT_ENABLED_TRUE;
+	bool enabled = getAccountDetail(ACCOUNT_ENABLED) == ACCOUNT_ENABLED_TRUE;
 		itemWidget = new AccountItemWidget();
 	itemWidget->setEnabled(enabled);
 	if(isNew() || !enabled)
 	{
 		itemWidget->setState(AccountItemWidget::Unregistered);
 	}
-	else if(getAccountDetail(* new QString(ACCOUNT_STATUS)) == ACCOUNT_STATE_REGISTERED)
+	else if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED)
 	{
 		itemWidget->setState(AccountItemWidget::Registered);
 	}
@@ -177,9 +177,9 @@ QString Account::getStateName(QString & state)
 
 QColor Account::getStateColor()
 {
-	if(getAccountDetail(* new QString(ACCOUNT_STATUS)) == ACCOUNT_STATE_UNREGISTERED)
+	if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_UNREGISTERED)
 		return Qt::black;
-	if(getAccountDetail(* new QString(ACCOUNT_STATUS)) == ACCOUNT_STATE_REGISTERED)
+	if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED)
 		return Qt::darkGreen;
 	return Qt::red;
 }
@@ -187,9 +187,9 @@ QColor Account::getStateColor()
 
 QString Account::getStateColorName()
 {
-	if(getAccountDetail(* new QString(ACCOUNT_STATUS)) == ACCOUNT_STATE_UNREGISTERED)
+	if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_UNREGISTERED)
 		return "black";
-	if(getAccountDetail(* new QString(ACCOUNT_STATUS)) == ACCOUNT_STATE_REGISTERED)
+	if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED)
 		return "darkGreen";
 	return "red";
 }
diff --git a/sflphone_kde/AccountList.cpp b/sflphone_kde/AccountList.cpp
index 07c1d158cc..e4f7bc8226 100644
--- a/sflphone_kde/AccountList.cpp
+++ b/sflphone_kde/AccountList.cpp
@@ -99,13 +99,10 @@ QVector<Account *> & AccountList::getAccounts()
 
 Account * AccountList::getAccountById(QString & id)
 {
-	qDebug() << "for " << accounts->size();
 	for (int i = 0; i < accounts->size(); ++i)
 	{
-		qDebug() << "account " << i << " (*accounts)[i]->getAccountId() " << (*accounts)[i];
 		if (!(*accounts)[i]->isNew() && (*accounts)[i]->getAccountId() == id)
 		{
-			qDebug() << "found ";
 			return (*accounts)[i];
 		}
 	}
@@ -116,7 +113,7 @@ QVector<Account *> AccountList::getAccountByState(QString & state)
 {
 	QVector<Account *> v;
 	for (int i = 0; i < accounts->size(); ++i){
-		if ((*accounts)[i]->getAccountDetail(*(new QString(ACCOUNT_STATUS))) == state)
+		if ((*accounts)[i]->getAccountDetail(ACCOUNT_STATUS) == state)
 			v += (*accounts)[i];
 	}
 	return v;
diff --git a/sflphone_kde/CMakeLists.txt b/sflphone_kde/CMakeLists.txt
index 3cc56937aa..875449c2b0 100644
--- a/sflphone_kde/CMakeLists.txt
+++ b/sflphone_kde/CMakeLists.txt
@@ -27,6 +27,7 @@ SET(
 	AccountItemWidget.cpp
 	ActionSetAccountFirst.cpp
 	Contact.cpp
+	ContactItemWidget.cpp
 )
  
 SET(QtApp_RCCS resources.qrc)
diff --git a/sflphone_kde/Call.cpp b/sflphone_kde/Call.cpp
index c56f662857..28cb12deaf 100644
--- a/sflphone_kde/Call.cpp
+++ b/sflphone_kde/Call.cpp
@@ -4,9 +4,15 @@
 #include "callmanager_interface_singleton.h"
 #include "SFLPhone.h"
 #include "sflphone_const.h"
+#include "configurationmanager_interface_p.h"
+#include "configurationmanager_interface_singleton.h"
 
+#include <kabc/addressbook.h>
+#include <kabc/stdaddressbook.h>
 
 
+using namespace KABC;
+
 const call_state Call::actionPerformedStateMap [11][5] = 
 {
 //                      ACCEPT                  REFUSE                  TRANSFER                   HOLD                           RECORD
@@ -57,6 +63,21 @@ const call_state Call::stateChangedStateMap [11][6] =
 /*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] = 
+{ 
+//                      RINGING                  CURRENT             BUSY              HOLD                    HUNGUP           FAILURE
+/*INCOMING       */  {&Call::nothing    , &Call::start     , &Call::start          , &Call::start        ,  &Call::start        , &Call::start  },
+/*RINGING        */  {&Call::nothing    , &Call::start     , &Call::start          , &Call::start        ,  &Call::start        , &Call::start  },
+/*CURRENT        */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*DIALING        */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*HOLD           */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*FAILURE        */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*BUSY           */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*TRANSFERT      */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*TRANSFERT_HOLD */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*OVER           */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing },
+/*ERROR          */  {&Call::nothing    , &Call::nothing   , &Call::nothing        , &Call::nothing      ,  &Call::nothing      , &Call::nothing }
+};
 
 
 const char * Call::callStateIcons[11] = {ICON_INCOMING, ICON_RINGING, ICON_CURRENT, ICON_DIALING, ICON_HOLD, ICON_FAILURE, ICON_BUSY, ICON_TRANSFER, ICON_TRANSF_HOLD, "", ""};
@@ -73,7 +94,8 @@ void Call::initCallItem()
 	itemWidget = new QWidget();
 	labelIcon = new QLabel(itemWidget);
 	qDebug() << "labelIcon : " << labelIcon;
-	labelCallNumber = new QLabel(peer, itemWidget);
+	labelCallNumber = new QLabel(peerPhoneNumber, itemWidget);
+	labelPeerName = NULL;
 	labelTransferPrefix = new QLabel("Transfer to : ", itemWidget);
 	labelTransferNumber = new QLabel(itemWidget);
 	QSpacerItem * horizontalSpacer = new QSpacerItem(16777215, 20, QSizePolicy::Preferred, QSizePolicy::Minimum);
@@ -93,10 +115,17 @@ void Call::setItemIcon(const QString pixmap)
 	labelIcon->setPixmap(QPixmap(pixmap));
 }
 
+void Call::setPeerName(const QString peerName)
+{
+	this->peerName = peerName;
+	if(!labelPeerName) labelPeerName = new QLabel(peerName + " : ");
+	labelPeerName->setText(peerName + " : ");
+}
+
 Call::Call(call_state startState, QString callId, QString from, QString account)
 {
 	this->callId = callId;
-	this->peer = from;
+	this->peerPhoneNumber = from;
 	initCallItem();
 	changeCurrentState(startState);
 	this->account = account;
@@ -181,6 +210,24 @@ daemon_call_state Call::toDaemonCallState(const QString & stateName)
 	return DAEMON_CALL_STATE_FAILURE;
 }
 
+
+Contact * Call::findContactForNumberInKAddressBook(QString number)
+{
+	AddressBook * ab = KABC::StdAddressBook::self();
+	QVector<Contact *> results = QVector<Contact *>();
+	AddressBook::Iterator it;
+	for ( it = ab->begin(); it != ab->end(); ++it ) {	
+		for(int i = 0 ; i < it->phoneNumbers().count() ; i++)
+		{
+			if(it->phoneNumbers().at(i) == number)
+			{
+				return new Contact( *it, it->phoneNumbers().at(i).number() );
+			}
+		}
+	}
+	return NULL;
+}
+
 QListWidgetItem * Call::getItem()
 {
 	return item;
@@ -195,18 +242,45 @@ QListWidgetItem * Call::getHistoryItem()
 {
 	if(historyItem == NULL && historyState != NONE)
 	{
-		historyItem = new QListWidgetItem(peer);
+		historyItem = new QListWidgetItem();
+		historyItem->setSizeHint(QSize(140,30));
 		qDebug() << "historystate = " << historyState;
-		historyItem->setIcon(QIcon(historyIcons[historyState]));
 	}
 	return historyItem;
 }
 
 QWidget * Call::getHistoryItemWidget()
 {
+	if(historyItemWidget == NULL && historyState != NONE)
+	{
+		historyItemWidget = new QWidget();
+		labelHistoryIcon = new QLabel(historyItemWidget);
+		labelHistoryIcon->setPixmap(QPixmap(historyIcons[historyState]));
+		labelHistoryCallNumber = new QLabel(peerPhoneNumber, historyItemWidget);
+		labelHistoryPeerName = NULL;
+		if(!peerName.isEmpty())
+			labelHistoryPeerName = new QLabel(peerName + " : ", historyItemWidget);
+		labelHistoryTime = new QLabel(startTime->toString(Qt::LocaleDate), historyItemWidget);
+		QSpacerItem * horizontalSpacer = new QSpacerItem(16777215, 20, QSizePolicy::Preferred, QSizePolicy::Minimum);
+		QGridLayout * layout = new QGridLayout(historyItemWidget);
+		layout->setMargin(3);
+		layout->setSpacing(3);
+		layout->addWidget(labelHistoryIcon, 0, 0, 2, 1);
+		layout->addWidget(labelHistoryCallNumber, 0, 1, 1, 2);
+		layout->addWidget(labelHistoryTime, 1, 1, 1, 1);
+		layout->addItem(horizontalSpacer, 0, 3, 1, 3);
+		historyItemWidget->setLayout(layout);
+	}
 	return historyItemWidget;
 }
 
+/*
+layout->addWidget(labelIcon, 0, 0, 2, 1);
+	layout->addWidget(labelCallNumber, 0, 1, 1, 2);
+	layout->addWidget(labelTransferPrefix, 1, 1, 1, 1);
+	layout->addWidget(labelTransferNumber, 1, 2, 1, 2);
+	layout->addItem(horizontalSpacer, 0, 3, 1, 3);
+*/
 call_state Call::getState() const
 {
 	return currentState;
@@ -223,6 +297,7 @@ call_state Call::stateChanged(const QString & newStateName)
 	daemon_call_state dcs = toDaemonCallState(newStateName);
 	//(this->*(stateChangedFunctionMap[currentState][dcs]))();
 	changeCurrentState(stateChangedStateMap[currentState][dcs]);
+	(this->*(stateChangedFunctionMap[previousState][dcs]))();
 	qDebug() << "Calling stateChanged " << newStateName << " -> " << toDaemonCallState(newStateName) << " on call with state " << previousState << ". Become " << currentState;
 	return currentState;
 }
@@ -230,20 +305,30 @@ call_state Call::stateChanged(const QString & newStateName)
 call_state Call::actionPerformed(call_action action)
 {
 	call_state previousState = currentState;
-	//execute the action associated with this transition
-	(this->*(actionPerformedFunctionMap[currentState][action]))();
 	//update the state
-	changeCurrentState(actionPerformedStateMap[currentState][action]);
+	changeCurrentState(actionPerformedStateMap[previousState][action]);
+	//execute the action associated with this transition
+	(this->*(actionPerformedFunctionMap[previousState][action]))();
 	qDebug() << "Calling action " << action << " on call with state " << previousState << ". Become " << currentState;
 	//return the new state
 	return currentState;
 }
 
-QString Call::getCallId()
+QString Call::getCallId() const
 {
 	return callId;
 }
 
+QString Call::getPeerPhoneNumber() const
+{
+	return peerPhoneNumber;
+}
+
+QString Call::getPeerName() const
+{
+	return peerName;
+}
+
 call_state Call::getCurrentState() const
 {
 	return currentState;
@@ -337,7 +422,10 @@ void Call::call()
 		qDebug() << "Calling " << number << " with account " << account << ". callId : " << callId;
 		callManager.placeCall(account, callId, number);
 		this->account = account;
-		this->peer = number;
+		this->peerPhoneNumber = number;
+		Contact * contact = findContactForNumberInKAddressBook(peerPhoneNumber);
+		if(contact) this->peerName = contact->getNickName();
+		this->startTime = new QDateTime(QDateTime::currentDateTime());
 		this->historyState = OUTGOING;
 	}
 	else
@@ -380,8 +468,15 @@ void Call::setRecord()
 	recording = !recording;
 }
 
+void Call::start()
+{
+	qDebug() << "Starting call. callId : " << callId;
+	this->startTime = new QDateTime(QDateTime::currentDateTime());
+}
+
 void Call::appendItemText(QString text)
 {
+	ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
 	QLabel * editNumber;
 	switch(currentState)
 	{
@@ -392,6 +487,15 @@ void Call::appendItemText(QString text)
 		case CALL_STATE_DIALING:
 			editNumber = labelCallNumber;
 			break;
+		case CALL_STATE_CURRENT:
+			//TODO replace account string by an Account instance and handle damn pointers to avoid detruction of Accounts
+			//if(peer == account->getAccountDetail(ACCOUNT_MAILBOX))
+			if(peerPhoneNumber == configurationManager.getAccountDetails(account).value()[ACCOUNT_MAILBOX])
+			{
+				text = QString(QChar(0x9A));
+			}
+			editNumber = labelCallNumber;
+			break;		
 		default:
 			qDebug() << "Type key on call not editable. Doing nothing.";
 			return;
diff --git a/sflphone_kde/Call.h b/sflphone_kde/Call.h
index 347ddc673c..2493c40a31 100644
--- a/sflphone_kde/Call.h
+++ b/sflphone_kde/Call.h
@@ -7,6 +7,8 @@
 #include <QtGui/QLabel>
 #include <QtGui/QWidget>
 
+#include "Contact.h"
+
 /** @enum call_state_t 
   * This enum have all the states a call can take.
   */
@@ -21,11 +23,11 @@ typedef enum
    /** Call which numbers are being added by the user */
    CALL_STATE_DIALING,
    /** Call is on hold */
-   CALL_STATE_HOLD,      
+   CALL_STATE_HOLD,
    /** Call has failed */
-   CALL_STATE_FAILURE,      
+   CALL_STATE_FAILURE,
    /** Call is busy */
-   CALL_STATE_BUSY,        
+   CALL_STATE_BUSY,
    /** Call is being transfered.  During this state, the user can enter the new number. */
    CALL_STATE_TRANSFER,
    /** Call is on hold for transfer */
@@ -46,13 +48,13 @@ typedef enum
    /** Call to which the user can speak and hear */
    DAEMON_CALL_STATE_CURRENT,
    /** Call is busy */
-   DAEMON_CALL_STATE_BUSY,   
+   DAEMON_CALL_STATE_BUSY,
    /** Call is on hold */
-   DAEMON_CALL_STATE_HOLD,    
+   DAEMON_CALL_STATE_HOLD,
    /** Call is over  */
-   DAEMON_CALL_STATE_HUNG_UP,  
+   DAEMON_CALL_STATE_HUNG_UP,
    /** Call has failed */
-   DAEMON_CALL_STATE_FAILURE      
+   DAEMON_CALL_STATE_FAILURE
 } daemon_call_state;
 
 /** @enum call_action
@@ -97,24 +99,34 @@ private:
 	
 	QString account;
 	QString callId;
-	QString peer;
+	QString peerPhoneNumber;
+	QString peerName;
 	history_state historyState;
 	QDateTime * startTime;
 	QDateTime * stopTime;
+	
 	QListWidgetItem * item;
 	QWidget * itemWidget;
 	QLabel * labelIcon;
+	QLabel * labelPeerName;
 	QLabel * labelCallNumber;
 	QLabel * labelTransferPrefix;
 	QLabel * labelTransferNumber;
 	
 	QListWidgetItem * historyItem;
 	QWidget * historyItemWidget;
+	QLabel * labelHistoryIcon;
+	QLabel * labelHistoryPeerName;
+	QLabel * labelHistoryCallNumber;
+	QLabel * labelHistoryTime;
+	
 	
 	//Automate attributes
 	static const call_state actionPerformedStateMap [11][5];
 	static const function actionPerformedFunctionMap [11][5];
 	static const call_state stateChangedStateMap [11][6];
+	static const function stateChangedFunctionMap [11][6];
+	
 	static const char * historyIcons[3];
 	
 	call_state currentState;
@@ -139,6 +151,8 @@ private:
 	void unhold();
 	void switchRecord();
 	void setRecord();
+	
+	void start();
 
 public:
 	
@@ -147,12 +161,17 @@ public:
 	static Call * buildDialingCall(QString callId);
 	static Call * buildIncomingCall(const QString & callId, const QString & from, const QString & account);
 	static Call * buildRingingCall(const QString & callId);
+	Contact * findContactForNumberInKAddressBook(QString number);
+	
 	QListWidgetItem * getItem();
 	QWidget * getItemWidget();
 	QListWidgetItem * getHistoryItem();
 	QWidget * getHistoryItemWidget();
 	call_state getState() const;
-	QString getCallId();
+	QString getCallId() const;
+	QString getPeerPhoneNumber() const;
+	QString getPeerName() const;
+	
 	call_state stateChanged(const QString & newState);
 	call_state actionPerformed(call_action action);
 	call_state getCurrentState() const;
@@ -161,6 +180,7 @@ public:
 	void appendItemText(QString text);
 	void backspaceItemText();
 	void setItemIcon(const QString pixmap);
+	void setPeerName(const QString peerName);
 	void changeCurrentState(call_state newState);
 	void updateItem();
 
diff --git a/sflphone_kde/CallList.cpp b/sflphone_kde/CallList.cpp
index a5d0736299..480e43bd26 100644
--- a/sflphone_kde/CallList.cpp
+++ b/sflphone_kde/CallList.cpp
@@ -27,7 +27,7 @@ Call * CallList::operator[](const QListWidgetItem * item)
 	return NULL;
 }
 
-Call * CallList::getCallByItem(const QListWidgetItem * item)
+Call * CallList::findCallByItem(const QListWidgetItem * item)
 {
 	for(int i = 0 ; i < size() ; i++)
 	{
@@ -39,6 +39,18 @@ Call * CallList::getCallByItem(const QListWidgetItem * item)
 	return NULL;
 }
 
+Call * CallList::findCallByHistoryItem(const QListWidgetItem * item)
+{
+	for(int i = 0 ; i < size() ; i++)
+	{
+		if ((*calls)[i]->getHistoryItem() == item)
+		{
+			return (*calls)[i];
+		}
+	}
+	return NULL;
+}
+
 Call * CallList::operator[](const QString & callId)
 {
 	for(int i = 0 ; i < size() ; i++)
diff --git a/sflphone_kde/CallList.h b/sflphone_kde/CallList.h
index 8ac1c7898c..a66c37d361 100644
--- a/sflphone_kde/CallList.h
+++ b/sflphone_kde/CallList.h
@@ -18,7 +18,8 @@ public:
 	CallList();
 	~CallList();
 
-	Call * getCallByItem(const QListWidgetItem * item);
+	Call * findCallByItem(const QListWidgetItem * item);
+	Call * findCallByHistoryItem(const QListWidgetItem * item);
 	Call * operator[](const QListWidgetItem * item);
 	Call * operator[](const QString & callId);
 	Call * operator[](int ind);
diff --git a/sflphone_kde/ConfigDialog.cpp b/sflphone_kde/ConfigDialog.cpp
index 67ef38faae..7e5eefee45 100644
--- a/sflphone_kde/ConfigDialog.cpp
+++ b/sflphone_kde/ConfigDialog.cpp
@@ -11,6 +11,7 @@
 #include "sflphone_const.h"
 #include "metatypes.h"
 #include "configurationmanager_interface_singleton.h"
+#include "configurationmanager_interface_p.h"
 
 
 AccountList * ConfigurationDialog::accountList;
@@ -153,6 +154,11 @@ void ConfigurationDialog::loadOptions()
 	//pulseaudio settings
 	checkBox_pulseAudioVolumeAlter->setCheckState(configurationManager.getPulseAppVolumeControl() ? Qt::Checked : Qt::Unchecked);
 	
+	//////////////////////
+	////Record settings////
+	//////////////////////
+	
+	urlcomborequester_destinationFolder->setUrl(KUrl::fromPath(configurationManager.getRecordPath()));
 	
 }
 
@@ -307,12 +313,12 @@ void ConfigurationDialog::loadAccount(QListWidgetItem * item)
 	Account * account = accountList->getAccountByItem(item);
 	if(! account )  {  qDebug() << "Attempting to load details of an unexisting account";  return;  }
 
-	edit1_alias->setText( account->getAccountDetail(*(new QString(ACCOUNT_ALIAS))));
+	edit1_alias->setText( account->getAccountDetail(ACCOUNT_ALIAS));
 	
 	QString protocolsTab[] = ACCOUNT_TYPES_TAB;
 	QList<QString> * protocolsList = new QList<QString>();
 	for(int i=0;i<sizeof(protocolsTab)/sizeof(QString);i++) protocolsList->append(protocolsTab[i]);
-	QString accountName = account->getAccountDetail(* new QString(ACCOUNT_TYPE));
+	QString accountName = account->getAccountDetail(ACCOUNT_TYPE);
 	int protocolIndex = protocolsList->indexOf(accountName);
 	delete protocolsList;
 	
diff --git a/sflphone_kde/ConfigDialog.h b/sflphone_kde/ConfigDialog.h
index d9e36e32b0..3ee92bc295 100644
--- a/sflphone_kde/ConfigDialog.h
+++ b/sflphone_kde/ConfigDialog.h
@@ -8,7 +8,6 @@
 #include <QErrorMessage>
 
 #include "ui_ConfigDialog.h"
-#include "configurationmanager_interface_p.h"
 #include "AccountList.h"
 #include "sflphone_kdeview.h"
 
diff --git a/sflphone_kde/Contact.cpp b/sflphone_kde/Contact.cpp
index e0f6ebdef8..3e6b955fac 100644
--- a/sflphone_kde/Contact.cpp
+++ b/sflphone_kde/Contact.cpp
@@ -20,13 +20,19 @@
  ***************************************************************************/
 #include "Contact.h"
 
+#include <QtCore/QDebug>
+
+#include "ContactItemWidget.h"
+#include "sflphone_const.h"
+
+
 Contact::Contact(Addressee addressee, QString number)
 {
 	this->firstName = addressee.name();
 	this->secondName = addressee.familyName();
 	this->nickName = addressee.nickName();
 	this->phoneNumber = number;
-	this->photo = addressee.photo().url();
+	this->photo = new Picture(addressee.photo());
 	
 	initItem();
 }
@@ -38,10 +44,35 @@ Contact::~Contact()
 
 void Contact::initItem()
 {
-	this->item = new QListWidgetItem(phoneNumber);
-	this->itemWidget = new QWidget();
+	this->item = new QListWidgetItem();
+	this->item->setSizeHint(QSize(140,CONTACT_ITEM_HEIGHT));
+	this->itemWidget = new ContactItemWidget(this);
+}
+
+QString Contact::getPhoneNumber() const
+{
+	return phoneNumber;
+}
+
+QString Contact::getNickName() const
+{
+	return nickName;
 }
 
+QString Contact::getFirstName() const
+{
+	return firstName;
+}
+
+QString Contact::getSecondName() const
+{
+	return secondName;
+}
+
+const Picture * Contact::getPhoto() const
+{
+	return photo;
+}
 
 //TODO
 QListWidgetItem * Contact::getItem()
diff --git a/sflphone_kde/Contact.h b/sflphone_kde/Contact.h
index ccf892ca4b..62dbf39862 100644
--- a/sflphone_kde/Contact.h
+++ b/sflphone_kde/Contact.h
@@ -25,6 +25,7 @@
 #include <QtGui/QWidget>
 
 #include <kabc/addressee.h>
+#include <kabc/picture.h>
 
 using namespace KABC;
 
@@ -39,7 +40,7 @@ private:
 	QString secondName;
 	QString nickName;
 	QString phoneNumber;
-	QString photo;
+	Picture * photo;
 	
 private:
 	void initItem();
@@ -49,6 +50,12 @@ public:
 
     ~Contact();
     
+    QString getPhoneNumber() const;
+    QString getNickName() const;
+    QString getFirstName() const;
+    QString getSecondName() const;
+    const Picture * getPhoto() const;
+    
     QListWidgetItem * getItem();
     
     QWidget * getItemWidget();
diff --git a/sflphone_kde/ContactItemWidget.cpp b/sflphone_kde/ContactItemWidget.cpp
new file mode 100644
index 0000000000..ff1f848193
--- /dev/null
+++ b/sflphone_kde/ContactItemWidget.cpp
@@ -0,0 +1,95 @@
+/***************************************************************************
+ *   Copyright (C) 2009 by Savoir-Faire Linux                              *
+ *   Author : Jérémy Quentin                                               *
+ *   jeremy.quentin@savoirfairelinux.com                                   *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 3 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#include "ContactItemWidget.h"
+
+#include <QtCore/QString>
+#include <QtGui/QVBoxLayout>
+#include <QtCore/QDebug>
+#include <QtGui/QSpacerItem>
+
+#include "sflphone_const.h"
+
+ContactItemWidget::ContactItemWidget(const Contact * contact, QWidget *parent)
+ : QWidget(parent)
+{
+	if(!contact->getNickName().isEmpty())
+	{
+		contactName = new QLabel(contact->getNickName());
+	}
+	else
+	{
+		contactName = new QLabel(contact->getFirstName());
+	}
+	if(!contact->getPhoto()->isEmpty())
+	{
+		QPixmap pixmap;
+		if(contact->getPhoto()->isIntern())
+		{
+			contactPhoto = new QLabel();
+			pixmap = QPixmap::fromImage(contact->getPhoto()->data());
+		}
+		else
+		{
+			contactPhoto = new QLabel();
+			pixmap = QPixmap(contact->getPhoto()->url());
+		}
+		if(pixmap.height() > pixmap.width())
+			contactPhoto->setPixmap(pixmap.scaledToHeight(CONTACT_ITEM_HEIGHT-4));
+		else
+			contactPhoto->setPixmap(pixmap.scaledToWidth(CONTACT_ITEM_HEIGHT-4));
+	}
+	else
+	{
+		contactPhoto = new QLabel();
+		contactPhoto->setMinimumSize(CONTACT_ITEM_HEIGHT-4, 0);
+	}
+	contactNumber = new QLabel(contact->getPhoneNumber());
+	QSpacerItem * horizontalSpacer = new QSpacerItem(16777215, 20, QSizePolicy::Preferred, QSizePolicy::Minimum);
+	QHBoxLayout * hlayout = new QHBoxLayout(this);
+	QVBoxLayout * vlayout = new QVBoxLayout();
+	hlayout->setMargin(1);
+	hlayout->setSpacing(4);
+	vlayout->setMargin(1);
+	vlayout->setSpacing(2);
+	vlayout->addWidget(contactName);
+	vlayout->addWidget(contactNumber);
+	hlayout->addWidget(contactPhoto);
+	hlayout->addLayout(vlayout);
+	hlayout->addItem(horizontalSpacer);
+	this->setLayout(hlayout);
+}
+
+
+ContactItemWidget::~ContactItemWidget()
+{
+}
+
+
+QString ContactItemWidget::getContactName()
+{
+	return contactName->text();
+}
+
+QString ContactItemWidget::getContactNumber()
+{
+	return contactNumber->text();
+}
+
diff --git a/sflphone_kde/ContactItemWidget.h b/sflphone_kde/ContactItemWidget.h
new file mode 100644
index 0000000000..4ea38c5a79
--- /dev/null
+++ b/sflphone_kde/ContactItemWidget.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ *   Copyright (C) 2009 by Savoir-Faire Linux                              *
+ *   Author : Jérémy Quentin                                               *
+ *   jeremy.quentin@savoirfairelinux.com                                   *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 3 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#ifndef CONTACTITEMWIDGET_H
+#define CONTACTITEMWIDGET_H
+
+#include <QWidget>
+#include <QtGui/QLabel>
+#include "Contact.h"
+
+/**
+	@author Jérémy Quentin <jeremy.quentin@gmail.com>
+*/
+class ContactItemWidget : public QWidget
+{
+Q_OBJECT
+
+private:
+	QLabel * contactName;
+	QLabel * contactNumber;
+	QLabel * contactPhoto;
+	
+public:
+	ContactItemWidget(const Contact * contact, QWidget *parent = 0);
+
+	~ContactItemWidget();
+	
+	QString getContactName();
+	QString getContactNumber();
+
+};
+
+#endif
diff --git a/sflphone_kde/SFLPhone.cpp b/sflphone_kde/SFLPhone.cpp
index 207f510bfe..e000ab2491 100644
--- a/sflphone_kde/SFLPhone.cpp
+++ b/sflphone_kde/SFLPhone.cpp
@@ -1,32 +1,43 @@
 #include "SFLPhone.h"
 
-
+#include <KApplication>
 #include <KStandardAction>
+#include <KMenuBar>
+#include <KMenu>
+#include <KAction>
+#include <KToolBar>
+#include <QtGui/QStatusBar>
+#include <KActionCollection>
+
+#include "sflphone_const.h"
+
 
 
 SFLPhone::SFLPhone(QWidget *parent)
-    : KMainWindow(parent),
+    : KXmlGuiWindow(parent),
       view(new sflphone_kdeView(this))
 {
 	// accept dnd
-    setAcceptDrops(true);
+		setAcceptDrops(true);
 
     // tell the KXmlGuiWindow that this is indeed the main widget
-    setCentralWidget(view);
+		setCentralWidget(view);
 
     // then, setup our actions
-    setupActions();
+   
 
     // add a status bar
-//     statusBar()->show();
+//    statusBar()->show();
 
     // a call to KXmlGuiWindow::setupGUI() populates the GUI
     // with actions, using KXMLGUI.
     // It also applies the saved mainwindow settings, if any, and ask the
     // mainwindow to automatically save settings if changed: window size,
     // toolbar position, icon size, etc.
-//     setupGUI();
-
+ 
+		setupActions();
+		createGUI("/home/jquentin/sflphone/sflphone_kde/sflphone_kdeui.rc");
+		setWindowIcon(QIcon(ICON_SFLPHONE));
 } 
 
 SFLPhone::~SFLPhone()
@@ -35,15 +46,100 @@ SFLPhone::~SFLPhone()
 
 void SFLPhone::setupActions()
 {
-//     KStandardAction::openNew(this, SLOT(fileNew()), actionCollection());
-//     KStandardAction::quit(qApp, SLOT(quit()), actionCollection());
+	qDebug() << "setupActions";
+// 	KStandardAction::openNew(this, SLOT(fileNew()), actionCollection());
+// 	KStandardAction::quit(qApp, SLOT(quit()), actionCollection());
 
-//     KStandardAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+// 	KStandardAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
 
-    // custom menu and menu item - the slot is in the class testkde4appfwView
-//     KAction *custom = new KAction(KIcon("colorize"), i18n("Swi&tch Colors"), this);
-//     actionCollection()->addAction( QLatin1String("switch_action"), custom );
-//     connect(custom, SIGNAL(triggered(bool)), view, SLOT(switchColors()));
+//     custom menu and menu item - the slot is in the class testkde4appfwView
+// 	KAction *custom = new KAction(KIcon("colorize"), i18n("Swi&tch Colors"), this);
+// 	actionCollection()->addAction( QLatin1String("switch_action"), custom );
+// 	connect(custom, SIGNAL(triggered(bool)), view, SLOT(switchColors()));
+// 	KAction * action_quit = KStandardAction::quit(qApp, SLOT(closeAllWindows()), menu_Actions);
+// 	menu_Actions->addAction(action_quit);
+	
+	actionCollection()->addAction("action_accept", view->action_accept);
+	actionCollection()->addAction("action_refuse", view->action_refuse);
+	actionCollection()->addAction("action_hold", view->action_hold);
+	actionCollection()->addAction("action_transfer", view->action_transfer);
+	actionCollection()->addAction("action_record", view->action_record);
+	actionCollection()->addAction("action_history", view->action_history);
+	actionCollection()->addAction("action_addressBook", view->action_addressBook);
+	actionCollection()->addAction("action_mailBox", view->action_mailBox);
+	KAction * action_quit = KStandardAction::quit(qApp, SLOT(closeAllWindows()), 0);
+	actionCollection()->addAction("action_quit", action_quit);
+	
+	//KMenu * menu_Actions = new KMenu(tr2i18n("&Actions"));
+	//actionCollection()->addMenu("Actions", menu_Actions);
+	//menu_Actions->setObjectName(QString::fromUtf8("menu_Actions"));
+// 	menu_Actions->addAction(view->action_accept);
+// 	menu_Actions->addAction(view->action_refuse);
+// 	menu_Actions->addAction(view->action_hold);
+// 	menu_Actions->addAction(view->action_transfer);
+// 	menu_Actions->addAction(view->action_record);
+// 	menu_Actions->addSeparator();
+// 	menu_Actions->addAction(view->action_history);
+// 	menu_Actions->addAction(view->action_addressBook);
+// 	menu_Actions->addSeparator();
+// 	menu_Actions->addAction(view->action_mailBox);
+// 	menu_Actions->addSeparator();
+// 	KAction * action_quit = KStandardAction::quit(qApp, SLOT(closeAllWindows()), 0);
+// 	menu_Actions->addAction(action_quit);
+// 	qDebug() << "menuBar()->addMenu(menu_Actions) : " << menuBar()->addMenu(menu_Actions);
+	//menuBar()->addMenu(menu_Actions);
+	
+	actionCollection()->addAction("action_displayVolumeControls", view->action_displayVolumeControls);
+	actionCollection()->addAction("action_displayDialpad", view->action_displayDialpad);
+	actionCollection()->addAction("action_configureAccounts", view->action_configureAccounts);
+	actionCollection()->addAction("action_configureAudio", view->action_configureAudio);
+	actionCollection()->addAction("action_configureSflPhone", view->action_configureSflPhone);
+	actionCollection()->addAction("action_accountCreationWizard", view->action_accountCreationWizard);
+	
+// 	KMenu * menu_Configure = new KMenu(tr2i18n("&Settings"));
+// 	menu_Configure->setObjectName(QString::fromUtf8("menu_Configure"));
+// 	menu_Configure->addAction(view->action_displayVolumeControls);
+// 	menu_Configure->addAction(view->action_displayDialpad);
+// 	menu_Configure->addSeparator();
+// 	menu_Configure->addAction(view->action_configureAccounts);
+// 	menu_Configure->addAction(view->action_configureAudio);
+// 	menu_Configure->addAction(view->action_configureSflPhone);
+// 	menu_Configure->addSeparator();
+// 	menu_Configure->addAction(view->action_accountCreationWizard);
+// 	menuBar()->addMenu(menu_Configure);
+	
+	QStatusBar * statusbar = new QStatusBar(this);
+	statusbar->setObjectName(QString::fromUtf8("statusbar"));
+	this->setStatusBar(statusbar);
+	
+	QToolBar * toolbar = new QToolBar(this);
+	this->addToolBar(Qt::TopToolBarArea, toolbar);
+	toolbar->addAction(view->action_accept);
+	toolbar->addAction(view->action_refuse);
+	toolbar->addAction(view->action_hold);
+	toolbar->addAction(view->action_transfer);
+	toolbar->addAction(view->action_record);
+	toolbar->addSeparator();
+	toolbar->addAction(view->action_history);
+	toolbar->addAction(view->action_addressBook);
+	toolbar->addSeparator();
+	toolbar->addAction(view->action_mailBox);
+	
+	
 }
 
 
+bool SFLPhone::queryClose()
+{
+	qDebug() << "queryClose : " << view->listWidget_callList->count() << " calls open.";
+	if(view->listWidget_callList->count() > 0)
+	{
+		qDebug() << "Attempting to quit when still having some calls open.";
+		view->getErrorWindow()->showMessage(tr2i18n("You still have some calls open. Please close all calls before quitting.", 0));
+		return false;
+	}
+	return true;
+}
+
+
+
diff --git a/sflphone_kde/SFLPhone.h b/sflphone_kde/SFLPhone.h
index 37feff3dd8..ff7aeea15f 100644
--- a/sflphone_kde/SFLPhone.h
+++ b/sflphone_kde/SFLPhone.h
@@ -19,7 +19,7 @@
 class ConfigurationDialog;
 class sflphone_kdeView;
 
-class SFLPhone : public KMainWindow
+class SFLPhone : public KXmlGuiWindow
 {
 
 Q_OBJECT
@@ -27,12 +27,14 @@ Q_OBJECT
 private:
 	sflphone_kdeView * view;
 
-
+protected:
+	virtual bool queryClose();
 
 public:
 	SFLPhone(QWidget *parent = 0);
 	~SFLPhone();
 	void setupActions();
+	
 
 };
 
diff --git a/sflphone_kde/icons/application-exit.png b/sflphone_kde/icons/application-exit.png
new file mode 100644
index 0000000000000000000000000000000000000000..dd76354c4a49d07e81d9e701164cdc2caa439a47
GIT binary patch
literal 1760
zcmV<61|Ru}P)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800009a7bBm000}W
z000}W0bUxB8~^|S2XskIMF-am8x{o-j%%>p00006VoOIv0RI600RN!9r;`8x25m`1
zK~#9!%~xA&R8<sR_uiSg^XT*e2n32!K1x+$rVzx2q7ovINJub^p}Y!$JW{9z6VMOk
z%b17;Lk#c4FZduN0`bE~2r5c2fR@sNw6wgR>B~-snS19x-23$A+!<RU9}wNi>N!1U
zpS{-J`^=dP{%cd<Su4$p!{Lw<kLy8AQ<cX|<PxlC)Kxk=GrfI%W;rcM0lhR@b#)14
z)Tn*ECr>7__wTFTq5L3n9C}U8AF>ylFu@&OUEOFlHLZ*uJlI%F%K>&s>$)B&E!`KG
zJ$tfNRRvX1250a%%B@o5!oteTwQGA7U9W~=WQ2gMszz=dIg*H1RKPS%JV|pXxz=OH
zDxW7#00RPS*VTHOn^irTgpDU_wqc-;TFjgv8>oQmsty1vlgSg%P0nrMFoNkc61vW<
zd9*BD7mai_8;PKtVwUK-FCd%cgaxM*K;){;n>hmhvTZnt1Qu0SBTWK+Jah<U$s~*T
zSMn?IIOf&XB0>UwJ8=R%=gy%}(+2iUliMIT0q>9FI4poGAQ7d@IE}~^a*jr$c(tYm
zw@ONo<^7={_HGszvoD_!XQ$1Wfk;)A^l`WX9;XywJC5H14`oF~P*t%Fm$K5Sj4#cf
zkFL^E=_lclca9w^d_tiR6M&6ll#wXu%N6iAr2xxsfmGUh-~b-9x5KNDKrk3Y<=nYQ
zO`HhJFl11kr^?Hbm@@}~KmfLFGlcL59UW-fzdx@6+ydtGE8t&3iEJu`mc4tCYHO1s
zI3N=|H)|H0DV0!cL%^P#K*h|N&@?Td{PJbA?AZe|l^P_#&b@>-pom4o;0^!A63*|~
zfk|uDAXru=D<R4{eFkom7{Ep8i&ebF#5{`L8y)SquzL?2TFW)t6TqB8fUE!qFijCe
z8oAIiF7DipXV=z4eWpxSf{8{?od(Zj&zao0b_JJq?|@@k)a#sQl=k%EBI0udr+){0
z0e%~d3|un<HJgEw=|}s{&*5HeV**(T?}GAN3fFF4LC3CbfYA@d%23NR#K(<8WW)%#
z<acK4R+t$B)<53?S5?q`p#@4ff>1n;U^s+;PUUn5R4N8=eb=XWdi6%QV`Mv607D3i
zC%bX?@P6nq9STQH8|b@!868ItBb`ixEf|Y}xOg{DfWj3>-nfoT{{v{6f=DccSYZT_
z0v+LK2zodOClbQ3AHGM`l2wv8SH!R1euL=OUs3fem|4K^pb#{ovzds=T~%;O0YZf8
zH5}|rJ+=+FDFZegw))9i*U<LbB2?Ebk!{EYTiM(NXzsd?kw^CdU||s8ZSD|{ibmu)
z7hTQ$mST0RA)xsP@)*)^=k?`yrQrj_Vlj9oZ#-wucYr^JFDzY$?l;zoGr>T9EOHkd
zuA&SUz<ptL8trL0A~XurwO}<~-tayO3JRD|k`KSph^KBg@?5rq--$$BJyNv|eAbV{
zP$7IBb!Y*y0>Y6&>8BR1C-TjlIg>LuQzAbL`-^38wy(hGJ5BsbGCA*wXM4(98{n?k
z#4++>DwLr+lmJ%6n-pI_4QLc#Bav@na#qd|B*j-x3-YjP3MgN$z?ggI5e|o?5S~wc
zy8)5<4@E2ylc6cZg(2?%5%>aP>o%jh{yj;~nQ`D)+bLu|TY{i#LJt99LJ%gh+m=&R
z{unG`)p`tjcZ-M#7Vz*p!2kIhRg3FH05VA)Z21MfA1?y3CI*>hBKgTuL|adB3s?lV
zOPs5$St#8URp4Ql5b~pQdSwmJ-zT3}`}gCx{ZTD!!xW$AtOd{%83NC38{#FsyJazO
z?q~T`&N0qVERG3=ch`n!fgq9sdRoro%(8h<lf6iv{0{A#7Q!O7tPT0dqzxfJz_dVn
z1X9&OzI=wyo~@flv6@6o$Mv%J`4Px(fp8KTIs`uW)AaF(gdqB@61?^aKh2ZR{+7ie
zypbx=-0<drID=#PF(DGoZvn5_YQZo!I<k-*1uWY~)?$dv1q?56+CzrH>)t;5S^_eL
zj2j(UMC*#foU#Hg(5=Vfm*SJgS7^}?G{@ps%zMfFQ6ne>u9iiRnQ+_qnI))%piOg&
z&d{jS81)jcwIHl`36u->E-|MRpa4Cgi+?tB^!9A;>FO-crqk-9{|tL{3q_(%SiNy+
zbh7^)=0xswI6lyh62dTUFP?yTW#`O$W&#fW5B4{McG5)R9cTpr0000<MNUMnLSTZ%
Ca3tRV

literal 0
HcmV?d00001

diff --git a/sflphone_kde/main.cpp b/sflphone_kde/main.cpp
index 37f6090144..781cb360c4 100644
--- a/sflphone_kde/main.cpp
+++ b/sflphone_kde/main.cpp
@@ -1,6 +1,9 @@
 #include <QApplication>
 #include <QtCore/QString>
 #include <QtGui/QCursor>
+#include <QtGui/QMenu>
+#include <QtGui/QMenuBar>
+#include <QtGui/QAction>
 #include <kapplication.h>
 #include <kcmdlineargs.h>
 #include <kaboutdata.h>
@@ -38,6 +41,7 @@ int main(int argc, char **argv)
 	{
 		InstanceInterface & instance = InstanceInterfaceSingleton::getInstance();
 		instance.Register(getpid(), APP_NAME);
+		
 		KAboutData about(
 		   "sflphone_kde", 
 		   0, 
@@ -56,15 +60,27 @@ int main(int argc, char **argv)
 		//options.add("+[URL]", ki18n( "Document to open" ));
 		KCmdLineArgs::addCmdLineOptions(options);
 		KApplication app;
-	
+		
+		SFLPhone * fenetre = new SFLPhone();
+		
 		QString locale = QLocale::system().name();
 	
 		QTranslator translator;
 		translator.load(QString("config_") + locale);
 		app.installTranslator(&translator);
 	
-		SFLPhone * fenetre = new SFLPhone();
-
+	/*
+		QApplication app(argc,argv);
+		//
+		QMainWindow * fenetre = new QMainWindow();
+		QMenu * menu = new QMenu("menubb",0);
+		fenetre->menuBar()->addMenu(menu);
+		//QMenu * menu = fenetre->menuBar()->addMenu("menu");
+		QAction * action = new QAction("actioncc", 0);
+		action->setText("actionbb");
+		menu->addAction(action);
+		//fenetre->menuBar()->addMenu("menu");
+*/
 		fenetre->move(QCursor::pos().x() - fenetre->geometry().width()/2, QCursor::pos().y() - fenetre->geometry().height()/2);
 		fenetre->show();
 	
diff --git a/sflphone_kde/resources.qrc b/sflphone_kde/resources.qrc
index c2032d4914..0451ab29d4 100644
--- a/sflphone_kde/resources.qrc
+++ b/sflphone_kde/resources.qrc
@@ -1,5 +1,6 @@
 <RCC>
   <qresource prefix="images" >
+    <file>icons/application-exit.png</file>
     <file>icons/office-address-book.png</file>
     <file>icons/x-office-address-book.png</file>
     <file>icons/add.png</file>
@@ -16,6 +17,7 @@
     <file>icons/history2.svg</file>
     <file>icons/history.svg</file>
     <file>icons/hold.svg</file>
+    <file>icons/application-exit.png</file>
     <file>icons/icon_accept.svg</file>
     <file>icons/icon_call.svg</file>
     <file>icons/icon_dialpad_off.svg</file>
diff --git a/sflphone_kde/sflphone-qt.ui b/sflphone_kde/sflphone-qt.ui
deleted file mode 100644
index 90de398ffb..0000000000
--- a/sflphone_kde/sflphone-qt.ui
+++ /dev/null
@@ -1,579 +0,0 @@
-<ui version="4.0" >
- <class>SFLPhone</class>
- <widget class="QMainWindow" name="SFLPhone" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>384</width>
-    <height>366</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>SFLPhone</string>
-  </property>
-  <property name="windowIcon" >
-   <iconset resource="resources.qrc" >
-    <normaloff>:/images/icons/sflphone.png</normaloff>:/images/icons/sflphone.png</iconset>
-  </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QVBoxLayout" name="verticalLayout" >
-    <property name="sizeConstraint" >
-     <enum>QLayout::SetDefaultConstraint</enum>
-    </property>
-    <item>
-     <widget class="QStackedWidget" name="stackedWidget_screen" >
-      <property name="currentIndex" >
-       <number>0</number>
-      </property>
-      <widget class="QWidget" name="page_callList" >
-       <layout class="QHBoxLayout" name="horizontalLayout_3" >
-        <item>
-         <widget class="QListWidget" name="listWidget_callList" />
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="page_callHistory" >
-       <layout class="QVBoxLayout" name="verticalLayout_3" >
-        <item>
-         <widget class="QListWidget" name="listWidget_callHistory" />
-        </item>
-        <item>
-         <widget class="QLineEdit" name="lineEdit_searchHistory" />
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="page_addressBook" >
-       <layout class="QVBoxLayout" name="verticalLayout_5" >
-        <item>
-         <widget class="QListWidget" name="listWidget_addressBook" />
-        </item>
-        <item>
-         <widget class="QLineEdit" name="lineEdit_addressBook" />
-        </item>
-       </layout>
-      </widget>
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout" >
-      <property name="spacing" >
-       <number>0</number>
-      </property>
-      <item>
-       <widget class="QWidget" native="1" name="widget_recVol" >
-        <property name="layoutDirection" >
-         <enum>Qt::RightToLeft</enum>
-        </property>
-        <layout class="QVBoxLayout" name="verticalLayout_4" >
-         <property name="spacing" >
-          <number>0</number>
-         </property>
-         <property name="margin" >
-          <number>0</number>
-         </property>
-         <item>
-          <widget class="QSlider" name="slider_recVol" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize" >
-            <size>
-             <width>0</width>
-             <height>50</height>
-            </size>
-           </property>
-           <property name="layoutDirection" >
-            <enum>Qt::RightToLeft</enum>
-           </property>
-           <property name="autoFillBackground" >
-            <bool>false</bool>
-           </property>
-           <property name="maximum" >
-            <number>100</number>
-           </property>
-           <property name="orientation" >
-            <enum>Qt::Vertical</enum>
-           </property>
-           <property name="invertedAppearance" >
-            <bool>false</bool>
-           </property>
-           <property name="invertedControls" >
-            <bool>false</bool>
-           </property>
-           <property name="tickPosition" >
-            <enum>QSlider::NoTicks</enum>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QToolButton" name="toolButton_recVol" >
-           <property name="text" >
-            <string>...</string>
-           </property>
-           <property name="icon" >
-            <iconset>
-             <normaloff>:/Images/mic_75.svg</normaloff>:/Images/mic_75.svg</iconset>
-           </property>
-           <property name="checkable" >
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-        </layout>
-        <zorder>toolButton_recVol</zorder>
-        <zorder>slider_recVol</zorder>
-       </widget>
-      </item>
-      <item>
-       <widget class="QWidget" native="1" name="widget_dialpad" >
-        <layout class="QGridLayout" name="gridLayout" >
-         <item row="0" column="1" >
-          <widget class="QPushButton" name="pushButton_1" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>1</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="2" >
-          <widget class="QPushButton" name="pushButton_2" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>2</string>
-           </property>
-           <property name="shortcut" >
-            <string>2</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="3" >
-          <widget class="QPushButton" name="pushButton_3" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>3</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1" >
-          <widget class="QPushButton" name="pushButton_4" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>4</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="2" >
-          <widget class="QPushButton" name="pushButton_5" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>5</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="3" >
-          <widget class="QPushButton" name="pushButton_6" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>6</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="1" >
-          <widget class="QPushButton" name="pushButton_7" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>7</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="2" >
-          <widget class="QPushButton" name="pushButton_8" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>8</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="3" >
-          <widget class="QPushButton" name="pushButton_9" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>9</string>
-           </property>
-          </widget>
-         </item>
-         <item row="3" column="1" >
-          <widget class="QPushButton" name="pushButton_etoile" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>*</string>
-           </property>
-          </widget>
-         </item>
-         <item row="3" column="2" >
-          <widget class="QPushButton" name="pushButton_0" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>0</string>
-           </property>
-          </widget>
-         </item>
-         <item row="3" column="3" >
-          <widget class="QPushButton" name="pushButton_diese" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>#</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
-      <item>
-       <widget class="QWidget" native="1" name="widget_sndVol" >
-        <layout class="QVBoxLayout" name="verticalLayout_2" >
-         <property name="spacing" >
-          <number>0</number>
-         </property>
-         <property name="margin" >
-          <number>0</number>
-         </property>
-         <item>
-          <widget class="QSlider" name="slider_sndVol" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize" >
-            <size>
-             <width>0</width>
-             <height>50</height>
-            </size>
-           </property>
-           <property name="layoutDirection" >
-            <enum>Qt::LeftToRight</enum>
-           </property>
-           <property name="autoFillBackground" >
-            <bool>false</bool>
-           </property>
-           <property name="maximum" >
-            <number>100</number>
-           </property>
-           <property name="orientation" >
-            <enum>Qt::Vertical</enum>
-           </property>
-           <property name="tickPosition" >
-            <enum>QSlider::NoTicks</enum>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QToolButton" name="toolButton_sndVol" >
-           <property name="text" >
-            <string>...</string>
-           </property>
-           <property name="icon" >
-            <iconset>
-             <normaloff>:/Images/speaker_75.svg</normaloff>:/Images/speaker_75.svg</iconset>
-           </property>
-           <property name="checkable" >
-            <bool>true</bool>
-           </property>
-           <property name="checked" >
-            <bool>false</bool>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>384</width>
-     <height>25</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menu_Actions" >
-    <property name="title" >
-     <string>&amp;Actions</string>
-    </property>
-    <addaction name="action_accept" />
-    <addaction name="action_refuse" />
-    <addaction name="action_hold" />
-    <addaction name="action_transfer" />
-    <addaction name="action_record" />
-    <addaction name="separator" />
-    <addaction name="action_history" />
-    <addaction name="action_addressBook" />
-    <addaction name="separator" />
-    <addaction name="action_mailBox" />
-    <addaction name="separator" />
-   </widget>
-   <widget class="QMenu" name="menu_Configure" >
-    <property name="title" >
-     <string>&amp;Configure</string>
-    </property>
-    <addaction name="action_displayVolumeControls" />
-    <addaction name="action_displayDialpad" />
-    <addaction name="separator" />
-    <addaction name="action_configureAccounts" />
-    <addaction name="action_configureAudio" />
-    <addaction name="action_configureSflPhone" />
-    <addaction name="separator" />
-    <addaction name="action_accountCreationWizard" />
-   </widget>
-   <addaction name="menu_Actions" />
-   <addaction name="menu_Configure" />
-  </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <widget class="QToolBar" name="toolBar" >
-   <property name="windowTitle" >
-    <string>toolBar</string>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="action_accept" />
-   <addaction name="action_refuse" />
-   <addaction name="action_hold" />
-   <addaction name="action_transfer" />
-   <addaction name="action_record" />
-   <addaction name="separator" />
-   <addaction name="action_history" />
-   <addaction name="action_addressBook" />
-   <addaction name="separator" />
-   <addaction name="action_mailBox" />
-  </widget>
-  <action name="action_accept" >
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/call.svg</normaloff>:/images/icons/call.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>&amp;Pick up</string>
-   </property>
-  </action>
-  <action name="action_refuse" >
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/hang_up.svg</normaloff>:/images/icons/hang_up.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>&amp;Hang up</string>
-   </property>
-  </action>
-  <action name="action_hold" >
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/hold.svg</normaloff>:/images/icons/hold.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>H&amp;old</string>
-   </property>
-  </action>
-  <action name="action_transfer" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/transfert.svg</normaloff>:/images/icons/transfert.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>&amp;Transfer</string>
-   </property>
-  </action>
-  <action name="action_history" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/history2.svg</normaloff>:/images/icons/history2.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>H&amp;istory</string>
-   </property>
-  </action>
-  <action name="action_mailBox" >
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/mailbox.svg</normaloff>:/images/icons/mailbox.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>&amp;Mailbox</string>
-   </property>
-  </action>
-  <action name="action_configureAccounts" >
-   <property name="icon" >
-    <iconset>
-     <normaloff>:/Images/stock_person.svg</normaloff>:/Images/stock_person.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>Configure &amp;accounts</string>
-   </property>
-  </action>
-  <action name="action_configureAudio" >
-   <property name="icon" >
-    <iconset>
-     <normaloff>:/Images/icon_volume.svg</normaloff>:/Images/icon_volume.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>Configure a&amp;udio</string>
-   </property>
-  </action>
-  <action name="action_configureSflPhone" >
-   <property name="icon" >
-    <iconset>
-     <normaloff>:/Images/sflphone.png</normaloff>:/Images/sflphone.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&amp;Configure SFLPhone</string>
-   </property>
-  </action>
-  <action name="action_displayVolumeControls" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset>
-     <normaloff>:/Images/icon_volume.svg</normaloff>:/Images/icon_volume.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>Display &amp;volume bars</string>
-   </property>
-  </action>
-  <action name="action_About" >
-   <property name="text" >
-    <string>&amp;About</string>
-   </property>
-  </action>
-  <action name="action_displayDialpad" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset>
-     <normaloff>:/Images/icon_dialpad.svg</normaloff>:/Images/icon_dialpad.svg</iconset>
-   </property>
-   <property name="text" >
-    <string>Display &amp;dialpad</string>
-   </property>
-  </action>
-  <action name="action_record" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/del_off.png</normaloff>:/images/icons/del_off.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&amp;Record</string>
-   </property>
-  </action>
-  <action name="action_accountCreationWizard" >
-   <property name="text" >
-    <string>Account creation &amp;wizard</string>
-   </property>
-  </action>
-  <action name="action_addressBook" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="resources.qrc" >
-     <normaloff>:/images/icons/x-office-address-book.png</normaloff>:/images/icons/x-office-address-book.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Address book</string>
-   </property>
-  </action>
- </widget>
- <resources>
-  <include location="resources.qrc" />
- </resources>
- <connections/>
-</ui>
diff --git a/sflphone_kde/sflphone_const.h b/sflphone_kde/sflphone_const.h
index 9b0afdff3f..a559fa6549 100644
--- a/sflphone_kde/sflphone_const.h
+++ b/sflphone_kde/sflphone_const.h
@@ -11,7 +11,7 @@
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *                                                                               
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -45,6 +45,7 @@
 #define PAGE_ACCOUNTS                     2
 #define PAGE_AUDIO                        3
 
+#define CONTACT_ITEM_HEIGHT               40
 
 #define ICON_INCOMING                     ":/images/icons/ring.svg"
 #define ICON_RINGING                      ":/images/icons/ring.svg"
@@ -80,6 +81,10 @@
 #define ICON_HISTORY_OUTGOING             ":/images/icons/outgoing.svg"
 #define ICON_HISTORY_MISSED               ":/images/icons/missed.svg"
 
+#define ICON_QUIT                         ":/images/icons/application-exit.png"
+
+#define ICON_SFLPHONE                     ":/images/icons/sflphone.png"
+
 
 #define RECORD_DEVICE                     "mic"
 #define SOUND_DEVICE                      "speaker"
diff --git a/sflphone_kde/sflphone_kdeui.rc b/sflphone_kde/sflphone_kdeui.rc
index 406bccc6b9..291817af5d 100644
--- a/sflphone_kde/sflphone_kdeui.rc
+++ b/sflphone_kde/sflphone_kdeui.rc
@@ -1,8 +1,38 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="KApp4" version="1">
-<MenuBar>
-  <Menu name="move"><text>&amp;Move</text>
-    <Action name="switch_action" />
-  </Menu>
-</MenuBar>
-</kpartgui>
+<?xml version="1.0" encoding="UTF-8"?>
+<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" >
+	
+	<MenuBar>
+		<Menu name="Actions" >
+			<text>Actions</text>
+			<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" />
+			<Separator />
+			<Action name="action_quit" />
+		</Menu>
+		<Menu name="Settings" >
+			<text>Settings</text>
+			<Action name="action_displayVolumeControls" />
+			<Action name="action_displayDialpad" />
+			<Separator />
+			<Action name="action_configureAccounts" />
+			<Action name="action_configureAudio" />
+			<Action name="action_configureSflPhone" />
+			<Separator />
+			<Action name="action_accountCreationWizard" />
+		</Menu>
+	</MenuBar>
+	
+</gui>
\ No newline at end of file
diff --git a/sflphone_kde/sflphone_kdeview.cpp b/sflphone_kde/sflphone_kdeview.cpp
index 093fb377f1..75bc2f0cb4 100644
--- a/sflphone_kde/sflphone_kdeview.cpp
+++ b/sflphone_kde/sflphone_kdeview.cpp
@@ -24,6 +24,7 @@
 #include <klocale.h>
 #include <QtGui/QLabel>
 #include <QtGui/QContextMenuEvent>
+#include <QtGui/QMenu>
 
 #include <kstandardaction.h>
 #include <kactioncollection.h>
@@ -34,11 +35,13 @@
 #include "callmanager_interface_singleton.h"
 #include "instance_interface_singleton.h"
 #include "ActionSetAccountFirst.h"
+#include "ContactItemWidget.h"
 
 
 #include <kabc/addressbook.h>
 #include <kabc/stdaddressbook.h>
 #include <kabc/addresseelist.h>
+//#include <kabc/ldapclient.h>
 
 
 using namespace KABC;
@@ -47,20 +50,8 @@ ConfigurationDialog * sflphone_kdeView::configDialog;
 
 sflphone_kdeView::sflphone_kdeView(QWidget *parent)
 {
-	//ui_sflphone_kdeview_base.setupUi(this);
-
 	setupUi(this);
 	
-
-	AddressBook * ab = KABC::StdAddressBook::self();
-	
-	AddresseeList results = ab->findByEmail("savoir");
-	for(int i = 0 ; i < results.count() ; i++)
-	{
-		qDebug() << results[i].name();
-	}
-	
-	
 	errorWindow = new QErrorMessage(this);
 	callList = new CallList();
 	
@@ -84,14 +75,8 @@ sflphone_kdeView::sflphone_kdeView(QWidget *parent)
 	connect(&callManager, SIGNAL(volumeChanged(const QString &, double)),
 	        this,         SLOT(on1_volumeChanged(const QString &, double)));
 	        
-   //QDBusConnection::sessionBus().connect("org.sflphone.SFLphone", "/org/sflphone/SFLphone/CallManager", "org.sflphone.SFLphone.CallManager", "incomingCall",
-   //             this, SLOT(on_incomingCall(const QString &accountID, const QString &callID, const QString &from)));
-
 	loadWindow();
-	setupActions();
-	
 	
-    setAutoFillBackground(true);
 } 
 
 sflphone_kdeView::~sflphone_kdeView()
@@ -104,30 +89,14 @@ sflphone_kdeView::~sflphone_kdeView()
 	instance.Unregister(getpid());
 }
 
-void sflphone_kdeView::setupActions()
-{
-	qDebug() << "setupActions";
-//	KAction * action_quit = KStandardAction::quit(qApp, SLOT(closeAllWindows()), menu_Actions);
-//	menu_Actions->addAction(action_quit);
-}
 
-bool sflphone_kdeView::queryClose()
-{
-	qDebug() << "queryClose : " << listWidget_callList->count() << " calls open.";
-	if(listWidget_callList->count() > 0)
-	{
-		qDebug() << "Attempting to quit when still having some calls open.";
-		errorWindow->showMessage(tr2i18n("You still have some calls open. Please close all calls before quitting.", 0));
-		return false;
-	}
-	return true;
-}
+
 
 void sflphone_kdeView::loadWindow()
 {
 	ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
-	//action_displayVolumeControls->setChecked(configurationManager.getVolumeControls());
-	//action_displayDialpad->setChecked(configurationManager.getDialpad());
+	action_displayVolumeControls->setChecked(configurationManager.getVolumeControls());
+	action_displayDialpad->setChecked(configurationManager.getDialpad());
 	updateWindowCallState();
 	updateRecordButton();
 	updateVolumeButton();
@@ -159,6 +128,10 @@ AccountList * sflphone_kdeView::getAccountList()
 	return configDialog->getAccountList();
 }
 
+QErrorMessage * sflphone_kdeView::getErrorWindow()
+{
+	return errorWindow;
+}
 
 void sflphone_kdeView::addCallToCallList(Call * call)
 {
@@ -209,7 +182,7 @@ void sflphone_kdeView::typeString(QString str)
 			addCallToCallList(call);
 			listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
 		}
-		callList->getCallByItem(listWidget_callList->currentItem())->appendItemText(str);
+		callList->findCallByItem(listWidget_callList->currentItem())->appendItemText(str);
 	}
 	if(stackedWidget_screen->currentWidget() == page_callHistory)
 	{
@@ -236,7 +209,7 @@ void sflphone_kdeView::backspace()
 		}
 		else
 		{
-			Call * call = callList->getCallByItem(listWidget_callList->currentItem());
+			Call * call = callList->findCallByItem(listWidget_callList->currentItem());
 			if(!call)
 			{
 				qDebug() << "Error : Backspace on unexisting call.";
@@ -268,6 +241,94 @@ void sflphone_kdeView::backspace()
 	}
 }
 
+void sflphone_kdeView::escape()
+{
+	qDebug() << "escape";
+	if(stackedWidget_screen->currentWidget() == page_callList )
+	{
+		qDebug() << "In call list.";
+		QListWidgetItem * item = listWidget_callList->currentItem();
+		if(!item)
+		{
+			qDebug() << "Escape when no item is selected. Doing nothing.";
+		}
+		else
+		{
+			Call * call = callList->findCallByItem(listWidget_callList->currentItem());
+			if(!call)
+			{
+				qDebug() << "Error : Escape on unexisting call.";
+			}
+			else
+			{
+				int state = call->getState();
+				if(state == CALL_STATE_TRANSFER || state == CALL_STATE_TRANSF_HOLD)
+				{
+					actionb(call, CALL_ACTION_TRANSFER);
+				}
+				else
+				{
+					actionb(call, CALL_ACTION_REFUSE);
+				}
+			}
+		}
+	}
+	if(stackedWidget_screen->currentWidget() == page_callHistory)
+	{
+		qDebug() << "In call history.";
+		lineEdit_searchHistory->clear();
+	}
+	if(stackedWidget_screen->currentWidget() == page_addressBook)
+	{
+		qDebug() << "In address book.";
+		lineEdit_addressBook->clear();
+	}
+}
+
+void sflphone_kdeView::enter()
+{
+	qDebug() << "enter";
+	if(stackedWidget_screen->currentWidget() == page_callList )
+	{
+		qDebug() << "In call list.";
+		QListWidgetItem * item = listWidget_callList->currentItem();
+		if(!item)
+		{
+			qDebug() << "Enter when no item is selected. Doing nothing.";
+		}
+		else
+		{
+			Call * call = callList->findCallByItem(listWidget_callList->currentItem());
+			if(!call)
+			{
+				qDebug() << "Error : Enter on unexisting call.";
+			}
+			else
+			{
+				int state = call->getState();
+				if(state == CALL_STATE_INCOMING || state == CALL_STATE_DIALING || state == CALL_STATE_TRANSFER || state == CALL_STATE_TRANSF_HOLD)
+				{
+					actionb(call, CALL_ACTION_ACCEPT);
+				}
+				else
+				{
+					qDebug() << "Enter when call selected not in appropriate state. Doing nothing.";
+				}
+			}
+		}
+	}
+	if(stackedWidget_screen->currentWidget() == page_callHistory)
+	{
+		qDebug() << "In call history.";
+		lineEdit_searchHistory->clear();
+	}
+	if(stackedWidget_screen->currentWidget() == page_addressBook)
+	{
+		qDebug() << "In address book.";
+		lineEdit_addressBook->clear();
+	}
+}
+
 void sflphone_kdeView::actionb(Call * call, call_action action)
 {
 	try
@@ -284,7 +345,7 @@ void sflphone_kdeView::actionb(Call * call, call_action action)
 
 void sflphone_kdeView::action(QListWidgetItem * item, call_action action)
 {
-	actionb(callList->getCallByItem(item), action);
+	actionb(callList->findCallByItem(item), action);
 }
 
 /*******************************************
@@ -450,20 +511,20 @@ void sflphone_kdeView::updateWindowCallState()
 			enabledActions[1] = true;
 		}
 	}
-//	action_accept->setEnabled(enabledActions[0]);
-//	action_refuse->setEnabled(enabledActions[1]);
-//	action_hold->setEnabled(enabledActions[2]);
-//	action_transfer->setEnabled(enabledActions[3]);
-//	action_record->setEnabled(enabledActions[4]);
-// 	action_mailBox->setEnabled(enabledActions[5]);
+	action_accept->setEnabled(enabledActions[0]);
+	action_refuse->setEnabled(enabledActions[1]);
+	action_hold->setEnabled(enabledActions[2]);
+	action_transfer->setEnabled(enabledActions[3]);
+	action_record->setEnabled(enabledActions[4]);
+	action_mailBox->setEnabled(enabledActions[5]);
 	
-// 	action_record->setIcon(QIcon(recordEnabled ? ICON_REC_DEL_ON : ICON_REC_DEL_OFF));
-// 	action_accept->setIcon(QIcon(buttonIconFiles[0]));
-// 	action_refuse->setIcon(QIcon(buttonIconFiles[1]));
-// 	action_hold->setIcon(QIcon(buttonIconFiles[2]));
+	action_record->setIcon(QIcon(recordEnabled ? ICON_REC_DEL_ON : ICON_REC_DEL_OFF));
+	action_accept->setIcon(QIcon(buttonIconFiles[0]));
+	action_refuse->setIcon(QIcon(buttonIconFiles[1]));
+	action_hold->setIcon(QIcon(buttonIconFiles[2]));
 	
-// 	action_transfer->setChecked(transfer);
-// 	action_record->setChecked(recordActivated);
+	action_transfer->setChecked(transfer);
+	action_record->setChecked(recordActivated);
 }
 
 void sflphone_kdeView::updateSearchHistory()
@@ -496,9 +557,6 @@ void sflphone_kdeView::updateCallHistory()
 		{
 			qDebug() << "call->getItem()->text()=" << call->getHistoryItem()->text() << " contains textSearched=" << textSearched;
 			addCallToCallHistory(call);
-			//QListWidgetItem * historyItem = call->getHistoryItem();
-			//listWidget_callHistory->addItem(historyItem);
-			//listWidget_callHistory->setItemWidget(historyItem, call->getHistoryItemWidget());
 		}
 	}
 }
@@ -531,10 +589,8 @@ QVector<Contact *> sflphone_kdeView::findContactsInKAddressBook(QString textSear
 	QVector<Contact *> results = QVector<Contact *>();
 	AddressBook::Iterator it;
 	for ( it = ab->begin(); it != ab->end(); ++it ) {
-		//kDebug(5700) << "UID=" << (*it).uid();
-		if(it->name().contains(textSearched, Qt::CaseInsensitive) || it->familyName().contains(textSearched, Qt::CaseInsensitive) || it->nickName().contains(textSearched, Qt::CaseInsensitive))
+		if(it->name().contains(textSearched, Qt::CaseInsensitive) || it->nickName().contains(textSearched, Qt::CaseInsensitive))
 		{
-			
 			for(int i = 0 ; i < it->phoneNumbers().count() ; i++)
 			{
 				if(phoneNumberTypeDisplayed(it->phoneNumbers().at(i).type()))
@@ -758,7 +814,7 @@ void sflphone_kdeView::on_listWidget_callList_itemChanged()
 void sflphone_kdeView::on_listWidget_callList_itemDoubleClicked(QListWidgetItem * item)
 {
 	qDebug() << "on_listWidget_callList_itemDoubleClicked";
-	Call * call = callList->getCallByItem(item);
+	Call * call = callList->findCallByItem(item);
 	call_state state = call->getCurrentState();
 	switch(state)
 	{
@@ -776,13 +832,13 @@ void sflphone_kdeView::on_listWidget_callList_itemDoubleClicked(QListWidgetItem
 
 void sflphone_kdeView::contextMenuEvent(QContextMenuEvent *event)
 {
-/*	QMenu menu(this);
+	QMenu menu(this);
 	menu.addAction(action_accept);
 	menu.addAction(action_refuse);
 	menu.addAction(action_hold);
 	menu.addAction(action_transfer);
 	menu.addAction(action_record);
-	TODO accounts to choose
+	//TODO accounts to choose
 	menu.addSeparator();
 	QVector<Account *> accounts = registeredAccounts();
 	for (int i = 0 ; i < accounts.size() ; i++)
@@ -800,7 +856,7 @@ void sflphone_kdeView::contextMenuEvent(QContextMenuEvent *event)
 		menu.addAction(action);
 	}
 	menu.exec(event->globalPos());
-	*/
+	
 }
 
 void sflphone_kdeView::setAccountFirst(Account * account)
@@ -853,34 +909,58 @@ void sflphone_kdeView::on_action_accept_triggered()
 	if(stackedWidget_screen->currentWidget() == page_callList)
 	{
 		QListWidgetItem * item = listWidget_callList->currentItem();
-		if(!item || (*callList)[item]->getState() == CALL_STATE_RINGING || (*callList)[item]->getState() == CALL_STATE_CURRENT || (*callList)[item]->getState() == CALL_STATE_HOLD || (*callList)[item]->getState() == CALL_STATE_BUSY)
+		if(!item)
 		{
-			qDebug() << "Calling when no item is selected or item currently ringing, current, hold or busy. Opening an item.";
+			qDebug() << "Calling when no item is selected. Opening an item.";
 			Call * call = callList->addDialingCall();
 			addCallToCallList(call);
 			listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
 		}
 		else
 		{
-			action(item, CALL_ACTION_ACCEPT);
+			Call * call = callList->findCallByItem(item);
+			if(!call)
+			{
+				qDebug() << "Error : Accept triggered on unexisting call.";
+			}
+			else
+			{
+				int state = call->getState();
+				if(state == CALL_STATE_RINGING || state == CALL_STATE_CURRENT || state == CALL_STATE_HOLD || state == CALL_STATE_BUSY)
+				{
+					qDebug() << "Calling when item currently ringing, current, hold or busy. Opening an item.";
+					Call * call = callList->addDialingCall();
+					addCallToCallList(call);
+					listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
+				}
+				else
+				{
+					actionb(call, CALL_ACTION_ACCEPT);
+				}
+			}
 		}
 	}
 	if(stackedWidget_screen->currentWidget() == page_callHistory)
 	{
-// 		action_history->setChecked(false);
+		action_history->setChecked(false);
 		stackedWidget_screen->setCurrentWidget(page_callList);
 		Call * call = callList->addDialingCall();
-		call->appendItemText(listWidget_callHistory->currentItem()->text());
+		Call * pastCall = callList->findCallByHistoryItem(listWidget_callHistory->currentItem());
+		call->appendItemText(pastCall->getPeerPhoneNumber());
+		if(!pastCall->getPeerName().isEmpty())
+			call->setPeerName(pastCall->getPeerName());
 		addCallToCallList(call);
 		listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
 		actionb(call, CALL_ACTION_ACCEPT);
 	}
 	if(stackedWidget_screen->currentWidget() == page_addressBook)
 	{
-// 		action_addressBook->setChecked(false);
+		action_addressBook->setChecked(false);
 		stackedWidget_screen->setCurrentWidget(page_callList);
 		Call * call = callList->addDialingCall();
-		call->appendItemText(listWidget_addressBook->currentItem()->text());
+		ContactItemWidget * w = (ContactItemWidget *) (listWidget_addressBook->itemWidget(listWidget_addressBook->currentItem()));
+		call->setPeerName(w->getContactName());
+		call->appendItemText(w->getContactNumber());
 		addCallToCallList(call);
 		listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
 		actionb(call, CALL_ACTION_ACCEPT);
@@ -954,7 +1034,7 @@ void sflphone_kdeView::on_action_history_triggered(bool checked)
 {
 	if(checked == true)
 	{
-// 		action_addressBook->setChecked(false);
+ 		action_addressBook->setChecked(false);
 		stackedWidget_screen->setCurrentWidget(page_callHistory);
 	}
 	else
@@ -969,7 +1049,7 @@ void sflphone_kdeView::on_action_addressBook_triggered(bool checked)
 	if(checked == true)
 	{
 	
-// 		action_history->setChecked(false);
+		action_history->setChecked(false);
 		stackedWidget_screen->setCurrentWidget(page_addressBook);
 	}
 	else
diff --git a/sflphone_kde/sflphone_kdeview.h b/sflphone_kde/sflphone_kdeview.h
index 736a0049b8..b723765927 100644
--- a/sflphone_kde/sflphone_kdeview.h
+++ b/sflphone_kde/sflphone_kdeview.h
@@ -49,6 +49,7 @@ class ConfigurationDialog;
  * @author Jérémy Quentin <jeremy.quentin@gmail.com>
  * @version 0.1
  */
+ 
 
 class sflphone_kdeView : public QWidget, public Ui::SFLPhone
 {
@@ -64,7 +65,6 @@ private:
 
 protected:
 	void contextMenuEvent(QContextMenuEvent *event);
-	virtual bool queryClose();
 
 public:
 	sflphone_kdeView(QWidget *parent);
@@ -77,6 +77,7 @@ public:
 	static AccountList * getAccountList();
 	QVector<Contact *> findContactsInKAddressBook(QString textSearched);
 	bool phoneNumberTypeDisplayed(int type);
+	QErrorMessage * getErrorWindow();
 
 private slots:
 	//void typeChar(QChar c);
@@ -84,7 +85,6 @@ private slots:
 	void backspace();
 	void actionb(Call * call, call_action action);
 	void action(QListWidgetItem * item, call_action action);
-	void setupActions();
 	
 	void addCallToCallList(Call * call);
 	void addCallToCallHistory(Call * call);
@@ -103,11 +103,14 @@ private slots:
 	void updateVolumeControls();
 	void updateDialpad();
 	
+	void escape();
+	void enter();
+	
 	virtual void keyPressEvent(QKeyEvent *event)
 {
 	int key = event->key();
 	if(key == Qt::Key_Escape)
-		on_action_refuse_triggered();
+		escape();
 	else if(key == Qt::Key_Return || key == Qt::Key_Enter)
 		on_action_accept_triggered();
 	else if(key == Qt::Key_Backspace)
diff --git a/sflphone_kde/sflphone_kdeview_base.ui b/sflphone_kde/sflphone_kdeview_base.ui
index 109c734937..e98d6ff784 100644
--- a/sflphone_kde/sflphone_kdeview_base.ui
+++ b/sflphone_kde/sflphone_kdeview_base.ui
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>310</width>
-    <height>390</height>
+    <width>391</width>
+    <height>349</height>
    </rect>
   </property>
   <property name="windowTitle" >
@@ -348,12 +348,160 @@
     </layout>
    </item>
   </layout>
-  <action name="action_Pick_up" >
+  <action name="action_accept" >
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/call.svg</normaloff>:/images/icons/call.svg</iconset>
+   </property>
    <property name="text" >
     <string>&amp;Pick up</string>
    </property>
   </action>
+  <action name="action_refuse" >
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/hang_up.svg</normaloff>:/images/icons/hang_up.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>&amp;Hang up</string>
+   </property>
+  </action>
+  <action name="action_hold" >
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/hold.svg</normaloff>:/images/icons/hold.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>H&amp;old</string>
+   </property>
+  </action>
+  <action name="action_transfer" >
+   <property name="checkable" >
+    <bool>true</bool>
+   </property>
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/transfert.svg</normaloff>:/images/icons/transfert.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>&amp;Transfer</string>
+   </property>
+  </action>
+  <action name="action_history" >
+   <property name="checkable" >
+    <bool>true</bool>
+   </property>
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/history2.svg</normaloff>:/images/icons/history2.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>H&amp;istory</string>
+   </property>
+  </action>
+  <action name="action_mailBox" >
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/mailbox.svg</normaloff>:/images/icons/mailbox.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>&amp;Mailbox</string>
+   </property>
+  </action>
+  <action name="action_configureAccounts" >
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/stock_person.svg</normaloff>:/images/icons/stock_person.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>Configure &amp;accounts</string>
+   </property>
+  </action>
+  <action name="action_configureAudio" >
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/icon_volume.svg</normaloff>:/images/icons/icon_volume.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>Configure a&amp;udio</string>
+   </property>
+  </action>
+  <action name="action_configureSflPhone" >
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/sflphone.png</normaloff>:/images/icons/sflphone.png</iconset>
+   </property>
+   <property name="text" >
+    <string>&amp;Configure SFLPhone</string>
+   </property>
+  </action>
+  <action name="action_displayVolumeControls" >
+   <property name="checkable" >
+    <bool>true</bool>
+   </property>
+   <property name="checked" >
+    <bool>true</bool>
+   </property>
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/icon_volume_off.svg</normaloff>:/images/icons/icon_volume_off.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>Display &amp;volume bars</string>
+   </property>
+  </action>
+  <action name="action_About" >
+   <property name="text" >
+    <string>&amp;About</string>
+   </property>
+  </action>
+  <action name="action_displayDialpad" >
+   <property name="checkable" >
+    <bool>true</bool>
+   </property>
+   <property name="checked" >
+    <bool>true</bool>
+   </property>
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/icon_dialpad.svg</normaloff>:/images/icons/icon_dialpad.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>Display &amp;dialpad</string>
+   </property>
+  </action>
+  <action name="action_record" >
+   <property name="checkable" >
+    <bool>true</bool>
+   </property>
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/del_off.png</normaloff>:/images/icons/del_off.png</iconset>
+   </property>
+   <property name="text" >
+    <string>&amp;Record</string>
+   </property>
+  </action>
+  <action name="action_accountCreationWizard" >
+   <property name="text" >
+    <string>Account creation &amp;wizard</string>
+   </property>
+  </action>
+  <action name="action_addressBook" >
+   <property name="checkable" >
+    <bool>true</bool>
+   </property>
+   <property name="icon" >
+    <iconset resource="resources.qrc" >
+     <normaloff>:/images/icons/x-office-address-book.png</normaloff>:/images/icons/x-office-address-book.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Address book</string>
+   </property>
+  </action>
  </widget>
- <resources/>
+ <resources>
+  <include location="resources.qrc" />
+ </resources>
  <connections/>
 </ui>
-- 
GitLab