[Opalvoip-svn] SF.net SVN: opalvoip:[21672] opal/trunk/samples/openphone
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2008-12-02 02:46:06
|
Revision: 21672 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=21672&view=rev Author: rjongbloed Date: 2008-12-02 02:45:56 +0000 (Tue, 02 Dec 2008) Log Message: ----------- Fixed Linux compile issues. Modified Paths: -------------- opal/trunk/samples/openphone/absent16.xpm opal/trunk/samples/openphone/absent48.xpm opal/trunk/samples/openphone/main.cxx opal/trunk/samples/openphone/main.h opal/trunk/samples/openphone/present16.xpm opal/trunk/samples/openphone/present48.xpm opal/trunk/samples/openphone/unknown16.xpm opal/trunk/samples/openphone/unknown48.xpm Modified: opal/trunk/samples/openphone/absent16.xpm =================================================================== --- opal/trunk/samples/openphone/absent16.xpm 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/absent16.xpm 2008-12-02 02:45:56 UTC (rev 21672) @@ -1,5 +1,5 @@ /* XPM */ -static const char * const SmallPhone_xpm[] = { +static const char * const absent16_xpm[] = { /* columns rows colors chars-per-pixel */ "16 16 13 1", " c opaque", Modified: opal/trunk/samples/openphone/absent48.xpm =================================================================== --- opal/trunk/samples/openphone/absent48.xpm 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/absent48.xpm 2008-12-02 02:45:56 UTC (rev 21672) @@ -1,5 +1,5 @@ /* XPM */ -static char * Absent_xpm[] = { +static const char * const absent48_xpm[] = { "48 48 1122 2", " c None", ". c #D5F2F8", Modified: opal/trunk/samples/openphone/main.cxx =================================================================== --- opal/trunk/samples/openphone/main.cxx 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/main.cxx 2008-12-02 02:45:56 UTC (rev 21672) @@ -530,7 +530,7 @@ m_imageListNormal = new wxImageList(48, 48, true); // Order here is important!! Must be same as IconStates enum - m_imageListSmall ->Add(wxICON(SmallPhone)); + m_imageListSmall ->Add(wxICON(unknown16)); m_imageListNormal->Add(wxICON(unknown48)); m_imageListSmall ->Add(wxICON(absent16)); m_imageListNormal->Add(wxICON(absent48)); @@ -2675,7 +2675,7 @@ { ConversationMapType::iterator r = conversationMap.find(messageInfo.callId); if (r != conversationMap.end()) { - r->second->remoteContact = messageInfo.remoteContact; + r->second->m_remoteContact = messageInfo.remoteContact; return r->second; } @@ -4894,19 +4894,23 @@ EVT_CLOSE(IMDialog::OnCloseWindow) END_EVENT_TABLE() -IMDialog::IMDialog(MyManager * _manager, const PString & _callId, const SIPURL & _them, const PString & _remoteContact) - : callId(_callId), remoteContact(_remoteContact), manager(_manager), them(_them.AsString()) +IMDialog::IMDialog(MyManager * manager, const PString & callId, const SIPURL & them, const PString & remoteContact) + : m_callId(callId) + , m_remoteContact(remoteContact) + , m_manager(manager) + , m_them(them.AsString()) + , m_us(wxT("(local)")) { wxXmlResource::Get()->LoadDialog(this, manager, wxT("IMDialog")); { PString t; - if (!_them.GetDisplayName().IsEmpty()) - t = _them.GetDisplayName(); + if (!them.GetDisplayName().IsEmpty()) + t = them.GetDisplayName(); else - t = _them.AsString(); + t = m_them; PwxString tw(t); - PwxString iw(_callId); + PwxString iw(m_callId); wxString s; s.sprintf(wxT("Conversation with %s (%s)"), tw.c_str(), iw.c_str()); SetTitle(s); } @@ -4915,21 +4919,19 @@ m_enteredText = FindWindowByNameAs<wxTextCtrl>(this, wxT("EnteredText")); m_enteredText->SetFocus(); - defaultStyle = m_textArea->GetDefaultStyle(); - ourStyle = defaultStyle; - theirStyle = defaultStyle; - ourStyle.SetTextColour(*wxRED); - theirStyle.SetTextColour(wxColour(0, 0xc0, 0)); + m_defaultStyle = m_textArea->GetDefaultStyle(); + m_ourStyle = m_defaultStyle; + m_theirStyle = m_defaultStyle; + m_ourStyle.SetTextColour(*wxRED); + m_theirStyle.SetTextColour(wxColour(0, 0xc0, 0)); - us = wxT("(local)"); - manager->conversationMap.insert(MyManager::ConversationMapType::value_type((const char *)callId, this)); } IMDialog::~IMDialog() { - PString key = callId; - manager->conversationMap.erase((const char *)key); + PString key = m_callId; + m_manager->conversationMap.erase((const char *)key); } void IMDialog::OnCloseWindow(wxCloseEvent & WXUNUSED(event)) @@ -4952,13 +4954,13 @@ PwxString text = m_enteredText->GetValue(); AddTextToScreen(text, true); m_enteredText->SetValue(wxT("")); - if (manager->sipEP->Message(them.p_str(), text.p_str(), remoteContact, callId)) { - LogWindow << "Sending page mode IM to " << them << " (" << callId << ")" << endl; + if (m_manager->sipEP->Message(m_them.p_str(), text.p_str(), m_remoteContact, m_callId)) { + LogWindow << "Sending page mode IM to " << m_them << " (" << m_callId << ")" << endl; } else { - LogWindow << "Page mode IM to " << them << " failed" << endl; - m_textArea->SetDefaultStyle(theirStyle); + LogWindow << "Page mode IM to " << m_them << " failed" << endl; + m_textArea->SetDefaultStyle(m_theirStyle); m_textArea->AppendText(wxT("ERROR: Message could not be delivered")); - m_textArea->SetDefaultStyle(defaultStyle); + m_textArea->SetDefaultStyle(m_defaultStyle); m_textArea->AppendText(wxT("\n")); } } @@ -4970,14 +4972,14 @@ m_textArea->AppendText(nowStr); m_textArea->AppendText(wxT(" ")); if (fromUs) { - m_textArea->SetDefaultStyle(ourStyle); - m_textArea->AppendText(us); + m_textArea->SetDefaultStyle(m_ourStyle); + m_textArea->AppendText(m_us); } else { - m_textArea->SetDefaultStyle(theirStyle); - m_textArea->AppendText(them); + m_textArea->SetDefaultStyle(m_theirStyle); + m_textArea->AppendText(m_them); } m_textArea->AppendText(wxT(": ")); - m_textArea->SetDefaultStyle(defaultStyle); + m_textArea->SetDefaultStyle(m_defaultStyle); m_textArea->AppendText(text); m_textArea->AppendText(wxT("\n")); } Modified: opal/trunk/samples/openphone/main.h =================================================================== --- opal/trunk/samples/openphone/main.h 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/main.h 2008-12-02 02:45:56 UTC (rev 21672) @@ -272,13 +272,13 @@ class IMDialog : public wxDialog { public: - IMDialog(MyManager * _manager, const PString & _callId, const SIPURL & _them, const PString & _remoteContact); + IMDialog(MyManager * manager, const PString & callId, const SIPURL & them, const PString & remoteContact); ~IMDialog(); void AddTextToScreen(const wxString & text, bool fromUs); - PString callId; - PString remoteContact; + PString m_callId; + PString m_remoteContact; private: void OnSend(wxCommandEvent & event); @@ -287,16 +287,16 @@ void SendCurrentText(); - MyManager * manager; + MyManager * m_manager; - PwxString them; - PwxString us; + PwxString m_them; + PwxString m_us; wxTextCtrl * m_enteredText; wxTextCtrl * m_textArea; - wxTextAttr defaultStyle; - wxTextAttr ourStyle; - wxTextAttr theirStyle; + wxTextAttr m_defaultStyle; + wxTextAttr m_ourStyle; + wxTextAttr m_theirStyle; DECLARE_EVENT_TABLE() }; @@ -998,7 +998,6 @@ void StartRegistrations(); void ReplaceRegistrations(const RegistrationList & newRegistrations); - friend IMDialog; typedef std::map<std::string, IMDialog *> ConversationMapType; PMutex conversationMapMutex; Modified: opal/trunk/samples/openphone/present16.xpm =================================================================== --- opal/trunk/samples/openphone/present16.xpm 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/present16.xpm 2008-12-02 02:45:56 UTC (rev 21672) @@ -1,5 +1,5 @@ /* XPM */ -static const char * const SmallPhone_xpm[] = { +static const char * const present16_xpm[] = { /* columns rows colors chars-per-pixel */ "16 16 13 1", " c opaque", Modified: opal/trunk/samples/openphone/present48.xpm =================================================================== --- opal/trunk/samples/openphone/present48.xpm 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/present48.xpm 2008-12-02 02:45:56 UTC (rev 21672) @@ -1,5 +1,5 @@ /* XPM */ -static char * Present_xpm[] = { +static const char * const present48_xpm[] = { "48 48 1125 2", " c #D5F2F8", ". c #D4F1F7", Modified: opal/trunk/samples/openphone/unknown16.xpm =================================================================== --- opal/trunk/samples/openphone/unknown16.xpm 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/unknown16.xpm 2008-12-02 02:45:56 UTC (rev 21672) @@ -1,5 +1,5 @@ /* XPM */ -static const char * const SmallPhone_xpm[] = { +static const char * const unknown16_xpm[] = { /* columns rows colors chars-per-pixel */ "16 16 13 1", " c opaque", Modified: opal/trunk/samples/openphone/unknown48.xpm =================================================================== --- opal/trunk/samples/openphone/unknown48.xpm 2008-12-02 02:35:44 UTC (rev 21671) +++ opal/trunk/samples/openphone/unknown48.xpm 2008-12-02 02:45:56 UTC (rev 21672) @@ -1,5 +1,5 @@ /* XPM */ -static char * Absent_xpm[] = { +static const char * const unknown48_xpm[] = { "48 48 843 2", " c #D5F2F8", ". c #D4F1F7", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |