while (sqlite3_step(stmt) == SQLITE_ROW) {
APP_INFO *item = (APP_INFO *)malloc(sizeof(APP_INFO));
- memset(item, 0, sizeof(APP_INFO));
+ if (item) {
+ memset(item, 0, sizeof(APP_INFO));
- item->db_id = sqlite3_column_int(stmt, COL_ID);
+ item->db_id = sqlite3_column_int(stmt, COL_ID);
- str = (const char *) sqlite3_column_text(stmt, COL_APPLICATION_ID);
- item->app_id = (!str || !strlen(str)) ? NULL : strdup(str);
+ str = (const char *) sqlite3_column_text(stmt, COL_APPLICATION_ID);
+ item->app_id = (!str || !strlen(str)) ? NULL : strdup(str);
- str = (const char *) sqlite3_column_text(stmt, COL_PACKAGE_ID);
- item->pkg_id = (!str || !strlen(str)) ? NULL : strdup(str);
+ str = (const char *) sqlite3_column_text(stmt, COL_PACKAGE_ID);
+ item->pkg_id = (!str || !strlen(str)) ? NULL : strdup(str);
- str = (const char *) sqlite3_column_text(stmt, COL_LABEL);
- item->label = (!str) ? NULL : strdup(str);
+ str = (const char *) sqlite3_column_text(stmt, COL_LABEL);
+ item->label = (!str) ? NULL : strdup(str);
- str = (const char *)sqlite3_column_text(stmt, COL_ICON_PATH);
- item->icon_path = (!str || !strlen(str)) ? NULL : strdup(str);
+ str = (const char *)sqlite3_column_text(stmt, COL_ICON_PATH);
+ item->icon_path = (!str || !strlen(str)) ? NULL : strdup(str);
- item->index = sqlite3_column_int(stmt, COL_INDEX);
+ item->index = sqlite3_column_int(stmt, COL_INDEX);
- list = eina_list_append(list, item);
+ list = eina_list_append(list, item);
+ }
}
sqlite3_finalize(stmt);
__close_db_connector();
}
__insert_data_value(key, value);
- free(v);
}
static bool __init_db_connector(void)
if (title_text) {
buffer_size = strlen(start_tag_title)+strlen(title_text)+strlen(end_tag)+1;
set_text = (char *)calloc(buffer_size, sizeof(char));
- snprintf(set_text, buffer_size, "%s%s%s", start_tag_title, title_text, end_tag);
+ if (set_text) {
+ snprintf(set_text, buffer_size, "%s%s%s", start_tag_title, title_text, end_tag);
- screen_buffer_size += strlen(title_text);
+ screen_buffer_size += strlen(title_text);
- _noti_detail_view_data_s.title_label = _noti_detail_view_set_label();
- elm_object_text_set(_noti_detail_view_data_s.title_label, set_text);
- elm_label_wrap_width_set(_noti_detail_view_data_s.title_label, 268);
- evas_object_size_hint_max_set(_noti_detail_view_data_s.title_label, 268, -1);
- _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
- _noti_detail_view_data_s.title_label);
+ _noti_detail_view_data_s.title_label = _noti_detail_view_set_label();
+ elm_object_text_set(_noti_detail_view_data_s.title_label, set_text);
+ elm_label_wrap_width_set(_noti_detail_view_data_s.title_label, 268);
+ evas_object_size_hint_max_set(_noti_detail_view_data_s.title_label, 268, -1);
+ _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
+ _noti_detail_view_data_s.title_label);
- if (elm_atspi_bridge_utils_is_screen_reader_enabled())
- elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.title_label, EINA_FALSE);
- free(set_text);
+ if (elm_atspi_bridge_utils_is_screen_reader_enabled())
+ elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.title_label, EINA_FALSE);
+ free(set_text);
+ }
}
if (time) {
if (text_time) {
buffer_size = strlen(start_tag_time)+strlen(text_time)+strlen(end_tag)+1;
set_text = (char *)calloc(buffer_size, sizeof(char));
- snprintf(set_text, buffer_size, "%s%s%s", start_tag_time, text_time, end_tag);
+ if (set_text) {
- screen_buffer_size += strlen(text_time);
+ snprintf(set_text, buffer_size, "%s%s%s", start_tag_time, text_time, end_tag);
- _noti_detail_view_data_s.time_label = _noti_detail_view_set_label();
- elm_object_text_set(_noti_detail_view_data_s.time_label, set_text);
- _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
- _noti_detail_view_data_s.time_label);
+ screen_buffer_size += strlen(text_time);
- if (elm_atspi_bridge_utils_is_screen_reader_enabled())
- elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.time_label, EINA_FALSE);
+ _noti_detail_view_data_s.time_label = _noti_detail_view_set_label();
+ elm_object_text_set(_noti_detail_view_data_s.time_label, set_text);
+ _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
+ _noti_detail_view_data_s.time_label);
- free(set_text);
+ if (elm_atspi_bridge_utils_is_screen_reader_enabled())
+ elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.time_label, EINA_FALSE);
+
+ free(set_text);
+ }
}
}
if (content_title_text) {
buffer_size = strlen(start_tag)+strlen(content_title_text)+strlen(end_tag)+1;
set_text = (char *)calloc(buffer_size, sizeof(char));
- snprintf(set_text, buffer_size, "%s%s%s", start_tag, content_title_text, end_tag);
+ if (set_text) {
+ snprintf(set_text, buffer_size, "%s%s%s", start_tag, content_title_text, end_tag);
- screen_buffer_size += strlen(content_title_text);
+ screen_buffer_size += strlen(content_title_text);
- _noti_detail_view_data_s.contents_title_label = _noti_detail_view_set_label();
- elm_object_text_set(_noti_detail_view_data_s.contents_title_label, set_text);
- _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
- _noti_detail_view_data_s.contents_title_label);
+ _noti_detail_view_data_s.contents_title_label = _noti_detail_view_set_label();
+ elm_object_text_set(_noti_detail_view_data_s.contents_title_label, set_text);
+ _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
+ _noti_detail_view_data_s.contents_title_label);
- if (elm_atspi_bridge_utils_is_screen_reader_enabled())
- elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.contents_title_label, EINA_FALSE);
+ if (elm_atspi_bridge_utils_is_screen_reader_enabled())
+ elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.contents_title_label, EINA_FALSE);
- free(set_text);
+ free(set_text);
+ }
}
/* Horizontal separator */
if (content_text) {
buffer_size = strlen(start_tag)+strlen(content_text)+strlen(end_tag)+1;
set_text = (char *)calloc(buffer_size, sizeof(char));
- snprintf(set_text, buffer_size, "%s%s%s", start_tag, content_text, end_tag);
+ if (set_text) {
+ snprintf(set_text, buffer_size, "%s%s%s", start_tag, content_text, end_tag);
- screen_buffer_size += strlen(content_text);
+ screen_buffer_size += strlen(content_text);
- _noti_detail_view_data_s.paragraph_label = _noti_detail_view_set_label();
- elm_object_text_set(_noti_detail_view_data_s.paragraph_label, set_text);
- evas_object_size_hint_max_set(_noti_detail_view_data_s.paragraph_label, 294, -1);
- _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
- _noti_detail_view_data_s.paragraph_label);
+ _noti_detail_view_data_s.paragraph_label = _noti_detail_view_set_label();
+ elm_object_text_set(_noti_detail_view_data_s.paragraph_label, set_text);
+ evas_object_size_hint_max_set(_noti_detail_view_data_s.paragraph_label, 294, -1);
+ _noti_detail_view_data_s.item_list = eina_list_append(_noti_detail_view_data_s.item_list,
+ _noti_detail_view_data_s.paragraph_label);
- if (elm_atspi_bridge_utils_is_screen_reader_enabled())
- elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.paragraph_label, EINA_FALSE);
+ if (elm_atspi_bridge_utils_is_screen_reader_enabled())
+ elm_atspi_accessible_can_highlight_set(_noti_detail_view_data_s.paragraph_label, EINA_FALSE);
- free(set_text);
+ free(set_text);
+ }
}
_noti_detail_view_data_s.up_screen_text = (char *)calloc(screen_buffer_size+1+6, sizeof(char));
- if (title_text) {
- strncat(_noti_detail_view_data_s.up_screen_text, title_text, strlen(title_text));
- strncat(_noti_detail_view_data_s.up_screen_text, ". ", 2);
- }
- if (text_time) {
- strncat(_noti_detail_view_data_s.up_screen_text, text_time, strlen(text_time));
- strncat(_noti_detail_view_data_s.up_screen_text, ". ", 2);
- }
- if (content_title_text) {
- strncat(_noti_detail_view_data_s.up_screen_text, content_title_text, strlen(content_title_text));
- strncat(_noti_detail_view_data_s.up_screen_text, ". ", 2);
- }
- if (content_text)
- strncat(_noti_detail_view_data_s.up_screen_text, content_text, strlen(content_text));
+ if (_noti_detail_view_data_s.up_screen_text) {
+ if (title_text) {
+ strncat(_noti_detail_view_data_s.up_screen_text, title_text, strlen(title_text));
+ strncat(_noti_detail_view_data_s.up_screen_text, ". ", 2);
+ }
+ if (text_time) {
+ strncat(_noti_detail_view_data_s.up_screen_text, text_time, strlen(text_time));
+ strncat(_noti_detail_view_data_s.up_screen_text, ". ", 2);
+ }
+ if (content_title_text) {
+ strncat(_noti_detail_view_data_s.up_screen_text, content_title_text, strlen(content_title_text));
+ strncat(_noti_detail_view_data_s.up_screen_text, ". ", 2);
+ }
+ if (content_text)
+ strncat(_noti_detail_view_data_s.up_screen_text, content_text, strlen(content_text));
- free(text_time);
+ free(text_time);
+ }
Evas_Object *bottom_spacer = _noti_create_detail_view_item_layout("detail_bottom_space");
ret_if(!bottom_spacer);