예제 #1
0
 protected void OnActivity(object o, Gtk.WidgetEventArgs args)
 {
     foreach (SettingBinder b in _settings)
     {
         b.SensitizeDependents();
     }
 }
예제 #2
0
        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;
                        }
                    }
                }
            }
        }
예제 #3
0
        void JisonsScrolledWindow_WidgetEvent(object o, Gtk.WidgetEventArgs args)
        {
            switch (args.Event.Type)
            {
            case EventType.KeyRelease:
            {
                KeyUpHandle(o, args);
                break;
            }

            default: break;
            }
        }
예제 #4
0
		/* 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);
				}
			}
		}
예제 #5
0
		#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 ();
		}
예제 #6
0
		#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);
		}
예제 #7
0
 void OnRDWidgetExposureEvent(object o, Gtk.WidgetEventArgs args)
 {
     PopulateTotals();
 }