public void FillPolicies() { if (selectingPolicy) { return; } ((ListStore)store).Clear(); if (IsCustomUserPolicy) { store.AppendValues(GettextCatalog.GetString("System Default"), null); store.AppendValues("--", null); } else if (!isRoot) { store.AppendValues(GettextCatalog.GetString("Inherited Policy"), null); store.AppendValues("--", null); } setsInCombo.Clear(); foreach (PolicySet set in panelData.GetSupportedPolicySets()) { if (polSet != null && polSet.Name == set.Name) { continue; } if (IsCustomUserPolicy && set.Name == "Default") // There is already the System Default entry { continue; } store.AppendValues(set.Name, set); setsInCombo.Add(set); } if (setsInCombo.Count > 0) { store.AppendValues("--", null); } store.AppendValues(GettextCatalog.GetString("Custom"), null); }
void FillPolicies() { if (!isRoot) { store.AppendValues(GettextCatalog.GetString("Inherited Policy"), null); store.AppendValues("--", null); } bool added = false; foreach (PolicySet set in panelData.GetSupportedPolicySets()) { store.AppendValues(set.Name, set); added = true; } if (added) { store.AppendValues("--", null); } store.AppendValues(GettextCatalog.GetString("Custom"), null); }
string[] GetComboOptions (MimeTypePanelData mt) { List<string> values = new List<string> (); if (!this.panel.PolicyContainer.IsRoot) values.Add (parentPolicyText); foreach (PolicySet set in mt.GetSupportedPolicySets ()) values.Add (set.Name); values.Add (customPolicyText); return values.ToArray (); }