{
int noti_err = NOTIFICATION_ERROR_NONE;
bool is_exist_count = false;
- char *text = NULL;
-
+ char *title_text = NULL;
+ char *count_text = NULL;
+ char *content_text = NULL;
char *domain = NULL;
char *dir = NULL;
/* Get pkgname & id */
if (noti_privacy_mode == QP_PRIVACY_MODE_HIDE_CONTENT)
- text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
+ title_text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
- if (text == NULL)
- text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
+ if (title_text == NULL)
+ title_text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
- if (text != NULL) {
- DBG("TITLE text : %s", text);
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
- _set_text_to_part(item, "elm.text.title", text);
+ if (title_text != NULL) {
+ DBG("TITLE text : %s", title_text);
+ quickpanel_common_util_char_replace(title_text, _NEWLINE, _SPACE);
+ _set_text_to_part(item, "elm.text.title", title_text);
#ifdef QP_SCREENREADER_ENABLE
- _check_and_add_to_buffer(str_buf, text);
+ _check_and_add_to_buffer(str_buf, title_text);
#endif
}
- noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &text);
- if (noti_err == NOTIFICATION_ERROR_NONE && text != NULL) {
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
- int count = atoi(text);
+ noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &count_text);
+ if (noti_err == NOTIFICATION_ERROR_NONE && count_text != NULL) {
+ quickpanel_common_util_char_replace(count_text, _NEWLINE, _SPACE);
+ int count = atoi(count_text);
if (count > 999)
_set_text_to_part(item, "elm.text.count", "999+");
else
- _set_text_to_part(item, "elm.text.count", text);
+ _set_text_to_part(item, "elm.text.count", count_text);
is_exist_count = true;
#ifdef QP_SCREENREADER_ENABLE
- _check_and_add_to_buffer(str_buf, text);
+ _check_and_add_to_buffer(str_buf, count_text);
#endif
}
if (noti_privacy_mode == QP_PRIVACY_MODE_HIDE_CONTENT)
- text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
+ content_text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
- if (text == NULL)
- text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
+ if (content_text == NULL)
+ content_text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
- if (text != NULL) {
- DBG("CONTENT text : %s", text);
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
- _set_text_to_part(item, "elm.text.content", text);
+ if (content_text != NULL) {
+ DBG("CONTENT text : %s", content_text);
+ quickpanel_common_util_char_replace(content_text, _NEWLINE, _SPACE);
+ _set_text_to_part(item, "elm.text.content", content_text);
#ifdef QP_SCREENREADER_ENABLE
- _check_and_add_to_buffer(str_buf, text);
+ _check_and_add_to_buffer(str_buf, content_text);
#endif
}
static void _set_text(Evas_Object *item, notification_h noti)
{
- char *text = NULL;
+ char *title_text = NULL;
+ char *count_text = NULL;
+ char *content_text = NULL;
+ char *progress_text = NULL;
char *text_utf8 = NULL;
char *domain = NULL;
char *dir = NULL;
Evas_Object *textblock = NULL;
int len_w = 0, num_line = 1, view_height = 0;
struct appdata *ad = quickpanel_get_app_data();
- char *text_count = NULL;
int ret;
qp_privacy_mode noti_privacy_mode = quickpanel_noti_util_get_noti_privacy_mode(noti);
if (ret != NOTIFICATION_ERROR_NONE)
ERR("Unable to get layout");
- ret = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &text_count);
+ ret = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &count_text);
if (ret != NOTIFICATION_ERROR_NONE)
ERR("Unable to get event_count");
DBG("percentage:%f size:%f", percentage, size);
if (noti_privacy_mode == QP_PRIVACY_MODE_HIDE_CONTENT)
- text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
+ title_text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
- if (text == NULL)
- text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
+ if (title_text == NULL)
+ title_text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
- if (text != NULL) {
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
- _set_text_to_part(item, "elm.text.title", text);
+ if (title_text != NULL) {
+ quickpanel_common_util_char_replace(title_text, _NEWLINE, _SPACE);
+ _set_text_to_part(item, "elm.text.title", title_text);
#ifdef QP_SCREENREADER_ENABLE
- _check_and_add_to_buffer(str_buf, text);
+ _check_and_add_to_buffer(str_buf, title_text);
#endif
}
if (noti_privacy_mode == QP_PRIVACY_MODE_HIDE_CONTENT)
- text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
+ content_text = quickpanel_noti_util_get_hidden_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
else
- text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
+ content_text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
- if (text != NULL) {
+ if (content_text != NULL) {
if (layout == NOTIFICATION_LY_ONGOING_EVENT) {
- text_utf8 = elm_entry_utf8_to_markup(text);
+ text_utf8 = elm_entry_utf8_to_markup(content_text);
if (text_utf8 != NULL) {
_set_text_to_part(item, "elm.text.content", text_utf8);
free(text_utf8);
} else {
- _set_text_to_part(item, "elm.text.content", text);
+ _set_text_to_part(item, "elm.text.content", content_text);
}
textblock = (Evas_Object *)edje_object_part_object_get(_EDJ(item), "elm.text.content");
evas_object_textblock_size_native_get(textblock, &len_w, NULL);
}*/
quickpanel_uic_initial_resize(item, view_height);
#ifdef QP_SCREENREADER_ENABLE
- _check_and_add_to_buffer(str_buf, text);
+ _check_and_add_to_buffer(str_buf, content_text);
#endif
} else {
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
- _set_text_to_part(item, "elm.text.content", text);
+ quickpanel_common_util_char_replace(content_text, _NEWLINE, _SPACE);
+ _set_text_to_part(item, "elm.text.content", content_text);
#ifdef QP_SCREENREADER_ENABLE
- _check_and_add_to_buffer(str_buf, text);
+ _check_and_add_to_buffer(str_buf, content_text);
#endif
}
}
if (layout != NOTIFICATION_LY_ONGOING_EVENT) {
- text = _noti_get_progress(noti, buf, sizeof(buf));
- if (text != NULL) {
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
+ progress_text = _noti_get_progress(noti, buf, sizeof(buf));
+ if (progress_text != NULL) {
+ quickpanel_common_util_char_replace(progress_text, _NEWLINE, _SPACE);
#ifdef QP_SCREENREADER_ENABLE
- _check_and_add_to_buffer(str_buf, text);
+ _check_and_add_to_buffer(str_buf, progress_text);
#endif
} else {
_set_text_to_part(item, "elm.text.time", "");
}
}
- if (layout == NOTIFICATION_LY_ONGOING_PROGRESS && text_count != NULL) {
- _set_text_to_part(item, "elm.text.count", text_count);
+ if (layout == NOTIFICATION_LY_ONGOING_PROGRESS && count_text != NULL) {
+ _set_text_to_part(item, "elm.text.count", count_text);
if (elm_object_part_text_get(item, "elm.text.count") != NULL) {
elm_object_signal_emit(item, "content.short", "prog");
elm_object_signal_emit(item, "count.show", "prog");