private void LoadDisplayPreferences() { Logger.ReportInfo("Loading display prefs for " + this.Path); Guid id = Id; if (Config.Instance.EnableSyncViews) { if (baseItem is Folder && baseItem.GetType() != typeof(Folder)) { id = baseItem.GetType().FullName.GetMD5(); } } DisplayPreferences dp = Kernel.Instance.ItemRepository.RetrieveDisplayPreferences(id); if (dp == null) { dp = new DisplayPreferences(id); dp.LoadDefaults(); if ((this.PhysicalParent != null) && (Config.Instance.InheritDefaultView)) { // inherit some of the display properties from our parent the first time we are visited DisplayPreferences pt = this.PhysicalParent.DisplayPrefs; dp.ViewType.Chosen = pt.ViewType.Chosen; dp.ShowLabels.Value = pt.ShowLabels.Value; // after some use, carrying the sort order forward doesn;t feel right - for seasons especially it can be confusing // dp.SortOrder = pt.SortOrder; dp.VerticalScroll.Value = pt.VerticalScroll.Value; } } this.DisplayPrefs = dp; }
protected void LoadDefaultDisplayPreferences(ref Guid id, ref DisplayPreferences dp) { dp = new DisplayPreferences(id, this.Folder); dp.LoadDefaults(); if ((this.PhysicalParent != null) && (Config.Instance.InheritDefaultView)) { // inherit some of the display properties from our parent the first time we are visited DisplayPreferences pt = this.PhysicalParent.DisplayPrefs; dp.ViewType.Chosen = pt.ViewType.Chosen; dp.ShowLabels.Value = pt.ShowLabels.Value; // after some use, carrying the sort order forward doesn;t feel right - for seasons especially it can be confusing // dp.SortOrder = pt.SortOrder; dp.VerticalScroll.Value = pt.VerticalScroll.Value; } }
protected void LoadDefaultDisplayPreferences(ref Guid id, ref DisplayPreferences dp) { dp = new DisplayPreferences(this.Folder.DisplayPreferencesId, this.Folder); dp.LoadDefaults(); if ((this.PhysicalParent != null) && (Config.Instance.InheritDefaultView)) { // inherit some of the display properties from our parent the first time we are visited DisplayPreferences pt = this.PhysicalParent.DisplayPrefs; dp.ViewType.Chosen = pt.ViewType.Chosen; dp.ShowLabels.Value = pt.ShowLabels.Value; // after some use, carrying the sort order forward doesn;t feel right - for seasons especially it can be confusing // dp.SortOrder = pt.SortOrder; dp.VerticalScroll.Value = pt.VerticalScroll.Value; } }