MimeTypePanelData AddPanel(string mt) { var chain = new List <string> (DesktopService.GetMimeTypeInheritanceChain(mt).Where(mimeTypesWithPolicies.Contains)); if (chain.Count == 0) { return(null); } MimeTypePanelData data = new MimeTypePanelData(); OptionsDialogSection sec = new MimetypeOptionsDialogSection(mt); sec.Fill = true; data.Section = sec; data.MimeType = mt; data.TypeDescription = DesktopService.GetMimeTypeDescription(mt); if (string.IsNullOrEmpty(data.TypeDescription)) { data.TypeDescription = mt; } data.DataObject = DataObject; data.PolicyContainer = policyContainer; sec.Label = data.TypeDescription; LoadPolicyTypeData(data, mt, chain); typeSections [mt] = data; ParentDialog.AddChildSection(this, sec, data); return(data); }
MimeTypePanelData AddPanel (string mt) { var chain = new List<string> (DesktopService.GetMimeTypeInheritanceChain (mt).Where (x => mimeTypesWithPolicies.Contains (x))); if (chain.Count == 0) return null; MimeTypePanelData data = new MimeTypePanelData (); OptionsDialogSection sec = new MimetypeOptionsDialogSection (mt); sec.Fill = true; data.Section = sec; data.MimeType = mt; data.TypeDescription = DesktopService.GetMimeTypeDescription (mt); if (string.IsNullOrEmpty (data.TypeDescription)) data.TypeDescription = mt; data.DataObject = DataObject; data.PolicyContainer = policyContainer; sec.Label = data.TypeDescription; LoadPolicyTypeData (data, mt, chain); typeSections [mt] = data; ParentDialog.AddChildSection (this, sec, data); return data; }