Author: miguel
Date: 2008-01-03 00:19:04 -0500 (Thu, 03 Jan 2008)
New Revision: 92154

Added:
   trunk/mono-tools/gui-compare/CustomCompare.cs
Modified:
   trunk/mono-tools/gui-compare/ChangeLog
   trunk/mono-tools/gui-compare/Config.cs
   trunk/mono-tools/gui-compare/InfoManager.cs
   trunk/mono-tools/gui-compare/MainWindow.cs
   trunk/mono-tools/gui-compare/ProviderSelector.cs
   trunk/mono-tools/gui-compare/config.make
   trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs
   trunk/mono-tools/gui-compare/gtk-gui/gui.stetic
   trunk/mono-tools/gui-compare/gtk-gui/guicompare.ProviderSelector.cs
   trunk/mono-tools/gui-compare/gui-compare.mdp
Log:
Implement custom compares.

* MainWindow.cs: SetComparedefinition allow setting target/reference on
  a single call fro mthe CompareDefinition
* CustomCompare.cs: New dialog box for custom compares.
* InfoManager.cs: Refactor code, move body to MainWindow
* ProviderSelector.cs: Spice this up.
* gtk-gui/gui.stetic: Widget to pick XML files or assemblies.
* Config.cs: Add new ToString override that formats the comparison for
  consistent titles

Modified: trunk/mono-tools/gui-compare/ChangeLog
===================================================================
--- trunk/mono-tools/gui-compare/ChangeLog      2008-01-03 03:56:40 UTC (rev 
92153)
+++ trunk/mono-tools/gui-compare/ChangeLog      2008-01-03 05:19:04 UTC (rev 
92154)
@@ -1,3 +1,14 @@
+2008-01-03  Miguel de Icaza <[EMAIL PROTECTED]> 
+
+       * MainWindow.cs: SetComparedefinition allow setting target/reference on 
a
+         single call fro mthe CompareDefinition
+       * CustomCompare.cs: New dialog box for custom compares.
+       * InfoManager.cs: Refactor code, move body to MainWindow
+       * ProviderSelector.cs: Spice this up.
+       * gtk-gui/gui.stetic: Widget to pick XML files or assemblies.
+       * Config.cs: Add new ToString override that formats the comparison for
+         consistent titles
+
 2008-01-02  Chris Toshok <[EMAIL PROTECTED]> 
 
        * MainWindow.cs: move the "summary.Visible = false" to StartCompare() so

Modified: trunk/mono-tools/gui-compare/Config.cs
===================================================================
--- trunk/mono-tools/gui-compare/Config.cs      2008-01-03 03:56:40 UTC (rev 
92153)
+++ trunk/mono-tools/gui-compare/Config.cs      2008-01-03 05:19:04 UTC (rev 
92154)
@@ -34,6 +34,7 @@
                public string ReferencePath = "";
                public bool TargetIsInfo = true;
                public string TargetPath = "";
+               public bool IsCustom = false;
                
                public CompareDefinition ()
                {
@@ -46,6 +47,13 @@
                        TargetIsInfo = tmaster;
                        TargetPath = tpath;
                }
+               
+               // Returns a suitable title
+               public override string ToString ()
+               {
+                       return String.Format ("{2}{0} -> {1}", Path.GetFileName 
(ReferencePath), Path.GetFileName (TargetPath),
+                                             IsCustom ? "Custom: ": "");
+               }
        }
        
        public class Config

Added: trunk/mono-tools/gui-compare/CustomCompare.cs
===================================================================
--- trunk/mono-tools/gui-compare/CustomCompare.cs       2008-01-03 03:56:40 UTC 
(rev 92153)
+++ trunk/mono-tools/gui-compare/CustomCompare.cs       2008-01-03 05:19:04 UTC 
(rev 92154)
@@ -0,0 +1,66 @@
+// CustomCompare.cs
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to 
deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+//
+
+using System;
+using Gtk;
+using System.IO;
+
+namespace GuiCompare
+{
+       public partial class CustomCompare : Gtk.Dialog
+       {       
+               public CustomCompare()
+               {
+                       this.Build();
+               }
+               
+               CompareDefinition Error (string format, params string [] args)
+               {
+                       MessageDialog md = new MessageDialog (this, 
DialogFlags.DestroyWithParent, MessageType.Error, ButtonsType.Close, 
String.Format (format, args));
+                       md.Run ();
+                       md.Destroy ();
+                       return null;
+               }
+               
+               public CompareDefinition GetCompare ()
+               {
+                       if (String.IsNullOrEmpty (reference.File))
+                               return Error ("No reference file was provided");
+                       
+                       if (String.IsNullOrEmpty (target.File))
+                               return Error ("No target file was provided");
+                       
+                       if (!File.Exists (reference.File))
+                               return Error ("Reference file {0} does not 
exist", reference.File);
+                               
+                       if (!File.Exists (target.File))
+                               return Error ("Target file {0} does not exist", 
target.File);
+                               
+                       
+                       CompareDefinition cd = new CompareDefinition 
(reference.IsInfo, reference.File, target.IsInfo, target.File);
+                       cd.IsCustom = true;
+                       return cd;
+               }
+       }
+}

Modified: trunk/mono-tools/gui-compare/InfoManager.cs
===================================================================
--- trunk/mono-tools/gui-compare/InfoManager.cs 2008-01-03 03:56:40 UTC (rev 
92153)
+++ trunk/mono-tools/gui-compare/InfoManager.cs 2008-01-03 05:19:04 UTC (rev 
92154)
@@ -399,22 +399,12 @@
                                        CompareDefinition cd = cdd;
                                        if (cd == null)
                                                throw new Exception ("FGGG");
-                                       string title = String.Format ("{0} -> 
{1}",
-                                                                     
Path.GetFileName (cd.ReferencePath),
-                                                                     
Path.GetFileName (cd.TargetPath));
-                                       MenuItem c = new MenuItem (title);
+                               
+                                       MenuItem c = new MenuItem (cd.ToString 
());
                                        c.Activated += delegate {
-                                               if (cd.ReferenceIsInfo)
-                                                       main.SetReference 
(delegate { return new MasterAssembly (cd.ReferencePath); });
-                                               else
-                                                       main.SetReference 
(delegate { return new CecilAssembly (cd.ReferencePath); });
-                                               
-                                               if (cd.TargetIsInfo)
-                                                       main.SetTarget 
(delegate { return new MasterAssembly (cd.TargetPath); });
-                                               else
-                                                       main.SetTarget 
(delegate { return new CecilAssembly (cd.TargetPath); });
-                                               main.StartCompare (delegate {
-                                                       main.Title = title; });
+                                               main.SetCompareDefinition (cd);
+
+                                               main.StartCompare (delegate { 
main.Title = cd.ToString ();});
                                                main.Config.MoveToTop (cd);
                                                PopulateRecent ();
                                                main.Config.Save ();
@@ -476,6 +466,10 @@
                                return;
                        }
                        
+                       MenuItem separator = new SeparatorMenuItem ();
+                       separator.ShowAll ();
+                       sub.Add (separator);
+                       
                        Populate (sub, "API 1.1", "1.0", "1.0", api_1_1);
                        Populate (sub, "API 2.0", "2.0", "2.0", api_2_0);
                        Populate (sub, "API 3.0 (WxF)", "3.0", "3.0", api_3_0);

Modified: trunk/mono-tools/gui-compare/MainWindow.cs
===================================================================
--- trunk/mono-tools/gui-compare/MainWindow.cs  2008-01-03 03:56:40 UTC (rev 
92153)
+++ trunk/mono-tools/gui-compare/MainWindow.cs  2008-01-03 05:19:04 UTC (rev 
92154)
@@ -243,6 +243,19 @@
                reference_loader = reference;
        }
        
+       public void SetCompareDefinition (CompareDefinition cd)
+       {
+               if (cd.ReferenceIsInfo)
+                       SetReference (delegate { return new MasterAssembly 
(cd.ReferencePath); });
+               else
+                       SetReference (delegate { return new CecilAssembly 
(cd.ReferencePath); });
+               
+               if (cd.TargetIsInfo)
+                       SetTarget (delegate { return new MasterAssembly 
(cd.TargetPath); });
+               else
+                       SetTarget (delegate { return new CecilAssembly 
(cd.TargetPath); });
+       }
+       
        public void StartCompare (WaitCallback done)
        {               
                summary.Visible = false;
@@ -445,4 +458,26 @@
        {
                StartCompare (delegate {});
        }
+
+       protected virtual void OnCustomActivated (object sender, 
System.EventArgs e)
+       {
+               CustomCompare cc = new CustomCompare ();
+               ResponseType code = (ResponseType) cc.Run ();
+               
+               if (code == ResponseType.None)
+                       return;
+               
+               if (code == ResponseType.Ok){
+                       CompareDefinition cd = cc.GetCompare ();
+                       if (cd != null){
+                               SetCompareDefinition (cd);
+                               StartCompare (delegate { Title = cd.ToString 
();});
+                               Config.AddRecent (cd);
+                               Config.Save ();
+                               info_manager.PopulateRecent ();
+                       }
+               }
+                               
+               cc.Destroy ();
+       }
 }
\ No newline at end of file

Modified: trunk/mono-tools/gui-compare/ProviderSelector.cs
===================================================================
--- trunk/mono-tools/gui-compare/ProviderSelector.cs    2008-01-03 03:56:40 UTC 
(rev 92153)
+++ trunk/mono-tools/gui-compare/ProviderSelector.cs    2008-01-03 05:19:04 UTC 
(rev 92154)
@@ -35,5 +35,43 @@
                {
                        this.Build();
                }
+
+               protected virtual void OnRadiobutton1Toggled (object sender, 
System.EventArgs e)
+               {
+                       filechooserbutton2.Sensitive = false;
+                       filechooserbutton1.Sensitive = true;
+               }
+
+               protected virtual void OnRadiobutton2Toggled (object sender, 
System.EventArgs e)
+               {
+                       filechooserbutton1.Sensitive = false;
+                       filechooserbutton2.Sensitive = true;
+               }
+
+               protected virtual void OnFilechooserbutton2Focused (object o, 
Gtk.FocusedArgs args)
+               {
+                       Console.WriteLine ("Got focus");
+               }
+
+               protected virtual void OnFilechooserbutton2FocusChildSet 
(object o, Gtk.FocusChildSetArgs args)
+               {
+                       radiobutton2.Active = true;
+               }
+               
+               // true if this is an XML description, false if its an assembly
+               public bool IsInfo {
+                       get {
+                               return radiobutton1.Active;
+                       }
+               }
+               
+               public string File {
+                       get {
+                               if (IsInfo)
+                                       return filechooserbutton1.Filename;
+                               else
+                                       return filechooserbutton2.Filename;
+                       }
+               }
        }
 }

Modified: trunk/mono-tools/gui-compare/config.make
===================================================================
--- trunk/mono-tools/gui-compare/config.make    2008-01-03 03:56:40 UTC (rev 
92153)
+++ trunk/mono-tools/gui-compare/config.make    2008-01-03 05:19:04 UTC (rev 
92154)
@@ -1,4 +1,4 @@
-prefix=/usr/local
+prefix=/mono
 RUNTIME=mono
 ASSEMBLY_VERSION=0.1.0.0
 VERSION=0.1

Modified: trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs
===================================================================
--- trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs  2008-01-03 03:56:40 UTC 
(rev 92153)
+++ trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs  2008-01-03 05:19:04 UTC 
(rev 92154)
@@ -124,7 +124,7 @@
         this.vbox1.Name = "vbox1";
         this.vbox1.Spacing = 6;
         // Container child vbox1.Gtk.Box+BoxChild
-        w1.AddUiFromString("<ui><menubar name='menubar1'><menu 
action='File'><menu action='RecentComparisons'/><separator/><menuitem 
action='Refresh'/><separator/><menuitem action='quit'/></menu><menu 
action='Compare'><menuitem action='Custom'/><separator/></menu><menu 
action='View'><menuitem action='ShowErrors'/><menuitem 
action='ShowMissing'/><menuitem action='ShowExtra'/><menuitem 
action='ShowTodo'/><menuitem action='ShowPresent'/></menu></menubar></ui>");
+        w1.AddUiFromString("<ui><menubar name='menubar1'><menu 
action='File'><menu action='RecentComparisons'/><separator/><menuitem 
action='Refresh'/><separator/><menuitem action='quit'/></menu><menu 
action='Compare'><menuitem action='Custom'/></menu><menu 
action='View'><menuitem action='ShowErrors'/><menuitem 
action='ShowMissing'/><menuitem action='ShowExtra'/><menuitem 
action='ShowTodo'/><menuitem action='ShowPresent'/></menu></menubar></ui>");
         this.menubar1 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
         this.menubar1.Name = "menubar1";
         this.vbox1.Add(this.menubar1);
@@ -213,6 +213,7 @@
         this.Show();
         this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
         this.quit.Activated += new System.EventHandler(this.OnQuitActivated);
+        this.Custom.Activated += new 
System.EventHandler(this.OnCustomActivated);
         this.ShowMissing.Toggled += new 
System.EventHandler(this.OnShowMissingToggled);
         this.ShowExtra.Toggled += new 
System.EventHandler(this.OnShowExtraToggled);
         this.ShowPresent.Toggled += new 
System.EventHandler(this.OnShowPresentToggled);

Modified: trunk/mono-tools/gui-compare/gtk-gui/gui.stetic
===================================================================
--- trunk/mono-tools/gui-compare/gtk-gui/gui.stetic     2008-01-03 03:56:40 UTC 
(rev 92153)
+++ trunk/mono-tools/gui-compare/gtk-gui/gui.stetic     2008-01-03 05:19:04 UTC 
(rev 92154)
@@ -30,6 +30,7 @@
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">Custom...</property>
         <property name="ShortLabel" translatable="yes">Custom...</property>
+        <signal name="Activated" handler="OnCustomActivated" />
       </action>
       <action id="a">
         <property name="Type">Action</property>
@@ -121,7 +122,6 @@
               </node>
               <node type="Menu" action="Compare">
                 <node type="Menuitem" action="Custom" />
-                <node type="Separator" />
               </node>
               <node type="Menu" action="View">
                 <node type="Menuitem" action="ShowErrors" />
@@ -242,10 +242,264 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="guicompare.ProviderSelector" design-size="300 
300">
+  <widget class="Gtk.Bin" id="guicompare.ProviderSelector" design-size="321 
142">
     <property name="MemberName" />
     <child>
-      <placeholder />
+      <widget class="Gtk.Table" id="table2">
+        <property name="MemberName" />
+        <property name="NRows">4</property>
+        <property name="NColumns">2</property>
+        <property name="RowSpacing">6</property>
+        <property name="ColumnSpacing">6</property>
+        <property name="BorderWidth">4</property>
+        <child>
+          <placeholder />
+        </child>
+        <child>
+          <widget class="Gtk.FileChooserButton" id="filechooserbutton1">
+            <property name="MemberName" />
+          </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.FileChooserButton" id="filechooserbutton2">
+            <property name="MemberName" />
+            <signal name="FocusChildSet" 
handler="OnFilechooserbutton2FocusChildSet" />
+          </widget>
+          <packing>
+            <property name="TopAttach">3</property>
+            <property name="BottomAttach">4</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="label2">
+            <property name="MemberName" />
+            <property name="Xpad">8</property>
+            <property name="LabelProp" translatable="yes" />
+          </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>
+        <child>
+          <widget class="Gtk.RadioButton" id="radiobutton1">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Label" translatable="yes">API 
Description</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="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.RadioButton" id="radiobutton2">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Label" translatable="yes">Assembly</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="TopAttach">2</property>
+            <property name="BottomAttach">3</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>
+      </widget>
     </child>
   </widget>
+  <widget class="Gtk.Dialog" id="GuiCompare.CustomCompare" design-size="578 
273">
+    <property name="MemberName" />
+    <property name="WindowPosition">CenterOnParent</property>
+    <property name="Buttons">2</property>
+    <property name="HelpButton">False</property>
+    <property name="HasSeparator">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.HBox" id="hbox1">
+            <property name="MemberName" />
+            <property name="Spacing">12</property>
+            <property name="BorderWidth">4</property>
+            <child>
+              <widget class="Gtk.Frame" id="frame1">
+                <property name="MemberName" />
+                <property name="ShadowType">In</property>
+                <child>
+                  <widget class="Gtk.Alignment" id="GtkAlignment2">
+                    <property name="MemberName" />
+                    <property name="Xalign">0</property>
+                    <property name="Yalign">0</property>
+                    <property name="LeftPadding">12</property>
+                    <child>
+                      <widget class="guicompare.ProviderSelector" 
id="reference">
+                        <property name="MemberName" />
+                        <property name="Events">ButtonPressMask</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="Gtk.Label" id="GtkLabel4">
+                    <property name="MemberName" />
+                    <property name="LabelProp" 
translatable="yes">&lt;b&gt;Reference:&lt;/b&gt;</property>
+                    <property name="UseMarkup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">False</property>
+                <property name="Padding">4</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.Frame" id="frame2">
+                <property name="MemberName" />
+                <property name="ShadowType">In</property>
+                <child>
+                  <widget class="Gtk.Alignment" id="GtkAlignment3">
+                    <property name="MemberName" />
+                    <property name="Xalign">0</property>
+                    <property name="Yalign">0</property>
+                    <property name="LeftPadding">12</property>
+                    <child>
+                      <widget class="guicompare.ProviderSelector" id="target">
+                        <property name="MemberName" />
+                        <property name="Events">ButtonPressMask</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="Gtk.Label" id="GtkLabel9">
+                    <property name="MemberName" />
+                    <property name="LabelProp" 
translatable="yes">&lt;b&gt;Target:&lt;/b&gt;</property>
+                    <property name="UseMarkup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">False</property>
+                <property name="Padding">4</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder />
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">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="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="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

Modified: trunk/mono-tools/gui-compare/gtk-gui/guicompare.ProviderSelector.cs
===================================================================
--- trunk/mono-tools/gui-compare/gtk-gui/guicompare.ProviderSelector.cs 
2008-01-03 03:56:40 UTC (rev 92153)
+++ trunk/mono-tools/gui-compare/gtk-gui/guicompare.ProviderSelector.cs 
2008-01-03 05:19:04 UTC (rev 92154)
@@ -13,15 +13,90 @@
     
     public partial class ProviderSelector {
         
+        private Gtk.Table table2;
+        
+        private Gtk.FileChooserButton filechooserbutton1;
+        
+        private Gtk.FileChooserButton filechooserbutton2;
+        
+        private Gtk.Label label2;
+        
+        private Gtk.RadioButton radiobutton1;
+        
+        private Gtk.RadioButton radiobutton2;
+        
         protected virtual void Build() {
             Stetic.Gui.Initialize(this);
             // Widget guicompare.ProviderSelector
             Stetic.BinContainer.Attach(this);
             this.Name = "guicompare.ProviderSelector";
+            // Container child 
guicompare.ProviderSelector.Gtk.Container+ContainerChild
+            this.table2 = new Gtk.Table(((uint)(4)), ((uint)(2)), false);
+            this.table2.Name = "table2";
+            this.table2.RowSpacing = ((uint)(6));
+            this.table2.ColumnSpacing = ((uint)(6));
+            this.table2.BorderWidth = ((uint)(4));
+            // Container child table2.Gtk.Table+TableChild
+            this.filechooserbutton1 = new 
Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A File"), 
((Gtk.FileChooserAction)(0)));
+            this.filechooserbutton1.Name = "filechooserbutton1";
+            this.table2.Add(this.filechooserbutton1);
+            Gtk.Table.TableChild w1 = 
((Gtk.Table.TableChild)(this.table2[this.filechooserbutton1]));
+            w1.TopAttach = ((uint)(1));
+            w1.BottomAttach = ((uint)(2));
+            w1.LeftAttach = ((uint)(1));
+            w1.RightAttach = ((uint)(2));
+            w1.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table2.Gtk.Table+TableChild
+            this.filechooserbutton2 = new 
Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A File"), 
((Gtk.FileChooserAction)(0)));
+            this.filechooserbutton2.Name = "filechooserbutton2";
+            this.table2.Add(this.filechooserbutton2);
+            Gtk.Table.TableChild w2 = 
((Gtk.Table.TableChild)(this.table2[this.filechooserbutton2]));
+            w2.TopAttach = ((uint)(3));
+            w2.BottomAttach = ((uint)(4));
+            w2.LeftAttach = ((uint)(1));
+            w2.RightAttach = ((uint)(2));
+            w2.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table2.Gtk.Table+TableChild
+            this.label2 = new Gtk.Label();
+            this.label2.Name = "label2";
+            this.label2.Xpad = 8;
+            this.label2.LabelProp = "";
+            this.table2.Add(this.label2);
+            Gtk.Table.TableChild w3 = 
((Gtk.Table.TableChild)(this.table2[this.label2]));
+            w3.TopAttach = ((uint)(1));
+            w3.BottomAttach = ((uint)(2));
+            w3.XOptions = ((Gtk.AttachOptions)(4));
+            w3.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table2.Gtk.Table+TableChild
+            this.radiobutton1 = new 
Gtk.RadioButton(Mono.Unix.Catalog.GetString("API Description"));
+            this.radiobutton1.CanFocus = true;
+            this.radiobutton1.Name = "radiobutton1";
+            this.radiobutton1.DrawIndicator = true;
+            this.radiobutton1.UseUnderline = true;
+            this.radiobutton1.Group = new GLib.SList(System.IntPtr.Zero);
+            this.table2.Add(this.radiobutton1);
+            Gtk.Table.TableChild w4 = 
((Gtk.Table.TableChild)(this.table2[this.radiobutton1]));
+            w4.RightAttach = ((uint)(2));
+            w4.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table2.Gtk.Table+TableChild
+            this.radiobutton2 = new 
Gtk.RadioButton(Mono.Unix.Catalog.GetString("Assembly"));
+            this.radiobutton2.CanFocus = true;
+            this.radiobutton2.Name = "radiobutton2";
+            this.radiobutton2.DrawIndicator = true;
+            this.radiobutton2.UseUnderline = true;
+            this.radiobutton2.Group = this.radiobutton1.Group;
+            this.table2.Add(this.radiobutton2);
+            Gtk.Table.TableChild w5 = 
((Gtk.Table.TableChild)(this.table2[this.radiobutton2]));
+            w5.TopAttach = ((uint)(2));
+            w5.BottomAttach = ((uint)(3));
+            w5.RightAttach = ((uint)(2));
+            w5.YOptions = ((Gtk.AttachOptions)(4));
+            this.Add(this.table2);
             if ((this.Child != null)) {
                 this.Child.ShowAll();
             }
             this.Show();
+            this.filechooserbutton2.FocusChildSet += new 
Gtk.FocusChildSetHandler(this.OnFilechooserbutton2FocusChildSet);
         }
     }
 }

Modified: trunk/mono-tools/gui-compare/gui-compare.mdp
===================================================================
--- trunk/mono-tools/gui-compare/gui-compare.mdp        2008-01-03 03:56:40 UTC 
(rev 92153)
+++ trunk/mono-tools/gui-compare/gui-compare.mdp        2008-01-03 05:19:04 UTC 
(rev 92154)
@@ -53,6 +53,8 @@
     <File name="gtk-gui/objects.xml" subtype="Code" 
buildaction="EmbedAsResource" />
     <File name="AssemblyResolver.cs" subtype="Code" buildaction="Compile" />
     <File name="Config.cs" subtype="Code" buildaction="Compile" />
+    <File name="CustomCompare.cs" subtype="Code" buildaction="Compile" />
+    <File name="gtk-gui/GuiCompare.CustomCompare.cs" subtype="Code" 
buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, 
Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
@@ -68,6 +70,7 @@
   <GtkDesignInfo gtkVersion="2.10.2">
     <ExportedWidgets>
       <Widget>guicompare.ProviderSelector</Widget>
+      <Widget>guicompare.CompareSource</Widget>
     </ExportedWidgets>
   </GtkDesignInfo>
 </Project>
\ No newline at end of file

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

Reply via email to