public AdroitWindow()
: base(Gtk.WindowType.Toplevel)
{
var settings = ServiceManager.Get<SettingsService> ();
var useCompact = settings.Get<bool> ("compact_mode", false);
this.Build ();
this.BuildModeButton ();
this.AttachResizeGrip ();
CommandManager commandManager = ServiceManager.Get<CommandService> ().Commands;
commandManager.Changed += delegate { this.UpdateStatusLabel (); };
var storageService = ServiceManager.Get<StorageService> ();
storageService.Tasks.Changed += delegate {
this.UpdateStatusLabel ();
};
this.UpdateStatusLabel ();
// unselect the find entry. annoying, *i know*
m_findEntry.SelectRegion (0, 0);
m_planningView.CompactMode = useCompact;
m_planningView.TasksTreeView.GrabFocus ();
ServiceManager.Shutdown += delegate {
m_planningView.SaveState ();
};
}