Conversation *conversation = new Conversation(*this);
ecore_main_loop_iterate_may_block(true); // FIXME: Fix EFL(TSAM-2158) and remove it
push(*conversation);
+ ecore_main_loop_iterate_may_block(true);
conversation->execCmd(cmd);
}
}
conv = new Conversation(*this);
ecore_main_loop_iterate_may_block(true); // FIXME: Fix EFL(TSAM-2158) and remove it
push(*conv);
+ ecore_main_loop_iterate_may_block(true);
}
conv->execCmd(cmd);
}
virtual std::string getMime() const = 0;
virtual void setFilePath(const std::string &path) = 0;
- virtual void setFileName(const std::string &fileName) = 0;
- virtual void setFileSize(int size) const = 0;
- virtual void setMime(const std::string &mime) = 0;
};
}
* @param[in] path.
*/
virtual void setFilePath(const std::string &path) = 0;
-
- /**
- * @brief Sets filename.
- * @param[in] filename.
- */
- virtual void setFileName(const std::string &name) = 0;
};
}
void MsgAttachmentPrivate::setFilePath(const std::string &path)
{
MsgUtilsPrivate::setStr(m_MsgStruct, MSG_MMS_ATTACH_FILEPATH_STR, path);
+ setFileName(FileUtils::getFileName(path));
+ setFileSize(FileUtils::getFileSize(path));
+ setMime(FileUtils::getMimeType(path));
}
void MsgAttachmentPrivate::setFileName(const std::string &fileName)
virtual std::string getMime() const;
virtual void setFilePath(const std::string &path);
- virtual void setFileName(const std::string &fileName);
- virtual void setFileSize(int size) const;
- virtual void setMime(const std::string &mime);
+ void setFileName(const std::string &fileName);
+ void setFileSize(int size) const;
+ void setMime(const std::string &mime);
};
typedef class MsgListHandlePrivate<MsgAttachmentPrivate, MsgAttachment> MsgAttachmentListHandlePrivate;
#include "MsgDefPrivate.h"
#include "Logger.h"
#include "MediaType.h"
+#include "FileUtils.h"
#include <msg.h>
using namespace Msg;
MsgUtilsPrivate::setStr(m_MsgStruct, MSG_MMS_MEDIA_FILEPATH_STR, path);
MediaTypeData mediaData = getMsgMediaTypeByFileExt(path);
setType(mediaData.type);
+ setFileName(FileUtils::getFileName(path));
}
void MsgMediaPrivate::setFileName(const std::string &name)
virtual Type getType() const;
virtual std::string getFilePath() const;
virtual std::string getFileName() const;
- virtual void setFileName(const std::string &name);
virtual void setFilePath(const std::string &path);
std::string getMime() const;
+ void setFileName(const std::string &name);
void setMime(const std::string &mime);
void setType(Type type);
};
for(auto *attachment : attachments)
{
const std::string &filePath = attachment->getFilePath();
- if(!filePath.empty())
+ if(filePath.empty())
+ continue;
+
+ switch(getMsgMediaTypeByFileExt(filePath).type)
{
- MsgPage &msgPage = msg.addPage();
- msgPage.setPageDuration(defaultPageDuration);
- MsgMedia &media = msgPage.addMedia();
- media.setFilePath(filePath);
- media.setFileName(FileUtils::getFileName(filePath));
+ case MsgMedia::ImageType:
+ case MsgMedia::AudioType:
+ case MsgMedia::VideoType:
+ {
+ MsgPage &msgPage = msg.addPage();
+ msgPage.setPageDuration(defaultPageDuration);
+ MsgMedia &media = msgPage.addMedia();
+ media.setFilePath(filePath);
+ break;
+ }
+ default:
+ {
+ MsgAttachment &msgAttach = msg.addAttachment();
+ msgAttach.setFilePath(filePath);
+ break;
+ }
}
}
}
m_pDelButton = elm_button_add(getEo());
elm_object_style_set(m_pDelButton, "transparent");
evas_object_smart_callback_add(m_pDelButton, "clicked", SMART_CALLBACK(BubbleViewItem, onDelButtonClicked), this);
+ elm_object_focus_allow_set(m_pDelButton, false);
evas_object_event_callback_add
(
m_pDelButton,