Fix N_SE-21691, disable more button of composer in case of sms
[apps/core/preloaded/message-app.git] / composer / src / ui-composer / msg-ui-composer-main.c
index 63ab32e..1e9626d 100755 (executable)
@@ -5,7 +5,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *    http://www.tizenopensource.org/license
+ *    http://floralicense.org/license
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -390,8 +390,12 @@ static void __msgc_get_service_app_svc_op(MSG_COMPOSER_VIEW_DATA_S *cd, service_
                                 __msgc_ui_parse_mmsto_uri(cd, svc_handle, (const char *)uri);
                        } else if (g_str_has_prefix(uri, MSG_BUNDLE_VALUE_FILE_URI)) { /* URI : file */
                                 __msgc_ui_parse_file_uri(cd, svc_handle, (const char *)uri);
+                       } else if (g_str_has_prefix(uri, "/")) {
+                               cd->attachlist = make_tokenize_list((const char *)uri, COMPOSER_BUNDLE_ATTACH_TOKEN);
+                               if (cd->attachlist)
+                                       msg_ui_composer_body_items_add(cd);
                        } else {
-                               D_EMSG("Not supported mime type");
+                               D_EMSG("Not supported URI type");
                                return;
                        }
                } else {
@@ -1584,6 +1588,9 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_create(MSG_COMPOSER_VIEW_DATA_S *cd)
 
        cd->more_btn = more_button;
 
+       if (cd->msg_type == COMPOSER_MSG_TYPE_SMS)
+               elm_object_disabled_set(cd->more_btn, EINA_TRUE);
+
        /*Create compose button*/
        compose_button = __naviframe_compose_btn_create(navi_frame, cd);
 
@@ -1870,7 +1877,7 @@ static Eina_Bool __msgc_up_key_long_press_cb(void *data)
        if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
                msg_common_apply_font_size("bubble", cd->content_layout);
 
-       msg_ui_composer_apply_font_size(cd);
+       msg_ui_composer_apply_font_size(cd, false);
 
        return EINA_TRUE;
 }
@@ -1890,7 +1897,7 @@ static Eina_Bool __msgc_down_key_long_press_cb(void *data)
        if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
                msg_common_apply_font_size("bubble", cd->content_layout);
 
-       msg_ui_composer_apply_font_size(cd);
+       msg_ui_composer_apply_font_size(cd, false);
 
        return EINA_TRUE;
 }
@@ -1952,7 +1959,7 @@ Eina_Bool msg_ui_composer_key_press_cb(void *data, int type, void *event)
                        if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
                                msg_common_apply_font_size("bubble", cd->content_layout);
 
-                       msg_ui_composer_apply_font_size(cd);
+                       msg_ui_composer_apply_font_size(cd, false);
 
                        cd->vol_up_key_longpress = ecore_timer_add(0.1, (Ecore_Task_Cb) __msgc_up_key_long_press_cb, (void *)cd);
                } else if (!g_strcmp0(ev->keyname, KEY_VOLUMEDOWN)) {   /* KEY_VOLUMEDOWN */
@@ -1964,7 +1971,7 @@ Eina_Bool msg_ui_composer_key_press_cb(void *data, int type, void *event)
                        if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
                                msg_common_apply_font_size("bubble", cd->content_layout);
 
-                       msg_ui_composer_apply_font_size(cd);
+                       msg_ui_composer_apply_font_size(cd, false);
 
                        cd->vol_down_key_longpress = ecore_timer_add(0.1, (Ecore_Task_Cb) __msgc_down_key_long_press_cb, (void *)cd);
                } else {