如何自定义FTO Q03C Browser的九宫格shortcut

1)在Vapp_Browser.res中添加图片资源 
<IMAGE id="IMG_ID_VAPP_BRW_S1">RES_IMG_ROOT"\\\\Browser\\\\brw_img1.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S2">RES_IMG_ROOT"\\\\Browser\\\\brw_img2.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S3">RES_IMG_ROOT"\\\\Browser\\\\brw_img3.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S4">RES_IMG_ROOT"\\\\Browser\\\\brw_img4.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S5">RES_IMG_ROOT"\\\\Browser\\\\brw_img5.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S6">RES_IMG_ROOT"\\\\Browser\\\\brw_img6.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S7">RES_IMG_ROOT"\\\\Browser\\\\brw_img7.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S8">RES_IMG_ROOT"\\\\Browser\\\\brw_img8.png"</IMAGE> 
<IMAGE id="IMG_ID_VAPP_BRW_S9">RES_IMG_ROOT"\\\\Browser\\\\brw_img9.png"</IMAGE>
2)把相关图片放到\plutommi\Customer\Images下对应分支的压缩包中
3)修改nvram 
  
3.1 common_nvram_editor_data_Item.h
#define NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_LID_VERNO "001" 
 #define NVRAM_EF_BRW_LOCAL_SHORTCUTS_LIST_LID_VERNO "001"
.... 
typedef struct 

 kal_uint8 id; 
 nvram_brw_hist_title_struct title; 
 kal_uint8 url[NVRAM_BRW_ADDRESS_HISTORY_MAX_URL_LENGTH]; 
 kal_uint16 points; 
 kal_uint16 image_id; 
 kal_uint32 time; 
 kal_uint8 is_locked; 
 kal_uint8 is_fac;  
} nvram_brw_global_shortcuts_item_struct;
typedef struct 

 nvram_brw_global_shortcuts_item_struct shortcut_list[GLOBAL_SHORTCUT_ENTERIES_PER_RECORD]; 
}nvram_wap_global_shortcuts_list_struct;
typedef struct 

 kal_uint8 id; 
 nvram_brw_hist_title_struct title; 
 kal_uint8 url[NVRAM_BRW_ADDRESS_HISTORY_MAX_URL_LENGTH]; 
 kal_uint16 points; 
 kal_uint32 time; 
} nvram_brw_local_shortcuts_item_struct;
-------------- 
3.2 nvram_common_config.c 
nvram_wap_global_shortcuts_list_struct const
COMMON_NVRAM_EF_WAP_GLOBAL_SHORTCUT_LIST_DEFAULT[NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_RECORDS] =  

 { 
 0, {0, "1"}, "http://wap.baidu.com/", 0, 0, 0, 0,1, 
 0, {0, "2"}, "http://wap.sina.cn", 0, 0, 0, 0,2, 
 0, {0, "3"}, "http://3g.qq.com/", 0, 0, 0, 0,3, 
 0, {0, "4"}, "http://m.taobao.com/sprefer=cabb01&ttid=cabb01", 0, 0, 0, 0,4, 
 0, {0, "5"}, "http://3g.163.com/w/", 0, 0, 0, 0,5, 
 0, {0, "6"}, "http://3g.renren.com/ep.doc=2001501", 0, 0, 0, 0,6 
 }, 
 { 
 0, {0, "7"}, "http://wap.sohu.com/v=1&fr=bubu_mtk_0804", 0, 0, 0, 0,7, 
 0, {0, "8"}, "http://wap.monternet.com", 0, 0, 0, 0,8, 
 0, {0, "9"}, "http://port.bbk.com/serviceaddress/", 0, 0, 0, 0,9, 
 0, {0, ""}, "", 0, 0, 0, 0,0, 
 0, {0, ""}, "", 0, 0, 0, 0,0, 
 0, {0, ""}, "", 0, 0, 0, 0,0 
 } 
};
....
,{ 
 NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_LID, 
 NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_SIZE, 
 NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_RECORDS, 
 NVRAM_NORMAL(COMMON_NVRAM_EF_WAP_GLOBAL_SHORTCUT_LIST_DEFAULT), 
 NVRAM_ATTR_AVERAGE|NVRAM_ATTR_MULTI_DEFAULT, 
 NVRAM_CATEGORY_USER, 
 "MP52", 
 VER(NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_LID), 
 "Global Shortcuts", 
 NVRAM_APP_RESERVED 
 }
... 
------------------ 
3.3 nvram_common_defs.h
 
#define GLOBAL_SHORTCUT_ENTERIES_PER_RECORD ((2*1024)/
sizeof(nvram_brw_global_shortcuts_item_struct)) 
#define NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_SIZE (sizeof(nvram_brw_global_shortcuts_item_struct) *
GLOBAL_SHORTCUT_ENTERIES_PER_RECORD)
 
#define NVRAM_EF_BRW_GLOBAL_SHORTCUTS_LIST_RECORDS 
((CUSTOM_WAP_CFG_N_NBR_GLOBAL_SHORTCUTS%GLOBAL_SHORTCUT_ENTERIES_PER_RECORD) 
((CUSTOM_WAP_CFG_N_NBR_GLOBAL_SHORTCUTS/GLOBAL_SHORTCUT_ENTERIES_PER_RECORD) +1) :
(CUSTOM_WAP_CFG_N_NBR_GLOBAL_SHORTCUTS/GLOBAL_SHORTCUT_ENTERIES_PER_RECORD))
#define LOCAL_SHORTCUT_ENTERIES_PER_RECORD ((2*1024)/
sizeof(nvram_brw_local_shortcuts_item_struct))
 
#define NVRAM_EF_BRW_LOCAL_SHORTCUTS_LIST_SIZE (sizeof(nvram_brw_local_shortcuts_item_struct) *
LOCAL_SHORTCUT_ENTERIES_PER_RECORD)
 
#define NVRAM_EF_BRW_LOCAL_SHORTCUTS_LIST_RECORDS
((CUSTOM_WAP_CFG_N_NBR_LOCAL_SHORTCUTS%LOCAL_SHORTCUT_ENTERIES_PER_RECORD) 
((CUSTOM_WAP_CFG_N_NBR_LOCAL_SHORTCUTS/LOCAL_SHORTCUT_ENTERIES_PER_RECORD) +1) :
(CUSTOM_WAP_CFG_N_NBR_LOCAL_SHORTCUTS/LOCAL_SHORTCUT_ENTERIES_PER_RECORD))
------------------- 
4).修改Vapp_brw_main.c  
void VappBrowserPage::getHomepageShortcutInfo(VfxU8 index, VfxImage &shortcutImage, VfxWString
&shotcutTitle, VfxBool &isLocked) 

 if(!srv_brw_is_shortcut_index_empty(index)) 
 { 
 nvram_brw_global_shortcuts_item_struct* shortcutItem = srv_brw_get_global_shortcut(index); 
 isLocked = (VfxBool)shortcutItem->is_locked; 
 if(strlen((S8*)shortcutItem->title.title)) 
 { 
 VfxWChar *textBuff = shotcutTitle.lockBuf((SRV_BRW_MAX_TITLE_LENGTH + 1) *ENCODING_LENGTH); 
 mmi_chset_utf8_to_ucs2_string((U8*)textBuff,  
(SRV_BRW_MAX_TITLE_LENGTH + 1) * ENCODING_LENGTH,  
(U8*) shortcutItem->title.title); 
 shotcutTitle.unlockBuf(); 
 } 
 else 
 { 
 shotcutTitle.format("%s", shortcutItem->url); 
 } 
 if(m_isMassStorageMode) 
 { 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_SHORTCUTS_ICON); 
 } 
 else if(shortcutItem->is_fac!=0) 
 { 
 switch(shortcutItem->is_fac) 
 { 
 case 1: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S1); 
 break; 
 case 2: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S2); 
 break; 
 case 3: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S3); 
 break; 
 case 4: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S4); 
 break; 
 case 5: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S5); 
 break; 
 case 6: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S6); 
 break; 
 case 7: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S7); 
 break; 
 case 8: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S8); 
 break; 
 case 9: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_S9); 
 break; 
 default: 
 shortcutImage.setResId(IMG_ID_VAPP_BRW_SHORTCUTS_ICON); 
 break; 
  
 } 
 } 
 else 
 { 
 ..... 
.....
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值