TizenRefApp-7482 [Email] Implement support of RTL feature in Viewer 28/93528/1
authorIgor Nazarov <i.nazarov@samsung.com>
Mon, 24 Oct 2016 16:57:02 +0000 (19:57 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Mon, 24 Oct 2016 17:12:40 +0000 (20:12 +0300)
Change-Id: I2189d22b9ee6e19a2e8c5d4091aeaf3387eb9396

edc/viewer/email-viewer-popup.edc
edc/viewer/email-viewer-subject-layout.edc
modules/viewer/inc/email-viewer.h
modules/viewer/src/email-viewer-attachment.c
modules/viewer/src/email-viewer-header.c
modules/viewer/src/email-viewer-more-menu.c
modules/viewer/src/email-viewer-noti-mgr.c
modules/viewer/src/email-viewer-util.c
modules/viewer/src/email-viewer.c

index d6d7992..a1d6aba 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  *
  */
+
 #define POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC 15 27
 #define POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_SIZE_INC 0 38
 #define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_INC 0 69
@@ -85,7 +85,7 @@ group { name: "popup_text_progressbar_view_layout";
             text {
                font: "Tizen:style=Regular";
                                size: 32;
-                               align: 0.0 0.5;
+                               align: -1.0 0.5;
             }
             color: TEXT_BLACK_COLOR;
          }
index b52051a..7eee72d 100644 (file)
@@ -76,7 +76,7 @@ group {
        name: "ev/header/details_layout";
        styles {
                style { name: "date_text_style";
-                       base: "font=BreezeSansFallback align=right font_size=28 color=#3DB9CC wrap=word ellipsis=1.0";
+                       base: "font=BreezeSansFallback align=auto font_size=28 color=#3DB9CC wrap=word ellipsis=1.0";
                        tag: "br" "\n";
                        tag: "tab" "\t";
                }
@@ -228,7 +228,7 @@ group {
        styles {
                style {
                        name: "attachment_info.text.style";
-                       base: "font=Tizen:style=Regular align=left font_size=36 color=#000000 ellipsis= -1.0";
+                       base: "font=Tizen:style=Regular align=auto font_size=36 color=#000000 ellipsis= -1.0";
                }
        }
 
index 2504471..70d834b 100644 (file)
@@ -280,18 +280,6 @@ struct _view_data {
        bool is_smil_mail;
        email_account_t *account;
 
-       /*popup translation*/
-       int popup_element_type;
-       char *translation_string_id1;
-       char *translation_string_id2;
-       char *str_format1;
-       char *str_format2;
-       int package_type1;
-       int package_type2;
-       int extra_variable_type;
-       int extra_variable_integer;
-       char *extra_variable_string;
-
        /* popup */
        double loading_progress;
        Evas_Object *passwd_popup;
index 0fd8242..bf0628b 100644 (file)
@@ -45,6 +45,7 @@ typedef struct {
 
 static int _create_view(email_view_t *self);
 static void _destroy_view(email_view_t *self);
+static void _update_view(email_view_t *self, int flags);
 static void _on_back_key(email_view_t *self);
 
 static void _popup_response_cb(void *data, Evas_Object *obj, void *event_info);
@@ -1376,6 +1377,18 @@ static void _destroy_view(email_view_t *self)
        debug_leave();
 }
 
+static void _update_view(email_view_t *self, int flags)
+{
+       debug_enter();
+       EmailViewerView *view = &((EmailViewerModule *)self->module)->view;
+
+       if (flags & EVUF_LANGUAGE_CHANGED) {
+               if (view->attachment_genlist) {
+                       elm_genlist_realized_items_update(view->attachment_genlist);
+               }
+       }
+}
+
 static gboolean _viewer_notify_attachment_process_copy_cb(void *data, float percentage)
 {
        debug_enter();
@@ -1399,6 +1412,7 @@ void viewer_create_attachment_view(EmailViewerView *view)
 
        view->attachment_view.create = _create_view;
        view->attachment_view.destroy = _destroy_view;
+       view->attachment_view.update = _update_view;
        view->attachment_view.on_back_key = _on_back_key;
 
        int ret = email_module_create_view(view->base.module, &view->attachment_view);
index b9bcbf8..566f31f 100644 (file)
@@ -40,7 +40,7 @@ static i18n_udatepg_h viewer_pattern_generator = NULL;
 #define VIEWER_HEADER_PRIO_SENDER_TITLE_FMT            "<font=BreezeSansFallback><color=#FFB200>&#xF898;</color> %s</font>"
 #define VIEWER_SUBJECT_ENTRY_TEXT_STYLE                        "DEFAULT='font=Tizen:style=Regular font_size=40 color=#000000'"
 
-#define VIEWER_ATTACH_INFO_FONT_STYLE          "Tizen:style=Regular"
+#define VIEWER_ATTACH_INFO_FONT_NAME           "Tizen:style=Regular"
 #define VIEWER_ATTACH_INFO_FONT_SIZE           36
 #define VIEWER_ATTACH_INFO_TEXT_PADDINGS       122
 
@@ -551,7 +551,7 @@ void header_update_attachment_summary_info(EmailViewerView *view)
        }
 
        Evas_Object *text_obj = evas_object_text_add(evas_object_evas_get(view->attachment_ly));
-       evas_object_text_font_set(text_obj, VIEWER_ATTACH_INFO_FONT_STYLE, VIEWER_ATTACH_INFO_FONT_SIZE);
+       evas_object_text_font_set(text_obj, VIEWER_ATTACH_INFO_FONT_NAME, VIEWER_ATTACH_INFO_FONT_SIZE);
        evas_object_text_style_set(text_obj, EVAS_TEXT_STYLE_PLAIN);
 
        char *non_ellipsised_text = _header_format_attachment_summary_text(view->attachment_count, "", view->total_att_size);
index d6b71f8..03a3473 100644 (file)
@@ -181,8 +181,6 @@ void viewer_more_menu_move_ctxpopup(Evas_Object *ctxpopup, Evas_Object *win)
                evas_object_move(ctxpopup, (w / 2), h);
                break;
        case 90:
-               evas_object_move(ctxpopup, (h / 2), w);
-               break;
        case 270:
                evas_object_move(ctxpopup, (h / 2), w);
                break;
index 831d91a..53d0bbd 100644 (file)
@@ -27,7 +27,7 @@
 
 static void _noti_mgr_popup_response_cb(void *data, Evas_Object *obj, void *event_info);
 static void _noti_mgr_set_value_down_progress(void *data, double val);
-static char *_noti_mgr_get_service_fail_type(int type, EmailViewerView *view);
+static const char *_noti_mgr_get_service_fail_type(int type);
 static void _noti_mgr_parse_mail_move_finish_data_params(char *buf, int *src_mailbox_id, int *dst_mailbox_id, int *mail_id);
 static void _noti_mgr_parse_mail_field_update_data_params(char *inbuf, char **field_name, GList **mail_list);
 static void _noti_mgr_on_gdbus_event_receive(GDBusConnection *connection,
@@ -45,12 +45,6 @@ static void _noti_mgr_popup_response_cb(void *data, Evas_Object *obj, void *even
        EmailViewerView *view = (EmailViewerView *)data;
        DELETE_EVAS_OBJECT(view->notify);
 
-       FREE(view->translation_string_id1);
-       FREE(view->translation_string_id2);
-       FREE(view->str_format1);
-       FREE(view->str_format2);
-       FREE(view->extra_variable_string);
-
        debug_leave();
 }
 
@@ -100,64 +94,41 @@ static void _noti_mgr_set_value_down_progress(void *data, double val)
        debug_leave();
 }
 
-static char *_noti_mgr_get_service_fail_type(int type, EmailViewerView *view)
+static const char *_noti_mgr_get_service_fail_type(int type)
 {
        debug_enter();
 
        char *ret = NULL;
        debug_log("service error type: %d", type);
 
-       debug_leave();
-       view->package_type2 = PACKAGE_TYPE_PACKAGE;
        if (type == EMAIL_ERROR_CANCELLED) {
-               view->translation_string_id2 = strdup(N_("IDS_EMAIL_POP_DOWNLOAD_CANCELLED"));
-               ret = email_get_email_string(N_("IDS_EMAIL_POP_DOWNLOAD_CANCELLED"));
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_DOWNLOAD_CANCELLED";
        } else if (type == EMAIL_ERROR_MAIL_NOT_FOUND_ON_SERVER) {
-               view->translation_string_id2 = strdup("IDS_EMAIL_POP_THIS_EMAIL_HAS_BEEN_DELETED_FROM_THE_SERVER");
-               ret = email_get_email_string("IDS_EMAIL_POP_THIS_EMAIL_HAS_BEEN_DELETED_FROM_THE_SERVER");
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_THIS_EMAIL_HAS_BEEN_DELETED_FROM_THE_SERVER";
        } else if (type == EMAIL_ERROR_NO_SUCH_HOST) {
-               view->translation_string_id2 = strdup(N_("IDS_EMAIL_POP_HOST_NOT_FOUND"));
-               ret = email_get_email_string(N_("IDS_EMAIL_POP_HOST_NOT_FOUND"));
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_HOST_NOT_FOUND";
        } else if (type == EMAIL_ERROR_INVALID_SERVER) {
-               view->translation_string_id2 = strdup(N_("IDS_EMAIL_POP_SERVER_NOT_AVAILABLE"));
-               ret = email_get_email_string(N_("IDS_EMAIL_POP_SERVER_NOT_AVAILABLE"));
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_SERVER_NOT_AVAILABLE";
        } else if (type == EMAIL_ERROR_MAIL_MEMORY_FULL) {
-               view->translation_string_id2 = strdup("IDS_EMAIL_POP_THERE_IS_NOT_ENOUGH_SPACE_IN_YOUR_DEVICE_STORAGE_GO_TO_SETTINGS_POWER_AND_STORAGE_STORAGE_THEN_DELETE_SOME_FILES_AND_TRY_AGAIN");
-               ret = _("IDS_EMAIL_POP_THERE_IS_NOT_ENOUGH_SPACE_IN_YOUR_DEVICE_STORAGE_GO_TO_SETTINGS_POWER_AND_STORAGE_STORAGE_THEN_DELETE_SOME_FILES_AND_TRY_AGAIN");
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_THERE_IS_NOT_ENOUGH_SPACE_IN_YOUR_DEVICE_STORAGE_GO_TO_SETTINGS_POWER_AND_STORAGE_STORAGE_THEN_DELETE_SOME_FILES_AND_TRY_AGAIN";
        } else if (type == EMAIL_ERROR_FAILED_BY_SECURITY_POLICY) {
-               view->translation_string_id2 = strdup("IDS_EMAIL_POP_THE_CURRENT_EXCHANGE_SERVER_POLICY_PREVENTS_ATTACHMENTS_FROM_BEING_DOWNLOADED_TO_MOBILE_DEVICES");
-               ret = email_get_email_string("IDS_EMAIL_POP_THE_CURRENT_EXCHANGE_SERVER_POLICY_PREVENTS_ATTACHMENTS_FROM_BEING_DOWNLOADED_TO_MOBILE_DEVICES");
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_THE_CURRENT_EXCHANGE_SERVER_POLICY_PREVENTS_ATTACHMENTS_FROM_BEING_DOWNLOADED_TO_MOBILE_DEVICES";
        } else if (type == EMAIL_ERROR_ATTACHMENT_SIZE_EXCEED_POLICY_LIMIT) {
-               view->translation_string_id2 = strdup("IDS_EMAIL_POP_THE_MAXIMUM_ATTACHMENT_SIZE_ALLOWED_BY_THE_CURRENT_EXCHANGE_SERVER_POLICY_HAS_BEEN_EXCEEDED");
-               ret = email_get_email_string("IDS_EMAIL_POP_THE_MAXIMUM_ATTACHMENT_SIZE_ALLOWED_BY_THE_CURRENT_EXCHANGE_SERVER_POLICY_HAS_BEEN_EXCEEDED");
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_THE_MAXIMUM_ATTACHMENT_SIZE_ALLOWED_BY_THE_CURRENT_EXCHANGE_SERVER_POLICY_HAS_BEEN_EXCEEDED";
        } else if (type == EMAIL_ERROR_NO_RESPONSE) {
-               view->translation_string_id2 = strdup(N_("IDS_EMAIL_POP_NO_RESPONSE_HAS_BEEN_RECEIVED_FROM_THE_SERVER_TRY_AGAIN_LATER"));
-               ret = email_get_email_string(N_("IDS_EMAIL_POP_NO_RESPONSE_HAS_BEEN_RECEIVED_FROM_THE_SERVER_TRY_AGAIN_LATER"));
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_NO_RESPONSE_HAS_BEEN_RECEIVED_FROM_THE_SERVER_TRY_AGAIN_LATER";
        } else if (type == EMAIL_ERROR_CERTIFICATE_FAILURE) {
-               view->translation_string_id2 = strdup(N_("IDS_EMAIL_POP_INVALID_OR_INACCESSIBLE_CERTIFICATE"));
-               ret = email_get_email_string(N_("IDS_EMAIL_POP_INVALID_OR_INACCESSIBLE_CERTIFICATE"));
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_INVALID_OR_INACCESSIBLE_CERTIFICATE";
        } else if (type == EMAIL_ERROR_TLS_NOT_SUPPORTED) {
-               view->translation_string_id2 = strdup(N_("IDS_EMAIL_BODY_SERVER_DOES_NOT_SUPPORT_TLS"));
-               ret = email_get_email_string(N_("IDS_EMAIL_BODY_SERVER_DOES_NOT_SUPPORT_TLS"));
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_BODY_SERVER_DOES_NOT_SUPPORT_TLS";
        } else if (type == EMAIL_ERROR_TLS_SSL_FAILURE) {
-               view->translation_string_id2 = strdup(N_("IDS_EMAIL_BODY_UNABLE_TO_OPEN_CONNECTION_TO_SERVER_SECURITY_ERROR_OCCURRED"));
-               ret = email_get_email_string(N_("IDS_EMAIL_BODY_UNABLE_TO_OPEN_CONNECTION_TO_SERVER_SECURITY_ERROR_OCCURRED"));
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_BODY_UNABLE_TO_OPEN_CONNECTION_TO_SERVER_SECURITY_ERROR_OCCURRED";
        } else {
-               view->translation_string_id2 = strdup("IDS_EMAIL_POP_AN_UNKNOWN_ERROR_HAS_OCCURRED");
-               ret = _("IDS_EMAIL_POP_AN_UNKNOWN_ERROR_HAS_OCCURRED");
-               return g_strdup(ret);
+               ret = "IDS_EMAIL_POP_AN_UNKNOWN_ERROR_HAS_OCCURRED";
        }
+
+       debug_leave();
+       return ret;
 }
 
 static void _noti_mgr_parse_mail_move_finish_data_params(char *buf, int *src_mailbox_id, int *dst_mailbox_id, int *mail_id)
@@ -753,28 +724,20 @@ static void _noti_mgr_on_gdbus_event_receive(GDBusConnection *connection,
                                } else if (_is_storage_full_error(data4)) {
                                        viewer_show_storage_full_popup(view);
                                } else {
-                                       char *err_msg = NULL;
+                                       const char *err_msg = NULL;
                                        if (_is_connection_error(data4)) {
-                                               view->package_type2 = PACKAGE_TYPE_NOT_AVAILABLE;
-                                               view->translation_string_id2 = strdup("IDS_EMAIL_POP_FAILED_TO_DOWNLOAD_ATTACHMENT_CHECK_YOUR_NETWORK_CONNECTION_AND_TRY_AGAIN");
-                                               err_msg = g_strdup(email_get_email_string("IDS_EMAIL_POP_FAILED_TO_DOWNLOAD_ATTACHMENT_CHECK_YOUR_NETWORK_CONNECTION_AND_TRY_AGAIN"));
+                                               err_msg = "IDS_EMAIL_POP_FAILED_TO_DOWNLOAD_ATTACHMENT_CHECK_YOUR_NETWORK_CONNECTION_AND_TRY_AGAIN";
                                        } else {
-                                               err_msg = _noti_mgr_get_service_fail_type(data4, view);
+                                               err_msg = _noti_mgr_get_service_fail_type(data4);
                                        }
 
-                                       email_string_t EMAIL_VIEWER_FAIL_MSG = { NULL, err_msg};
-                                       view->translation_string_id1 = strdup(err_msg);
-                                       view->str_format1 = strdup("%s");
-                                       view->package_type1 = PACKAGE_TYPE_NOT_AVAILABLE;
-                                       view->popup_element_type = POPUP_ELEMENT_TYPE_CONTENT;
-
+                                       email_string_t EMAIL_VIEWER_FAIL_MSG = { PACKAGE, err_msg};
                                        email_string_t title = { PACKAGE, "IDS_EMAIL_HEADER_UNABLE_TO_DOWNLOAD_ATTACHMENT_ABB" };
                                        email_string_t btn = { PACKAGE, "IDS_EMAIL_BUTTON_OK" };
                                        email_string_t null_str = { NULL, NULL };
 
                                        util_create_notify(view, title, EMAIL_VIEWER_FAIL_MSG, 1,
                                                        btn, _noti_mgr_popup_response_cb, null_str, NULL, NULL);
-                                       g_free(err_msg);
                                }
 
                        } else {
index f6c4b1b..656937d 100644 (file)
@@ -44,8 +44,8 @@ static email_string_t EMAIL_VIEWER_POP_ERROR = { PACKAGE, "IDS_EMAIL_HEADER_UNAB
 static email_string_t EMAIL_VIEWER_STRING_OK = { PACKAGE, "IDS_EMAIL_BUTTON_OK" };
 static email_string_t EMAIL_VIEWER_HEADER_UNABLE_TO_OPEN_FILE = { PACKAGE, "IDS_EMAIL_HEADER_UNABLE_TO_OPEN_FILE_ABB" };
 static email_string_t EMAIL_VIEWER_POP_THIS_FILE_TYPE_IS_NOT_SUPPORTED = { PACKAGE, "IDS_EMAIL_POP_THIS_FILE_TYPE_IS_NOT_SUPPORTED_BY_ANY_APPLICATION_ON_YOUR_DEVICE" };
-static email_string_t EMAIL_VIEWER_POP_FAILED_TO_DELETE = { PACKAGE, N_("IDS_EMAIL_POP_FAILED_TO_DELETE") };
-static email_string_t EMAIL_VIEWER_POP_FAILED_TO_MOVE = { PACKAGE, N_("IDS_EMAIL_POP_FAILED_TO_MOVE") };
+static email_string_t EMAIL_VIEWER_POP_FAILED_TO_DELETE = { PACKAGE, "IDS_EMAIL_POP_FAILED_TO_DELETE" };
+static email_string_t EMAIL_VIEWER_POP_FAILED_TO_MOVE = { PACKAGE, "IDS_EMAIL_POP_FAILED_TO_MOVE" };
 static email_string_t EMAIL_VIEWER_STRING_NULL = { NULL, NULL };
 
 
@@ -987,7 +987,7 @@ void viewer_create_down_progress(void *data, email_string_t t, popup_cb resp_cb)
        Evas_Object *layout = viewer_load_edj(popup, email_get_viewer_theme_path(), "popup_text_progressbar_view_layout", EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, 0.5);
        evas_object_show(layout);
-       elm_object_part_text_set(layout, "elm.text.description", email_get_email_string("IDS_EMAIL_POP_DOWNLOADING_ING"));
+       elm_object_domain_translatable_part_text_set(layout, "elm.text.description", PACKAGE, "IDS_EMAIL_POP_DOWNLOADING_ING");
 
        pb = elm_progressbar_add(layout);
 
index 4fd55b8..12a91cc 100644 (file)
@@ -591,73 +591,6 @@ static void _viewer_update_on_language_change(EmailViewerView *view)
 
        header_update_attachment_summary_info(view);
 
-       /* This code is specific for popups where string translation is not handled by EFL */
-       if (view->notify && view->popup_element_type) {
-               char str[MAX_STR_LEN] = { 0, };
-               char first_str[MAX_STR_LEN] = { 0, };
-               switch (view->popup_element_type) {
-               case POPUP_ELEMENT_TYPE_TITLE:
-                       break;
-               case POPUP_ELEMENT_TYPE_CONTENT:
-                       if (view->extra_variable_type == VARIABLE_TYPE_INT) {
-                               if (view->str_format2) {
-                                       if (view->package_type2 == PACKAGE_TYPE_SYS_STRING) {
-                                               snprintf(str, sizeof(str), view->str_format2, email_get_system_string(view->translation_string_id2), view->extra_variable_integer);
-                                       } else if (view->package_type2 == PACKAGE_TYPE_PACKAGE) {
-                                               snprintf(str, sizeof(str), view->str_format2, email_get_email_string(view->translation_string_id2), view->extra_variable_integer);
-                                       }
-                               } else {
-                                       if (view->package_type2 == PACKAGE_TYPE_SYS_STRING) {
-                                               snprintf(str, sizeof(str), email_get_system_string(view->translation_string_id2), view->extra_variable_integer);
-                                       } else if (view->package_type2 == PACKAGE_TYPE_PACKAGE) {
-                                               snprintf(str, sizeof(str), email_get_email_string(view->translation_string_id2), view->extra_variable_integer);
-                                       }
-                               }
-                       } else if (view->extra_variable_type == VARIABLE_TYPE_STRING) {
-                               if (view->str_format2) {
-                                       if (view->package_type2 == PACKAGE_TYPE_SYS_STRING) {
-                                               snprintf(str, sizeof(str), view->str_format2, email_get_system_string(view->translation_string_id2), view->extra_variable_string);
-                                       } else if (view->package_type2 == PACKAGE_TYPE_PACKAGE) {
-                                               snprintf(str, sizeof(str), view->str_format2, email_get_email_string(view->translation_string_id2), view->extra_variable_string);
-                                       }
-                               } else {
-                                       if (view->package_type2 == PACKAGE_TYPE_SYS_STRING) {
-                                               snprintf(str, sizeof(str), email_get_system_string(view->translation_string_id2), view->extra_variable_string);
-                                       } else if (view->package_type2 == PACKAGE_TYPE_PACKAGE) {
-                                               snprintf(str, sizeof(str), email_get_email_string(view->translation_string_id2), view->extra_variable_string);
-                                       }
-                               }
-                       } else {
-                               if (view->package_type2 == PACKAGE_TYPE_SYS_STRING) {
-                                       snprintf(str, sizeof(str), "%s", email_get_system_string(view->translation_string_id2));
-                               } else if (view->package_type2 == PACKAGE_TYPE_PACKAGE) {
-                                       snprintf(str, sizeof(str), "%s", email_get_email_string(view->translation_string_id2));
-                               } else {
-                                       snprintf(str, sizeof(str), "%s", view->translation_string_id2);
-                               }
-                       }
-                       if (view->str_format1) {
-                               if (view->package_type1 == PACKAGE_TYPE_SYS_STRING) {
-                                       snprintf(first_str, sizeof(first_str), view->str_format1, email_get_system_string(view->translation_string_id1), str);
-                               } else if (view->package_type1 == PACKAGE_TYPE_PACKAGE) {
-                                       snprintf(first_str, sizeof(first_str), view->str_format1, email_get_email_string(view->translation_string_id1), str);
-                               } else {
-                                       snprintf(first_str, sizeof(first_str), view->str_format1, view->translation_string_id1, str);
-                               }
-                       } else {
-                               snprintf(first_str, sizeof(first_str), "%s", view->translation_string_id1);
-                       }
-                       elm_object_text_set(view->notify, first_str);
-                       break;
-               case POPUP_ELEMENT_TYPE_BTN1:
-                       break;
-               case POPUP_ELEMENT_TYPE_BTN2:
-                       break;
-               case POPUP_ELEMENT_TYPE_BTN3:
-                       break;
-
-               }
-       }
        debug_leave();
 }
 
@@ -898,18 +831,6 @@ Eina_Bool viewer_initialize_data(EmailViewerView *view)
        view->viewer_type = EMAIL_VIEWER;
        view->eml_file_path = NULL;
 
-       /*popup translation*/
-       view->popup_element_type = 0;
-       view->package_type1 = 0;
-       view->package_type2 = 0;
-       view->translation_string_id1 = NULL;
-       view->translation_string_id2 = NULL;
-       view->extra_variable_type = 0;
-       view->extra_variable_string = NULL;
-       view->extra_variable_integer = 0;
-       view->str_format1 = NULL;
-       view->str_format2 = NULL;
-
        /* for module create */
        view->create_contact_arg = 0;