static void lang_changed(void *data)
{
D_ENTER;
+ struct appdata *ad = data;
ug_send_event(UG_EVENT_LANG_CHANGE);
+
+ msg_ui_thread_lang_changed(ad->thread_data);
}
static void low_battery_cb(void *data)
}
service_add_extra_data(svc_handle, MSG_BUNDLE_KEY_TYPE, MSG_BUNDLE_VALUE_COMPOSE);
+ } else if (g_strcmp0(operation, SERVICE_OPERATION_DEFAULT) == 0) {
+ char *key_type = NULL;
+
+ service_get_extra_data(service, MSG_BUNDLE_KEY_TYPE, &key_type);
+ if (g_strcmp0(key_type, MSG_BUNDLE_VALUE_MSG_ID) == 0) {
+ msg_error_t err = MSG_SUCCESS;
+ msg_struct_t count_info = msg_create_struct(MSG_STRUCT_COUNT_INFO);
+ int unread_cnt = 0;
+
+ err = msg_count_message(gAppData->msgHandle, MSG_INBOX_ID, count_info);
+ if (err != MSG_SUCCESS) {
+ msg_release_struct(&count_info);
+ return NULL;
+ }
+
+ msg_get_int_value(count_info, MSG_COUNT_INFO_UNREAD_INT, &unread_cnt);
+ if (unread_cnt == 1)
+ svc_handle = __get_service_with_msg_id(gAppData, service);
+
+ msg_release_struct(&count_info);
+ }
}
D_LEAVE;
evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
evas_object_resize(eo, w, h);
+ elm_win_conformant_set(eo, EINA_TRUE);
}
D_LEAVE;
win = ug_get_window();
switch (mode) {
- case UG_MODE_FULLVIEW:
+ case UG_MODE_FULLVIEW:
evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, base);
evas_object_show(base);
break;
case UG_MODE_FRAMEVIEW:
- default:
+ default:
break;
}
if (buf) {
update_id = atoi(buf);
msg_ui_thread_list_item_update(pListData, update_id);
+ pListData->sel_thread_id = update_id;
}
}
}
PMSG_THREAD_LIST_DATA pListData = NULL;
pListData = msg_ui_thread_get_current_list();
-
if (pListData == NULL) {
elm_exit();
return;
}
- if (pData->isRotate == true) {
- if (!pData->split_data) {
- msg_ui_thread_create_split_data();
- msg_ui_thread_splitview_launch(pData, pData->split_data);
+ if (pData) {
+ if (pData->isRotate == true) {
+ if (!pData->split_data) {
+ msg_ui_thread_create_split_data();
+ msg_ui_thread_splitview_launch(pData, pData->split_data);
+ }
+ if (ug_type == MSG_COMPOSER_UG_TYPE_VIEWER) {
+ msg_ui_thread_cancel_search_mode(pListData);
+ elm_win_lower(pData->win_main);
+ }
+ } else {
+ elm_object_part_content_set(pData->panes, "left", pData->layout_main);
+ elm_object_part_content_unset(pData->panes, "right");
+ elm_panes_content_left_size_set(pData->panes, 1.0);
}
-
- if (ug_type == MSG_COMPOSER_UG_TYPE_VIEWER)
- elm_win_lower(pData->win_main);
- } else {
- elm_object_part_content_set(pData->panes, "left", pData->layout_main);
- elm_object_part_content_unset(pData->panes, "right");
- elm_panes_content_left_size_set(pData->panes, 1.0);
}
if (pListData->sel_thread_id > 0)
gAppData->ug_type = MSG_COMPOSER_UG_TYPE_NONE;
service_add_extra_data(svc_handle, MSG_BUNDLE_KEY_FROM, MSG_BUNDLE_VALUE_INTERNAL);
- gAppData->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FULLVIEW, svc_handle, &gAppData->cbs);
+ if (ug_type == MSG_COMPOSER_UG_TYPE_COMPOSER)
+ gAppData->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FULLVIEW, svc_handle, &gAppData->cbs);
+ else
+ gAppData->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FRAMEVIEW, svc_handle, &gAppData->cbs);
} else {
ug_send_message(gAppData->composer_ug, svc_handle);
}
} else {
service_add_extra_data(svc_handle, MSG_BUNDLE_KEY_FROM, MSG_BUNDLE_VALUE_INTERNAL);
- gAppData->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FULLVIEW, svc_handle, &gAppData->cbs);
+ if (ug_type == MSG_COMPOSER_UG_TYPE_COMPOSER)
+ gAppData->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FULLVIEW, svc_handle, &gAppData->cbs);
+ else
+ gAppData->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FRAMEVIEW, svc_handle, &gAppData->cbs);
}
if (!gAppData->composer_ug)
evas_object_hide(pData->layout_main);
}
}
-
D_LEAVE;
return MSG_UI_RET_SUCCESS;
}
ad->win_main = win;
+ ad->bg = elm_bg_add(ad->win_main);
+ evas_object_size_hint_weight_set(ad->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(ad->win_main, ad->bg);
+
+ ad->conform = elm_conformant_add(win);
+ if (ad->conform == NULL)
+ return FALSE;
+
+ evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, ad->conform);
+ evas_object_show(ad->conform);
+
err = sound_manager_set_session_type(SOUND_SESSION_TYPE_SHARE);
if (err != SOUND_MANAGER_ERROR_NONE)
D_MSG("sound_manager_set_session_type is failed, ret = [%d]", err);
}
if (isDefaultView) {
+ MSG_UI_DEBUG(MSG_UI_LEVEL_DEBUG, "show DefaultView");
if (ad->composer_ug) {
ug_destroy(ad->composer_ug);
ad->composer_ug = NULL;
if (!ad->layout_main) {
ad->layout_main = msg_ui_thread_create_layout_main(ad->thread_data);
evas_object_size_hint_weight_set(ad->layout_main, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(ad->win_main, ad->layout_main);
+ elm_object_content_set(ad->conform, ad->layout_main);
msg_ui_thread_load_thread_view(ad->thread_data, service);
} else {
}
__rotate(app_get_device_orientation(), ad);
} else {
+ MSG_UI_DEBUG(MSG_UI_LEVEL_DEBUG, "show app-service view");
/* If message app is called by app-service to display composer view,
* list view should be destroyed because previous screen should be displayed
* when user tap back button.
*/
+ MessageComposerUgType ug_type = MSG_COMPOSER_UG_TYPE_NONE;
+
if (operation != NULL) {
+ int i = 0;
+ PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)ad->thread_data;
+
if (g_strcmp0(operation, SERVICE_OPERATION_SEND) == 0 ||
g_strcmp0(operation, SERVICE_OPERATION_SEND_TEXT) == 0) {
if (ad->layout_main) {
+ /* content unset composer */
+ if (ad->ug_type == MSG_COMPOSER_UG_TYPE_VIEWER) {
+ if (pData)
+ elm_object_part_content_unset(pData->panes, "right");
+ }
+
+ if (pData) {
+ for (i = MSG_THREAD_LIST_MAX_COUNT-1; i >= 0; i--) {
+ if (pData->list_data[i] != NULL) {
+ msg_ui_thread_destroy_thread_list_data(pData->list_data[i]);
+ }
+ }
+ }
evas_object_del(ad->layout_main);
ad->layout_main = NULL;
}
+ ug_type = MSG_COMPOSER_UG_TYPE_COMPOSER;
+ } else if (g_strcmp0(operation, SERVICE_OPERATION_DEFAULT) == 0) {
+ char *key_type = NULL;
+
+ service_get_extra_data(service, MSG_BUNDLE_KEY_TYPE, &key_type);
+ if (g_strcmp0(key_type, MSG_BUNDLE_VALUE_MSG_ID) == 0) {
+ if (ad->layout_main) {
+ /* content unset composer */
+ if (ad->ug_type == MSG_COMPOSER_UG_TYPE_VIEWER) {
+ if (pData)
+ elm_object_part_content_unset(pData->panes, "right");
+ }
+
+ if (pData) {
+ for (i = MSG_THREAD_LIST_MAX_COUNT-1; i >= 0; i--) {
+ if (pData->list_data[i] != NULL) {
+ msg_ui_thread_destroy_thread_list_data(pData->list_data[i]);
+ }
+ }
+ }
+ evas_object_del(ad->layout_main);
+ ad->layout_main = NULL;
+ }
+ ug_type = MSG_COMPOSER_UG_TYPE_VIEWER;
+ }
}
}
- if (!ad->composer_ug)
- ad->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FULLVIEW, svc_handle, &ad->cbs);
- else
- ug_send_message(ad->composer_ug, svc_handle);
-
- PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)ad->thread_data;
- char *thread_id_s = NULL;
-
- service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_THREAD_ID, &thread_id_s);
-
- if (pData) {
- PMSG_THREAD_LIST_DATA pListData = NULL;
- pListData = msg_ui_thread_get_current_list();
-
- if (pListData && thread_id_s)
- pListData->sel_thread_id = atoi(thread_id_s);
+ if (ad->composer_ug) {
+ ug_destroy(ad->composer_ug);
+ ad->composer_ug = NULL;
+ ad->ug_type = MSG_COMPOSER_UG_TYPE_NONE;
}
+
+ ad->composer_ug = ug_create(NULL, MSG_COMPOSER_UG_NAME, UG_MODE_FULLVIEW, svc_handle, &ad->cbs);
+ ad->ug_type = ug_type;
}
if (svc_handle)