bool SaveAttachments::saveCheckedItems()
{
- std::string filePathDst;
- std::string dowloadPath = PathUtils::getDownloadPath();
-
auto items = m_pList->getItems<SaveAttachmentsListItem>();
std::list<std::string> files;
#ifdef TIZEN_PRIVATE_API
const int maxSegments = 3;
const int maxGsm7Len = 160;
- const int maxUnicodeLen = 70;
msg_encode_type_t encode = MSG_ENCODE_GSM7BIT;
unsigned textLen = 0;
segmentLen /= bytesInChar;
}
- if (segmentLen == 0)
+ if (segmentLen == 0) {
+ const int maxUnicodeLen = 70;
segmentLen = encode == MSG_ENCODE_UCS2 ? maxUnicodeLen : maxGsm7Len;
-
+ }
if (textLen == 0)
textLen = text.length() / bytesInChar;
bool MsgSettingsPrivate::getMmsAutoRetr() const
{
- bool res = false;
int retrType = 0;
msg_get_int_value(m_MmsRecvOpt, MSG_MMS_RECVOPT_HOME_RETRIEVE_TYPE_INT, &retrType);
- res = retrType == MSG_HOME_AUTO_DOWNLOAD;
+ bool res = retrType == MSG_HOME_AUTO_DOWNLOAD;
return res;
}
bool MsgSettingsPrivate::getMmsAutoRetrRoaming() const
{
- bool res = false;
int retrType = 0;
msg_get_int_value(m_MmsRecvOpt, MSG_MMS_RECVOPT_ABROAD_RETRIEVE_TYPE_INT, &retrType);
- res = retrType == MSG_ABROAD_AUTO_DOWNLOAD;
+ bool res = retrType == MSG_ABROAD_AUTO_DOWNLOAD;
return res;
}
(
[](void *data)
{
- auto *self =(MsgSettingsPrivate*)data;
+ auto *self = static_cast<MsgSettingsPrivate*>(data);
self->m_pActiveNotifJob = nullptr;
vconf_set_int(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, self->m_ActiveNotifValue);
MSG_LOG("ActiveNotifValue = ", self->m_ActiveNotifValue);
bool FileUtils::isExists(const std::string &file)
{
- bool res = false;
struct stat st = {};
- res = stat(file.c_str(), &st) == 0 || file == "/";
- return res;
+ return stat(file.c_str(), &st) == 0 || file == "/";
}
bool FileUtils::copy(const std::string &src, const std::string &dst)
bool FileUtils::makeDir(const std::string &dir)
{
- bool res = false;
-
mode_t mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
- res = mkdir(dir.c_str(), mode) == 0;
-
- return res;
+ return mkdir(dir.c_str(), mode) == 0;
}
std::string FileUtils::addFileToDataDir(const std::string &path)
if (thumbnail) {
const int quality = 90; // JPEG image quality(1 ~ 100)
image_util_encode_h encode_h = {};
- bool isOk = false;
- isOk = image_util_encode_create(IMAGE_UTIL_JPEG, &encode_h) == IMAGE_UTIL_ERROR_NONE;
+ bool isOk = image_util_encode_create(IMAGE_UTIL_JPEG, &encode_h) == IMAGE_UTIL_ERROR_NONE;
if (!isOk) {
free(thumbnail);
return false;
void Body::addFileToPage(MessageMms &msg, const std::string &filePath)
{
- static const int defaultPageDuration = 5000; // msec
if (!filePath.empty()) {
MsgPage &msgPage = msg.addPage();
MediaTypeData mediaData = getMsgMediaTypeByFileExt(filePath);
if (mediaData.type == MsgMedia::VideoType || mediaData.type == MsgMedia::AudioType)
pageDuration = MediaUtils::getDuration(filePath);
- if (pageDuration <= 0)
+ if (pageDuration <= 0) {
+ const int defaultPageDuration = 5000; // msec
pageDuration = defaultPageDuration;
-
+ }
msgPage.setPageDuration(pageDuration);
MsgMedia &media = msgPage.addMedia();
media.setFilePath(filePath);
void ConvList::dateLineDelIfNec(ConvListItem *item)
{
- bool needDelDateLine = false;
DateLineItem *prev = dynamic_cast<DateLineItem*>(m_pList->getPrevItem(*item));
if (prev) {
ListItem *nextItem = m_pList->getNextItem(*item);
- needDelDateLine = nextItem ? dynamic_cast<ConvListItem*>(nextItem) == nullptr : true;
+ bool needDelDateLine = nextItem ? dynamic_cast<ConvListItem*>(nextItem) == nullptr : true;
if (needDelDateLine) {
m_DateLineItemSet.erase(prev->getDateLine());
m_pList->deleteItem(*prev);
protected:
Evas_Object *createProgress();
- void updateProgress();
void updateContent();
void updateItemType(ConvItemType type);
virtual void onRealized(ListItem &item);
updateFields(bubbleContentPart, ELM_GENLIST_ITEM_FIELD_CONTENT);
}
-void ConvListViewItem::updateProgress()
-{
- updateFields(infoStatus, ELM_GENLIST_ITEM_FIELD_CONTENT);
-}
-
void ConvListViewItem::updateItemType(ConvItemType type)
{
if (type == m_Type || type == InitType)
virtual void onMbeChanged();
void onAppControlRes(app_control_h request, app_control_h reply, app_control_result_e result);
- void onPopupBtnClicked(Popup &popup, int buttonId);
- void onPopupDel(Evas_Object *popup, void *eventInfo);
void appendStatusHandler(MbeRecipients::AppendItemStatus status);
int getMaxRecipientCount() const;
setEntryFocus(true);
}
-void ConvRecipientsPanel::onPopupBtnClicked(Popup &popup, int buttonId)
-{
- popup.destroy();
-}
-
-void ConvRecipientsPanel::onPopupDel(Evas_Object *popup, void *eventInfo)
-{
- setEntryFocus(true);
-}
-
void ConvRecipientsPanel::showInvalidRecipientPopup()
{
notification_status_message_post(msg("IDS_MSG_TPOP_CANT_ADD_RECIPIENT_NUMBER_NOT_VALID").cStr());
void setEditMode(bool isEdit);
void showInvalidIcon(bool show);
void showClearButton(bool show);
- void setButtonEnabled(ButtonType buttonType, bool enabled);
-
private:
// Out signals:
}
}
-void ConvRecipientsPanelView::setButtonEnabled(ButtonType buttonType, bool enabled)
-{
- Evas_Object *pBtn = nullptr;
- switch (buttonType) {
- case NoneButton:
- break;
- case ContactButton:
- pBtn = getContactBtn();
- break;
- case PlusButton:
- pBtn = getPlusBtn();
- break;
- default:
- assert(false);
- break;
- }
-
- if (pBtn)
- elm_object_disabled_set(pBtn, !enabled);
-}
-
void ConvRecipientsPanelView::addGeometryChangedCb(Evas_Object *obj)
{
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, EVAS_EVENT_CALLBACK(ConvRecipientsPanelView, onGeometryChanged), this);
void onSearchItemPressed(PopupListItem &item);
// IMsgThreadSearchPanelListener:
- virtual void onSearchButtonClicked(MsgThreadSearchPanel &obj);
virtual void onEntryChanged(MsgThreadSearchPanel &obj);
// IFloatingButtonListener
void setListener(IThreadListListener *l);
void setDeleteMode(bool value);
- bool isDeleteModeEnabled() const;
void deleteSelectedItems();
int getThreadsCheckedCount() const;
composeNewMessage();
}
-void MsgThread::onSearchButtonClicked(MsgThreadSearchPanel &obj)
-{
- MSG_LOG("");
-}
-
void MsgThread::onEntryChanged(MsgThreadSearchPanel &obj)
{
MSG_LOG("");
showSelectAllItem(value);
}
-bool ThreadList::isDeleteModeEnabled() const
-{
- return m_DeleteMode;
-}
-
void ThreadList::deleteSelectedItems()
{
auto items = getItems<ThreadListItem>();
virtual ~IMsgThreadSearchPanelListener() {};
virtual void onBackButtonClicked(MsgThreadSearchPanel &obj) {};
- virtual void onSearchButtonClicked(MsgThreadSearchPanel &obj) {};
virtual void onEntryChanged(MsgThreadSearchPanel &obj) {};
};
}