Exemple #1
0
static PRESULT timerset_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 bID;
	UINT8 back_save;

	bID = OSD_GetObjID(pObj);

	switch (event)
	{
		case EVN_UNKNOWN_ACTION:
			if (bID == TIMER_BTN_OK_ID)
			{
				if (win_timerset_check_and_save() == 0)
				{
					timer_set_ok_cancel_flag = 1;
					ret = PROC_LEAVE;
				}
				else
				{
					win_compopup_init(WIN_POPUP_TYPE_OK);
					win_compopup_set_msg(NULL, NULL, RS_MSG_INVALID_INPUT_CONTINUE);
					win_compopup_open_ext(&back_save);
				}
			}
			else
				ret = PROC_LEAVE;

			break;
	}

	return ret;
}
Exemple #2
0
static PRESULT timerset_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{	
	PRESULT ret = PROC_PASS;
	UINT8 bID;
	UINT8 back_save;
	
	bID = OSD_GetObjID(pObj);	

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		if(bID == TIMER_BTN_OK_ID)
		{
			if(win_timerset_check_and_save() == 0)
			{
#if 0//def DVR_PVR_SUPPORT
				TIMER_SET_CONTENT* timer = &timer_set;
				P_NODE p_node;
				if(get_prog_by_id(timer->wakeup_channel,&p_node) != DB_SUCCES)
					return PROC_PASS;
				if((p_node.lock_flag)
//					&& (timer->timer_mode != TIMER_MODE_OFF) 
					&& (timer->timer_service == TIMER_SERVICE_DVR_RECORD)
					)
				{
					if(!win_pwd_open(NULL,0))
					{
						return PROC_PASS;
					}
				}		
#endif
				timer_set_ok_cancel_flag= 1;				
				ret = PROC_LEAVE;
			}
			else
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL,NULL,RS_MSG_INVALID_INPUT_CONTINUE);
				win_compopup_open_ext(&back_save);
			}
		}
		else
			ret = PROC_LEAVE;
		
		break;
	}

	return ret;
}