예제 #1
0
void win_pvr_vol_invalid_msg()
{
    UINT8 back_saved;
    win_popup_choice_t choice;
	
	if(storage_get_volume_count() == 0)
		return;

	if(m_pvr_vol_error < -1)
	{
		char hint[128];
		char name_old[64];
		char name_new[64];
		UINT8 device_type = sys_data_get_storage_type();
		UINT8 device_sub = sys_data_get_storage_sub_dev();
		UINT8 device_part = sys_data_get_storage_partition();

		storage_type2osd_string2(device_type, device_sub, device_part,name_old);
		storage_type2osd_string2(m_sto_device_type, m_sto_device_sub, m_sto_device_part,name_new);
		if(m_pvr_vol_error == -2)
			sprintf(hint, "Cann't find last PVR %s, auto select to %s!",name_old, name_new);
		else if(m_pvr_vol_error == -3)
			sprintf(hint, "Cann't find any PVR partition!");
		else
			ASSERT(0);
		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		win_compopup_set_msg(hint, NULL, 0);
		win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
		choice = win_compopup_open_ext(&back_saved);
		if(choice == WIN_POP_CHOICE_YES)
		{
			sys_data_set_storage(m_sto_device_type, m_sto_device_sub, m_sto_device_part);
		}
	}
}
예제 #2
0
void save_detitle()
{
    UINT8 back_saved,deldtl,i;
    UINT16 ret2;
    for(i=0; i<CDCA_MAXNUM_DETITLE+1; i++)
    {
        if(del_detitle_idx[i]==1)
            break;
    }
    if(i==CDCA_MAXNUM_DETITLE+1)
        return;
    win_compopup_init(WIN_POPUP_TYPE_OKNO);
    win_compopup_set_msg(NULL, NULL, RS_DETITLE_DELPOP_CURRENT);
    win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
    ret2= win_compopup_open_ext(&back_saved);
    if (ret2 == WIN_POP_CHOICE_YES)
    {
        //to do
        for(i=0; i<CDCA_MAXNUM_DETITLE+1; i++)
        {
            if(del_detitle_idx[i]==1)
            {
                deldtl = CDCASTB_DelDetitleChkNum(current_operator_ID, Detitle_Chknum[i]);
                if (FALSE == deldtl)
                {
                    win_popup_msg(NULL, NULL, RS_OPERATION_ERROR);
                    break;
                }
            }
        }
    }
}
예제 #3
0
static PRESULT otaupg_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 back_saved;
	INT32 btn_state;
	win_popup_choice_t choice;
	lpVSCR apvscr;

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			/* 0 - stop , 1 - exit , 2 - download 3 - burnflash 4 - reboot*/
			btn_state = win_otaup_get_btn_state();
			apvscr = OSD_GetTaskVscr(osal_task_get_current_id());
			switch(btn_state)
			{
			case 0:
				if(!ota_user_stop)
				{
					ota_stop_service();
					ota_user_stop = 1;					
				}
				break;
			case 1:
				ret = PROC_LEAVE;
				break;
			case 2:
				win_otaupg_download();
				win_otaup_set_btn_msg_display(TRUE);
				OSD_UpdateVscr(apvscr);
				break;
			case 3:
			#ifndef _BUILD_OTA_E_				
				win_compopup_init(WIN_POPUP_TYPE_OKNO);
				win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_TO_BURN_THE_FLASH);
				win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
				choice = win_compopup_open_ext(&back_saved);
				//win_compopup_smsg_restoreback();
				if(choice == WIN_POP_CHOICE_YES)
			#endif
				{
					win_otaupg_burnflash();
					win_otaup_set_btn_msg_display(TRUE);
					OSD_UpdateVscr(apvscr);
				}
				break;
			case 4:
				win_otaupg_reboot();
				break;
			}
		}
		break;
	}

	return ret;
}
예제 #4
0
void win_pvr_vol_save()
{
	char new_volume[32];
    UINT8 back_saved;
    win_popup_choice_t choice;
	PVR_VOL_INFO volume;

	if(m_volume_index < 0 || storage_get_volume_count()== 0)
		return;

	if(storage_get_pvr_volume(m_volume_index, &volume)<0)
		return;

	if( volume.type == m_sto_device_type &&
		volume.sub_type == m_sto_device_sub &&
		volume.partition_idx == m_sto_device_part)
	{				
		return;
	}

	win_compopup_init(WIN_POPUP_TYPE_OKNO);
	win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_TO_CHANGE_PVR_PARTION);
	win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
	choice = win_compopup_open_ext(&back_saved);
	if (choice == WIN_POP_CHOICE_YES)
	{
		if(storage_change_pvr_volume(volume.type,volume.sub_type,volume.partition_idx)>=0)
			sys_data_set_storage(volume.type,volume.sub_type,volume.partition_idx);
	}
}
예제 #5
0
BOOL storage_switch_sd_ide_proc(UINT8 sd_active, BOOL first)
{
	char hint[64];
    UINT8 back_saved;
    win_popup_choice_t choice = WIN_POP_CHOICE_YES;
	
	if (first)
	{
		UINT32 cnt = osal_get_tick();
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		sprintf(hint, "Please wait %s initial",sd_active?"SD Card":"Hard Disk");
		win_compopup_set_msg(hint, NULL, 0);
		win_compopup_open();
		storage_switch_sd_ide(sd_active, TRUE);
		while(osal_get_tick()-cnt < 2000)
		{
			osal_task_sleep(10);
		}
		win_msg_popup_close();
		return TRUE;
	}
	else
	{
		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		sprintf(hint, "Are you sure to switch to %s?",sd_active?"SD Card":"Hard Disk");
		win_compopup_set_msg(hint, NULL, 0);		
		win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
		choice = win_compopup_open_ext(&back_saved);
		if (choice == WIN_POP_CHOICE_YES)
		{
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg("Please wait, maybe it will take a long time!", NULL, 0);
			win_compopup_open();
			storage_switch_sd_ide(sd_active, first);
			sys_data_set_sd_ide_statue(sd_active);
			win_msg_popup_close();
			return TRUE;
		}
	}

	return FALSE;
}
예제 #6
0
void cti_chnchg_function()
{
	UINT16 chn_idx=0xffff;
	date_time local_time;
	CTI_CHN_CHG_CONTENT chnchg_data;
	UINT8 save;
	BOOL need_change = TRUE,info_changed = FALSE;
	win_popup_choice_t sel;
	UINT16 string[CHANNEL_JUMP_STR_LEN_MAX/2+1];

	INT sec = 0;
	if(pre_channel_index!=sys_data_get_cur_group_cur_mode_channel())//换台了
	{
		cti_chnchg_para_reset();
	}

	if(!get_cti_chnchg_flg())
	{
		return;
	}

	MEMSET(&local_time,0,sizeof(date_time));
	get_local_time(&local_time);

	MEMSET(&chnchg_data,0,sizeof(CTI_CHN_CHG_CONTENT));
	get_cti_chnchg_data(&chnchg_data);

	//显示内容有没有变化
	if(MEMCMP(pre_info,chnchg_data.pString,sizeof(chnchg_data.pString))==0)
	{
		info_changed = FALSE;
	}
	else
	{
		info_changed = TRUE;
	}

	chn_idx=GetPlayChannelID(chnchg_data.bType,chnchg_data.wPart1,
							chnchg_data.wPart2,chnchg_data.wPart3,chnchg_data.wPart4);

	if((chnchg_data.bStatus==0)
		||(chnchg_data.bStatus==2))//立即跳转
	{
		set_cti_chnchg_flg(FALSE);
	}
	else//时间跳转
	{
		if(api_compare_day_time_ext(&(chnchg_data.stStartTime),&local_time)>=0)	//跳转时间没有到
		{
			need_change = FALSE;
		}
		else if(api_compare_day_time_ext(&(chnchg_data.stEndTime),&local_time)>=0)	//正常跳转
		{
			sec = cti_mktime(&(chnchg_data.stEndTime),&local_time);
		}
		else//控制时间已过
		{
			need_change = FALSE;
			set_cti_chnchg_flg(FALSE);
			return;
		}
	}

	if((chn_idx!=0xffff)
		&&(chn_idx!=sys_data_get_cur_group_cur_mode_channel())
		&&need_change)
	{

		if(chnchg_data.bStatus==0)//强制立即跳转
		{
			BackToFullScrPlay();
			win_compopup_init ( WIN_POPUP_TYPE_SMSG );
			win_compopup_set_frame ( 100, 140, 400, 120);
			//win_compopup_set_frame(100, 180, 400, 80);
			win_compopup_set_msg_ext(NULL,NULL, RS_CTI_CHANNEL_JUMP);
			win_compopup_open_ext ( &save );
			osal_task_sleep(3000);
			win_compopup_close();
		}
		else if(chnchg_data.bStatus==1)//强制时间跳转
		{
			if(!info_showed)
			{
				BackToFullScrPlay();
				win_compopup_init ( WIN_POPUP_TYPE_SMSG );
				win_compopup_set_frame ( 100, 140, 400, 120);
				//win_compopup_set_frame(100, 180, 400, 80);
				win_compopup_set_msg_ext(NULL,NULL, RS_CTI_CHANNEL_JUMP);
				win_compopup_open_ext ( &save );
				osal_task_sleep(3000);
				win_compopup_close();
				info_showed = TRUE;
			}
		}
		else if(chnchg_data.bStatus==2)//用户选择立即跳转
		{
			if((sys_data_get_cur_group_cur_mode_channel()==chn_idx_sel_no)
				&&(!info_changed))
			{
				return;
			}
			else
			{
				BackToFullScrPlay();

				MEMSET(string,0,sizeof(string));
				MEMSET(pre_info,0,sizeof(pre_info));
#ifdef GB2312_SUPPORT
				convert_gb2312_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2);
#else
				dvb_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2, 0);
#endif
				MEMCPY(pre_info,chnchg_data.pString,sizeof(chnchg_data.pString));
				win_compopup_init ( WIN_POPUP_TYPE_OKNO);				
				//win_compopup_set_frame ( 100, 120, 400, 160);
				win_compopup_set_frame ( 100, 100, 400, 160);
				win_compopup_set_msg_ext(NULL, string, 0);
				win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
				sel = win_compopup_open_ext_timeout(&save, 5);
				if (sel == WIN_POP_CHOICE_NO)
				{
					chn_idx_sel_no = sys_data_get_cur_group_cur_mode_channel();
					return;//do not change
				}	
				//choice yes,so change channel
			}
		}
		else if(chnchg_data.bStatus==3)//用户选择按时间跳转
		{
			if((!info_showed)||info_changed)//没有显示过或者字符变化了
			{
				BackToFullScrPlay();

				MEMSET(string,0,sizeof(string));
				MEMSET(pre_info,0,sizeof(pre_info));
#ifdef GB2312_SUPPORT				
				convert_gb2312_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2);
#else
				dvb_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2, 0);
#endif
				MEMCPY(pre_info,chnchg_data.pString,sizeof(chnchg_data.pString));
				win_compopup_init ( WIN_POPUP_TYPE_OKNO);
				win_compopup_set_frame ( 100, 100, 400, 160);
				win_compopup_set_msg_ext(NULL, string, 0);
				win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
				sel = win_compopup_open_ext_timeout(&save, sec);
				choiced_yes = FALSE;
				info_showed = TRUE;
				if ((sel == WIN_POP_CHOICE_NO) || (sel == WIN_POP_CHOICE_TIMEOUT))
				{
					return;//do not change
				}	
				choiced_yes = TRUE;
			}
			else if(choiced_yes==TRUE)//用户选择yes,则继续判断是否需要跳转
			{

			}
			else
			{
				return;//提示过,不再提醒,也不换台
			}

		}

		api_play_channel(chn_idx, TRUE, TRUE, FALSE);
	}
}
예제 #7
0
static PRESULT tms_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact;
	UINT32 i;
	BOOL subt_flag;
	CONTAINER* cont = (CONTAINER*)pObj;
	UINT8	id = OSD_GetObjID(pObj);
    char new_volume[16];
	
	switch(event)
	{
	case EVN_PRE_OPEN:
		wincom_open_subtitle((POBJECT_HEAD)&g_win_timeshift,RS_DVR_CONFIGURATION, 0);
		win_tms_set_string(sys_data_get_tms(),&tms_item_txtset1);
		win_tms_set_string(sys_data_get_tms2rec(),&tms_item_txtset2);		
        win_set_rec_type_string(sys_data_get_rec_type(),&tms_item_txtset3);        
#if (defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT))		
		win_pvr_vol_init();
        win_set_vol_string(&tms_item_txtset4);
#endif
		tms_set_tms2rec_item_active(FALSE);
#ifdef NEW_DEMO_FRAME
		OSD_SetContainerFocus(&g_win_timeshift, 4);
		remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con1, CON_H + CON_GAP);
		remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con2, CON_H + CON_GAP);
		remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con3, CON_H + CON_GAP);
#else
		OSD_SetContainerFocus(&g_win_timeshift, 1);
#endif
		break;
	
	case EVN_POST_OPEN:
#if(defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT))
		win_pvr_vol_invalid_msg();
#endif
		break;
		
	case EVN_PRE_CLOSE:
        *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG;
#if (defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT))
		win_pvr_vol_save();
#endif
		sys_data_save(1);
		break;

	case EVN_POST_CLOSE:
		break;
    case EVN_UNKNOWN_ACTION:
        if (api_pvr_is_record_active())
            break;
        if (sys_data_get_tms() == 0)
        {
            win_popup_choice_t choice;
            UINT8 back_saved;

            win_compopup_init(WIN_POPUP_TYPE_OKNO);
            win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_TO_ENTER_RECORD_TP_MODE);
            if (pvr_r_get_record_all())
                win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
            else
                win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
            choice = win_compopup_open_ext(&back_saved);
            if(choice == WIN_POP_CHOICE_YES)
            {
                pvr_r_set_record_all(TRUE);
            }   
            else if (choice == WIN_POP_CHOICE_NO)
            {
                pvr_r_set_record_all(FALSE);
            }

        }
		else
		{
#ifdef PVR3_SUPPORT
            win_popup_choice_t choice;
            UINT8 back_saved;

            win_compopup_init(WIN_POPUP_TYPE_OKNO);
            win_compopup_set_msg(NULL, NULL, RS_CONTINUE_TMS_SUPPORT);
            if (pvr_r_get_record_all())
                win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
            else
                win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
            choice = win_compopup_open_ext(&back_saved);
            if(choice == WIN_POP_CHOICE_YES)
            {
                pvr_info.continue_tms = 1;
            }   
            else
            {
                pvr_info.continue_tms = 0;
            }
#endif
		}
       {
            win_popup_choice_t choice;
            UINT8 back_saved;

            win_compopup_init(WIN_POPUP_TYPE_OKNO);
            win_compopup_set_msg(NULL, NULL, RS_RECORD_CA_PROGRAM_IN_DESCRAMBLED_FORMAT);
            if (sys_data_get_scramble_record_mode())
                win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
            else
                win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
            choice = win_compopup_open_ext(&back_saved);
            if (choice == WIN_POP_CHOICE_YES)
            {
                sys_data_set_scramble_record_mode(0);
            }
            else if (choice == WIN_POP_CHOICE_NO)
            {
                sys_data_set_scramble_record_mode(1);
                pvr_r_set_scramble();
            }
        }
        break;
	}
	return ret;
}
예제 #8
0
static PRESULT factoryset_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;	
	VACTION unact;
	UINT8 bID,back_saved;
	UINT32 chunk_id, default_db_addr, default_db_len;
	S_NODE  s_node;
	bID = OSD_GetObjID(pObj);
	INT16 	i,n;
	UINT8 back_saved1;
	UINT16 sat_id;//-a by wangyang 2011-11-03 for factory set del sat program
	win_popup_choice_t choice = WIN_POP_CHOICE_NO;
	
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			switch(bID)
			{
				case IDC_CON1:
					win_compopup_init(WIN_POPUP_TYPE_OKNO);
					win_compopup_set_msg(NULL, NULL, RS_DISPLAY_SURE_TO_DELETE);
					win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
					choice = win_compopup_open_ext(&back_saved1);
					if(choice == WIN_POP_CHOICE_YES)
					{
						win_compopup_init(WIN_POPUP_TYPE_SMSG);
						win_compopup_set_msg(NULL,NULL, RS_MSG_SAVING_DATA);
						win_compopup_open_ext(&back_saved);

						chunk_id = 0x03FC0100;
						api_get_chuck_addlen(chunk_id, &default_db_addr, &default_db_len);
						set_default_value(DEFAULT_ALL_PROG,default_db_addr + 16);

						sys_data_factroy_init(); 
						sys_data_set_cur_chan_mode(TV_CHAN);
						sys_data_save(TRUE);
						sys_data_load();
						if(GetMuteState())
							SetMuteOnOff(FALSE);
						if(GetPauseState())
							SetPauseOnOff(FALSE);
						win_compopup_smsg_restoreback();
					#ifdef LOGO_IN_RAM
						api_show_Test_logo_2(MM_tool3,get_logo_h_file_size(3));
                           	 	#endif
						OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
						wincom_open_subtitle((POBJECT_HEAD)&win_factoryset_con,RS_TOOLS_FACTORY_SETTING, 0);
						OSD_TrackObject( (POBJECT_HEAD) &win_factoryset_con, C_UPDATE_ALL);
					#if defined(ORDER_GZ1010010)||defined(ORDER_GZ1011005)||defined(ORDER_GZ1104005)	
						system_config.tv_scan_mode = 0;
					#endif	

						// Restart the unit after Factory Default in any case
						osal_task_sleep(1200);
						power_off_process();
						power_on_process();
					}
					break;
				case IDC_CON2:
					win_compopup_init(WIN_POPUP_TYPE_OKNO);
					win_compopup_set_msg(NULL, NULL, RS_DISPLAY_SURE_TO_DELETE);
					win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
					choice = win_compopup_open_ext(&back_saved1);
					if(choice == WIN_POP_CHOICE_YES)
					{
						win_compopup_init(WIN_POPUP_TYPE_SMSG);
						win_compopup_set_msg(NULL,NULL, RS_MSG_SAVING_DATA);
						win_compopup_open_ext(&back_saved);
						osal_task_sleep(1500);
						si_monitor_off(0xFFFFFFFF);
						n = get_sat_num(VIEW_ALL);
					
						recreate_prog_view(VIEW_ALL | PROG_TV_MODE,0);
						for(i=0;i<n;i++)
						{
							get_sat_at(i, VIEW_ALL,&s_node);
							del_child_prog(TYPE_SAT_NODE, s_node.sat_id);
						}
					
						update_data();
						sys_data_check_channel_groups();	
						win_compopup_smsg_restoreback();

						// Restart the unit after Factory Default in any case
						osal_task_sleep(1200);
						power_off_process();
						power_on_process();
					}
                        		break;
				case IDC_CON3:
					win_compopup_init(WIN_POPUP_TYPE_OKNO);
					win_compopup_set_msg(NULL, NULL, RS_DISPLAY_SURE_TO_DELETE);
					win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
					choice = win_compopup_open_ext(&back_saved1);
					if(choice == WIN_POP_CHOICE_YES)
					{
						win_compopup_init(WIN_POPUP_TYPE_SMSG);
						win_compopup_set_msg(NULL,NULL, RS_MSG_SAVING_DATA);
						win_compopup_open_ext(&back_saved);
 						osal_task_sleep(1500);

						si_monitor_off(0xFFFFFFFF);
						n = get_sat_num(VIEW_ALL);
					
						recreate_prog_view(VIEW_ALL | PROG_RADIO_MODE,0);
						for(i=0;i<n;i++)
						{
							get_sat_at(i, VIEW_ALL,&s_node);
							del_child_prog(TYPE_SAT_NODE, s_node.sat_id);
						}
					
						update_data();
						sys_data_check_channel_groups();	
						win_compopup_smsg_restoreback();

						// Restart the unit after Factory Default in any case
						osal_task_sleep(1200);
						power_off_process();
						power_on_process();
					}
                        		break;
				case IDC_CON4:
					win_compopup_init(WIN_POPUP_TYPE_OKNO);
					win_compopup_set_msg(NULL, NULL, RS_DISPLAY_SURE_TO_DELETE);
					win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
					choice = win_compopup_open_ext(&back_saved1);
					if(choice == WIN_POP_CHOICE_YES)
					{
						win_compopup_init(WIN_POPUP_TYPE_SMSG);
						win_compopup_set_msg(NULL,NULL, RS_MSG_SAVING_DATA);
						win_compopup_open_ext(&back_saved);

						sys_data_factroy_init(); 
						sys_data_set_cur_chan_mode(TV_CHAN);
						sys_data_save(TRUE);
						sys_data_load();
			        		win_compopup_smsg_restoreback();
					#ifdef LOGO_IN_RAM
				   		api_show_Test_logo_2(MM_tool3,get_logo_h_file_size(3));
                              	#endif
						OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
						wincom_open_subtitle((POBJECT_HEAD)&win_factoryset_con,RS_TOOLS_FACTORY_SETTING, 0);
						OSD_TrackObject( (POBJECT_HEAD) &win_factoryset_con, C_UPDATE_ALL);

						// Restart the unit after Factory Default in any case
						osal_task_sleep(1200);
						power_off_process();
						power_on_process();
					}
                    			break;
//-a by wangyang 2011-11-03 for factory set del sat program{{
				case IDC_CON5:

				if(OSD_GetMultiselCount(&factoryset_sel5)==0)
				{
					win_compopup_init(WIN_POPUP_TYPE_SMSG);
					win_compopup_set_msg(NULL,NULL, RS_MSG_NO_CHANNELS);
					win_compopup_open_ext(&back_saved1);
					osal_task_sleep(1000);
					win_compopup_smsg_restoreback();
				}
				else
				{
					sat_id=OSD_GetMultiselSel(&factoryset_sel5);
					win_compopup_init(WIN_POPUP_TYPE_OKNO);
					win_compopup_set_msg(NULL, NULL, RS_DISPLAY_SURE_TO_DELETE);
					win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
					choice = win_compopup_open_ext(&back_saved1);
					if(choice == WIN_POP_CHOICE_YES)
					{
					//	mm_enter_stop_mode(FALSE);
					//	api_show_menu_logo();
						if(api_is_playing_tv()  || api_is_playing_radio())
						{
							api_stop_play(1);
						}
						win_compopup_init(WIN_POPUP_TYPE_SMSG);
						win_compopup_set_msg(NULL,NULL, RS_MSG_SAVING_DATA);
						win_compopup_open_ext(&back_saved);
						osal_task_sleep(1500);
						si_monitor_off(0xFFFFFFFF);
						//n = get_sat_num(VIEW_ALL);
						
						recreate_prog_view(VIEW_ALL | PROG_TVRADIO_MODE,0);
						//for(i=0;i<n;i++)
						{
							get_sat_at(sat_id, SET_SELECTED,&s_node);
							del_child_prog(TYPE_SAT_NODE, s_node.sat_id);
						}
						
						update_data();
						sys_data_check_channel_groups();	
						win_compopup_smsg_restoreback();
						// Restart the unit after Factory Default in any case
						osal_task_sleep(1200);
						power_off_process();
						power_on_process();
					}
				}
                        		break;
//-a by wangyang 2011-11-03 for factory set del sat program}}
				default:
					break;
			}
			
		}
		break;
	}

	return ret;
}
예제 #9
0
static void hddfmt_start()
{
	UINT8 back_saved;
	win_popup_choice_t choice;
	UINT8 mode;
	struct dvr_HDD_info hdd_info;
	char volume_name[48];
	char osd_name[48];
	char hint[64];
	BOOL ret;

	disk_format_mode_num = get_fsystem_installed(disk_mode, 8);
	//sprintf(temp, "%s", disk_mode[input]);

	storage_index_to_osd_string((UINT8)hddfmt_cur_volume,osd_name);	
	sprintf(hint, "Are you sure to format the %s?", osd_name);

	if(disk_format_mode_num == 1)
	{
		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		win_compopup_set_btnstr_ext(0, disk_mode[0]);
		win_compopup_set_default_choice(WIN_POP_CHOICE_NO);		
	}
	else if(disk_format_mode_num == 2)
	{
		win_compopup_init(WIN_POPUP_TYPE_OKNOCANCLE);
		win_compopup_set_btnstr_ext(0, disk_mode[0]);
		win_compopup_set_btnstr_ext(1, disk_mode[1]);
		win_compopup_set_default_choice(WIN_POP_CHOICE_CANCEL);		
	}
	win_compopup_set_msg(hint, NULL, 0);
	choice = win_compopup_open_ext(&back_saved);

	if(((disk_format_mode_num == 1) && (choice == WIN_POP_CHOICE_YES)) || ((disk_format_mode_num == 2) && ((choice == WIN_POP_CHOICE_YES) || (choice == WIN_POP_CHOICE_NO))))
	{
		if(choice == WIN_POP_CHOICE_YES)
			mode = 1;
		else
			mode = 2;

		storage_index2volume((UINT8)hddfmt_cur_volume,volume_name);
		storage_add_parent_dir(volume_name);		
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		win_compopup_set_frame(GET_MID_L(286), GET_MID_T(130), 286, 130);
		win_compopup_set_msg_ext("formating wait!",NULL,0);
		win_compopup_open_ext(&back_saved);
		ret = pvr_format_multi_hdd(mode, volume_name);
		win_compopup_smsg_restoreback();

		if(!ret) 		
		{
			win_compopup_init(WIN_POPUP_TYPE_OK);
			sprintf(hint, "Format %s error?", osd_name);
			win_compopup_set_msg(hint, NULL, 0);
			win_compopup_set_default_choice(WIN_POP_CHOICE_CANCEL);		
			win_compopup_open_ext(&back_saved);
			return;
		}

		if(STRCMP((char *)pvr_get_mout_prefix(), volume_name)==0)
		{
			if(pvr_get_HDD_info(&hdd_info))
			{
				api_pvr_check_level(&hdd_info);		
				ap_clear_all_message();//or usb reflash msg maybe send fail
				pvr_evnt_callback(0, PVR_HDD_FORMATTED);
			}		
		}
		win_hddfmt_draw_disk_infor();
	}
}
예제 #10
0
void win_popup_ad_setting(void)
{
    UINT8 back_saved;

    if (sys_data_get_ad_service() == 0)
    {
        win_compopup_init(WIN_POPUP_TYPE_SMSG);
        win_compopup_set_msg("Please Open Audio Description Component", NULL, 0);
        win_compopup_open_ext(&back_saved);
        osal_task_sleep(1000);
        win_compopup_smsg_restoreback();
        return;
    }
    ad_show_flag = 1;

    if (sys_data_get_ad_mode() == 0)
    {
        sys_data_set_ad_mode(1);
        audio_change_pid(-1, FALSE);
    }
    else
    {
        sys_data_set_ad_mode(0);
        audio_change_pid(-1, FALSE);

        win_compopup_init(WIN_POPUP_TYPE_SMSG);
        win_compopup_set_msg_ext("AD Disable", NULL, 0);
        win_compopup_open_ext(&back_saved);
        osal_task_sleep(1000);
        win_compopup_smsg_restoreback();
    }
#if 0
    win_compopup_init(WIN_POPUP_TYPE_OKNO);
    win_compopup_set_msg("Use AD as default", NULL, 0);
    win_compopup_set_btnstr_ext(0, "ON");
    win_compopup_set_btnstr_ext(1, "OFF");
    win_popup_choice_t choice = sys_data_get_ad_mode() ?
                                WIN_POP_CHOICE_YES : WIN_POP_CHOICE_NO;
    win_compopup_set_default_choice(choice);
    ID timer_id = win_compopup_start_send_key_timer(V_KEY_EXIT, 5000, TIMER_ALARM);
    choice = win_compopup_open_ext(&back_saved);
    api_stop_timer(&timer_id);
    if (choice == WIN_POP_CHOICE_YES)
    {
        if (sys_data_get_ad_mode() == 0)
        {
            sys_data_set_ad_mode(1);
            audio_change_pid(-1, FALSE);
            sys_data_save(1);
        }
    }
    else if (choice == WIN_POP_CHOICE_NO)
    {
        if (sys_data_get_ad_mode() == 1)
        {
            sys_data_set_ad_mode(0);
            audio_change_pid(-1, FALSE);
            sys_data_save(1);
        }
    }
#endif
}
예제 #11
0
static PRESULT pvr_setting_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact;
	UINT32 i;
	BOOL subt_flag;
	CONTAINER* cont = (CONTAINER*)pObj;
	UINT8	id = OSD_GetObjID(pObj);
	static UINT8 preval;
	SYSTEM_DATA* p_sys_data;
	
	switch(event)
	{
		case EVN_PRE_OPEN:
			wincom_open_title((POBJECT_HEAD)&win_osdset_con, RS_PVR_SETTING, 0);
			p_sys_data=sys_data_get();
			win_pvr_setting_timeshift_set_string(p_sys_data->timeshift);
			win_pvr_setting_jumpstep_set_string(p_sys_data->jumpstep);
			win_pvr_setting_scramble_record_mode_set_string(p_sys_data->scramble_record_mode);
            remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con3, CON_H + CON_GAP);
			win_pvr_setting_ts_file_size_set_string(p_sys_data->record_ts_file_size);
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con4, CON_H + CON_GAP);
			win_pvr_setting_tms2rec_set_string(p_sys_data->tms2rec);			
			win_pvr_setting_ttx_subt_set_string(p_sys_data->record_ttx_subt);
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con6, CON_H + CON_GAP);
			win_pvr_setting_rec_num_set_string(p_sys_data->rec_num);
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con7, CON_H + CON_GAP);
#ifdef NEW_DEMO_FRAME
			win_pvr_setting_record_ps_set_string(p_sys_data->rec_ps_enable);
#else
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP);
#endif
			break;
		case EVN_POST_OPEN:
			break;			
		case EVN_PRE_CLOSE:
       		*((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG;
			p_sys_data=sys_data_get();
			sys_data_save(1);
#ifndef PVR3_SUPPORT
			pvr_r_set_ts_file_size(p_sys_data->record_ts_file_size + 1);
#endif
			//api_pvr_jumpstep_trans();
			break;
		case EVN_POST_CLOSE:
			break;
        case EVN_UNKNOWN_ACTION:
            if (api_pvr_is_record_active())
                break;
            
            win_popup_choice_t choice;
            UINT8 back_saved;

            win_compopup_init(WIN_POPUP_TYPE_OKNO);
            win_compopup_set_msg("Record CA program in descrambled format?", NULL, 0);
            if (sys_data_get_scramble_record_mode())
                win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
            else
                win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
            choice = win_compopup_open_ext(&back_saved);
            if (choice == WIN_POP_CHOICE_YES)
            {
                sys_data_set_scramble_record_mode(1);
                pvr_r_set_scramble_ext(0);
            }
            else if (choice == WIN_POP_CHOICE_NO)
            {
                sys_data_set_scramble_record_mode(0);
                pvr_r_set_scramble_ext(1);
            }
            break;
	}
	
	return ret;
}
예제 #12
0
BOOL usb_remove_safely_by_hotkey()
{
	UINT8 back_saved;

//	if(!storage_usb_menu_item_ready())
//		return FALSE;
#ifdef DVR_PVR_SUPPORT
	if(api_pvr_is_record_active())
	{
		win_compopup_init(WIN_POPUP_TYPE_OK);
	    win_compopup_set_msg("USB safely remove error, please stop recording first!", NULL, 0);
	    win_compopup_open_ext(&back_saved);
		return TRUE;
	}
	else if(api_pvr_is_playing())
	{
		win_compopup_init(WIN_POPUP_TYPE_OK);
	    win_compopup_set_msg("USB safely remove error, please stop playing first!", NULL, 0);
	    win_compopup_open_ext(&back_saved);
		return TRUE;
	}
	else if(pvr_info.pvr_state == PVR_STATE_TMS)
	{
		api_pvr_tms_proc(FALSE);
	}
#endif
	win_compopup_init(WIN_POPUP_TYPE_OKNO);
    win_compopup_set_msg("Are you sure to remove USB device safely!", NULL, 0);
	win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
	win_popup_choice_t choice = win_compopup_open_ext(&back_saved);
	if(choice == WIN_POP_CHOICE_YES)
	{
		//api_usb_device_safely_remove();
#ifdef USB_SUPPORT_HUB
	/* remove disk */
	char disk_name[8];
	int ret;
	int disk_type = diskNamePrefix2Type(disk_name);
	if (disk_type == MNT_TYPE_USB)
	{
		char dev_path[16];
		int node_id, fd;
		sprintf(dev_path, "/dev/%s", disk_name);
		fd = fs_open(dev_path, O_RDONLY, 0);
		ret = fs_ioctl(fd, IOCTL_GET_NODEID, &node_id, sizeof(int));
		fs_close(fd);

		if (ret == 0)
			usbd_safely_remove_ex(node_id);
	}
#ifdef SDIO_SUPPORT
	else if (disk_type == MNT_TYPE_SD)
	{
		sd_notify(0);
	}
#endif
#ifdef SATA_SUPPORT
	else if (disk_type == MNT_TYPE_SATA)
	{
		sata_notify(0, 0);
	}
#endif
#else
	usbd_safely_remove();
#endif
	
	api_dec_wnd_count();

		}
	return TRUE;
}
예제 #13
0
static PRESULT editchannel_con_item_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact;
	UINT8	id = OSD_GetObjID(pObj) + sub_menu_desc->list_top;
	UINT8 	back_saved;
	INT16 	i,n,parent_id;
	S_NODE  s_node;
	TIMER_SET_CONTENT* timer;
    SYSTEM_DATA* sys_data;
    
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16) ;
		if(unact == VACT_ENTER)
		{
			if(unact == VACT_ENTER)
			{
				if(id == CHLIST_DELETE_ALL_CHAN_ID)
				{
					//if(win_pwd_open(NULL,0))
					{
						win_compopup_init(WIN_POPUP_TYPE_OKNO);
						win_compopup_set_msg(NULL,NULL,RS_POPUP_WARNING_DELETE_ALL_CHANNEL);
						win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
						ret = win_compopup_open_ext(&back_saved);
						if(ret==WIN_POP_CHOICE_YES)
					 	{
#ifdef NEW_DEMO_FRAME
							si_monitor_off(0xFFFFFFFF);
#endif
							n = get_sat_num(VIEW_ALL);
							
							recreate_prog_view(VIEW_ALL | PROG_TVRADIO_MODE,0);
							for(i=0;i<n;i++)
							{
								get_sat_at(i, VIEW_ALL,&s_node);
								del_child_prog(TYPE_SAT_NODE, s_node.sat_id);
							}
							
							update_data();
							sys_data_check_channel_groups();	
                            /*turn off all timer*/
                            sys_data = sys_data_get();
                            for(i=0;i<MAX_TIMER_NUM;i++)
                            {
        	                    timer = &sys_data->timer_set.TimerContent[i];
			                    timer->timer_mode = TIMER_MODE_OFF;                                    
                            }
                            
							ret = PROC_LEAVE;

							key_pan_display("noCH", 4);
					 	}
					}
				}
				else
				{
					enter_sub_menu(editchannel_sub_menus,id - 1);
					ret = PROC_LOOP;
				}
			}
		}
	}

	return ret;
}
예제 #14
0
static PRESULT record_con_item_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact;
	UINT8	id = OSD_GetObjID(pObj) + sub_menu_desc->list_top;
	UINT8 back_saved;
	
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16) ;
		if(unact == VACT_ENTER)
		{
		    if(id == RECORD_PVRMANAGE_ID)
			{
				hddfmt_win_set_type(TRUE);
			}
 			else
			{
 				hddfmt_win_set_type(FALSE);
 			}
#ifdef USB_SAFELY_REMOVE_SUPPORT
			if(id == TOOLS_USB_REMOVE_ID)  //guop edit 20100623
            {
			win_compopup_init(WIN_POPUP_TYPE_OKNO);
			win_compopup_set_msg(NULL, NULL,RS_USB_REMOVE_SAFELY_SURE);
			win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
			win_popup_choice_t choice = win_compopup_open_ext(&back_saved);
			if(choice == WIN_POP_CHOICE_YES)
	      {
			if (api_usb_device_safely_remove ())
                         g_show_usb_safely_removed = 1;
                   else
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL, NULL, RS_USB_SAFELY_REMOVE_FAILED);
				win_compopup_open_ext(&back_saved);
				if (!storage_usb_menu_item_ready())
			   {
				  ap_send_msg(CTRL_MSG_SUBTYPE_CMD_ENTER_ROOT,(UINT32)(&g_win_mainmenu),TRUE);
			   }
			}
	    }
    			ret = PROC_LOOP;            
                break;
            }
#endif
/*
			if(id == TOOLS_USB_ID)
			{
				if(get_stroage_device_number(STORAGE_TYPE_ALL) > 0 )
				{
					if(mp_title_type != TITLE_RECORD)
					{
						enter_sub_menu(record_sub_menus,id - 1);
						//ap_send_msg(CTRL_MSG_SUBTYPE_STATUS_USBMOUNT,0,0);
					}
					else
					{
						if(OSD_ObjOpen((POBJECT_HEAD)&g_win_record,(UINT32)(~0)) != PROC_LEAVE)
						{
							menu_stack_push((POBJECT_HEAD)&g_win_record);
						}
					}
				}
				return PROC_LOOP;
			}
*/
			enter_sub_menu(record_sub_menus,id - 1);
			ret = PROC_LOOP;
		}

	}

	return ret;
}
예제 #15
0
static PRESULT pvr_setting_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact;
	UINT32 i;
	BOOL subt_flag;
	CONTAINER* cont = (CONTAINER*)pObj;
	UINT8	id = OSD_GetObjID(pObj);
	static UINT8 preval;
	SYSTEM_DATA* p_sys_data;
	
	switch(event)
	{
		case EVN_PRE_OPEN:
#ifdef EXIT_KEY_EXIT_ALL_MENU
	         exit_key_flag =  FALSE;
#endif
			wincom_open_subtitle((POBJECT_HEAD)&win_osdset_con, RS_PVR_SETTING, 0);
			p_sys_data=sys_data_get();
			win_pvr_setting_timeshift_set_string(p_sys_data->timeshift);
			win_pvr_setting_jumpstep_set_string(p_sys_data->jumpstep);
			win_pvr_setting_scramble_record_mode_set_string(p_sys_data->scramble_record_mode);
            remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con3, CON_H + CON_GAP);
			win_pvr_setting_ts_file_size_set_string(p_sys_data->record_ts_file_size);
			remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con4, CON_H + CON_GAP);
			win_pvr_setting_tms2rec_set_string(p_sys_data->tms2rec);			
			win_pvr_setting_ttx_subt_set_string(p_sys_data->record_ttx_subt);
			remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con6, CON_H + CON_GAP);
			win_pvr_setting_rec_num_set_string(p_sys_data->rec_num);
			remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con7, CON_H + CON_GAP);
#ifdef NEW_DEMO_FRAME
			win_pvr_setting_record_ps_set_string(p_sys_data->rec_ps_enable);
	#ifdef SUPPORT_CAS9
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con5, CON_H + CON_GAP);
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP);
	#endif
#else
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP);
#endif
#ifdef PREVIEW_SUBMENU  //-a by wangyang 
{
				
			POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);
			
			if(param2==MENU_OPEN_TYPE_OTHER)
			{
				pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_SH_IDX;
				pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_SH_IDX;
			}
			else
			{
				pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_HL_IDX;
				pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_HL_IDX;
			}

}
#endif

			break;
		case EVN_POST_OPEN:
		wincom_open_commen_help(pObj);//-a by wangyang 
			break;			
		case EVN_PRE_CLOSE:
       		*((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG;
			p_sys_data=sys_data_get();
			sys_data_save(1);
#ifndef PVR3_SUPPORT
			pvr_r_set_ts_file_size(p_sys_data->record_ts_file_size + 1);
#endif
			//api_pvr_jumpstep_trans();
			break;
		case EVN_POST_CLOSE:
	  		wincom_close_subtitle();
			OSD_ClearScreen();
#ifdef EXIT_KEY_EXIT_ALL_MENU
	        if( exit_key_flag == TRUE)
	        	{
 			 exit_key_flag =FALSE;
			mm_leave_all_menu();
		}
#endif
			//OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
			break;
		#ifdef PREVIEW_SUBMENU  //-a by wangyang 
  		case EVN_MSG_GOT:
			if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER)
			{
				//system_state = SYS_STATE_NORMAL;
				wincom_close_subtitle();
				OSD_ClearScreen();
				//wincom_close_help();
				OSD_ClearObject( pObj, C_UPDATE_ALL);
				OSD_DrawFill(SUBMENU_W_L, SUBMENU_W_T, (SUBMENU_W_W), (SUBMENU_W_H), OSD_TRANSPARENT_COLOR, NULL);
				OSD_ObjOpen((POBJECT_HEAD)&win_info_con, MENU_OPEN_TYPE_OTHER );
				ret = PROC_LEAVE;
			}
			break;		
		#endif
      case EVN_UNKNOWN_ACTION:
            if (api_pvr_is_record_active())
                break;
            
            win_popup_choice_t choice;
            UINT8 back_saved;

#ifndef CI_PLUS_PVR_SUPPORT
			if (sys_data_get_tms() == 0)
			{
				win_popup_choice_t choice;
				UINT8 back_saved;			
				win_compopup_init(WIN_POPUP_TYPE_OKNO);
				win_compopup_set_msg("Are you sure to enter record TP mode?", NULL, 0);
				if (pvr_r_get_record_all())
					win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
				else
					win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
				choice = win_compopup_open_ext(&back_saved);
				if(choice == WIN_POP_CHOICE_YES)
				{
					pvr_r_set_record_all(TRUE);
				}	
				else if (choice == WIN_POP_CHOICE_NO)
				{
					pvr_r_set_record_all(FALSE);
				}
			
			}
			else
#endif
			{
	            win_compopup_init(WIN_POPUP_TYPE_OKNO);
	            win_compopup_set_msg("Record CA program in descrambled format?", NULL, 0);
	            if (sys_data_get_scramble_record_mode())
	                win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
	            else
	                win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
	            choice = win_compopup_open_ext(&back_saved);
	            if (choice == WIN_POP_CHOICE_YES)
	            {
	                sys_data_set_scramble_record_mode(1);
	                pvr_r_set_scramble_ext(0);
	            }
	            else if (choice == WIN_POP_CHOICE_NO)
	            {
	                sys_data_set_scramble_record_mode(0);
	                pvr_r_set_scramble_ext(1);
	            }
			}
            break;
	}
	
	return ret;
}