protected void OnActivity(object o, Gtk.WidgetEventArgs args) { foreach (SettingBinder b in _settings) { b.SensitizeDependents(); } }
protected void txtEntry_WidgetEvent(object o, Gtk.WidgetEventArgs args) { // Did the user type "@"? if (args.Event.Type == EventType.KeyPress) { EventKey eventKey = (EventKey)args.Event; if (eventKey.Key == Gdk.Key.at) { // Prevent the editor from typing the "@" key args.RetVal = true; // The user typed "@", so run the chooser for @-mentions using (var window = new UserChooserWindow()) { // Find the coordinates of the text editor int editorX; int editorY; txtEntry.GdkWindow.GetOrigin(out editorX, out editorY); // If the CC input box is empty, position the chooser on top of the input box. // Otherwise position it just below the input box, so the existing text is not hidden. window.SetPosition(WindowPosition.None); if (string.IsNullOrWhiteSpace(txtEntry.Text)) { window.Move(editorX, editorY); } else { int editorW; int editorH; txtEntry.GdkWindow.GetSize(out editorW, out editorH); window.Move(editorX, editorY + editorH); } Utilities.RunWindowAsDialog(window); // Did the user select something? (If not, fall through and let the // "@" key be typed normally.) if (window.ChosenUser != null) { // Insert the alias for the user that was chosen if (txtEntry.Text.Length > 0 && !txtEntry.Text.EndsWith(" ")) { txtEntry.Text += " "; } txtEntry.Text += "@" + window.ChosenUser.Alias; txtEntry.Position = txtEntry.Text.Length; } } } } }
void JisonsScrolledWindow_WidgetEvent(object o, Gtk.WidgetEventArgs args) { switch (args.Event.Type) { case EventType.KeyRelease: { KeyUpHandle(o, args); break; } default: break; } }
/* These functions are used by glade that gets them using reflection. * Therefore the warning that the function is not used is disabled. */ #pragma warning disable 169 private void OnLocationsViewPopup(object o, WidgetEventArgs args){ if(args.Event is Gdk.EventButton){ Gdk.EventButton e = (Gdk.EventButton) args.Event; //3 is the right mouse button if(e.Button == 3){ locationPopup.Popup(null,null,null,e.Button, e.Time); } } }
#pragma warning restore 0169 //Disabling warning 0169 because this code will be called at //runtime with glade. #pragma warning disable 0169 private void OnVBoxEvent (object sender, WidgetEventArgs args) { okButton.Sensitive = ValidateUpperLimit (); }
#pragma warning restore 0169 //Disabling warning 0169 because this code will be called at //runtime with glade. #pragma warning disable 0169 private void OnWindowEvent (object sender, WidgetEventArgs args) { reloadToolButton.Sensitive = (measures != null); }
void OnRDWidgetExposureEvent(object o, Gtk.WidgetEventArgs args) { PopulateTotals(); }