void OnCollectionChanged(object s, ActionGroupEventArgs args) { // Avoid firing the selection change event if the selected // group is the same after the refresh ActionGroup oldGroup = currentGroup; updating = true; int i = combo.Active; Refresh(); if (actionGroups.Count == 0) { combo.Sensitive = false; currentGroup = null; } else { combo.Sensitive = true; if (i == -1) { i = 0; } if (i < actionGroups.Count) { combo.Active = i; } else { combo.Active = actionGroups.Count - 1; } currentGroup = (ActionGroup)actionGroups [combo.Active]; } updating = false; if (currentGroup != oldGroup) { OnActiveChanged(null, null); } frontend.NotifyModified(); }
void OnModified(object ob, EventArgs args) { modified = true; frontend.NotifyModified(); }