Widget IMimeTypePolicyOptionsPanel.CreateMimePanelWidget() { panelWidget = CreatePanelWidget(); //HACK: work around bug 469427 - broken themes match on widget names if (panelWidget.Name.IndexOf("Panel") > 0) { panelWidget.Name = panelWidget.Name.Replace("Panel", "_"); } if (isExactMimeType) { return(panelWidget); } VBox box = new VBox(); box.Spacing = 6; string baseType = mimeTypeScopes.ElementAt(1); baseType = IdeServices.DesktopService.GetMimeTypeDescription(baseType); defaultSettingsButton = new CheckButton(GettextCatalog.GetString("Use default settings from '{0}'", baseType)); defaultSettingsButton.Clicked += delegate { if (defaultSettingsButton.Active) { panelWidget.Sensitive = false; List <string> baseTypes = new List <string> (mimeTypeScopes); baseTypes.RemoveAt(0); LoadFrom(GetInheritedPolicy(baseTypes)); } else { panelWidget.Sensitive = true; } }; defaultSettingsButton.SetCommonAccessibilityAttributes("MimePanel.DefaultCheckbox", "", GettextCatalog.GetString("Check to use the default settings from '{0}'", baseType)); defaultSettingsButton.Accessible.AddLinkedUIElement(panelWidget.Accessible); box.PackStart(defaultSettingsButton, false, false, 0); var hsep = new HSeparator(); hsep.Accessible.SetShouldIgnore(true); box.PackStart(hsep, false, false, 0); box.ShowAll(); box.PackStart(panelWidget, true, true, 0); panelWidget.Show(); return(box); }
public XmlEditorOptionsPanelWidget() { Spacing = 6; autoCompleteElementsCheck = new CheckButton(GettextCatalog.GetString("Automatically insert closing tags")); autoCompleteElementsCheck.SetCommonAccessibilityAttributes("XmlOptionsPanel.autoComplete", "", GettextCatalog.GetString("Check to enable automatic close tag insertion")); autoAddPunctuationCheck = new CheckButton(GettextCatalog.GetString("Automatically insert punctuation (=\"\", />, etc.)")); autoAddPunctuationCheck.SetCommonAccessibilityAttributes("XmlOptionsPanel.autoAdd", "", GettextCatalog.GetString("Check to enable automatic punctuation insertion")); showSchemaAnnotationCheck = new CheckButton(GettextCatalog.GetString("Show schema annotation")); PackStart(autoCompleteElementsCheck, false, false, 0); PackStart(autoAddPunctuationCheck, false, false, 0); //PackStart (showSchemaAnnotationCheck, false, false, 0); ShowAll(); }