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 OptionsDialogSection(typeof(MimeTypePolicyOptionsSection)); sec.Fill = true; Gdk.Pixbuf icon = DesktopService.GetPixbufForType(mt, Gtk.IconSize.Menu); sec.Icon = ImageService.GetStockId(icon, Gtk.IconSize.Menu); 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); }
void AddPanel(RunConfigInfo configInfo) { configInfo.Project = Project; var sec = new RunConfigurationOptionsDialogSection(configInfo); sec.Fill = true; sections [configInfo] = sec; ParentDialog.AddChildSection(this, sec, configInfo); }
void AddPanel(SolutionRunConfigInfo configInfo) { configInfo.Solution = Solution; var sec = new SolutionRunConfigurationOptionsDialogSection(configInfo); sec.Fill = true; sections [configInfo] = sec; ParentDialog.AddChildSection(this, sec, configInfo); }