Author: fejj
Date: 2007-05-16 14:00:27 -0400 (Wed, 16 May 2007)
New Revision: 77498

Added:
   
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs
   
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.cs
Modified:
   trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
   trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am
   
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs
   trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.mdp
   
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.FeatureSelectorDialog.cs
   trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/gui.stetic
Log:
2007-05-16  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs: New dialog for
        encapsulating a single field.

        * MonoDevelop.Ide.Commands/RefactoryCommands.cs 
(BuildRefactoryMenuForItem):
        Add an "Encapsulate Field" menu item for all fiends.
        (EncapsulateField): Open an EncapsulateFieldDialog.



Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2007-05-16 
17:57:06 UTC (rev 77497)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2007-05-16 
18:00:27 UTC (rev 77498)
@@ -1,3 +1,12 @@
+2007-05-16  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs: New dialog for
+       encapsulating a single field.
+
+       * MonoDevelop.Ide.Commands/RefactoryCommands.cs 
(BuildRefactoryMenuForItem):
+       Add an "Encapsulate Field" menu item for all fiends.
+       (EncapsulateField): Open an EncapsulateFieldDialog.
+
 2007-05-15  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 
        * MonoDevelop.Ide.Commands/RefactoryCommands.cs (ImplementInterface): 
When

Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am      2007-05-16 
17:57:06 UTC (rev 77497)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am      2007-05-16 
18:00:27 UTC (rev 77498)
@@ -33,6 +33,7 @@
        gtk-gui/generated.cs \
        gtk-gui/MonoDevelop.Ide.Gui.Dialogs.CombineEntryFeatureSelector.cs \
        gtk-gui/MonoDevelop.Ide.Gui.Dialogs.DeleteFileDialog.cs \
+       gtk-gui/MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.cs \
        gtk-gui/MonoDevelop.Ide.Gui.Dialogs.ExportProjectDialog.cs \
        gtk-gui/MonoDevelop.Ide.Gui.Dialogs.FeatureSelectorDialog.cs \
        gtk-gui/MonoDevelop.Ide.Gui.Dialogs.NewProjectDialog.cs \
@@ -98,6 +99,7 @@
        MonoDevelop.Ide.Gui.Dialogs/DeleteFileDialog.cs \
        MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs \
        MonoDevelop.Ide.Gui.Dialogs/EditTemplateDialog.cs \
+       MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs \
        MonoDevelop.Ide.Gui.Dialogs/ExportProjectDialog.cs \
        MonoDevelop.Ide.Gui.Dialogs/FeatureSelectorDialog.cs \
        MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs \

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs
    2007-05-16 17:57:06 UTC (rev 77497)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs
    2007-05-16 18:00:27 UTC (rev 77498)
@@ -255,6 +255,7 @@
                        } else if (item is IField) {
                                txt = GettextCatalog.GetString ("Field '{0}'", 
item.Name);
                                AddRefactoryMenuForClass (ctx, pinfo, ciset, 
((IField) item).ReturnType.FullyQualifiedName);
+                               ciset.CommandInfos.Add 
(GettextCatalog.GetString ("Encapsulate Field"), new RefactoryOperation 
(refactorer.EncapsulateField));
                        } else if (item is IProperty) {
                                txt = GettextCatalog.GetString ("Property 
'{0}'", item.Name);
                                AddRefactoryMenuForClass (ctx, pinfo, ciset, 
((IProperty) item).ReturnType.FullyQualifiedName);
@@ -563,6 +564,12 @@
                        ImplementInterface (true);
                }
                
+               public void EncapsulateField ()
+               {
+                       EncapsulateFieldDialog dialog = new 
EncapsulateFieldDialog (ctx, (IField) item);
+                       dialog.Show ();
+               }
+               
                public void Rename ()
                {
                        RenameItemDialog dialog = new RenameItemDialog (ctx, 
item);

Added: 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs
    2007-05-16 17:57:06 UTC (rev 77497)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs
    2007-05-16 18:00:27 UTC (rev 77498)
@@ -0,0 +1,157 @@
+// 
/cvs/monodevelop/Core/src/MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs 
created with MonoDevelop
+// User: fejj at 3:50 PM 5/15/2007
+//
+// To change standard headers go to Edit->Preferences->Coding->Standard Headers
+//
+
+using System;
+using System.Text;
+using System.CodeDom;
+
+using Gtk;
+
+using MonoDevelop.Core;
+using MonoDevelop.Projects.Parser;
+using MonoDevelop.Projects.CodeGeneration;
+
+namespace MonoDevelop.Ide.Gui.Dialogs {
+       public partial class EncapsulateFieldDialog : Gtk.Dialog {
+               IParserContext ctx;
+               IField field;
+               
+               public EncapsulateFieldDialog (IParserContext ctx, IField field)
+               {
+                       this.field = field;
+                       this.ctx = ctx;
+                       
+                       this.Build ();
+                       
+                       this.Title = GettextCatalog.GetString ("Encapsulate 
'{0}'", field.Name);
+                       
+                       entryFieldName.Text = field.Name;
+                       
+                       buttonOk.Sensitive = false;
+                       entryPropertyName.Changed += new EventHandler 
(OnEntryChanged);
+                       entryPropertyName.Activated += new EventHandler 
(OnEntryActivated);
+                       
+                       entryPropertyName.Text = GeneratePropertyName ();
+                       entryPropertyName.SelectRegion (0, -1);
+                       
+                       buttonOk.Clicked += new EventHandler (OnOKClicked);
+                       buttonCancel.Clicked += new EventHandler 
(OnCancelClicked);
+               }
+               
+               string GeneratePropertyName ()
+               {
+                       StringBuilder builder = new StringBuilder 
(field.Name.Length);
+                       string fieldName = field.Name;
+                       bool upper = true;
+                       int i = 0;
+                       
+                       // Field names are commonly prefixed with "m" or "m_" 
by devs from c++ land.
+                       if (fieldName[0] == 'm' && fieldName.Length > 1 &&
+                           (fieldName[1] == '_' || Char.IsUpper 
(fieldName[1])))
+                               i++;
+                       
+                       while (i < fieldName.Length) {
+                               if (fieldName[i] == '_') {
+                                       // strip _'s and uppercase the next 
letter
+                                       upper = true;
+                               } else if (Char.IsLetter (fieldName[i])) {
+                                       builder.Append (upper ? Char.ToUpper 
(fieldName[i]) : fieldName[i]);
+                                       upper = false;
+                               } else {
+                                       builder.Append (fieldName[i]);
+                               }
+                               
+                               i++;
+                       }
+                       
+                       return builder.ToString ();
+               }
+               
+               void OnEntryChanged (object sender, EventArgs e)
+               {
+                       string name = entryPropertyName.Text;
+                       IMember member;
+                       int i;
+                       
+                       // Don't allow the user to click OK unless there is a 
new name
+                       if (name.Length == 0) {
+                               buttonOk.Sensitive = false;
+                               return;
+                       }
+                       
+                       // Check that this member name isn't already used by 
properties
+                       for (i = 0; i < field.DeclaringType.Properties.Count; 
i++) {
+                               member = field.DeclaringType.Properties[i];
+                               if (member.Name == name) {
+                                       buttonOk.Sensitive = false;
+                                       return;
+                               }
+                       }
+                       
+                       // Check that this member name isn't already used by 
fields
+                       for (i = 0; i < field.DeclaringType.Fields.Count; i++) {
+                               member = field.DeclaringType.Fields[i];
+                               if (member.Name == name) {
+                                       buttonOk.Sensitive = false;
+                                       return;
+                               }
+                       }
+                       
+                       // Check that this member name isn't already used by 
methods
+                       for (i = 0; i < field.DeclaringType.Methods.Count; i++) 
{
+                               member = field.DeclaringType.Methods[i];
+                               if (member.Name == name) {
+                                       buttonOk.Sensitive = false;
+                                       return;
+                               }
+                       }
+                       
+                       // Check that this member name isn't already used by 
events
+                       for (i = 0; i < field.DeclaringType.Events.Count; i++) {
+                               member = field.DeclaringType.Events[i];
+                               if (member.Name == name) {
+                                       buttonOk.Sensitive = false;
+                                       return;
+                               }
+                       }
+                       
+                       buttonOk.Sensitive = true;
+               }
+               
+               void OnEntryActivated (object sender, EventArgs e)
+               {
+                       if (buttonOk.Sensitive)
+                               buttonOk.Click ();
+               }
+               
+               void OnCancelClicked (object sender, EventArgs e)
+               {
+                       ((Widget) this).Destroy ();
+               }
+               
+               void OnOKClicked (object sender, EventArgs e)
+               {
+                       CodeRefactorer refactorer = 
IdeApp.ProjectOperations.CodeRefactorer;
+                       IProgressMonitor monitor = 
IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor (this.Title, 
null);
+                       string name = entryPropertyName.Text;
+                       CodeMemberProperty member;
+                       
+                       member = new CodeMemberProperty ();
+                       member.Name = name;
+                       
+                       member.Type = new CodeTypeReference 
(field.ReturnType.Name);
+                       member.Attributes = MemberAttributes.Public;
+                       
+                       // FIXME: need to fill in these implementations
+                       member.HasGet = true;
+                       member.HasSet = true;
+                       
+                       refactorer.AddMember (field.DeclaringType, member);
+                       
+                       ((Widget) this).Destroy ();
+               }
+       }
+}

Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.mdp
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.mdp      
2007-05-16 17:57:06 UTC (rev 77497)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.mdp      
2007-05-16 18:00:27 UTC (rev 77498)
@@ -291,6 +291,8 @@
     <File name="./gtk-gui/MonoDevelop.Ide.Gui.Dialogs.NewProjectDialog.cs" 
subtype="Code" buildaction="Compile" />
     <File 
name="./gtk-gui/MonoDevelop.Ide.Gui.Dialogs.FeatureSelectorDialog.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./gtk-gui/MonoDevelop.Ide.Gui.Dialogs.RenameItemDialog.cs" 
subtype="Code" buildaction="Compile" />
+    <File name="./MonoDevelop.Ide.Gui.Dialogs/EncapsulateFieldDialog.cs" 
subtype="Code" buildaction="Compile" />
+    <File 
name="./gtk-gui/MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.cs" 
subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="False" refto="gecko-sharp, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=ccf7d78a55e9f021" />
@@ -324,6 +326,12 @@
     <ProjectReference type="Assembly" localcopy="False" 
refto="../../../contrib/Mono.Addins.Gui.dll" />
     <ProjectReference type="Assembly" localcopy="False" 
refto="../../../contrib/Mono.Addins.Setup.dll" />
   </References>
+  <Deployment.LinuxDeployData scriptName="monodevelop.ide" />
+  <GtkDesignInfo partialTypes="True">
+    <ExportedWidgets>
+      <Widget>MonoDevelop.Ide.Gui.Dialogs.CombineEntryFeatureSelector</Widget>
+    </ExportedWidgets>
+  </GtkDesignInfo>
   <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" 
RelativeMakefileName="./Makefile.am" BuildTargetName="" CleanTargetName="" 
SyncReferences="True" IsAutotoolsProject="True" 
RelativeConfigureInPath="../../../">
     <ExcludedFiles>
       <File>./AssemblyInfo.cs</File>
@@ -336,12 +344,6 @@
     <AsmRefVar Sync="True" Name="REFS" Prefix="-r:" />
     <ProjectRefVar Sync="True" Name="REFS" Prefix="-r:" />
   </MonoDevelop.Autotools.MakefileInfo>
-  <GtkDesignInfo partialTypes="True">
-    <ExportedWidgets>
-      <Widget>MonoDevelop.Ide.Gui.Dialogs.CombineEntryFeatureSelector</Widget>
-    </ExportedWidgets>
-  </GtkDesignInfo>
-  <Deployment.LinuxDeployData scriptName="monodevelop.ide" />
   <DeploymentInformation strategy="File">
     <excludeFiles />
   </DeploymentInformation>

Added: 
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.cs
    2007-05-16 17:57:06 UTC (rev 77497)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.cs
    2007-05-16 18:00:27 UTC (rev 77498)
@@ -0,0 +1,219 @@
+// 
------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      Mono Runtime Version: 2.0.50727.42
+// 
+//      Changes to this file may cause incorrect behavior and will be lost if 
+//      the code is regenerated.
+//  </autogenerated>
+// 
------------------------------------------------------------------------------
+
+namespace MonoDevelop.Ide.Gui.Dialogs {
+    
+    
+    public partial class EncapsulateFieldDialog {
+        
+        private Gtk.VBox vbox;
+        
+        private Gtk.Table tableName;
+        
+        private Gtk.Entry entryFieldName;
+        
+        private Gtk.Entry entryPropertyName;
+        
+        private Gtk.Label labelFieldName;
+        
+        private Gtk.Label labelPropertyName;
+        
+        private Gtk.Label labelUpdateRefs;
+        
+        private Gtk.HBox hboxUpdateRefs;
+        
+        private Gtk.Label labelSpacer;
+        
+        private Gtk.VBox vboxUpdateChoices;
+        
+        private Gtk.RadioButton radioUpdateExternal;
+        
+        private Gtk.RadioButton radioUpdateAll;
+        
+        private Gtk.Button buttonCancel;
+        
+        private Gtk.Button buttonOk;
+        
+        protected virtual void Build() {
+            Stetic.Gui.Initialize();
+            // Widget MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog
+            this.Name = "MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog";
+            this.Title = Mono.Unix.Catalog.GetString("Encapsulate Field");
+            // Internal child 
MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.VBox
+            Gtk.VBox w1 = this.VBox;
+            w1.Name = "dialog1_VBox";
+            w1.BorderWidth = ((uint)(2));
+            // Container child dialog1_VBox.Gtk.Box+BoxChild
+            this.vbox = new Gtk.VBox();
+            this.vbox.Name = "vbox";
+            this.vbox.Spacing = 6;
+            this.vbox.BorderWidth = ((uint)(12));
+            // Container child vbox.Gtk.Box+BoxChild
+            this.tableName = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
+            this.tableName.Name = "tableName";
+            this.tableName.RowSpacing = ((uint)(6));
+            this.tableName.ColumnSpacing = ((uint)(6));
+            // Container child tableName.Gtk.Table+TableChild
+            this.entryFieldName = new Gtk.Entry();
+            this.entryFieldName.Sensitive = false;
+            this.entryFieldName.CanFocus = true;
+            this.entryFieldName.Name = "entryFieldName";
+            this.entryFieldName.IsEditable = true;
+            this.entryFieldName.InvisibleChar = '●';
+            this.tableName.Add(this.entryFieldName);
+            Gtk.Table.TableChild w2 = 
((Gtk.Table.TableChild)(this.tableName[this.entryFieldName]));
+            w2.LeftAttach = ((uint)(1));
+            w2.RightAttach = ((uint)(2));
+            w2.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child tableName.Gtk.Table+TableChild
+            this.entryPropertyName = new Gtk.Entry();
+            this.entryPropertyName.CanFocus = true;
+            this.entryPropertyName.Name = "entryPropertyName";
+            this.entryPropertyName.IsEditable = true;
+            this.entryPropertyName.InvisibleChar = '●';
+            this.tableName.Add(this.entryPropertyName);
+            Gtk.Table.TableChild w3 = 
((Gtk.Table.TableChild)(this.tableName[this.entryPropertyName]));
+            w3.TopAttach = ((uint)(1));
+            w3.BottomAttach = ((uint)(2));
+            w3.LeftAttach = ((uint)(1));
+            w3.RightAttach = ((uint)(2));
+            w3.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child tableName.Gtk.Table+TableChild
+            this.labelFieldName = new Gtk.Label();
+            this.labelFieldName.Name = "labelFieldName";
+            this.labelFieldName.Xalign = 0F;
+            this.labelFieldName.LabelProp = Mono.Unix.Catalog.GetString("Field 
name:");
+            this.tableName.Add(this.labelFieldName);
+            Gtk.Table.TableChild w4 = 
((Gtk.Table.TableChild)(this.tableName[this.labelFieldName]));
+            w4.XOptions = ((Gtk.AttachOptions)(4));
+            w4.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child tableName.Gtk.Table+TableChild
+            this.labelPropertyName = new Gtk.Label();
+            this.labelPropertyName.Name = "labelPropertyName";
+            this.labelPropertyName.Xalign = 0F;
+            this.labelPropertyName.LabelProp = 
Mono.Unix.Catalog.GetString("_Property name:");
+            this.labelPropertyName.UseUnderline = true;
+            this.tableName.Add(this.labelPropertyName);
+            Gtk.Table.TableChild w5 = 
((Gtk.Table.TableChild)(this.tableName[this.labelPropertyName]));
+            w5.TopAttach = ((uint)(1));
+            w5.BottomAttach = ((uint)(2));
+            w5.XOptions = ((Gtk.AttachOptions)(4));
+            w5.YOptions = ((Gtk.AttachOptions)(4));
+            this.vbox.Add(this.tableName);
+            Gtk.Box.BoxChild w6 = 
((Gtk.Box.BoxChild)(this.vbox[this.tableName]));
+            w6.Position = 0;
+            w6.Expand = false;
+            w6.Fill = false;
+            // Container child vbox.Gtk.Box+BoxChild
+            this.labelUpdateRefs = new Gtk.Label();
+            this.labelUpdateRefs.Name = "labelUpdateRefs";
+            this.labelUpdateRefs.Xalign = 0F;
+            this.labelUpdateRefs.LabelProp = 
Mono.Unix.Catalog.GetString("_Update references:");
+            this.labelUpdateRefs.UseUnderline = true;
+            this.vbox.Add(this.labelUpdateRefs);
+            Gtk.Box.BoxChild w7 = 
((Gtk.Box.BoxChild)(this.vbox[this.labelUpdateRefs]));
+            w7.Position = 1;
+            w7.Expand = false;
+            w7.Fill = false;
+            // Container child vbox.Gtk.Box+BoxChild
+            this.hboxUpdateRefs = new Gtk.HBox();
+            this.hboxUpdateRefs.Name = "hboxUpdateRefs";
+            this.hboxUpdateRefs.Spacing = 6;
+            // Container child hboxUpdateRefs.Gtk.Box+BoxChild
+            this.labelSpacer = new Gtk.Label();
+            this.labelSpacer.Name = "labelSpacer";
+            this.labelSpacer.Xalign = 0F;
+            this.labelSpacer.LabelProp = Mono.Unix.Catalog.GetString("    ");
+            this.hboxUpdateRefs.Add(this.labelSpacer);
+            Gtk.Box.BoxChild w8 = 
((Gtk.Box.BoxChild)(this.hboxUpdateRefs[this.labelSpacer]));
+            w8.Position = 0;
+            w8.Expand = false;
+            w8.Fill = false;
+            // Container child hboxUpdateRefs.Gtk.Box+BoxChild
+            this.vboxUpdateChoices = new Gtk.VBox();
+            this.vboxUpdateChoices.Name = "vboxUpdateChoices";
+            this.vboxUpdateChoices.Spacing = 6;
+            // Container child vboxUpdateChoices.Gtk.Box+BoxChild
+            this.radioUpdateExternal = new 
Gtk.RadioButton(Mono.Unix.Catalog.GetString("_External"));
+            this.radioUpdateExternal.CanFocus = true;
+            this.radioUpdateExternal.Name = "radioUpdateExternal";
+            this.radioUpdateExternal.DrawIndicator = true;
+            this.radioUpdateExternal.UseUnderline = true;
+            this.radioUpdateExternal.Group = new 
GLib.SList(System.IntPtr.Zero);
+            this.vboxUpdateChoices.Add(this.radioUpdateExternal);
+            Gtk.Box.BoxChild w9 = 
((Gtk.Box.BoxChild)(this.vboxUpdateChoices[this.radioUpdateExternal]));
+            w9.Position = 0;
+            w9.Expand = false;
+            w9.Fill = false;
+            // Container child vboxUpdateChoices.Gtk.Box+BoxChild
+            this.radioUpdateAll = new 
Gtk.RadioButton(Mono.Unix.Catalog.GetString("_All"));
+            this.radioUpdateAll.CanFocus = true;
+            this.radioUpdateAll.Name = "radioUpdateAll";
+            this.radioUpdateAll.DrawIndicator = true;
+            this.radioUpdateAll.UseUnderline = true;
+            this.radioUpdateAll.Group = this.radioUpdateExternal.Group;
+            this.vboxUpdateChoices.Add(this.radioUpdateAll);
+            Gtk.Box.BoxChild w10 = 
((Gtk.Box.BoxChild)(this.vboxUpdateChoices[this.radioUpdateAll]));
+            w10.Position = 1;
+            w10.Expand = false;
+            w10.Fill = false;
+            this.hboxUpdateRefs.Add(this.vboxUpdateChoices);
+            Gtk.Box.BoxChild w11 = 
((Gtk.Box.BoxChild)(this.hboxUpdateRefs[this.vboxUpdateChoices]));
+            w11.Position = 1;
+            this.vbox.Add(this.hboxUpdateRefs);
+            Gtk.Box.BoxChild w12 = 
((Gtk.Box.BoxChild)(this.vbox[this.hboxUpdateRefs]));
+            w12.Position = 2;
+            w12.Expand = false;
+            w12.Fill = false;
+            w1.Add(this.vbox);
+            Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(w1[this.vbox]));
+            w13.Position = 0;
+            w13.Expand = false;
+            w13.Fill = false;
+            // Internal child 
MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog.ActionArea
+            Gtk.HButtonBox w14 = this.ActionArea;
+            w14.Name = "dialog1_ActionArea";
+            w14.Spacing = 6;
+            w14.BorderWidth = ((uint)(5));
+            w14.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
+            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+            this.buttonCancel = new Gtk.Button();
+            this.buttonCancel.CanDefault = true;
+            this.buttonCancel.CanFocus = true;
+            this.buttonCancel.Name = "buttonCancel";
+            this.buttonCancel.UseStock = true;
+            this.buttonCancel.UseUnderline = true;
+            this.buttonCancel.Label = "gtk-cancel";
+            this.AddActionWidget(this.buttonCancel, -6);
+            Gtk.ButtonBox.ButtonBoxChild w15 = 
((Gtk.ButtonBox.ButtonBoxChild)(w14[this.buttonCancel]));
+            w15.Expand = false;
+            w15.Fill = false;
+            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+            this.buttonOk = new Gtk.Button();
+            this.buttonOk.CanDefault = true;
+            this.buttonOk.CanFocus = true;
+            this.buttonOk.Name = "buttonOk";
+            this.buttonOk.UseStock = true;
+            this.buttonOk.UseUnderline = true;
+            this.buttonOk.Label = "gtk-ok";
+            this.AddActionWidget(this.buttonOk, -5);
+            Gtk.ButtonBox.ButtonBoxChild w16 = 
((Gtk.ButtonBox.ButtonBoxChild)(w14[this.buttonOk]));
+            w16.Position = 1;
+            w16.Expand = false;
+            w16.Fill = false;
+            if ((this.Child != null)) {
+                this.Child.ShowAll();
+            }
+            this.DefaultWidth = 400;
+            this.DefaultHeight = 229;
+            this.Show();
+        }
+    }
+}

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.FeatureSelectorDialog.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.FeatureSelectorDialog.cs
     2007-05-16 17:57:06 UTC (rev 77497)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.FeatureSelectorDialog.cs
     2007-05-16 18:00:27 UTC (rev 77498)
@@ -52,7 +52,6 @@
             this.featureList = new 
MonoDevelop.Ide.Gui.Dialogs.CombineEntryFeatureSelector();
             this.featureList.Events = ((Gdk.EventMask)(256));
             this.featureList.Name = "featureList";
-            this.featureList.BorderWidth = ((uint)(0));
             this.vbox5.Add(this.featureList);
             Gtk.Box.BoxChild w3 = 
((Gtk.Box.BoxChild)(this.vbox5[this.featureList]));
             w3.Position = 1;

Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/gui.stetic
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/gui.stetic       
2007-05-16 17:57:06 UTC (rev 77497)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/gtk-gui/gui.stetic       
2007-05-16 18:00:27 UTC (rev 77498)
@@ -927,7 +927,6 @@
                   <widget 
class="MonoDevelop.Ide.Gui.Dialogs.CombineEntryFeatureSelector" 
id="featureList">
                     <property name="MemberName" />
                     <property name="Events">ButtonPressMask</property>
-                    <property name="BorderWidth">0</property>
                   </widget>
                   <packing>
                     <property name="Position">1</property>
@@ -1029,7 +1028,6 @@
               <widget 
class="MonoDevelop.Ide.Gui.Dialogs.CombineEntryFeatureSelector" 
id="featureList">
                 <property name="MemberName" />
                 <property name="Events">ButtonPressMask</property>
-                <property name="BorderWidth">0</property>
               </widget>
               <packing>
                 <property name="Position">1</property>
@@ -1197,4 +1195,254 @@
       </widget>
     </child>
   </widget>
+  <widget class="Gtk.Dialog" 
id="MonoDevelop.Ide.Gui.Dialogs.EncapsulateFieldDialog" design-size="400 229">
+    <property name="MemberName" />
+    <property name="Title" translatable="yes">Encapsulate Field</property>
+    <property name="Buttons">2</property>
+    <property name="HelpButton">False</property>
+    <child internal-child="VBox">
+      <widget class="Gtk.VBox" id="dialog1_VBox">
+        <property name="MemberName" />
+        <property name="BorderWidth">2</property>
+        <child>
+          <widget class="Gtk.VBox" id="vbox">
+            <property name="MemberName" />
+            <property name="Spacing">6</property>
+            <property name="BorderWidth">12</property>
+            <child>
+              <widget class="Gtk.Table" id="tableName">
+                <property name="MemberName" />
+                <property name="NRows">2</property>
+                <property name="NColumns">2</property>
+                <property name="RowSpacing">6</property>
+                <property name="ColumnSpacing">6</property>
+                <child>
+                  <widget class="Gtk.Entry" id="entryFieldName">
+                    <property name="MemberName" />
+                    <property name="Sensitive">False</property>
+                    <property name="CanFocus">True</property>
+                    <property name="IsEditable">True</property>
+                    <property name="InvisibleChar">●</property>
+                  </widget>
+                  <packing>
+                    <property name="LeftAttach">1</property>
+                    <property name="RightAttach">2</property>
+                    <property name="AutoSize">True</property>
+                    <property name="YOptions">Fill</property>
+                    <property name="XExpand">True</property>
+                    <property name="XFill">True</property>
+                    <property name="XShrink">False</property>
+                    <property name="YExpand">False</property>
+                    <property name="YFill">True</property>
+                    <property name="YShrink">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Entry" id="entryPropertyName">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="IsEditable">True</property>
+                    <property name="InvisibleChar">●</property>
+                  </widget>
+                  <packing>
+                    <property name="TopAttach">1</property>
+                    <property name="BottomAttach">2</property>
+                    <property name="LeftAttach">1</property>
+                    <property name="RightAttach">2</property>
+                    <property name="AutoSize">True</property>
+                    <property name="YOptions">Fill</property>
+                    <property name="XExpand">True</property>
+                    <property name="XFill">True</property>
+                    <property name="XShrink">False</property>
+                    <property name="YExpand">False</property>
+                    <property name="YFill">True</property>
+                    <property name="YShrink">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Label" id="labelFieldName">
+                    <property name="MemberName" />
+                    <property name="Xalign">0</property>
+                    <property name="LabelProp" translatable="yes">Field 
name:</property>
+                  </widget>
+                  <packing>
+                    <property name="AutoSize">True</property>
+                    <property name="XOptions">Fill</property>
+                    <property name="YOptions">Fill</property>
+                    <property name="XExpand">False</property>
+                    <property name="XFill">True</property>
+                    <property name="XShrink">False</property>
+                    <property name="YExpand">False</property>
+                    <property name="YFill">True</property>
+                    <property name="YShrink">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Label" id="labelPropertyName">
+                    <property name="MemberName" />
+                    <property name="Xalign">0</property>
+                    <property name="LabelProp" translatable="yes">_Property 
name:</property>
+                    <property name="UseUnderline">True</property>
+                  </widget>
+                  <packing>
+                    <property name="TopAttach">1</property>
+                    <property name="BottomAttach">2</property>
+                    <property name="AutoSize">True</property>
+                    <property name="XOptions">Fill</property>
+                    <property name="YOptions">Fill</property>
+                    <property name="XExpand">False</property>
+                    <property name="XFill">True</property>
+                    <property name="XShrink">False</property>
+                    <property name="YExpand">False</property>
+                    <property name="YFill">True</property>
+                    <property name="YShrink">False</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.Label" id="labelUpdateRefs">
+                <property name="MemberName" />
+                <property name="Xalign">0</property>
+                <property name="LabelProp" translatable="yes">_Update 
references:</property>
+                <property name="UseUnderline">True</property>
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.HBox" id="hboxUpdateRefs">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
+                  <widget class="Gtk.Label" id="labelSpacer">
+                    <property name="MemberName" />
+                    <property name="Xalign">0</property>
+                    <property name="LabelProp" translatable="yes">    
</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.VBox" id="vboxUpdateChoices">
+                    <property name="MemberName" />
+                    <property name="Spacing">6</property>
+                    <child>
+                      <widget class="Gtk.RadioButton" id="radioUpdateExternal">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="Label" 
translatable="yes">_External</property>
+                        <property name="Active">True</property>
+                        <property name="DrawIndicator">True</property>
+                        <property name="HasLabel">True</property>
+                        <property name="UseUnderline">True</property>
+                        <property name="Group">group1</property>
+                      </widget>
+                      <packing>
+                        <property name="Position">0</property>
+                        <property name="AutoSize">False</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Gtk.RadioButton" id="radioUpdateAll">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="Label" 
translatable="yes">_All</property>
+                        <property name="DrawIndicator">True</property>
+                        <property name="HasLabel">True</property>
+                        <property name="UseUnderline">True</property>
+                        <property name="Group">group1</property>
+                      </widget>
+                      <packing>
+                        <property name="Position">1</property>
+                        <property name="AutoSize">False</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">2</property>
+                <property name="AutoSize">False</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+    <child internal-child="ActionArea">
+      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+        <property name="MemberName" />
+        <property name="Spacing">6</property>
+        <property name="BorderWidth">5</property>
+        <property name="Size">2</property>
+        <property name="LayoutStyle">End</property>
+        <child>
+          <widget class="Gtk.Button" id="buttonCancel">
+            <property name="MemberName" />
+            <property name="CanDefault">True</property>
+            <property name="CanFocus">True</property>
+            <property name="UseStock">True</property>
+            <property name="Type">StockItem</property>
+            <property name="StockId">gtk-cancel</property>
+            <property name="IsDialogButton">True</property>
+            <property name="ResponseId">-6</property>
+            <property name="label">gtk-cancel</property>
+          </widget>
+          <packing>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.Button" id="buttonOk">
+            <property name="MemberName" />
+            <property name="CanDefault">True</property>
+            <property name="CanFocus">True</property>
+            <property name="UseStock">True</property>
+            <property name="Type">StockItem</property>
+            <property name="StockId">gtk-ok</property>
+            <property name="IsDialogButton">True</property>
+            <property name="ResponseId">-5</property>
+            <property name="label">gtk-ok</property>
+          </widget>
+          <packing>
+            <property name="Position">1</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </stetic-interface>
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to