Exemplo n.º 1
0
void win_tms_left_key(POBJECT_HEAD pObj,UINT8 id)
{
	if(id == 1)
	{
		sys_data_set_tms(!sys_data_get_tms());
		win_tms_set_string(sys_data_get_tms(),&tms_item_txtset1);
		tms_set_tms2rec_item_active(TRUE);
	}
	else if (id == 2)
	{
		sys_data_set_tms2rec(!sys_data_get_tms2rec());
		win_tms_set_string(sys_data_get_tms2rec(),&tms_item_txtset2);
	}
    else if (id == 3)
	{
        sys_data_set_rec_type(!sys_data_get_rec_type());
		win_set_rec_type_string(sys_data_get_rec_type(),&tms_item_txtset3);
        
	}    
#ifdef MULTI_PARTITION_SUPPORT
    else if (id == 4)
	{
		if(storage_get_volume_count()<=1)
			return;
		win_get_nex_vol(-1);
        win_set_vol_string(&tms_item_txtset4);

	}
#endif
	OSD_TrackObject(pObj,C_UPDATE_ALL);
}
Exemplo n.º 2
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;
}