Beispiel #1
0
// Reset window menus
void display_reset_menus(BOOL main_only,BOOL fix_only)
{
	// Do main window
	if (GUI->window)
	{
		// Reset?
		if (!fix_only)
		{
			// Free existing menu
			display_free_menu(GUI->window);

			// Get new menu
			display_get_menu(GUI->window);
		}

		// Fix checkmarks
		display_fix_menu(GUI->window,WINDOW_BACKDROP,0);
	}

	// Doing main window only?
	if (main_only) return;

	// Signal children to reset their menus
	IPC_ListCommand(&GUI->lister_list,IPC_RESET,!fix_only,0,0);
	IPC_ListCommand(&GUI->buttons_list,IPC_RESET,!fix_only,0,0);
	IPC_ListCommand(&GUI->process_list,IPC_RESET,!fix_only,0,0);
	IPC_ListCommand(&GUI->group_list,IPC_RESET,!fix_only,0,0);
}
// Signal with pattern update
void display_update_pattern(short which,short valid)
{
	// Main pattern changed?
	if (which==PATTERN_MAIN)
	{
		// Send refresh command
		IPC_Command(&main_ipc,LISTER_BACKFILL_CHANGE,valid,0,0,REPLY_NO_PORT);
	}

	// Redraw listers and groups if they need it
	else
	if (which==PATTERN_LISTER)
	{
		IPC_ListCommand(&GUI->lister_list,LISTER_BACKFILL_CHANGE,valid,0,TRUE);
		IPC_ListCommand(&GUI->group_list,LISTER_BACKFILL_CHANGE,valid,0,TRUE);
	}
}