~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyPad.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
using pg = MonoDevelop.Components.PropertyGrid;
39
39
using MonoDevelop.Components.Docking;
40
40
using System.Collections.Generic;
 
41
using MonoDevelop.Components.Commands;
 
42
using MonoDevelop.Ide;
 
43
using MonoDevelop.Ide.Commands;
41
44
 
42
45
namespace MonoDevelop.DesignerSupport
43
46
{
44
47
        
45
 
        public class PropertyPad : AbstractPadContent
 
48
        public class PropertyPad : AbstractPadContent, ICommandDelegator
46
49
        {
47
50
                pg.PropertyGrid grid;
48
51
                MonoDevelop.Components.InvisibleFrame frame;
49
52
                bool customWidget;
50
53
                IPadWindow container;
51
54
                DockToolbarProvider toolbarProvider = new DockToolbarProvider ();
 
55
 
 
56
                internal object CommandRouteOrigin { get; set; }
52
57
                
53
58
                public PropertyPad ()
54
59
                {
84
89
                }
85
90
                
86
91
                #endregion
 
92
 
 
93
                #region ICommandDelegatorRouter implementation
 
94
 
 
95
                object ICommandDelegator.GetDelegatedCommandTarget ()
 
96
                {
 
97
                        // Route the save command to the object for which we are inspecting the properties,
 
98
                        // so pressing the Save shortcut when doing changes in the property pad will save
 
99
                        // the document we are changing
 
100
                        if (IdeApp.CommandService.CurrentCommand == IdeApp.CommandService.GetCommand (FileCommands.Save))
 
101
                                return CommandRouteOrigin;
 
102
                        else
 
103
                                return null;
 
104
                }
 
105
 
 
106
                #endregion
87
107
                
88
108
                //Grid consumers must call this when they lose focus!
89
109
                public void BlankPad ()
90
110
                {
91
111
                        PropertyGrid.CurrentObject = null;
 
112
                        CommandRouteOrigin = null;
92
113
                }
93
114
                
94
115
                internal pg.PropertyGrid PropertyGrid {