Esempio n. 1
0
	public MainUi (EventHandlers handlers, out Glade.XML glade) {
		glade = new Glade.XML(null, gladeFilename, null, Base.ExecutionContext.TranslationDomain);

		window = glade.GetWidget("window") as Window;
		window.Icon = new Gdk.Pixbuf(null, iconFilename);
		window.SetDefaultSize(Base.Config.PrefsWindowWidth, Base.Config.PrefsWindowHeight);

		video = new Video();
		view = new SubtitleView();
		edit = new SubtitleEdit();
		menus = new Menus();
		status = new Status();

		glade.Autoconnect(handlers);
		Base.InitFinished += OnBaseInitFinished;

		window.Visible = true;
    }
Esempio n. 2
0
	/* Private members */

	/// <summary>Initializes the base program structure.</summary>
	/// <remarks>Nothing is done if initialization has already occured. The core value is checked for this,
	/// if it's null then initialization hasn't occured yet.</remarks>
	private static void Init (ExecutionContext newExecutionContext) {
		if ((executionContext != null) && (executionContext.Initialized))
			throw new Exception("The Base environment was already initialized.");

		executionContext = newExecutionContext;
		executionContext.InitApplication();

		/* Initialize Command manager */
		commandManager = new CommandManager();

		/* Initialize handlers */
		handlers = new EventHandlers();

		/* Initialize misc */
		clipboards = new Clipboards();
		globalAccelerators = new GlobalAccelerators();
		dragDrop = new DragDrop();
		config = new Config();
		dialogs = new Dialogs();
		spellLanguages = new SpellLanguages();
		backup = new Backup();

		/* Initialize the GUI */
		ui = new MainUi(handlers, out glade);
		clipboards.WatchPrimaryChanges = true;
		Catalog.Init(ExecutionContext.TranslationDomain, ExecutionContext.LocaleDir);

		EmitInitFinishedEvent();
	}