[Telegram] Fixed crash issue about attach-panel 52/49652/1
authormoon87.park <moon87.park@samsung.com>
Fri, 16 Oct 2015 12:07:16 +0000 (21:07 +0900)
committermoon87.park <moon87.park@samsung.com>
Fri, 16 Oct 2015 12:07:16 +0000 (21:07 +0900)
Change-Id: I770df530d1b09ffa786fc04e415b67f80686ce0b

TelegramTizen/src/telegramtizen.c
TelegramTizen/src/tg_messaging_view.c
TelegramTizen/tg_utils/tg_common.h

index 8b387b4..638de85 100644 (file)
@@ -2727,7 +2727,9 @@ static void create_base_gui(appdata_s *ad)
        char edj_path[PATH_MAX] = {0, };
        app_get_resource(TELEGRAM_CUSTOM_WINSET_EDJ, edj_path, (int)PATH_MAX);
 
-       elm_theme_extension_add(NULL, edj_path);
+       Elm_Theme *theme = elm_theme_new();
+       elm_theme_extension_add(theme, edj_path);
+       ad->theme = theme;
        evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL);
 
        ad->conform = elm_conformant_add(ad->win);
index 8f07b96..0546713 100644 (file)
@@ -880,7 +880,9 @@ Evas_Object *on_message_item_content_get_cb(void *data, Evas_Object *obj, const
 
                        //elm_entry_magnifier_disabled_set(entry, EINA_TRUE);
                        // FIXME: Deprecated API
-                       elm_entry_selection_handler_disabled_set(entry, EINA_TRUE);
+                       //elm_entry_selection_handler_disabled_set(entry, EINA_TRUE);
+
+                       elm_object_theme_set(layout, ad->theme);
 
                        char *sender_name = NULL;
                        if(msg->out) {
@@ -2141,11 +2143,18 @@ void on_file_app_control_reply_cb(app_control_h request, app_control_h reply, ap
 static void on_voice_record_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
 {
        if (result == APP_CONTROL_RESULT_SUCCEEDED) {
-               Evas_Object *chat_list = user_data;
-               char *file_name = NULL;
-               app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &file_name);
-               if (file_name) {
-                       send_media_message_to_buddy(chat_list, file_name, tgl_message_media_document);
+               Evas_Object* chat_list = user_data;
+
+               char* file_path = NULL;
+               char** path_arryay = NULL;
+               int array_length = 0;
+               app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &path_arryay,  &array_length);
+
+               for(int i = 0 ; i < array_length ; i++) {
+                       file_path = strdup(path_arryay[i]);
+                       send_media_message_to_buddy(chat_list, file_path, tgl_message_media_document);
+                       free(file_path);
+                       break;
                }
        }
 }
index 6d162f8..b5c0111 100644 (file)
@@ -546,6 +546,7 @@ typedef struct appdata {
        Eina_Bool is_server_ready;
        TelegramAppDirection target_direction;
        Evas_Object *floating_btn;
+       Elm_Theme *theme;
 } appdata_s;
 
 extern void show_toast(appdata_s* ad, char* value);