Exemplo n.º 1
0
static void update_menus () {
	int i;
	CLEARMENU(mainmenu);
	CLEARMENU(submenu_sync);
	CLEARMENU(submenu_size);
	CLEARMENU(submenu_osd);
	CLEARMENU(submenu_jack);

#ifdef HAVE_LTC
	submenu_sync[1].sensitive = 1;
#else
	submenu_sync[1].sensitive = 0;
#endif
#ifdef HAVE_JACKMIDI
	submenu_sync[2].sensitive = 1;
#else
	submenu_sync[2].sensitive = 0;
#endif
#ifdef HAVE_PORTMIDI
	submenu_sync[3].sensitive = 1;
#else
	submenu_sync[3].sensitive = 0;
#endif
#ifdef ALSA_SEQ_MIDI
	submenu_sync[4].sensitive = 1;
#else
	submenu_sync[4].sensitive = 0;
#endif
#ifdef ALSA_RAW_MIDI
	submenu_sync[5].sensitive = 1;
#else
	submenu_sync[5].sensitive = 0;
#endif

	submenu_sync[ui_syncsource()].enabled = 1;

	if (OSD_mode&OSD_SMPTE) {
		submenu_osd[0].enabled = 1;
	}
	if (!(OSD_mode&(OSD_FRAME|OSD_VTC))) {
		submenu_osd[2].enabled = 1;
	}
	if (OSD_mode&OSD_VTC) {
		submenu_osd[3].enabled = 1;
	}
	if (OSD_mode&OSD_FRAME) {
		submenu_osd[4].enabled = 1;
	}
	if (!(OSD_mode&(OSD_OFFF|OSD_OFFS))) {
		submenu_osd[6].enabled = 1;
	}
	if (OSD_mode&OSD_OFFS) {
		submenu_osd[7].enabled = 1;
	}
	if (OSD_mode&OSD_OFFF) {
		submenu_osd[8].enabled = 1;
	}
	if (OSD_mode&OSD_NFO) {
		submenu_osd[10].enabled = 1;
	}
	if (OSD_mode&OSD_GEO) {
		submenu_osd[11].enabled = 1;
	}
	if (movie_height < OSD_MIN_NFO_HEIGHT) {
		submenu_osd[10].sensitive = 0;
		submenu_osd[11].sensitive = 0;
	} else {
		submenu_osd[10].sensitive = 1;
		submenu_osd[11].sensitive = 1;
	}
	if (OSD_mode&OSD_BOX) {
		submenu_osd[13].enabled = 1;
	}

	if (Xgetletterbox()) {
		submenu_size[8].enabled = 1;
	}
	if (Xgetontop()) {
		submenu_size[10].enabled = 1;
	}
	if (Xgetfullscreen()) {
		submenu_size[11].enabled = 1;
	}
	if (!Xgetmousepointer()) {
		submenu_size[13].enabled = 1;
	}

	if ((interaction_override&OVR_AVOFFSET) != 0 )
	{
		mainmenu[6].sensitive = 0;
	} else {
		mainmenu[6].sensitive = 1;
	}
	if (ui_syncsource() == SYNC_JACK && !(interaction_override&OVR_JCONTROL))
	{
		mainmenu[7].sensitive = 1;
	} else {
		mainmenu[7].sensitive = 0;
	}

	if (interaction_override & OVR_MENUSYNC) {
		mainmenu[3].sensitive = 0;
	} else {
		mainmenu[3].sensitive = 1;
	}

	if (interaction_override & OVR_LOADFILE) {
		submenu_file[0].sensitive = 0;
		submenu_file[1].sensitive = 0;
		submenu_file[3].sensitive = 0;
		submenu_file[4].sensitive = 0;
	} else {
		submenu_file[0].sensitive = 1;
		submenu_file[1].sensitive = have_open_file() ? 1 : 0;
		submenu_file[3].sensitive = 1;
		submenu_file[4].sensitive = 1;
	}
#ifndef XFIB
	submenu_file[0].sensitive = 0;
#endif
	if (interaction_override & OVR_QUIT_WMG) {
		submenu_file[6].sensitive = 0;
	} else {
		submenu_file[6].sensitive = 1;
	}
}
Exemplo n.º 2
0
void xapi_pontop(void *d) {
	if (Xgetontop())
		remote_printf(201,"windowontop=1 # always on top");
	else
		remote_printf(201,"windowontop=0 # normal window stack");
}