Commit 84eb685c authored by yanmorin's avatar yanmorin
Browse files

Add slot/signal to stop flashing button when a call is hanguped

parent ada757b2
......@@ -417,6 +417,7 @@ PhoneLine::hangup(bool sendrequest)
}
clearCall();
}
emit hanguped();
clear();
clearPeer();
......
/*
* Copyright (C) 2004-2005 Savoir-Faire Linux inc.
* Copyright (C) 2004-2006 Savoir-Faire Linux inc.
* Author: Yan Morin <yan.morin@savoirfairelinux.com>
* Author: Jean-Philippe Barrette-LaPierre
* <jean-philippe.barrette-lapierre@savoirfairelinux.com>
*
......@@ -155,6 +156,8 @@ signals:
void talkingStarted(QTime);
void talkingStopped();
void transfered();
/** when the call is hangup */
void hanguped();
private:
void setCall(Call *call);
......
......@@ -75,14 +75,12 @@ void
PhoneLineButton::sendClicked()
{
if(isOn()) {
mIsFlashing = false;
mTimer->stop();
stopFlashing();
emit selected(mLine);
}
else {
if (mIsFlashing) {
mIsFlashing = false;
mTimer->stop();
stopFlashing();
emit selected(mLine);
} else {
emit unselected(mLine);
......@@ -90,3 +88,8 @@ PhoneLineButton::sendClicked()
}
}
void
PhoneLineButton::stopFlashing() {
mIsFlashing = false;
mTimer->stop();
}
......@@ -55,6 +55,10 @@ public slots:
virtual void clearToolTip();
virtual void swap();
virtual void sendClicked();
/**
* Stop the timer and the flashing
*/
void stopFlashing();
private:
unsigned int mLine;
......
......@@ -117,6 +117,8 @@ SFLPhoneApp::initConnections(SFLPhoneWindow *w)
*pos, SLOT(setOn(bool)));
QObject::connect(line, SIGNAL(backgrounded()),
*pos, SLOT(suspend()));
QObject::connect(line, SIGNAL(hanguped()),
*pos, SLOT(stopFlashing()));
QObject::connect(line, SIGNAL(peerUpdated(QString)),
*pos, SLOT(setToolTip(QString)));
QObject::connect(line, SIGNAL(peerCleared()),
......
......@@ -54,7 +54,8 @@ SIPAccount::createVoIPLink()
bool
SIPAccount::registerAccount()
{
if (_link && !_registered) {
if (_link) {
unregisterAccount();
SIPVoIPLink* tmplink = dynamic_cast<SIPVoIPLink*> (_link);
if (tmplink) {
tmplink->setProxy(Manager::instance().getConfigString(_accountID,SIP_PROXY));
......
......@@ -430,7 +430,7 @@ SIPCall::sdp_complete_message(sdp_message_t * remote_sdp, osip_message_t * msg)
iPayload++;
}
if (listCodec.str().empty()) {
media << "m=" << remote_med->m_media << " 0 << " << remote_med->m_proto << " \r\n";
media << "m=" << remote_med->m_media << " 0 " << remote_med->m_proto << " \r\n";
} else {
// we add the media line + a=rtpmap list
media << "m=" << remote_med->m_media << " " << getLocalExternAudioPort() << " RTP/AVP " << listCodec.str() << "\r\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment