void create(Evas_Object *parent);
void setListener(IBodyListener *listener);
+ void enableAutoFocusForAttachments(bool focus);
void addMedia(const std::list<std::string> &fileList);
void addMedia(const std::string &filePath);
bool m_MmsRecipFlag;
AttachmentHandler m_AttachmentHandler;
std::queue<std::string> m_SelectedFiles;
+ bool m_AutoFocusForAttachments;
};
class IBodyListener
, m_ResizingPopupShow(false)
, m_MmsRecipFlag(false)
, m_AttachmentHandler(workingDir)
+ , m_AutoFocusForAttachments(true)
{
m_AttachmentHandler.setListener(this);
}
m_pListener = listener;
}
+void Body::enableAutoFocusForAttachments(bool focus)
+{
+ m_AutoFocusForAttachments = focus;
+}
+
void Body::addMedia(const std::list<std::string> &fileList)
{
for(auto& file : fileList)
page = &getDefaultPage();
}
- if(page)
+ if(page && m_AutoFocusForAttachments)
BodyView::setFocus(*page, true); // TODO: check for multi insertion
+
m_SelectedFiles.pop();
if(!m_SelectedFiles.empty())
{
}
setThreadId(ThreadId());
+
if(m_pRecipPanel)
- {
m_pRecipPanel->execCmd(cmd);
- if(!isRecipExists())
- m_pRecipPanel->setEntryFocus(true);
- }
+
if(m_pBody)
{
+ m_pBody->enableAutoFocusForAttachments(isRecipExists());
m_pBody->execCmd(cmd);
- if(isRecipExists())
- m_pBody->setFocus(true);
}
+
+ if(isRecipExists())
+ m_pBody->setFocus(true);
+ else if(m_pRecipPanel)
+ m_pRecipPanel->setEntryFocus(true);
}
void Conversation::execCmd(const AppControlDefaultRef &cmd)
void Conversation::onFileSelected(AttachPanel &panel, const AttachPanel::FileList &files)
{
MSG_LOG("");
+ m_pBody->enableAutoFocusForAttachments(true);
m_pBody->addMedia(files);
}