Added legend in function cl_gui_main_window;
fixed datasize make_event(GUI_END)