EbookSrc.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:169k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2.  * FUNCTION
  3.  *  ebr_app_save_settings_scroll
  4.  * DESCRIPTION
  5.  *  Save scroll flag in nfo file
  6.  * PARAMETERS
  7.  *  void
  8.  * RETURNS
  9.  *  void
  10.  *****************************************************************************/
  11. void ebr_app_save_settings_scroll(void)
  12. {
  13.     /*----------------------------------------------------------------*/
  14.     /* Local Variables                                                */
  15.     /*----------------------------------------------------------------*/
  16.     /*----------------------------------------------------------------*/
  17.     /* Code Body                                                      */
  18.     /*----------------------------------------------------------------*/
  19.     ebr_app_delete_upto_open_book_screen_id();
  20.     ebr_app_display_pop_up_changed_auto_scroll(ebr_frm_save_settings_scroll());
  21. }
  22. /*****************************************************************************
  23.  * FUNCTION
  24.  *  ebr_app_save_settings_screen_mode
  25.  * DESCRIPTION
  26.  *  Saves screen mode in NFO file.
  27.  * PARAMETERS
  28.  *  void
  29.  * RETURNS
  30.  *  void
  31.  *****************************************************************************/
  32. void ebr_app_save_settings_screen_mode(void)
  33. {
  34.     /*----------------------------------------------------------------*/
  35.     /* Local Variables                                                */
  36.     /*----------------------------------------------------------------*/
  37.     /*----------------------------------------------------------------*/
  38.     /* Code Body                                                      */
  39.     /*----------------------------------------------------------------*/
  40.     ebr_app_delete_upto_open_book_screen_id();
  41.     ebr_app_display_pop_up_changed_screen_mode(ebr_frm_save_settings_screen_mode());
  42. }
  43. /*****************************************************************************
  44.  * FUNCTION
  45.  *  ebr_entry_open_book
  46.  * DESCRIPTION
  47.  *  Entry Function for Open Book
  48.  * PARAMETERS
  49.  *  void
  50.  * RETURNS
  51.  *  void
  52.  *****************************************************************************/
  53. extern pBOOL isInCall(void);
  54. void ebr_entry_open_book(void)
  55. {
  56.     /*----------------------------------------------------------------*/
  57.     /* Local Variables                                                */
  58.     /*----------------------------------------------------------------*/
  59.     U8 *guiBuffer = NULL;
  60.     S16 buffer_size;
  61.     U16 lsk=STR_GLOBAL_OPTIONS;
  62.     U16 display_name[MAX_EBOOK_NAME_LENGTH + 1];
  63.     S16 return_val;
  64.     S32 book_size;
  65.     S32 page_size;
  66.     S16 full_screen, auto_scroll_staus;
  67.     ebr_frm_nfo_create_type_errors_enum error_type = EBR_FRM_NFO_CREATE_SUCCESS;
  68.     /*----------------------------------------------------------------*/
  69.     /* Code Body                                                      */
  70.     /*----------------------------------------------------------------*/
  71.     ebr_please_wait_actual_screen();
  72.     
  73.     PowerAndEndKeyHandler();
  74.     if (ebr_frm_get_current_recursive_conversion_state() == EBR_FRM_CONVERSION_UNDERWAY)
  75.     {
  76.         ebr_frm_convert_record_record_recursively();
  77.         return;
  78.     }
  79.     if (ebr_frm_get_current_recursive_conversion_state() == EBR_FRM_NFO_CONVERSION_COMPLETED)
  80.     {
  81.         DeleteNScrId(EBOOK_OPEN_SCREENID);
  82.         ebr_frm_set_current_recursive_conversion_state(EBR_FRM_NO_CONVERSION);
  83.     }
  84.     guiBuffer = GetCurrGuiBuffer(EBOOK_OPEN_SCREENID);
  85.     if (guiBuffer == NULL)
  86.     {
  87.         error_type = ebr_frm_reset_for_new_book();
  88.         g_ebook_app_cntx_p->enable_screen_exit = 1;
  89.         if ((ebr_frm_nfo_create_type_errors_enum) error_type == EBR_FRM_NFO_CREATE_FAILURE)
  90.         {
  91.             if (ebr_frm_check_nfo_file_size())
  92.             {
  93.                 ebr_app_dispaly_less_memory_pop_up();
  94.             }
  95.             else
  96.             {
  97.                 ebr_app_display_pop_up_error_opening_book();
  98.             }
  99.             DeleteNScrId(EBOOK_OPEN_SCREENID);
  100.             return;
  101.         }
  102.         else
  103.         {
  104.             if ((ebr_frm_nfo_create_type_errors_enum) error_type == EBR_FRM_NFO_CREATE_FILE_TYPE_NOT_SUPPORTED)
  105.             {
  106.                 ebr_app_display_pop_up_format_not_supported();
  107.                 DeleteNScrId(EBOOK_OPEN_SCREENID);
  108.                 return;
  109.             }
  110.         }
  111.         if ((ebr_frm_nfo_create_type_errors_enum) error_type == EBR_FRM_EMPTY_BOOK)
  112.         {
  113.             ebr_app_display_pop_up_empty_book();
  114.             DeleteNScrId(EBOOK_OPEN_SCREENID);
  115.             return;
  116.         }
  117.     }
  118.     memset(g_ebook_app_cntx_p->buffer_data, 0, EBR_RECORD_SIZE_MAX + GUI_SHARED_BYTES);
  119.     ebr_frm_register_recursive_callback_fn(ebr_entry_open_book);
  120.     return_val = ebr_frm_get_data_to_open_book(ebook_frm_setting, g_ebook_app_cntx_p->buffer_data, (PS8)display_name);
  121.     if (return_val == 0)
  122.     {
  123.         ebr_app_dispaly_less_memory_pop_up();
  124.         DeleteNScrId(EBOOK_OPEN_SCREENID);
  125.         return;
  126.     }
  127.     else
  128.     {
  129.         if (return_val == -1)
  130.         {
  131.             ebr_app_display_pop_up_error_opening_book();
  132.             DeleteNScrId(EBOOK_OPEN_SCREENID);
  133.             return;
  134.         }
  135.     }
  136.     if (return_val == 3)
  137.     {
  138.         ebr_app_display_pop_up_error_opening_book();
  139.         DeleteNScrId(EBOOK_OPEN_SCREENID);
  140.         return;
  141.     }
  142.     if (return_val == 2)
  143.     {
  144.         ebr_app_display_pop_up_empty_book();
  145.         DeleteNScrId(EBOOK_OPEN_SCREENID);
  146.         return;
  147.     }
  148.     if (ebr_frm_get_current_recursive_conversion_state() == EBR_FRM_CONVERSION_UNDERWAY)
  149.     {
  150.         return;
  151.     }
  152.     buffer_size = pfnUnicodeStrlen((const S8*)g_ebook_app_cntx_p->buffer_data);
  153.     full_screen = ebr_frm_get_full_screen_flag_status();
  154.     auto_scroll_staus = ebr_frm_get_auto_scroll_flag_status();
  155.     if (auto_scroll_staus)
  156.     {
  157.         TurnOnBacklight(0);
  158.     }
  159.     ebr_stop_please_wait_actual_screen();
  160.     EntryNewScreen(EBOOK_OPEN_SCREENID, ebr_mmi_ebook_exit, ebr_entry_open_book, NULL);
  161. #ifdef __MMI_TOUCH_SCREEN__
  162.     ebook_frm_setting->key_callback = ebr_set_key_TS;
  163. #endif 
  164.     if (isInCall())
  165.         lsk = 0;
  166.     if (full_screen == 0)
  167.     {
  168.         ShowCategory75Screen(
  169.             display_name,
  170.             GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  171.             lsk,
  172.             IMG_GLOBAL_OK,
  173.             STR_GLOBAL_BACK,
  174.             IMG_GLOBAL_BACK,
  175.             (U8*) g_ebook_app_cntx_p->buffer_data,
  176.             buffer_size,
  177.             NULL,
  178.             &ebook_frm_setting);
  179.         SetLeftSoftkeyFunction(ebr_entry_book_settings, KEY_EVENT_UP);
  180.         SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  181.     }
  182.     else
  183.     {
  184.         ShowCategory77Screen(
  185.             (U16*) display_name,
  186.             GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  187.             lsk,
  188.             IMG_GLOBAL_OK,
  189.             STR_GLOBAL_BACK,
  190.             IMG_GLOBAL_BACK,
  191.             (U8*) g_ebook_app_cntx_p->buffer_data,
  192.             buffer_size,
  193.             NULL,
  194.             &ebook_frm_setting);
  195.         SetKeyHandler(ebr_entry_book_settings, KEY_LSK, KEY_EVENT_DOWN);
  196.         SetKeyHandler(GoBackHistory, KEY_RSK, KEY_EVENT_DOWN);
  197.     }
  198.     /*    PowerAndEndKeyHandler(); */
  199.     register_multiline_inputbox_navigate_callback(ebr_frm_reset_find_next_data);
  200.     if (ebook_frm_setting->search_flag_is_on)
  201.     {
  202.         ebr_frm_get_and_set_current_page_values();
  203.     }
  204.     g_ebook_app_cntx_p->ebr_set_local_setting_flag = 1;
  205.     book_size = ebr_frm_get_book_size_from_nfo();
  206.     page_size = ebr_frm_get_page_size();
  207.     //KP Jerry add on 2007-3-22 start
  208.     ClearKeyHandler(KEY_0, KEY_EVENT_DOWN);
  209.     ClearKeyHandler(KEY_1, KEY_EVENT_DOWN);
  210.     ClearKeyHandler(KEY_2, KEY_EVENT_DOWN);
  211.     ClearKeyHandler(KEY_3, KEY_EVENT_DOWN);
  212.     ClearKeyHandler(KEY_4, KEY_EVENT_DOWN);
  213.     ClearKeyHandler(KEY_5, KEY_EVENT_DOWN);
  214.     ClearKeyHandler(KEY_6, KEY_EVENT_DOWN);
  215.     ClearKeyHandler(KEY_7, KEY_EVENT_DOWN);
  216.     ClearKeyHandler(KEY_8, KEY_EVENT_DOWN);
  217.     ClearKeyHandler(KEY_9, KEY_EVENT_DOWN);
  218.     ClearKeyHandler(KEY_STAR, KEY_EVENT_DOWN);
  219.     ClearKeyHandler(KEY_POUND, KEY_EVENT_DOWN);
  220.     ClearKeyHandler(KEY_0, KEY_LONG_PRESS);
  221.     ClearKeyHandler(KEY_1, KEY_LONG_PRESS);
  222.     ClearKeyHandler(KEY_2, KEY_LONG_PRESS);
  223.     ClearKeyHandler(KEY_3, KEY_LONG_PRESS);
  224.     ClearKeyHandler(KEY_4, KEY_LONG_PRESS);
  225.     ClearKeyHandler(KEY_5, KEY_LONG_PRESS);
  226.     ClearKeyHandler(KEY_6, KEY_LONG_PRESS);
  227.     ClearKeyHandler(KEY_7, KEY_LONG_PRESS);
  228.     ClearKeyHandler(KEY_8, KEY_LONG_PRESS);
  229.     ClearKeyHandler(KEY_9, KEY_LONG_PRESS);
  230.     ClearKeyHandler(KEY_STAR, KEY_LONG_PRESS);
  231.     ClearKeyHandler(KEY_POUND, KEY_LONG_PRESS);
  232.     ClearKeyHandler(KEY_0, KEY_REPEAT);
  233.     ClearKeyHandler(KEY_1, KEY_REPEAT);
  234.     ClearKeyHandler(KEY_2, KEY_REPEAT);
  235.     ClearKeyHandler(KEY_3, KEY_REPEAT);
  236.     ClearKeyHandler(KEY_4, KEY_REPEAT);
  237.     ClearKeyHandler(KEY_5, KEY_REPEAT);
  238.     ClearKeyHandler(KEY_6, KEY_REPEAT);
  239.     ClearKeyHandler(KEY_7, KEY_REPEAT);
  240.     ClearKeyHandler(KEY_8, KEY_REPEAT);
  241.     ClearKeyHandler(KEY_9, KEY_REPEAT);
  242.     ClearKeyHandler(KEY_STAR, KEY_REPEAT);
  243.     ClearKeyHandler(KEY_POUND, KEY_REPEAT);
  244.     //KP Jerry add on 2007-3-22 end
  245.     
  246.     SetKeyHandler(ebr_entry_settings, KEY_0, KEY_EVENT_UP);
  247.     SetKeyHandler(ebr_entry_help, KEY_1, KEY_EVENT_UP);
  248.     SetKeyHandler(ebr_entry_add_book_mark, KEY_2, KEY_EVENT_UP);
  249.     SetKeyHandler(ebr_entry_search, KEY_3, KEY_EVENT_UP);
  250.     SetKeyHandler(ebr_pre_entry_jump_to, KEY_4, KEY_EVENT_UP);
  251.     SetKeyHandler(ebr_entry_goto_book_mark, KEY_5, KEY_EVENT_UP);
  252.     //KP Jerry modify on 2007-3-22 start
  253.     /*Old:
  254.     if (((g_ebook_app_cntx_p->ebr_search_string_input[0] != '') || (g_ebook_app_cntx_p->ebr_search_string_input[1] != '')) && ebr_frm_get_auto_scroll_status())
  255.     {
  256.         SetKeyHandler(ebr_app_search_string_next, KEY_6, KEY_EVENT_UP);
  257.     }
  258.     */
  259.     SetKeyHandler(ebr_app_search_string_next_if_available, KEY_6, KEY_EVENT_UP);
  260.     //KP Jerry modify on 2007-3-22 end
  261.     
  262.     SetKeyHandler(ebr_app_save_settings_scroll, KEY_7, KEY_EVENT_UP);       /* Auto Scroll */     //KP Jerry add on 2007-3-22    
  263.     SetKeyHandler(ebr_entry_remove_book_mark, KEY_8, KEY_EVENT_UP);
  264.     SetKeyHandler(ebr_app_save_settings_screen_mode, KEY_9, KEY_EVENT_UP);   /* Full Screen */     //KP Jerry add on 2007-3-22
  265.     SetKeyHandler(ebr_app_save_settings_scroll, KEY_POUND, KEY_EVENT_UP);       /* Auto Scroll */
  266.     SetKeyHandler(ebr_app_save_settings_screen_mode, KEY_STAR, KEY_EVENT_UP);   /* Full Screen */
  267. }
  268. //KP Jerry add on 2007-3-22 start
  269. void ebr_app_search_string_next_if_available(void)
  270. {
  271. if (((g_ebook_app_cntx_p->ebr_search_string_input[0] != '') || (g_ebook_app_cntx_p->ebr_search_string_input[1] != '')) && ebr_frm_get_auto_scroll_status())
  272.        {
  273.            ebr_app_search_string_next();
  274.        }
  275. }
  276. //KP Jerry add on 2007-3-22 end
  277. /*****************************************************************************
  278.  * FUNCTION
  279.  *  ebr_stop_please_wait_actual_screen
  280.  * DESCRIPTION
  281.  *  
  282.  * PARAMETERS
  283.  *  void
  284.  * RETURNS
  285.  *  void
  286.  *****************************************************************************/
  287. void ebr_stop_please_wait_actual_screen(void)
  288. {
  289.     /*----------------------------------------------------------------*/
  290.     /* Local Variables                                                */
  291.     /*----------------------------------------------------------------*/
  292.     /*----------------------------------------------------------------*/
  293.     /* Code Body                                                      */
  294.     /*----------------------------------------------------------------*/
  295.     ExitCategory66Screen();
  296. }
  297. /*****************************************************************************
  298.  * FUNCTION
  299.  *  ebr_please_wait_actual_screen
  300.  * DESCRIPTION
  301.  *  Please Wait Screen
  302.  * PARAMETERS
  303.  *  void
  304.  * RETURNS
  305.  *  void
  306.  *****************************************************************************/
  307. void ebr_please_wait_actual_screen(void)
  308. {
  309.     /*----------------------------------------------------------------*/
  310.     /* Local Variables                                                */
  311.     /*----------------------------------------------------------------*/
  312.     /*----------------------------------------------------------------*/
  313.     /* Code Body                                                      */
  314.     /*----------------------------------------------------------------*/
  315.     EntryNewScreen(SCR_ID_EBOOK_WAITSCREEN, NULL, NULL, NULL);
  316.     ClearHighlightHandler();
  317.     /* ShowCategory151Screen(0, 0, 0, 0, 0, 0, (PU8)GetString(STR_WAIT_STRING), 0, NULL); */
  318.     ShowCategory66Screen(
  319.         (U16) STR_EBOOK_WAIT,
  320.         GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  321.         0,
  322.         0,
  323.         0,
  324.         0,
  325.         (U8*) GetString(STR_EBOOK_WAIT),
  326.         IMAGE_EBOOK_WAIT,
  327.         NULL);
  328.     /* ShowCategory9Screen(wait_string, wait_image_id, NULL); */
  329.     ClearAllKeyHandler();
  330.     ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
  331. }
  332. /*****************************************************************************
  333.  * FUNCTION
  334.  *  ebr_please_wait_actual_screen_2
  335.  * DESCRIPTION
  336.  *  Please Wait Screen
  337.  * PARAMETERS
  338.  *  void
  339.  * RETURNS
  340.  *  void
  341.  *****************************************************************************/
  342. void ebr_please_wait_actual_screen_2(void)
  343. {
  344.     /*----------------------------------------------------------------*/
  345.     /* Local Variables                                                */
  346.     /*----------------------------------------------------------------*/
  347.     /*----------------------------------------------------------------*/
  348.     /* Code Body                                                      */
  349.     /*----------------------------------------------------------------*/
  350.     EntryNewScreen(SCR_ID_EBOOK_WAITSCREEN, NULL, NULL, NULL);
  351.     ClearHighlightHandler();
  352.     /* ShowCategory151Screen(0, 0, 0, 0, 0, 0, (PU8)GetString(STR_WAIT_STRING), 0, NULL); */
  353.     ShowCategory66Screen(
  354.         (U16) STR_EBOOK_WAIT,
  355.         GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  356.         0,
  357.         0,
  358.         0,
  359.         0,
  360.         (U8*) GetString(STR_EBOOK_WAIT),
  361.         IMAGE_EBOOK_WAIT,
  362.         NULL);
  363.     /* ShowCategory9Screen(wait_string, wait_image_id, NULL); */
  364.     ClearAllKeyHandler();
  365. }
  366. /*****************************************************************************
  367.  * FUNCTION
  368.  *  ebr_please_wait_move_screen
  369.  * DESCRIPTION
  370.  *  Please Wait Screen
  371.  * PARAMETERS
  372.  *  void
  373.  * RETURNS
  374.  *  void
  375.  *****************************************************************************/
  376. void ebr_please_wait_move_screen(void)
  377. {
  378.     /*----------------------------------------------------------------*/
  379.     /* Local Variables                                                */
  380.     /*----------------------------------------------------------------*/
  381.     /*----------------------------------------------------------------*/
  382.     /* Code Body                                                      */
  383.     /*----------------------------------------------------------------*/
  384.     /* EntryNewScreen(SCR_ID_EBOOK_WAITSCREEN, NULL, NULL, NULL); */
  385.     ClearHighlightHandler();
  386.     ClearKeyEvents();
  387.     /* ShowCategory151Screen(0, 0, 0, 0, 0, 0, (PU8)GetString(STR_WAIT_STRING), 0, NULL); */
  388.     ShowCategory66Screen(
  389.         (U16) STR_EBOOK_WAIT,
  390.         GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  391.         0,
  392.         0,
  393.         0,
  394.         0,
  395.         (U8*) GetString(STR_EBOOK_WAIT),
  396.         IMAGE_EBOOK_WAIT,
  397.         NULL);
  398.     /* ShowCategory9Screen(wait_string, wait_image_id, NULL); */
  399.     ClearAllKeyHandler();
  400.     ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
  401. }
  402. /*****************************************************************************
  403.  * FUNCTION
  404.  *  go_back_to_bookshelf_screen
  405.  * DESCRIPTION
  406.  *  Go to Book shelf Screen
  407.  * PARAMETERS
  408.  *  void
  409.  * RETURNS
  410.  *  void
  411.  *****************************************************************************/
  412. void go_back_to_bookshelf_screen(void)
  413. {
  414.     /*----------------------------------------------------------------*/
  415.     /* Local Variables                                                */
  416.     /*----------------------------------------------------------------*/
  417.     /*----------------------------------------------------------------*/
  418.     /* Code Body                                                      */
  419.     /*----------------------------------------------------------------*/
  420.     ebr_frm_close_the_ebook();
  421.     DeleteNScrId(SCR_FMGR_APP_FILE_OPTION);
  422.     GoBackHistory();
  423. }
  424. /*****************************************************************************
  425.  * FUNCTION
  426.  *  ebr_frm_set_full_screen_on
  427.  * DESCRIPTION
  428.  *  Set full screen ON
  429.  * PARAMETERS
  430.  *  void
  431.  * RETURNS
  432.  *  void
  433.  *****************************************************************************/
  434. void ebr_frm_set_full_screen_on(void)
  435. {
  436.     /*----------------------------------------------------------------*/
  437.     /* Local Variables                                                */
  438.     /*----------------------------------------------------------------*/
  439.     /*----------------------------------------------------------------*/
  440.     /* Code Body                                                      */
  441.     /*----------------------------------------------------------------*/
  442.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  443.     ebr_entry_open_book();
  444. }
  445. /*****************************************************************************
  446.  * FUNCTION
  447.  *  ebr_frm_set_full_screen_off
  448.  * DESCRIPTION
  449.  *  Set full screen OFF
  450.  * PARAMETERS
  451.  *  void
  452.  * RETURNS
  453.  *  void
  454.  *****************************************************************************/
  455. void ebr_frm_set_full_screen_off(void)
  456. {
  457.     /*----------------------------------------------------------------*/
  458.     /* Local Variables                                                */
  459.     /*----------------------------------------------------------------*/
  460.     /*----------------------------------------------------------------*/
  461.     /* Code Body                                                      */
  462.     /*----------------------------------------------------------------*/
  463.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  464.     ebr_entry_open_book();
  465. }
  466. /*****************************************************************************
  467.  * FUNCTION
  468.  *  ebr_entry_book_settings
  469.  * DESCRIPTION
  470.  *  Entry Function for Setting Screen
  471.  * PARAMETERS
  472.  *  void
  473.  * RETURNS
  474.  *  void
  475.  *****************************************************************************/
  476. void ebr_entry_book_settings(void)
  477. {
  478.     /*----------------------------------------------------------------*/
  479.     /* Local Variables                                                */
  480.     /*----------------------------------------------------------------*/
  481.     U8 *guiBuffer;
  482.     U16 nNumofItem;
  483.     U16 nStrItemList[MAX_SUB_MENUS];
  484.     U16 nImgIltemList[MAX_SUB_MENUS];
  485.     U8 *hintList[MAX_SUB_MENUS];
  486.     S32 book_size;
  487.     S32 page_size;
  488.     /*----------------------------------------------------------------*/
  489.     /* Code Body                                                      */
  490.     /*----------------------------------------------------------------*/
  491.     EntryNewScreen(EBOOK_BOOK_SETTINGS_SCREENID, NULL, ebr_entry_book_settings, NULL);
  492.     guiBuffer = GetCurrGuiBuffer(EBOOK_BOOK_SETTINGS_SCREENID);
  493.     book_size = ebr_frm_get_book_size_from_nfo();
  494.     page_size = ebr_frm_get_page_size();
  495.     if (*g_ebook_app_cntx_p->ebr_search_string_input != '' && ebr_frm_get_auto_scroll_status())
  496.     {
  497.         SetParentHandler(MENU_ID_EBK_OPEN_OPTIONS_1);
  498.         nNumofItem = GetNumOfChild(MENU_ID_EBK_OPEN_OPTIONS_1);
  499.         GetSequenceStringIds(MENU_ID_EBK_OPEN_OPTIONS_1, nStrItemList);
  500.         GetSequenceImageIds(MENU_ID_EBK_OPEN_OPTIONS_1, nImgIltemList);
  501.         ConstructHintsList(MENU_ID_EBK_OPEN_OPTIONS_1, hintList);
  502.     }
  503.     else
  504.     {
  505.         SetParentHandler(MENU_ID_EBK_OPEN_OPTIONS);
  506.         nNumofItem = GetNumOfChild(MENU_ID_EBK_OPEN_OPTIONS);
  507.         GetSequenceStringIds(MENU_ID_EBK_OPEN_OPTIONS, nStrItemList);
  508.         GetSequenceImageIds(MENU_ID_EBK_OPEN_OPTIONS, nImgIltemList);
  509.         /* Construct List To Show Hint */
  510.         ConstructHintsList(MENU_ID_EBK_OPEN_OPTIONS, hintList);
  511.     }
  512.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  513.     ShowCategory52Screen(
  514.         STR_OPEN_BOOK_OPTION,
  515.         GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  516.         STR_GLOBAL_OK,
  517.         IMG_GLOBAL_OK,
  518.         STR_GLOBAL_BACK,
  519.         IMG_GLOBAL_BACK,
  520.         nNumofItem,
  521.         nStrItemList,
  522.         (U16*) gIndexIconsImageList,
  523.         hintList,
  524.         0,
  525.         0,
  526.         guiBuffer);
  527.     SetRightSoftkeyFunction(go_back_to_settings_screen, KEY_EVENT_UP);
  528.     SetKeyHandler(go_back_to_settings_screen, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  529. }
  530. /*****************************************************************************
  531.  * FUNCTION
  532.  *  ebr_entry_book_info
  533.  * DESCRIPTION
  534.  *  Entry Function for Book Info Screen
  535.  * PARAMETERS
  536.  *  void
  537.  * RETURNS
  538.  *  void
  539.  *****************************************************************************/
  540. void ebr_entry_book_info(void)
  541. {
  542.     /*----------------------------------------------------------------*/
  543.     /* Local Variables                                                */
  544.     /*----------------------------------------------------------------*/
  545.     U8 *guiBuffer;
  546.     U8 display_info[EBR_DISPLAY_INFO_SIZE], book_size[EBR_DISPLAY_INFO_DATA];
  547.     U8 new_line_info[EBR_NEW_LINE_SIZE];
  548.     S32 file_size, total_size;
  549.     U8 *type;
  550.     S8 buffer[MAX_EBOOK_NAME_LENGTH];
  551.     S8 new_line[]="n";
  552.     U8 type_info[EBR_DISPLAY_INFO_DATA * ENCODING_LENGTH];
  553.     /*----------------------------------------------------------------*/
  554.     /* Code Body                                                      */
  555.     /*----------------------------------------------------------------*/
  556.     EntryNewScreen(EBOOK_INFO_SCREENID, NULL, ebr_entry_book_info, NULL);
  557.     guiBuffer = GetCurrGuiBuffer(EBOOK_INFO_SCREENID);
  558.     type = ebr_frm_get_book_type();
  559.     AnsiiToUnicodeString((S8*) new_line_info, (S8*) new_line);
  560.     AnsiiToUnicodeString((S8*) type_info, (S8*) type);
  561.     pfnUnicodeStrcpy((PS8) display_info, (PS8) get_string(STR_EBOOK_BOOK_INFO_TITLE));
  562.     pfnUnicodeStrcat((PS8) display_info, (PS8) ebr_frm_get_book_name());
  563.     pfnUnicodeStrcat((PS8) display_info, (S8*) new_line_info);
  564.     pfnUnicodeStrcat((PS8) display_info, (S8*) get_string(STR_EBOOK_BOOK_INFO_SIZE));
  565.     total_size = ebr_frm_get_book_size();
  566.     if (total_size > 1024 * 1024)
  567.     {
  568.         file_size = total_size / 1024;
  569.         sprintf(buffer, "%d.%dM", (U16) (file_size / 1024), (U16) ((file_size % 1024) / 103));
  570.     }
  571.     else if (total_size > 1024)
  572.     {
  573.         sprintf(buffer, "%d.%dK", (U16) (total_size / 1024), (U16) ((total_size % 1024) / 103));
  574.     }
  575.     else    /* less than 1024 */
  576.     {
  577.         sprintf(buffer, "%dB", (U16) (total_size));
  578.     }
  579.     AnsiiToUnicodeString((S8*) book_size, (S8*) buffer);
  580.     pfnUnicodeStrcat((PS8) display_info, (PS8) book_size);
  581.     pfnUnicodeStrcat((PS8) display_info, (PS8) new_line_info);
  582.     pfnUnicodeStrcat((PS8) display_info, (PS8) get_string(STR_EBOOK_BOOK_INFO_FORMAT));
  583.     pfnUnicodeStrcat((PS8) display_info, (PS8) type_info);
  584.     ShowCategory74Screen(
  585.         STR_INFO_EBOOK,
  586.         GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  587.         0,
  588.         0,
  589.         STR_GLOBAL_BACK,
  590.         IMG_GLOBAL_BACK,
  591.         (U8*) display_info,
  592.         pfnUnicodeStrlen((const S8*)display_info),
  593.         guiBuffer);
  594.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  595.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  596. }
  597. /*****************************************************************************
  598.  * FUNCTION
  599.  *  ebr_entry_delete_ebook
  600.  * DESCRIPTION
  601.  *  Entry Function for Delete Book Screen
  602.  * PARAMETERS
  603.  *  void
  604.  * RETURNS
  605.  *  void
  606.  *****************************************************************************/
  607. void ebr_entry_delete_ebook(void)
  608. {
  609.     /*----------------------------------------------------------------*/
  610.     /* Local Variables                                                */
  611.     /*----------------------------------------------------------------*/
  612. S32 return_type = 0;
  613.     /*----------------------------------------------------------------*/
  614.     /* Code Body                                                      */
  615.     /*----------------------------------------------------------------*/
  616.     return_type = ebr_frm_delete_ebook();
  617.     DeleteNScrId(SCR_FMGR_APP_FILE_OPTION);
  618. if(return_type==-45)
  619. {
  620. DisplayPopup((PU8) GetString(FMGR_FS_READ_ONLY_ERROR_TEXT), IMG_GLOBAL_ERROR, 1, EBR_ST_NOTIFYDURATION, ERROR_TONE);
  621. }
  622.        else if (return_type < 0)
  623.        {
  624.          DisplayPopup((PU8) GetString(FMGR_FS_GENERAL_FAILURE_TEXT), IMG_GLOBAL_ERROR, 1, EBR_ST_NOTIFYDURATION, ERROR_TONE);   
  625.        }
  626. else
  627. {
  628.     DisplayPopup((PU8) GetString(STR_DELETED), IMG_GLOBAL_ACTIVATED, 1, EBR_ST_NOTIFYDURATION, SUCCESS_TONE);
  629. }
  630. }
  631. /*****************************************************************************
  632.  * FUNCTION
  633.  *  ebr_entry_help
  634.  * DESCRIPTION
  635.  *  Entry Function for Help Screen
  636.  * PARAMETERS
  637.  *  void
  638.  * RETURNS
  639.  *  void
  640.  *****************************************************************************/
  641. void ebr_entry_help(void)
  642. {
  643.     /*----------------------------------------------------------------*/
  644.     /* Local Variables                                                */
  645.     /*----------------------------------------------------------------*/
  646.     PS8 buffer_data;
  647.     U8 *guiBuffer;
  648.     /*----------------------------------------------------------------*/
  649.     /* Code Body                                                      */
  650.     /*----------------------------------------------------------------*/
  651.     EntryNewScreen(EBOOK_HELP_SCREEN, NULL, ebr_entry_help, NULL);
  652.     guiBuffer = GetCurrGuiBuffer(EBOOK_HELP_SCREEN);
  653. #ifdef __MMI_TOUCH_SCREEN__
  654.     buffer_data = GetString(STR_EBOOK_TOUCH_SCREEN_HELP);
  655. #else 
  656.     buffer_data = GetString(STR_EBOOK_HELP_DESCRIPTION);
  657. #endif 
  658.     ShowCategory74Screen(
  659.         STR_HELP_EBOOK,
  660.         GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  661.         0,
  662.         0,
  663.         STR_GLOBAL_BACK,
  664.         IMG_GLOBAL_BACK,
  665.         (U8*) buffer_data,
  666.         510,
  667.         guiBuffer);
  668.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  669.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  670. }
  671. /*****************************************************************************
  672.  * FUNCTION
  673.  *  ebr_entry_settings
  674.  * DESCRIPTION
  675.  *  Entry Function for Settings Screen
  676.  * PARAMETERS
  677.  *  void
  678.  * RETURNS
  679.  *  void
  680.  *****************************************************************************/
  681. void ebr_entry_settings(void)
  682. {
  683.     /*----------------------------------------------------------------*/
  684.     /* Local Variables                                                */
  685.     /*----------------------------------------------------------------*/
  686.     U8 *guiBuffer = NULL;
  687.     U8 status;
  688.     U8 *inputBuffer;
  689.     U16 nNumofItem = EBR_TOTAL_NUMBER_OF_ITEM_BKSHLF;   /* Stores no of children in the submenu */
  690.     U16 inputBufferSize;
  691.     U16 gIndexIconsImageList_local[] = 
  692.     {
  693.         IMG_GLOBAL_L1,
  694.         0,
  695.         IMG_GLOBAL_L2,
  696.         0,
  697.         IMG_GLOBAL_L3,
  698.         0,
  699.         IMG_GLOBAL_L4,
  700.         0,
  701.         IMG_GLOBAL_L5,
  702.         0,
  703.         IMG_GLOBAL_L6,
  704.         0,
  705.         IMG_GLOBAL_L7,
  706.         0,
  707.         IMG_GLOBAL_L8,
  708.         0
  709.     };
  710.     /*----------------------------------------------------------------*/
  711.     /* Code Body                                                      */
  712.     /*----------------------------------------------------------------*/
  713.     
  714.     nNumofItem = EBR_TOTAL_NUMBER_OF_ITEM_BKSHLF;
  715.     mmi_fmgr_get_exist_storage_inline_list(NULL, &status, NULL, NULL);
  716.     
  717.     if (g_ebook_app_cntx_p->ebr_set_local_setting_flag == 1 || 
  718.         (g_ebook_app_cntx_p->ebr_set_local_setting_flag != 1 && (status == 1)))
  719.     {
  720.         gIndexIconsImageList_local[14] = 0;
  721.         gIndexIconsImageList_local[15] = 0;
  722.         nNumofItem = EBR_TOTAL_NUMBER_OF_ITEM_BOOK;
  723.     }                    
  724.     EntryNewScreen(EBOOK_BOOK_SHELF_SETTINGS_SCREEN_ID, ebr_exit_settings, NULL, NULL);
  725.     InitializeCategory57Screen();
  726.         
  727.     guiBuffer = GetCurrGuiBuffer(EBOOK_BOOK_SHELF_SETTINGS_SCREEN_ID);
  728.     inputBuffer = GetCurrNInputBuffer(EBOOK_BOOK_SHELF_SETTINGS_SCREEN_ID, &inputBufferSize);   /* added for inline edit history */
  729.     if (inputBuffer != NULL)
  730.     {
  731.         SetCategory57Data(wgui_inline_items, nNumofItem, inputBuffer);
  732.     }    
  733.     else
  734.     {
  735.         //ClearHighlightHandler();
  736. /* Ge the Default value from NVRAM */
  737. ebr_frm_get_default_settings_value(g_ebookset_cntx_p, g_ebook_app_cntx_p->ebr_set_local_setting_flag);    
  738.     }
  739. ebr_fill_settings_inline_edit_struct((void*)&wgui_inline_items);
  740. RegisterHighlightHandler(mmi_ebr_highlight_setting);
  741.     if (mmi_ebr_is_memory_type_changed(g_ebookset_cntx_p->inlineHighligtItemSelectMemory) && GetInlineDoneFlag(guiBuffer) == 0)
  742.     {
  743.         SetInlineDoneFlag(guiBuffer);
  744.     }
  745.     
  746.     if (g_ebook_app_cntx_p->ebr_set_local_setting_flag != 1)
  747.     {
  748.     ShowCategory57Screen(
  749.         STR_SETTINGS_EBOOK,
  750.         GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  751.         STR_GLOBAL_OK,
  752.         IMG_GLOBAL_OK,
  753.         STR_GLOBAL_DONE,
  754.         IMG_GLOBAL_BACK,
  755.         nNumofItem,
  756.         (U16*) gIndexIconsImageList_local,
  757.         wgui_inline_items,
  758.         0,
  759.         guiBuffer);
  760.     }
  761.     else
  762.     {
  763.         ShowCategory57Screen(
  764.             STR_BOOK_SETTINGS_EBOOK,
  765.             GetRootTitleIcon(MAIN_MENU_EBOOK_MENUID),
  766.             STR_GLOBAL_OK,
  767.             IMG_GLOBAL_OK,
  768.             STR_GLOBAL_DONE,
  769.             IMG_GLOBAL_BACK,
  770.             nNumofItem,
  771.             (U16*) gIndexIconsImageList_local,
  772.             wgui_inline_items,
  773.             0,
  774.             guiBuffer);
  775.     }
  776.     /* Register function for right soft key */
  777.     SetCategory57RightSoftkeyFunctions(ebr_book_settings_confirm_pop_up, GoBackHistory);
  778. }
  779. #ifdef __MMI_TOUCH_SCREEN__
  780. /*****************************************************************************
  781.  * FUNCTION
  782.  *  ebr_set_key_TS
  783.  * DESCRIPTION
  784.  *  
  785.  * PARAMETERS
  786.  *  void              
  787.  * RETURNS
  788.  *  void
  789.  *****************************************************************************/
  790. void ebr_set_key_TS(UI_character_type c)
  791. {
  792.     /*----------------------------------------------------------------*/
  793.     /* Local Variables                                                */
  794.     /*----------------------------------------------------------------*/
  795.     /*----------------------------------------------------------------*/
  796.     /* Code Body                                                      */
  797.     /*----------------------------------------------------------------*/
  798.     switch (c)
  799.     {
  800.         case '0':
  801.             ebr_entry_settings();
  802.             break;
  803.         case '1':
  804.             ebr_entry_help();
  805.             break;
  806.         case '2':
  807.             ebr_entry_add_book_mark();
  808.             break;
  809.         case '3':
  810.             ebr_entry_search();
  811.             break;
  812.         case '4':
  813.             ebr_pre_entry_jump_to();
  814.             break;
  815.         case '5':
  816.             ebr_entry_goto_book_mark();
  817.             break;
  818.         case '6':
  819.             if (((g_ebook_app_cntx_p->ebr_search_string_input[0] != '') || (g_ebook_app_cntx_p->ebr_search_string_input[1] != '')) && ebr_frm_get_auto_scroll_status())
  820.             {
  821.                 ebr_app_search_string_next();
  822.             }
  823.             break;
  824.         case '7':
  825.             ebr_app_save_settings_scroll();
  826.             break;
  827.         case '8':
  828.             ebr_entry_remove_book_mark();
  829.             break;
  830.         case '9':
  831.             ebr_app_save_settings_screen_mode();
  832.             break;
  833.         default:
  834.             break;
  835.     }
  836. }
  837. #endif /* __MMI_TOUCH_SCREEN__ */ 
  838. /*****************************************************************************
  839.  * FUNCTION
  840.  *  ebr_book_settings_confirm_pop_up
  841.  * DESCRIPTION
  842.  *  Confirmation Screen for Settings
  843.  * PARAMETERS
  844.  *  void
  845.  * RETURNS
  846.  *  void
  847.  *****************************************************************************/
  848. void ebr_book_settings_confirm_pop_up(void)
  849. {
  850.     /*----------------------------------------------------------------*/
  851.     /* Local Variables                                                */
  852.     /*----------------------------------------------------------------*/
  853.     /*----------------------------------------------------------------*/
  854.     /* Code Body                                                      */
  855.     /*----------------------------------------------------------------*/
  856.     DisplayConfirm(
  857.         STR_GLOBAL_YES,
  858.         IMG_GLOBAL_YES,
  859.         STR_GLOBAL_NO,
  860.         IMG_GLOBAL_NO,
  861.         get_string(STR_CONFIRM_SAVE_SETTINGS),
  862.         IMG_GLOBAL_QUESTION,
  863.         WARNING_TONE);
  864.     if (g_ebook_app_cntx_p->ebr_set_local_setting_flag == 1)
  865.     {
  866.         SetLeftSoftkeyFunction(ebr_book_settings_done_hdlr, KEY_EVENT_UP);
  867.         SetRightSoftkeyFunction(go_back_to_open_book_screen, KEY_EVENT_UP);
  868.     }
  869.     else
  870.     {
  871.         SetLeftSoftkeyFunction(ebr_entry_settings_done_hndlr, KEY_EVENT_UP);
  872.         SetRightSoftkeyFunction(go_back_to_book_shelf_scren, KEY_EVENT_UP);
  873.     }
  874. }
  875. /*****************************************************************************
  876.  * FUNCTION
  877.  *  go_back_to_book_shelf_scren
  878.  * DESCRIPTION
  879.  *  Go to book Shelf Screen
  880.  * PARAMETERS
  881.  *  void
  882.  * RETURNS
  883.  *  void
  884.  *****************************************************************************/
  885. void go_back_to_book_shelf_scren(void)
  886. {
  887.     /*----------------------------------------------------------------*/
  888.     /* Local Variables                                                */
  889.     /*----------------------------------------------------------------*/
  890.     S16 count_no_of_nfo_file = 0;
  891.     /*----------------------------------------------------------------*/
  892.     /* Code Body                                                      */
  893.     /*----------------------------------------------------------------*/
  894.     count_no_of_nfo_file = ebr_frm_get_total_countof_nfo_file();
  895.     IsBackHistory = MMI_TRUE;
  896.     if (IsScreenPresent(FMGR_SCR_MARKER))
  897.     {
  898.         DeleteNScrId(FMGR_SCR_MARKER);
  899.     }
  900.     else
  901.     {
  902.         if (count_no_of_nfo_file <= 0)
  903.         {
  904.             DeleteNScrId(EBOOK_OPEN_OPTION_SCREENID);
  905.         }
  906.         else
  907.         {
  908.             DeleteNScrId(EBOOK_BOOK_SHELF_SETTINGS_SCREEN_ID);
  909.         }
  910.     }
  911.     ebr_entry_book_shel_screen();
  912. }
  913. /*****************************************************************************
  914.  * FUNCTION
  915.  *  go_back_to_open_book_screen
  916.  * DESCRIPTION
  917.  *  Go to Open Book Screen
  918.  * PARAMETERS
  919.  *  void
  920.  * RETURNS
  921.  *  void
  922.  *****************************************************************************/
  923. void go_back_to_open_book_screen(void)
  924. {
  925.     /*----------------------------------------------------------------*/
  926.     /* Local Variables                                                */
  927.     /*----------------------------------------------------------------*/
  928.     /*----------------------------------------------------------------*/
  929.     /* Code Body                                                      */
  930.     /*----------------------------------------------------------------*/
  931.     if (IsScreenPresent(EBOOK_BOOK_SETTINGS_SCREENID))
  932.     {
  933.         DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  934.         GoBackHistory();
  935.     }
  936.     else
  937.     {
  938.         DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  939.         GoBackHistory();
  940.     }
  941. }
  942. /*****************************************************************************
  943.  * FUNCTION
  944.  *  ebr_exit_settings
  945.  * DESCRIPTION
  946.  *  Exit function for Settings Screen
  947.  * PARAMETERS
  948.  *  void
  949.  * RETURNS
  950.  *  void
  951.  *****************************************************************************/
  952. void ebr_exit_settings(void)
  953. {
  954.     /*----------------------------------------------------------------*/
  955.     /* Local Variables                                                */
  956.     /*----------------------------------------------------------------*/
  957.     history Scr;
  958.     S16 nHistory = 0;
  959.     U16 size;
  960.     /*----------------------------------------------------------------*/
  961.     /* Code Body                                                      */
  962.     /*----------------------------------------------------------------*/
  963.     CloseCategory57Screen();
  964.     Scr.scrnID = EBOOK_BOOK_SHELF_SETTINGS_SCREEN_ID;
  965.     CloseCategory57Screen();
  966.     Scr.entryFuncPtr = ebr_entry_settings;
  967.     pfnUnicodeStrcpy((S8*) Scr.inputBuffer, (S8*) & nHistory);
  968.     GetCategoryHistory(Scr.guiBuffer);
  969.     size = (U16) GetCategory57DataSize();
  970.     GetCategory57Data((U8*) Scr.inputBuffer);
  971.     AddNHistory(Scr, size);
  972. }
  973. /*****************************************************************************
  974.  * FUNCTION
  975.  *  ebr_entry_settings_done_hndlr
  976.  * DESCRIPTION
  977.  *  Set highlight handler for Menu Ooptions
  978.  * PARAMETERS
  979.  *  void
  980.  * RETURNS
  981.  *  void
  982.  *****************************************************************************/
  983. void ebr_entry_settings_done_hndlr(void)
  984. {
  985.     /*----------------------------------------------------------------*/
  986.     /* Local Variables                                                */
  987.     /*----------------------------------------------------------------*/
  988.     /*----------------------------------------------------------------*/
  989.     /* Code Body                                                      */
  990.     /*----------------------------------------------------------------*/
  991.     ebr_frm_set_settings_and_save_in_nvram(g_ebookset_cntx_p);
  992.     DeleteUptoScrID(SCR_FMGR_EXPLORER);
  993.     IsBackHistory = MMI_TRUE;
  994.     DisplayPopupCallBack(
  995.         (PU8) GetString(STR_GLOBAL_DONE),
  996.         IMG_GLOBAL_ACTIVATED,
  997.         1,
  998.         EBR_ST_NOTIFYDURATION,
  999.         SUCCESS_TONE,
  1000.         ebr_entry_book_shel_screen);
  1001. }
  1002. /*****************************************************************************
  1003.  * FUNCTION
  1004.  *  ebr_book_settings_done_hdlr
  1005.  * DESCRIPTION
  1006.  *  Set highlight handler for Menu Ooptions
  1007.  * PARAMETERS
  1008.  *  void
  1009.  * RETURNS
  1010.  *  void
  1011.  *****************************************************************************/
  1012. void ebr_book_settings_done_hdlr(void)
  1013. {
  1014.     /*----------------------------------------------------------------*/
  1015.     /* Local Variables                                                */
  1016.     /*----------------------------------------------------------------*/
  1017.     /*----------------------------------------------------------------*/
  1018.     /* Code Body                                                      */
  1019.     /*----------------------------------------------------------------*/
  1020.     ebr_frm_set_settings_and_save(g_ebookset_cntx_p);
  1021.     if (IsScreenPresent(EBOOK_BOOK_SETTINGS_SCREENID))
  1022.     {
  1023.         DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1024.     }
  1025.     else
  1026.     {
  1027.         DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1028.     }
  1029. DisplayPopup(
  1030.         (PU8) GetString(STR_GLOBAL_DONE),
  1031.         IMG_GLOBAL_ACTIVATED,
  1032.         1,
  1033.         EBR_ST_NOTIFYDURATION,
  1034.         SUCCESS_TONE);
  1035. }
  1036. /*****************************************************************************
  1037.  * FUNCTION
  1038.  *  ebr_fill_settings_inline_edit_struct
  1039.  * DESCRIPTION
  1040.  *  Set highlight handler for Menu Ooptions
  1041.  * PARAMETERS
  1042.  *  pInlineStruct       [IN]        
  1043.  * RETURNS
  1044.  *  void
  1045.  *****************************************************************************/
  1046. void ebr_fill_settings_inline_edit_struct(void *pInlineStruct)
  1047. {
  1048.     /*----------------------------------------------------------------*/
  1049.     /* Local Variables                                                */
  1050.     /*----------------------------------------------------------------*/
  1051.     S16 i = 0;
  1052.     U8 status = 0;
  1053.     InlineItem *InlineStruct = (InlineItem*) pInlineStruct;
  1054.     /*----------------------------------------------------------------*/
  1055.     /* Code Body                                                      */
  1056.     /*----------------------------------------------------------------*/
  1057.     g_ebook_app_cntx_p->ebook_settings_font_style[EBR_FONT_STYLE_NORMAL] =
  1058.         (U8*) GetString(STR_SETTINGS_FONT_STYLE_NORMAL);
  1059.     g_ebook_app_cntx_p->ebook_settings_font_style[EBR_FONT_STYLE_ITALIC] =
  1060.         (U8*) GetString(STR_SETTINGS_FONT_STYLE_ITALIC);
  1061.     g_ebook_app_cntx_p->ebook_settings_font_style[EBR_FONT_STYLE_BOLD] = (U8*) GetString(STR_SETTINGS_FONT_STYLE_BOLD);
  1062.     g_ebook_app_cntx_p->ebook_settings_font_size[EBR_FONT_SIZE_SMALL] = (U8*) GetString(STR_SETTINGS_FONT_SIZE_SMALL);
  1063.     g_ebook_app_cntx_p->ebook_settings_font_size[EBR_FONT_SIZE_MEDIUM] =
  1064.         (U8*) GetString(STR_SETTINGS_FONT_SIZE_MEDIUM);
  1065.     g_ebook_app_cntx_p->ebook_settings_font_size[EBR_FONT_SIZE_LARGE] = (U8*) GetString(STR_SETTINGS_FONT_SIZE_LARGE);
  1066.     g_ebook_app_cntx_p->ebook_settings_scroll_by[EBR_SCROLL_BY_LINE] = (U8*) GetString(STR_SETTINGS_SCROLL_BY_LINE);
  1067.     g_ebook_app_cntx_p->ebook_settings_scroll_by[EBR_SCROLL_BY_PAGE] = (U8*) GetString(STR_SETTINGS_SCROLL_BY_PAGE);
  1068.     g_ebook_app_cntx_p->ebook_settings_auto_scroll[EBR_SCROLL_OFF] = (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_OFF);
  1069.     g_ebook_app_cntx_p->ebook_settings_auto_scroll[EBR_SCROLL_ON] = (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_ON);
  1070.     g_ebook_app_cntx_p->ebook_settings_full_screen[EBR_FULL_SCREEN_OFF] =
  1071.         (U8*) GetString(STR_SETTINGS_FULL_SCREEN_OFF);
  1072.     g_ebook_app_cntx_p->ebook_settings_full_screen[EBR_FULL_SCREEN_ON] = (U8*) GetString(STR_SETTINGS_FULL_SCREEN_ON);
  1073.     g_ebook_app_cntx_p->ebook_settings_encoding_format[i++] =
  1074.         (U8*) GetString(STR_SETTINGS_ENCODING_FORMAT_WESTERN_WIN);
  1075.     g_ebook_app_cntx_p->ebook_settings_encoding_format[i++] = (U8*) GetString(STR_SETTINGS_ENCODING_FORMAT_UCS2);
  1076.     g_ebook_app_cntx_p->ebook_settings_encoding_format[i++] = (U8*) GetString(STR_SETTINGS_ENCODING_FORMAT_UTF8);
  1077. #ifdef __MMI_CHSET_BIG5__
  1078.     g_ebook_app_cntx_p->ebook_settings_encoding_format[i++] = (U8*) GetString(STR_SETTINGS_ENCODING_FORMAT_BIG5);
  1079. #endif 
  1080. #ifdef __MMI_CHSET_GB2312__
  1081.     g_ebook_app_cntx_p->ebook_settings_encoding_format[i++] = (U8*) GetString(STR_SETTINGS_ENCODING_FORMAT_GB2312);
  1082. #endif 
  1083. #if 0
  1084. #ifdef __MMI_CHSET_TURKISH_ISO__
  1085. /* under construction !*/
  1086. /* under construction !*/
  1087. #endif /* __MMI_CHSET_TURKISH_ISO__ */ 
  1088. /* under construction !*/
  1089. #ifdef __MMI_CHSET_TURKISH_WIN__
  1090. /* under construction !*/
  1091. /* under construction !*/
  1092. #endif /* __MMI_CHSET_TURKISH_WIN__ */ 
  1093. #ifdef __MMI_CHSET_BALTIC_ISO__
  1094. /* under construction !*/
  1095. #endif 
  1096. #ifdef __MMI_CHSET_BALTIC_WIN__
  1097. /* under construction !*/
  1098. #endif 
  1099. #ifdef __MMI_CHSET_CEURO_ISO__
  1100. /* under construction !*/
  1101. /* under construction !*/
  1102. #endif /* __MMI_CHSET_CEURO_ISO__ */ 
  1103. #ifdef __MMI_CHSET_CEURO_WIN__
  1104. /* under construction !*/
  1105. #endif 
  1106. #ifdef __MMI_CHSET_GREEK_ISO__
  1107. /* under construction !*/
  1108. #endif 
  1109. #ifdef __MMI_CHSET_GREEK_WIN__
  1110. /* under construction !*/
  1111. #endif 
  1112. #ifdef __MMI_CHSET_HEBREW_ISO__
  1113. /* under construction !*/
  1114. #endif 
  1115. #ifdef __MMI_CHSET_HEBREW_WIN__
  1116. /* under construction !*/
  1117. #endif 
  1118. #ifdef __MMI_CHSET_LATIN_ISO__
  1119. /* under construction !*/
  1120. #endif 
  1121. #ifdef __MMI_CHSET_NORDIC_ISO__
  1122. /* under construction !*/
  1123. #endif 
  1124. #ifdef __MMI_CHSET_SEURO_ISO__
  1125. /* under construction !*/
  1126. /* under construction !*/
  1127. #endif /* __MMI_CHSET_SEURO_ISO__ */ 
  1128. #ifdef __MMI_CHSET_WESTERN_ISO__
  1129. /* under construction !*/
  1130. /* under construction !*/
  1131. #endif /* __MMI_CHSET_WESTERN_ISO__ */ 
  1132. #ifdef __MMI_CHSET_ARABIC_ISO__
  1133. /* under construction !*/
  1134. /* under construction !*/
  1135. #endif /* __MMI_CHSET_ARABIC_ISO__ */ 
  1136. #ifdef __MMI_CHSET_ARABIC_WIN__
  1137. /* under construction !*/
  1138. #endif 
  1139. #endif /* 0 */ 
  1140.     mmi_fmgr_get_exist_storage_inline_list(NULL, &status, NULL, NULL);
  1141.     g_ebook_app_cntx_p->ebook_settinsg_auto_scroll_speed[EBR_AUTO_SCROLL_SPEED_1] =
  1142.         (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_SPEED_1);
  1143.     g_ebook_app_cntx_p->ebook_settinsg_auto_scroll_speed[EBR_AUTO_SCROLL_SPEED_2] =
  1144.         (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_SPEED_2);
  1145.     g_ebook_app_cntx_p->ebook_settinsg_auto_scroll_speed[EBR_AUTO_SCROLL_SPEED_3] =
  1146.         (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_SPEED_3);
  1147.     g_ebook_app_cntx_p->ebook_settinsg_auto_scroll_speed[EBR_AUTO_SCROLL_SPEED_4] =
  1148.         (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_SPEED_4);
  1149.     g_ebook_app_cntx_p->ebook_settinsg_auto_scroll_speed[EBR_AUTO_SCROLL_SPEED_5] =
  1150.         (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_SPEED_5);
  1151.     SetInlineItemActivation(&InlineStruct[0], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1152.     SetInlineItemCaption(&InlineStruct[0], (PU8) (U8*) GetString(STR_SETTINGS_FONT_STYLE));
  1153.     SetInlineItemActivation(&InlineStruct[2], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1154.     SetInlineItemCaption(&InlineStruct[2], (PU8) (U8*) GetString(STR_SETTINGS_FONT_SIZE));
  1155.     SetInlineItemActivation(&InlineStruct[4], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1156.     SetInlineItemCaption(&InlineStruct[4], (PU8) (U8*) GetString(STR_SETTINGS_SCROLL_BY));
  1157.     SetInlineItemActivation(&InlineStruct[6], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1158.     SetInlineItemCaption(&InlineStruct[6], (PU8) (U8*) GetString(STR_SETTINGS_AUTO_SCROLL));
  1159.     SetInlineItemActivation(&InlineStruct[8], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1160.     SetInlineItemCaption(&InlineStruct[8], (PU8) (U8*) GetString(STR_SETTINGS_AUTO_SCROLL_SPEED));
  1161.     SetInlineItemActivation(&InlineStruct[10], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1162.     SetInlineItemCaption(&InlineStruct[10], (PU8) (U8*) GetString(STR_SETTINGS_FULL_SCREEN));
  1163.     SetInlineItemActivation(&InlineStruct[12], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1164.     SetInlineItemCaption(&InlineStruct[12], (PU8) (U8*) GetString(STR_SETTINGS_ENCODING_FORMAT));
  1165.     SetInlineItemActivation(&InlineStruct[1], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1166.     SetInlineItemSelect(
  1167.         &InlineStruct[1],
  1168.         3,
  1169.         g_ebook_app_cntx_p->ebook_settings_font_style,
  1170.         (S32*) & (g_ebookset_cntx_p->inlineHighligtItemFontStyle) /* CurrSelect */ );
  1171.     SetInlineItemActivation(&InlineStruct[3], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1172.     SetInlineItemSelect(
  1173.         &InlineStruct[3],
  1174.         3,
  1175.         g_ebook_app_cntx_p->ebook_settings_font_size,
  1176.         (S32*) & (g_ebookset_cntx_p->inlineHighligtItemFontSize) /* CurrSelect */ );
  1177.     SetInlineItemActivation(&InlineStruct[5], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1178.     SetInlineItemSelect(
  1179.         &InlineStruct[5],
  1180.         2,
  1181.         g_ebook_app_cntx_p->ebook_settings_scroll_by,
  1182.         (S32*) & (g_ebookset_cntx_p->inlineHighligtItemScrollBy) /* CurrSelect */ );
  1183.     SetInlineItemActivation(&InlineStruct[7], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1184.     SetInlineItemSelect(
  1185.         &InlineStruct[7],
  1186.         2,
  1187.         g_ebook_app_cntx_p->ebook_settings_auto_scroll,
  1188.         (S32*) & (g_ebookset_cntx_p->inlineHighligtItemAutoScroll) /* CurrSelect */ );
  1189.     SetInlineItemActivation(&InlineStruct[9], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1190.     SetInlineItemSelect(
  1191.         &InlineStruct[9],
  1192.         5,
  1193.         g_ebook_app_cntx_p->ebook_settinsg_auto_scroll_speed,
  1194.         (S32*) & (g_ebookset_cntx_p->inlineHighligtItemScrollSpeed) /* CurrSelect */ );
  1195.     SetInlineItemActivation(&InlineStruct[11], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1196.     SetInlineItemSelect(
  1197.         &InlineStruct[11],
  1198.         2,
  1199.         g_ebook_app_cntx_p->ebook_settings_full_screen,
  1200.         (S32*) & (g_ebookset_cntx_p->inlineHighligtItemFulScreenMode) /* CurrSelect */ );
  1201.     SetInlineItemActivation(&InlineStruct[13], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1202.     SetInlineItemSelect(
  1203.         &InlineStruct[13],
  1204.         i,
  1205.         g_ebook_app_cntx_p->ebook_settings_encoding_format,
  1206.         (S32*) & (g_ebookset_cntx_p->inlineHighligtItemEncodingFormat) /* CurrSelect */ );
  1207.     if (g_ebook_app_cntx_p->ebr_set_local_setting_flag != 1)
  1208.     {
  1209.         if (status >= 1)
  1210.         {
  1211.             SetInlineItemActivation(&InlineStruct[14], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1212.             SetInlineItemCaption(&InlineStruct[14], (U8*) GetString(STR_SETTINGS_SELECT_MEMORY));
  1213.             mmi_fmgr_get_drive_name(g_ebookset_cntx_p->inlineHighligtItemSelectMemory, g_ebook_app_cntx_p->ebook_settings_memory_type, FMGR_MAX_DRIVE_NAME_LEN);
  1214.             SetInlineItemActivation(&InlineStruct[15], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
  1215.             SetInlineItemDisplayOnly(&InlineStruct[15], (U8*) g_ebook_app_cntx_p->ebook_settings_memory_type);
  1216.         }
  1217.     }
  1218. }
  1219. /*****************************************************************************
  1220.  * FUNCTION
  1221.  *  ebr_mmi_ebook_exit
  1222.  * DESCRIPTION
  1223.  *  exit function for Open Book
  1224.  * PARAMETERS
  1225.  *  void
  1226.  * RETURNS
  1227.  *  void
  1228.  *****************************************************************************/
  1229. void ebr_mmi_ebook_exit(void)
  1230. {
  1231.     /*----------------------------------------------------------------*/
  1232.     /* Local Variables                                                */
  1233.     /*----------------------------------------------------------------*/
  1234.     /*----------------------------------------------------------------*/
  1235.     /* Code Body                                                      */
  1236.     /*----------------------------------------------------------------*/
  1237.     TurnOffBacklight();
  1238.     if (g_ebook_app_cntx_p->enable_screen_exit)
  1239.     {
  1240.         ebr_frm_ebook_exit();
  1241.         if (ebr_frm_get_current_recursive_conversion_state() == EBR_FRM_CONVERSION_UNDERWAY)
  1242.         {
  1243.             ebr_frm_stop_recursion();
  1244.             ebr_stop_please_wait_actual_screen();
  1245.         }
  1246.     }
  1247. }
  1248. /*****************************************************************************
  1249.  * FUNCTION
  1250.  *  entry_duplicate_book_mark_pop_up
  1251.  * DESCRIPTION
  1252.  *  Pop Up for Duplicate Book mark
  1253.  * PARAMETERS
  1254.  *  void
  1255.  * RETURNS
  1256.  *  void
  1257.  *****************************************************************************/
  1258. void entry_duplicate_book_mark_pop_up()
  1259. {
  1260.     /*----------------------------------------------------------------*/
  1261.     /* Local Variables                                                */
  1262.     /*----------------------------------------------------------------*/
  1263.     /*----------------------------------------------------------------*/
  1264.     /* Code Body                                                      */
  1265.     /*----------------------------------------------------------------*/
  1266.     DisplayConfirm(
  1267.         STR_GLOBAL_YES,
  1268.         IMG_GLOBAL_YES,
  1269.         STR_GLOBAL_NO,
  1270.         IMG_GLOBAL_NO,
  1271.         get_string(STR_DUPLICATE_BOOK_MARK),
  1272.         IMG_GLOBAL_QUESTION,
  1273.         WARNING_TONE);
  1274.     SetLeftSoftkeyFunction(ebr_frm_add_book_mark, KEY_EVENT_UP);
  1275.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1276. }
  1277. /*****************************************************************************
  1278.  * FUNCTION
  1279.  *  ebr_app_delete_all_from_book_shelf
  1280.  * DESCRIPTION
  1281.  *  Pop Up for Delete All
  1282.  * PARAMETERS
  1283.  *  void
  1284.  * RETURNS
  1285.  *  void
  1286.  *****************************************************************************/
  1287. void ebr_app_delete_all_from_book_shelf(void)
  1288. {
  1289.     /*----------------------------------------------------------------*/
  1290.     /* Local Variables                                                */
  1291.     /*----------------------------------------------------------------*/
  1292.     /*----------------------------------------------------------------*/
  1293.     /* Code Body                                                      */
  1294.     /*----------------------------------------------------------------*/
  1295.     DisplayConfirm(
  1296.         STR_GLOBAL_YES,
  1297.         IMG_GLOBAL_YES,
  1298.         STR_GLOBAL_NO,
  1299.         IMG_GLOBAL_NO,
  1300.         get_string(STR_DELETE_ALL_EBOOK_CONFIRM),
  1301.         IMG_GLOBAL_QUESTION,
  1302.         WARNING_TONE);
  1303.     SetLeftSoftkeyFunction(ebr_confirm_deletion_of_all_files, KEY_EVENT_UP);
  1304.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1305. }
  1306. /*****************************************************************************
  1307.  * FUNCTION
  1308.  *  ebr_confirm_deletion_of_all_files
  1309.  * DESCRIPTION
  1310.  *  Pop Up for Delete All
  1311.  * PARAMETERS
  1312.  *  void
  1313.  * RETURNS
  1314.  *  void
  1315.  *****************************************************************************/
  1316. void ebr_confirm_deletion_of_all_files(void)
  1317. {
  1318.     /*----------------------------------------------------------------*/
  1319.     /* Local Variables                                                */
  1320.     /*----------------------------------------------------------------*/
  1321.     /*----------------------------------------------------------------*/
  1322.     /* Code Body                                                      */
  1323.     /*----------------------------------------------------------------*/
  1324.     ebr_frm_delete_all_from_book_shelf();
  1325.     DeleteNScrId(SCR_FMGR_APP_FILE_OPTION);
  1326.     DisplayPopup((PU8) GetString(STR_DELETED), IMG_GLOBAL_ACTIVATED, 1, EBR_ST_NOTIFYDURATION, SUCCESS_TONE);
  1327. }
  1328. /*****************************************************************************
  1329.  * FUNCTION
  1330.  *  ebr_app_restore_default_book_settings_thru_frm
  1331.  * DESCRIPTION
  1332.  *  Pop Up for Delete All
  1333.  * PARAMETERS
  1334.  *  void
  1335.  * RETURNS
  1336.  *  void
  1337.  *****************************************************************************/
  1338. void ebr_app_restore_default_book_settings_thru_frm(void)
  1339. {
  1340.     /*----------------------------------------------------------------*/
  1341.     /* Local Variables                                                */
  1342.     /*----------------------------------------------------------------*/
  1343.     /*----------------------------------------------------------------*/
  1344.     /* Code Body                                                      */
  1345.     /*----------------------------------------------------------------*/
  1346.     if (ebr_frm_restore_default_book_settings())
  1347.     {
  1348.         ebr_app_display_pop_up_default_settings_for_book_restored();
  1349.     }
  1350.     else    /* Error Settings could not be restored */
  1351.     {
  1352.         ebr_app_display_pop_up_default_settings_not_restored();
  1353.     }
  1354. }
  1355. /*****************************************************************************
  1356.  * FUNCTION
  1357.  *  ebr_app_restore_default_book_settings
  1358.  * DESCRIPTION
  1359.  *  Confirmation screen for Restore default settings
  1360.  * PARAMETERS
  1361.  *  void
  1362.  * RETURNS
  1363.  *  void
  1364.  *****************************************************************************/
  1365. void ebr_app_restore_default_book_settings(void)
  1366. {
  1367.     /*----------------------------------------------------------------*/
  1368.     /* Local Variables                                                */
  1369.     /*----------------------------------------------------------------*/
  1370.     /*----------------------------------------------------------------*/
  1371.     /* Code Body                                                      */
  1372.     /*----------------------------------------------------------------*/
  1373.     DisplayConfirm(
  1374.         STR_GLOBAL_YES,
  1375.         IMG_GLOBAL_YES,
  1376.         STR_GLOBAL_NO,
  1377.         IMG_GLOBAL_NO,
  1378.         get_string(STR_RESTORE_DEFAULT_SETTINGS),
  1379.         IMG_GLOBAL_QUESTION,
  1380.         WARNING_TONE);
  1381.     SetLeftSoftkeyFunction(ebr_app_restore_default_book_settings_thru_frm, KEY_EVENT_UP);
  1382.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1383. }
  1384. /*****************************************************************************
  1385.  * FUNCTION
  1386.  *  ebr_app_restore_default_book_shelf_settings_thru_frm
  1387.  * DESCRIPTION
  1388.  *  
  1389.  * PARAMETERS
  1390.  *  void
  1391.  * RETURNS
  1392.  *  void
  1393.  *****************************************************************************/
  1394. void ebr_app_restore_default_book_shelf_settings_thru_frm(void)
  1395. {
  1396.     /*----------------------------------------------------------------*/
  1397.     /* Local Variables                                                */
  1398.     /*----------------------------------------------------------------*/
  1399.     /*----------------------------------------------------------------*/
  1400.     /* Code Body                                                      */
  1401.     /*----------------------------------------------------------------*/
  1402.     ebr_frm_restore_default_book_shelf_settings();
  1403.     ebr_app_display_pop_up_default_settings_restored();
  1404. }
  1405. /*****************************************************************************
  1406.  * FUNCTION
  1407.  *  ebr_app_restore_default_book_shelf_settings
  1408.  * DESCRIPTION
  1409.  *  Confirmation screen for Restore default settings.
  1410.  * PARAMETERS
  1411.  *  void
  1412.  * RETURNS
  1413.  *  void
  1414.  *****************************************************************************/
  1415. void ebr_app_restore_default_book_shelf_settings(void)
  1416. {
  1417.     /*----------------------------------------------------------------*/
  1418.     /* Local Variables                                                */
  1419.     /*----------------------------------------------------------------*/
  1420.     /*----------------------------------------------------------------*/
  1421.     /* Code Body                                                      */
  1422.     /*----------------------------------------------------------------*/
  1423.     DisplayConfirm(
  1424.         STR_GLOBAL_YES,
  1425.         IMG_GLOBAL_YES,
  1426.         STR_GLOBAL_NO,
  1427.         IMG_GLOBAL_NO,
  1428.         get_string(STR_RESTORE_DEFAULT_SETTINGS),
  1429.         IMG_GLOBAL_QUESTION,
  1430.         WARNING_TONE);
  1431.     SetLeftSoftkeyFunction(ebr_app_restore_default_book_shelf_settings_thru_frm, KEY_EVENT_UP);
  1432.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1433. }
  1434. /*****************************************************************************
  1435.  * FUNCTION
  1436.  *  ebr_app_display_pop_up_maximum_book_marks
  1437.  * DESCRIPTION
  1438.  *  Pop Up for Maximum book marks added.
  1439.  * PARAMETERS
  1440.  *  void
  1441.  * RETURNS
  1442.  *  void
  1443.  *****************************************************************************/
  1444. void ebr_app_display_pop_up_maximum_book_marks(void)
  1445. {
  1446.     /*----------------------------------------------------------------*/
  1447.     /* Local Variables                                                */
  1448.     /*----------------------------------------------------------------*/
  1449.     /*----------------------------------------------------------------*/
  1450.     /* Code Body                                                      */
  1451.     /*----------------------------------------------------------------*/
  1452.     DisplayPopup((PU8) GetString(STR_MAX_BOOK_MARK), IMG_GLOBAL_WARNING, 1, EBR_ST_NOTIFYDURATION, ERROR_TONE);
  1453.     DeleteUptoScrID(EBOOK_BOOK_SETTINGS_SCREENID);
  1454. }
  1455. /*****************************************************************************
  1456.  * FUNCTION
  1457.  *  ebr_app_display_pop_up_book_mark_name_empty
  1458.  * DESCRIPTION
  1459.  *  
  1460.  * PARAMETERS
  1461.  *  void
  1462.  * RETURNS
  1463.  *  void
  1464.  *****************************************************************************/
  1465. void ebr_app_display_pop_up_book_mark_name_empty(void)
  1466. {
  1467.     /*----------------------------------------------------------------*/
  1468.     /* Local Variables                                                */
  1469.     /*----------------------------------------------------------------*/
  1470.     /*----------------------------------------------------------------*/
  1471.     /* Code Body                                                      */
  1472.     /*----------------------------------------------------------------*/
  1473.     DisplayPopup(
  1474.         (PU8) GetString(STR_BOOK_MARK_NAME_IS_EMPTY),
  1475.         IMG_GLOBAL_UNFINISHED,
  1476.         1,
  1477.         EBR_ST_NOTIFYDURATION,
  1478.         ERROR_TONE);
  1479.     /* DeleteUptoScrID(EBOOK_BOOK_SETTINGS_SCREENID); */
  1480. }
  1481. /*****************************************************************************
  1482.  * FUNCTION
  1483.  *  ebr_app_display_pop_up_book_mark_sucessfully_added
  1484.  * DESCRIPTION
  1485.  *  Pop Up for Book Mark added.
  1486.  * PARAMETERS
  1487.  *  void
  1488.  * RETURNS
  1489.  *  void
  1490.  *****************************************************************************/
  1491. void ebr_app_display_pop_up_book_mark_sucessfully_added(void)
  1492. {
  1493.     /*----------------------------------------------------------------*/
  1494.     /* Local Variables                                                */
  1495.     /*----------------------------------------------------------------*/
  1496.     /*----------------------------------------------------------------*/
  1497.     /* Code Body                                                      */
  1498.     /*----------------------------------------------------------------*/
  1499.     DisplayPopup(
  1500.         (PU8) GetString(STR_EBOOK_BOOKMARK_ADDED),
  1501.         IMG_GLOBAL_ACTIVATED,
  1502.         1,
  1503.         EBR_ST_NOTIFYDURATION,
  1504.         SUCCESS_TONE);
  1505.     if (IsScreenPresent(EBOOK_BOOK_SETTINGS_SCREENID))
  1506.     {
  1507.         DeleteUptoScrID(EBOOK_BOOK_SETTINGS_SCREENID);
  1508.     }
  1509.     else
  1510.     {
  1511.         DeleteNScrId(EBOOK_ADD_BOOK_MARK_SCREEN_ID);
  1512.     }
  1513. }
  1514. /*****************************************************************************
  1515.  * FUNCTION
  1516.  *  ebr_app_search_result_unsucessfull
  1517.  * DESCRIPTION
  1518.  *  Pop Up for Search Uncessfull
  1519.  * PARAMETERS
  1520.  *  void
  1521.  * RETURNS
  1522.  *  void
  1523.  *****************************************************************************/
  1524. void ebr_app_search_result_unsucessfull(void)
  1525. {
  1526.     /*----------------------------------------------------------------*/
  1527.     /* Local Variables                                                */
  1528.     /*----------------------------------------------------------------*/
  1529.     /*----------------------------------------------------------------*/
  1530.     /* Code Body                                                      */
  1531.     /*----------------------------------------------------------------*/
  1532.     DisplayPopup(
  1533.         (U8*) GetString(STR_EBOOK_SEARCH_UN_SUCESSFULL),
  1534.         IMG_GLOBAL_UNFINISHED,
  1535.         1,
  1536.         UI_POPUP_NOTIFYDURATION_TIME,
  1537.         ERROR_TONE);
  1538.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1539.     ebr_app_search_result_successful(FALSE);
  1540. }
  1541. /*****************************************************************************
  1542.  * FUNCTION
  1543.  *  ebr_app_search_result_invalid
  1544.  * DESCRIPTION
  1545.  *  Pop Up for Search Invalid
  1546.  * PARAMETERS
  1547.  *  void
  1548.  * RETURNS
  1549.  *  void
  1550.  *****************************************************************************/
  1551. void ebr_app_search_result_invalid(void)
  1552. {
  1553.     /*----------------------------------------------------------------*/
  1554.     /* Local Variables                                                */
  1555.     /*----------------------------------------------------------------*/
  1556.     /*----------------------------------------------------------------*/
  1557.     /* Code Body                                                      */
  1558.     /*----------------------------------------------------------------*/
  1559.     DisplayPopup(
  1560.         (U8*) GetString(STR_EBOOK_SEARCH_INVALID),
  1561.         IMG_GLOBAL_UNFINISHED,
  1562.         1,
  1563.         UI_POPUP_NOTIFYDURATION_TIME,
  1564.         ERROR_TONE);
  1565.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1566.     ebr_app_search_result_successful(FALSE);
  1567. }
  1568. /*****************************************************************************
  1569.  * FUNCTION
  1570.  *  ebr_frm_search_string_empty
  1571.  * DESCRIPTION
  1572.  *  Pop Up for Search Uncessfull
  1573.  * PARAMETERS
  1574.  *  void
  1575.  * RETURNS
  1576.  *  void
  1577.  *****************************************************************************/
  1578. void ebr_frm_search_string_empty(void)
  1579. {
  1580.     /*----------------------------------------------------------------*/
  1581.     /* Local Variables                                                */
  1582.     /*----------------------------------------------------------------*/
  1583.     /*----------------------------------------------------------------*/
  1584.     /* Code Body                                                      */
  1585.     /*----------------------------------------------------------------*/
  1586.     DisplayPopup(
  1587.         (U8*) GetString(STR_GLOBAL_EMPTY),
  1588.         IMG_GLOBAL_UNFINISHED,
  1589.         1,
  1590.         UI_POPUP_NOTIFYDURATION_TIME,
  1591.         ERROR_TONE);
  1592.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1593.     ebr_app_search_result_successful(FALSE);
  1594. }
  1595. /*****************************************************************************
  1596.  * FUNCTION
  1597.  *  ebr_app_display_pop_up_changed_screen_mode
  1598.  * DESCRIPTION
  1599.  *  Pop Up for Screen mode changed.
  1600.  * PARAMETERS
  1601.  *  screen_mode     [IN]        
  1602.  * RETURNS
  1603.  *  void
  1604.  *****************************************************************************/
  1605. void ebr_app_display_pop_up_changed_screen_mode(S32 screen_mode)
  1606. {
  1607.     /*----------------------------------------------------------------*/
  1608.     /* Local Variables                                                */
  1609.     /*----------------------------------------------------------------*/
  1610.     /*----------------------------------------------------------------*/
  1611.     /* Code Body                                                      */
  1612.     /*----------------------------------------------------------------*/
  1613.     if (screen_mode == 0)
  1614.     {
  1615.         DisplayPopup(
  1616.             (PU8) GetString(STR_FULL_SCREEN_OFF),
  1617.             IMG_GLOBAL_ACTIVATED,
  1618.             1,
  1619.             EBR_ST_NOTIFYDURATION,
  1620.             SUCCESS_TONE);
  1621.     }
  1622.     else
  1623.     {
  1624.         DisplayPopup((PU8) GetString(STR_FULL_SCREEN_ON), IMG_GLOBAL_ACTIVATED, 1, EBR_ST_NOTIFYDURATION, SUCCESS_TONE);
  1625.     }
  1626. }
  1627. /*****************************************************************************
  1628.  * FUNCTION
  1629.  *  ebr_app_display_pop_up_changed_auto_scroll
  1630.  * DESCRIPTION
  1631.  *  Pop Up for Auto Scroll changed.
  1632.  * PARAMETERS
  1633.  *  auto_scroll_mode        [IN]        
  1634.  * RETURNS
  1635.  *  void
  1636.  *****************************************************************************/
  1637. void ebr_app_display_pop_up_changed_auto_scroll(S32 auto_scroll_mode)
  1638. {
  1639.     /*----------------------------------------------------------------*/
  1640.     /* Local Variables                                                */
  1641.     /*----------------------------------------------------------------*/
  1642.     /*----------------------------------------------------------------*/
  1643.     /* Code Body                                                      */
  1644.     /*----------------------------------------------------------------*/
  1645.     if (auto_scroll_mode == 0)
  1646.     {
  1647.         DisplayPopup(
  1648.             (PU8) GetString(STR_AUTO_SCROLL_OFF),
  1649.             IMG_GLOBAL_ACTIVATED,
  1650.             1,
  1651.             EBR_ST_NOTIFYDURATION,
  1652.             SUCCESS_TONE);
  1653.     }
  1654.     else
  1655.     {
  1656.         DisplayPopup((PU8) GetString(STR_AUTO_SCROLL_ON), IMG_GLOBAL_ACTIVATED, 1, EBR_ST_NOTIFYDURATION, SUCCESS_TONE);
  1657.     }
  1658. }
  1659. /*****************************************************************************
  1660.  * FUNCTION
  1661.  *  ebr_app_display_pop_up_error_opening_book
  1662.  * DESCRIPTION
  1663.  *  Pop Up for Error Opening book
  1664.  * PARAMETERS
  1665.  *  void
  1666.  * RETURNS
  1667.  *  void
  1668.  *****************************************************************************/
  1669. void ebr_app_display_pop_up_error_opening_book(void)
  1670. {
  1671.     /*----------------------------------------------------------------*/
  1672.     /* Local Variables                                                */
  1673.     /*----------------------------------------------------------------*/
  1674.     /*----------------------------------------------------------------*/
  1675.     /* Code Body                                                      */
  1676.     /*----------------------------------------------------------------*/
  1677.     DisplayPopup((PU8) GetString(STR_ERROR_OPENINIG_BOOK), IMG_GLOBAL_UNFINISHED, 1, EBR_ST_NOTIFYDURATION, ERROR_TONE);
  1678. }
  1679. /*****************************************************************************
  1680.  * FUNCTION
  1681.  *  ebr_app_display_pop_up_empty_book
  1682.  * DESCRIPTION
  1683.  *  Pop Up for Error Opening book
  1684.  * PARAMETERS
  1685.  *  void
  1686.  * RETURNS
  1687.  *  void
  1688.  *****************************************************************************/
  1689. void ebr_app_display_pop_up_empty_book(void)
  1690. {
  1691.     /*----------------------------------------------------------------*/
  1692.     /* Local Variables                                                */
  1693.     /*----------------------------------------------------------------*/
  1694.     /*----------------------------------------------------------------*/
  1695.     /* Code Body                                                      */
  1696.     /*----------------------------------------------------------------*/
  1697.     DisplayPopup((PU8) GetString(STR_GLOBAL_EMPTY), IMG_GLOBAL_UNFINISHED, 1, EBR_ST_NOTIFYDURATION, ERROR_TONE);
  1698. }
  1699. /*****************************************************************************
  1700.  * FUNCTION
  1701.  *  ebr_app_display_pop_up_format_not_supported
  1702.  * DESCRIPTION
  1703.  *  Pop Up for File fomat not supported.
  1704.  * PARAMETERS
  1705.  *  void
  1706.  * RETURNS
  1707.  *  void
  1708.  *****************************************************************************/
  1709. void ebr_app_display_pop_up_format_not_supported(void)
  1710. {
  1711.     /*----------------------------------------------------------------*/
  1712.     /* Local Variables                                                */
  1713.     /*----------------------------------------------------------------*/
  1714.     /*----------------------------------------------------------------*/
  1715.     /* Code Body                                                      */
  1716.     /*----------------------------------------------------------------*/
  1717.     DisplayPopup(
  1718.         (U8*) GetString(STR_EBOOK_FORMAT_NOT_SUPPORTED),
  1719.         IMG_GLOBAL_UNFINISHED,
  1720.         1,
  1721.         UI_POPUP_NOTIFYDURATION_TIME,
  1722.         ERROR_TONE);
  1723. }
  1724. /*****************************************************************************
  1725.  * FUNCTION
  1726.  *  ebr_app_display_pop_up_default_settings_restored
  1727.  * DESCRIPTION
  1728.  *  Pop Up for Resore defauklt settings.
  1729.  * PARAMETERS
  1730.  *  void
  1731.  * RETURNS
  1732.  *  void
  1733.  *****************************************************************************/
  1734. void ebr_app_display_pop_up_default_settings_restored(void)
  1735. {
  1736.     /*----------------------------------------------------------------*/
  1737.     /* Local Variables                                                */
  1738.     /*----------------------------------------------------------------*/
  1739.     /*----------------------------------------------------------------*/
  1740.     /* Code Body                                                      */
  1741.     /*----------------------------------------------------------------*/
  1742.     DeleteUptoScrID(SCR_FMGR_EXPLORER);
  1743.     IsBackHistory = MMI_TRUE;
  1744.     DisplayPopupCallBack(
  1745.         (PU8) GetString(STR_SUCESSFULL_RESTORE_DEFAULT),
  1746.         IMG_GLOBAL_ACTIVATED,
  1747.         1,
  1748.         EBR_ST_NOTIFYDURATION,
  1749.         SUCCESS_TONE,
  1750.         ebr_entry_book_shel_screen);
  1751. }
  1752. /*****************************************************************************
  1753.  * FUNCTION
  1754.  *  ebr_app_display_pop_up_default_settings_not_restored
  1755.  * DESCRIPTION
  1756.  *  Pop Up for DDefauklt settings unsucessfull.
  1757.  * PARAMETERS
  1758.  *  void
  1759.  * RETURNS
  1760.  *  void
  1761.  *****************************************************************************/
  1762. void ebr_app_display_pop_up_default_settings_not_restored(void)
  1763. {
  1764.     /*----------------------------------------------------------------*/
  1765.     /* Local Variables                                                */
  1766.     /*----------------------------------------------------------------*/
  1767.     /*----------------------------------------------------------------*/
  1768.     /* Code Body                                                      */
  1769.     /*----------------------------------------------------------------*/
  1770.     DisplayPopup(
  1771.         (PU8) GetString(STR_UNSUCESSFULL_RESTORE_DEFAULT),
  1772.         IMG_GLOBAL_UNFINISHED,
  1773.         1,
  1774.         EBR_ST_NOTIFYDURATION + EBR_ST_NOTIFYDURATION,
  1775.         ERROR_TONE);
  1776.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1777. }
  1778. /*****************************************************************************
  1779.  * FUNCTION
  1780.  *  ebr_app_display_pop_up_default_settings_for_book_restored
  1781.  * DESCRIPTION
  1782.  *  Pop Up for Default settings restored.
  1783.  * PARAMETERS
  1784.  *  void
  1785.  * RETURNS
  1786.  *  void
  1787.  *****************************************************************************/
  1788. void ebr_app_display_pop_up_default_settings_for_book_restored(void)
  1789. {
  1790.     /*----------------------------------------------------------------*/
  1791.     /* Local Variables                                                */
  1792.     /*----------------------------------------------------------------*/
  1793.     /*----------------------------------------------------------------*/
  1794.     /* Code Body                                                      */
  1795.     /*----------------------------------------------------------------*/
  1796.     DisplayPopup(
  1797.         (PU8) GetString(STR_SUCESSFULL_RESTORE_DEFAULT),
  1798.         IMG_GLOBAL_ACTIVATED,
  1799.         1,
  1800.         EBR_ST_NOTIFYDURATION + EBR_ST_NOTIFYDURATION,
  1801.         SUCCESS_TONE);
  1802.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1803. }
  1804. /*****************************************************************************
  1805.  * FUNCTION
  1806.  *  ebr_app_delete_upto_open_book_screen_id
  1807.  * DESCRIPTION
  1808.  *  History Handling
  1809.  * PARAMETERS
  1810.  *  void
  1811.  * RETURNS
  1812.  *  void
  1813.  *****************************************************************************/
  1814. void ebr_app_delete_upto_open_book_screen_id(void)
  1815. {
  1816.     /*----------------------------------------------------------------*/
  1817.     /* Local Variables                                                */
  1818.     /*----------------------------------------------------------------*/
  1819.     /*----------------------------------------------------------------*/
  1820.     /* Code Body                                                      */
  1821.     /*----------------------------------------------------------------*/
  1822.     DeleteUptoScrID(EBOOK_OPEN_SCREENID);
  1823. }
  1824. /*****************************************************************************
  1825.  * FUNCTION
  1826.  *  ebr_app_go_back_history
  1827.  * DESCRIPTION
  1828.  *  History handling
  1829.  * PARAMETERS
  1830.  *  void
  1831.  * RETURNS
  1832.  *  void
  1833.  *****************************************************************************/
  1834. void ebr_app_go_back_history(void)
  1835. {
  1836.     /*----------------------------------------------------------------*/
  1837.     /* Local Variables                                                */
  1838.     /*----------------------------------------------------------------*/
  1839.     /*----------------------------------------------------------------*/
  1840.     /* Code Body                                                      */
  1841.     /*----------------------------------------------------------------*/
  1842.     GoBackHistory();
  1843. }
  1844. /*****************************************************************************
  1845.  * FUNCTION
  1846.  *  ebr_app_get_nfo_id_from_fmgr
  1847.  * DESCRIPTION
  1848.  *  Function to get the Nf o id for File manager
  1849.  * PARAMETERS
  1850.  *  file_name       [IN]        
  1851.  *  file_path       [IN]        
  1852.  *  file_ext        [IN]        
  1853.  *  is_short        [IN]        
  1854.  * RETURNS
  1855.  *  void
  1856.  *****************************************************************************/
  1857. S32 ebr_app_get_nfo_id_from_fmgr(S8 *file_name, S8 *file_path, S8 *file_ext, BOOL is_short)
  1858. {
  1859.     /*----------------------------------------------------------------*/
  1860.     /* Local Variables                                                */
  1861.     /*----------------------------------------------------------------*/
  1862.     S32 nfo_id = ebr_frm_fmgr_pre_entry_open_book(file_name, file_path, file_ext);
  1863.     /*----------------------------------------------------------------*/
  1864.     /* Code Body                                                      */
  1865.     /*----------------------------------------------------------------*/
  1866.     ebr_frm_fmgr_set_nfo_id(nfo_id);
  1867.     /* Check wether NFo file is present or not. If not then cretae a new nfo file */
  1868.     if (nfo_id > 0)
  1869.     {
  1870.         nfo_id = ebr_frm_check_nfo_file_present(nfo_id);
  1871.     }
  1872.     ebr_frm_fmgr_set_nfo_id(nfo_id);
  1873.     return nfo_id;
  1874. }
  1875. /*****************************************************************************
  1876.  * FUNCTION
  1877.  *  ebr_frm_open_book_from_file_manager
  1878.  * DESCRIPTION
  1879.  *  open a file from file manager
  1880.  * PARAMETERS
  1881.  *  file_name       [IN]        
  1882.  *  file_path       [IN]        
  1883.  *  is_short        [IN]        
  1884.  *  file_ext(?)     [IN]
  1885.  * RETURNS
  1886.  *  void
  1887.  *****************************************************************************/
  1888. void ebr_frm_open_book_from_file_manager(S8 *file_name, S8 *file_path, BOOL is_short)
  1889. {
  1890.     /*----------------------------------------------------------------*/
  1891.     /* Local Variables                                                */
  1892.     /*----------------------------------------------------------------*/
  1893.     S16 drive_type;
  1894.     S32 nfo_id;
  1895.     PS8 file_ext;
  1896.     ebr_memory_type_enum memory_selected;
  1897.     pBOOL is_file_valid = FALSE;
  1898.     /*----------------------------------------------------------------*/
  1899.     /* Code Body                                                      */
  1900.     /*----------------------------------------------------------------*/
  1901. pfnUnicodeStrcpy((PS8)g_ebook_app_cntx_p->ebr_file_mgr_file_path,(PS8)file_path);
  1902.     file_ext = mmi_fmgr_extract_ext_file_name((PS8) file_name);
  1903.     ebr_frm_fmgr_set_application_type();
  1904.     drive_type = ebr_fmgr_is_book_shelf_path(g_ebook_app_cntx_p->ebr_file_mgr_file_path);
  1905.     memory_selected = ebr_frm_get_drive_type();
  1906.     ebr_frm_fmgr_set_drive_type(drive_type);
  1907.     ebr_fmgr_set_file_name((PS8) file_name);
  1908.     ebr_frm_set_file_info_from_fmgr((S8*) file_name, g_ebook_app_cntx_p->ebr_file_mgr_file_path, file_ext, is_short);
  1909.     ebr_frm_fmgr_set_file_type((S8*) file_name);
  1910.     if (drive_type < 0)
  1911.     {
  1912.         nfo_id = -1;
  1913.     }
  1914.     else
  1915.     {
  1916.         nfo_id = ebr_app_get_nfo_id_from_fmgr((S8*) file_name, g_ebook_app_cntx_p->ebr_file_mgr_file_path, file_ext, is_short);
  1917.     }
  1918.     if (nfo_id > 0)
  1919.     {
  1920.         ebr_entry_open_book();
  1921.     }
  1922.     else
  1923.     {
  1924.         if (nfo_id == 0)    /* nfo file dose not exist // Ask the user if he wants to add this in the bookshelf */
  1925.         {
  1926.             ebr_app_add_to_book_shelf();
  1927.         }
  1928.         else    /* Means the book is not in the ebook Folder */
  1929.         {
  1930.         #ifndef MMI_ON_HARDWARE_P
  1931.             PopupNoSupport();
  1932.         #else /* MMI_ON_HARDWARE_P */ 
  1933.             ebr_frm_fmgr_set_drive_type(memory_selected);
  1934.             // Check here that the file is a valid file.
  1935.             // If not a valid file pop an error and no need to move the file
  1936.             is_file_valid = ebr_frm_check_file_validity(g_ebook_app_cntx_p->ebr_file_mgr_file_path, file_name);
  1937.             if (!is_file_valid)
  1938.             {
  1939.                 ebr_app_display_pop_up_format_not_supported();
  1940.             }
  1941.             else
  1942.             {
  1943.                 DisplayConfirm(
  1944.                     STR_GLOBAL_YES,
  1945.                     IMG_GLOBAL_YES,
  1946.                     STR_GLOBAL_NO,
  1947.                     IMG_GLOBAL_NO,
  1948.                     get_string(STR_ADD_TO_EBOOK_FOLDER),
  1949.                     IMG_GLOBAL_QUESTION,
  1950.                     WARNING_TONE);
  1951.                 SetLeftSoftkeyFunction(ebr_fmgr_move_to_ebook_folder, KEY_EVENT_UP);
  1952.                 SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1953.             }
  1954.         #endif /* MMI_ON_HARDWARE_P */ 
  1955.         }
  1956.     }
  1957. }
  1958. /*****************************************************************************
  1959.  * FUNCTION
  1960.  *  ebr_app_add_to_book_shelf
  1961.  * DESCRIPTION
  1962.  *  Add files from file manager to book shelf
  1963.  * PARAMETERS
  1964.  *  void
  1965.  * RETURNS
  1966.  *  void
  1967.  *****************************************************************************/
  1968. void ebr_app_add_to_book_shelf(void)
  1969. {
  1970.     /*----------------------------------------------------------------*/
  1971.     /* Local Variables                                                */
  1972.     /*----------------------------------------------------------------*/
  1973.     /*----------------------------------------------------------------*/
  1974.     /* Code Body                                                      */
  1975.     /*----------------------------------------------------------------*/
  1976.     if (ebr_frm_check_nfo_file_size())
  1977.     {
  1978.         DeleteNScrId(SCR_FMGR_APP_FILE_OPTION);
  1979.         ebr_app_dispaly_less_memory_pop_up();
  1980.     }
  1981.     else
  1982.     {
  1983.         switch (ebr_frm_add_to_book_shelf())
  1984.         {
  1985.             case EBR_FRM_NFO_CREATE_SUCCESS:
  1986.                 ebr_entry_open_book();
  1987.                 break;
  1988.             case EBR_FRM_NFO_CREATE_FILE_TYPE_NOT_SUPPORTED:
  1989.                 DeleteNScrId(SCR_FMGR_APP_FILE_OPTION);
  1990.                 ebr_app_display_pop_up_format_not_supported();
  1991.                 break;
  1992.             case EBR_FRM_EMPTY_BOOK:
  1993.                 DeleteNScrId(SCR_FMGR_APP_FILE_OPTION);
  1994.                 ebr_app_display_pop_up_empty_book();
  1995.                 break;
  1996.             default:
  1997.                 DeleteNScrId(SCR_FMGR_APP_FILE_OPTION);
  1998.                 ebr_app_display_pop_up_error_opening_book();
  1999.                 break;
  2000.         }
  2001.     }
  2002. }
  2003. /*****************************************************************************
  2004.  * FUNCTION
  2005.  *  ebr_display_error_pop_up
  2006.  * DESCRIPTION
  2007.  *  
  2008.  * PARAMETERS
  2009.  *  void
  2010.  * RETURNS
  2011.  *  void
  2012.  *****************************************************************************/
  2013. void ebr_display_error_pop_up(S32 result)
  2014. {
  2015.     /*----------------------------------------------------------------*/
  2016.     /* Local Variables                                                */
  2017.     /*----------------------------------------------------------------*/
  2018.     /*----------------------------------------------------------------*/
  2019.     /* Code Body                                                      */
  2020.     /*----------------------------------------------------------------*/
  2021.     DisplayPopup((PU8) GetString(GetFileSystemErrorString(result)), IMG_GLOBAL_ERROR, 0, 1000, ERROR_TONE);
  2022.     return;
  2023. }
  2024. /*****************************************************************************
  2025.  * FUNCTION
  2026.  *  ebr_app_dispaly_less_memory_pop_up
  2027.  * DESCRIPTION
  2028.  *  
  2029.  * PARAMETERS
  2030.  *  void
  2031.  * RETURNS
  2032.  *  void
  2033.  *****************************************************************************/
  2034. void ebr_app_dispaly_less_memory_pop_up(void)
  2035. {
  2036.     /*----------------------------------------------------------------*/
  2037.     /* Local Variables                                                */
  2038.     /*----------------------------------------------------------------*/
  2039.     /*----------------------------------------------------------------*/
  2040.     /* Code Body                                                      */
  2041.     /*----------------------------------------------------------------*/
  2042.     DisplayPopup((PU8) GetString(STR_EBOOK_MEMORY_LESS), IMG_GLOBAL_ERROR, 0, 1000, ERROR_TONE);
  2043. }
  2044. #ifdef __MMI_LANG_HINDI__
  2045. /*****************************************************************************
  2046.  * FUNCTION
  2047.  *  ebr_app_show_string_incomplete_pop_up
  2048.  * DESCRIPTION
  2049.  *  Display incomplete popup
  2050.  * PARAMETERS
  2051.  *  void
  2052.  * RETURNS
  2053.  *  void
  2054.  *****************************************************************************/
  2055. void ebr_app_show_string_incomplete_pop_up(void)
  2056. {
  2057.     /*----------------------------------------------------------------*/
  2058.     /* Local Variables                                                */
  2059.     /*----------------------------------------------------------------*/
  2060.     /*----------------------------------------------------------------*/
  2061.     /* Code Body                                                      */
  2062.     /*----------------------------------------------------------------*/
  2063.     DisplayPopup(
  2064.         (PU8) GetString(STR_INCOMPLETE_SEARCH_STRING),
  2065.         IMG_GLOBAL_WARNING,
  2066.         1,
  2067.         EBR_ST_NOTIFYDURATION,
  2068.         WARNING_TONE);
  2069. }
  2070. #endif /* __MMI_LANG_HINDI__ */ 
  2071. /*****************************************************************************
  2072.  * FUNCTION
  2073.  *  ebr_app_clear_all_key_handlers
  2074.  * DESCRIPTION
  2075.  *  Clear All key Handlers
  2076.  * PARAMETERS
  2077.  *  void
  2078.  * RETURNS
  2079.  *  void
  2080.  *****************************************************************************/
  2081. void ebr_app_clear_all_key_handlers(void)
  2082. {
  2083.     /*----------------------------------------------------------------*/
  2084.     /* Local Variables                                                */
  2085.     /*----------------------------------------------------------------*/
  2086.     /*----------------------------------------------------------------*/
  2087.     /* Code Body                                                      */
  2088.     /*----------------------------------------------------------------*/
  2089.     ClearKeyEvents();
  2090.     ClearAllKeyHandler();
  2091.     ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
  2092. }
  2093. /*****************************************************************************
  2094.  * FUNCTION
  2095.  *  ebr_app_clear_all_key_handlers
  2096.  * DESCRIPTION
  2097.  *  Highlight handler of ebook setting screen
  2098.  * PARAMETERS
  2099.  *  void
  2100.  * RETURNS
  2101.  *  void
  2102.  *****************************************************************************/
  2103. void mmi_ebr_highlight_setting(S32 index)
  2104. {
  2105.     if (index == EBR_TOTAL_NUMBER_OF_ITEM_BKSHLF - 1)
  2106.     {
  2107.         ChangeLeftSoftkey(STR_GLOBAL_EDIT, 0);
  2108.         SetLeftSoftkeyFunction(mmi_ebr_entry_select_drive, KEY_EVENT_UP);
  2109.     }
  2110.     else
  2111.     {
  2112.         ChangeLeftSoftkey(NULL, 0);
  2113.         SetLeftSoftkeyFunction(NULL, KEY_EVENT_UP);
  2114.     }
  2115. }
  2116. void mmi_ebr_entry_select_drive(void)
  2117. {        
  2118.     mmi_fmgr_sel_drv_and_enter(APP_EXTRA, mmi_ebr_save_drive_selection, g_ebookset_cntx_p->inlineHighligtItemSelectMemory);    
  2119. }
  2120. void mmi_ebr_save_drive_selection(S8 drive_letter)
  2121. {
  2122.     g_ebookset_cntx_p->inlineHighligtItemSelectMemory = drive_letter;
  2123. }
  2124. #endif /* __MMI_EBOOK_READER__ */