Author: lluis
Date: 2006-01-18 11:12:40 -0500 (Wed, 18 Jan 2006)
New Revision: 55733

Added:
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Commands/
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Commands/GladeCommands.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileDisplayBinding.cs
   
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs
Modified:
   trunk/monodevelop/Extras/GladeAddIn/ChangeLog
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ClassUtils.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/EmbedWindow.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectNodeBuilder.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeService.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs
   
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderDisplayBinding.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderEditSession.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProject.cs
   
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProjectNodeBuilder.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderView.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindow.cs
   
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindowNodeBuilder.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/PreviewBox.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolder.cs
   
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolderNodeBuilder.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.addin.xml
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.mdp
   trunk/monodevelop/Extras/GladeAddIn/Makefile.am
   trunk/monodevelop/Extras/GladeAddIn/templates/GladeDialog.xft.xml
   trunk/monodevelop/Extras/GladeAddIn/templates/GladeWindow.xft.xml
Log:
2006-01-18 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   

        * GladeAddIn.Gui/GladePalettePad.cs: Hide the palette buttons which
        create a top level window.
        * GladeAddIn.addin.xml: Assign an Id to the file templates.
        Added commands for creating a window and dialog.
        * GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs:
        * GladeAddIn.Commands/GladeCommands.cs: Implemented new commands.
        * GladeAddIn.Gui/GladeFileDisplayBinding.cs: New display binding
        for glade files that just does nothing (it avoids starting glade
        when clicking on the glade resource file).
        * GladeAddIn.mdp: Updated.
        
        * templates/GladeWindow.xft.xml:
        * templates/GladeDialog.xft.xml: Moved to Gtk category.
        
        * GladeAddIn.Gui/GladePropertiesPad.cs:
        * GladeAddIn.Gui/GladeProjectNodeBuilder.cs:
        * GladeAddIn.Gui/GuiBuilderProject.cs:
        * GladeAddIn.Gui/GuiBuilderWindow.cs:
        * GladeAddIn.Gui/GladeWidgetTreePad.cs:
        * GladeAddIn.Gui/ClassUtils.cs:
        * GladeAddIn.Gui/GuiBuilderView.cs:
        * GladeAddIn.Gui/WindowsFolder.cs:
        * GladeAddIn.Gui/GladeProjectPad.cs:
        * GladeAddIn.Gui/PreviewBox.cs:
        * GladeAddIn.Gui/GladeService.cs:
        * GladeAddIn.Gui/GuiBuilderProjectNodeBuilder.cs:
        * GladeAddIn.Gui/GuiBuilderWindowNodeBuilder.cs:
        * GladeAddIn.Gui/WindowsFolderNodeBuilder.cs:
        * GladeAddIn.Gui/EmbedWindow.cs:
        * GladeAddIn.Gui/GuiBuilderEditSession.cs:
        * GladeAddIn.Gui/GladeFileTemplate.cs:
        * GladeAddIn.Gui/GuiBuilderDisplayBinding.cs: Added license header.
        
        * Makefile.am: Added new files.



Modified: trunk/monodevelop/Extras/GladeAddIn/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/ChangeLog       2006-01-18 15:56:37 UTC 
(rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/ChangeLog       2006-01-18 16:12:40 UTC 
(rev 55733)
@@ -1,3 +1,40 @@
+2006-01-18 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   
+
+       * GladeAddIn.Gui/GladePalettePad.cs: Hide the palette buttons which
+       create a top level window.
+       * GladeAddIn.addin.xml: Assign an Id to the file templates.
+       Added commands for creating a window and dialog.
+       * GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs:
+       * GladeAddIn.Commands/GladeCommands.cs: Implemented new commands.
+       * GladeAddIn.Gui/GladeFileDisplayBinding.cs: New display binding
+       for glade files that just does nothing (it avoids starting glade
+       when clicking on the glade resource file).
+       * GladeAddIn.mdp: Updated.
+       
+       * templates/GladeWindow.xft.xml:
+       * templates/GladeDialog.xft.xml: Moved to Gtk category.
+       
+       * GladeAddIn.Gui/GladePropertiesPad.cs:
+       * GladeAddIn.Gui/GladeProjectNodeBuilder.cs:
+       * GladeAddIn.Gui/GuiBuilderProject.cs:
+       * GladeAddIn.Gui/GuiBuilderWindow.cs:
+       * GladeAddIn.Gui/GladeWidgetTreePad.cs:
+       * GladeAddIn.Gui/ClassUtils.cs:
+       * GladeAddIn.Gui/GuiBuilderView.cs:
+       * GladeAddIn.Gui/WindowsFolder.cs:
+       * GladeAddIn.Gui/GladeProjectPad.cs:
+       * GladeAddIn.Gui/PreviewBox.cs:
+       * GladeAddIn.Gui/GladeService.cs:
+       * GladeAddIn.Gui/GuiBuilderProjectNodeBuilder.cs:
+       * GladeAddIn.Gui/GuiBuilderWindowNodeBuilder.cs:
+       * GladeAddIn.Gui/WindowsFolderNodeBuilder.cs:
+       * GladeAddIn.Gui/EmbedWindow.cs:
+       * GladeAddIn.Gui/GuiBuilderEditSession.cs:
+       * GladeAddIn.Gui/GladeFileTemplate.cs:
+       * GladeAddIn.Gui/GuiBuilderDisplayBinding.cs: Added license header.
+       
+       * Makefile.am: Added new files.
+
 2006-01-13 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   
 
        * GladeAddIn.Gui/GladePropertiesPad.cs: 

Added: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Commands/GladeCommands.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Commands/GladeCommands.cs    
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Commands/GladeCommands.cs    
2006-01-18 16:12:40 UTC (rev 55733)
@@ -0,0 +1,36 @@
+//
+// GladeCommands.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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.
+//
+
+namespace GladeAddIn
+{
+       public enum GladeCommands
+       {
+               AddNewDialog,
+               AddNewWindow,
+       }
+}

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ClassUtils.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ClassUtils.cs    
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ClassUtils.cs    
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,3 +1,31 @@
+//
+// ClassUtils.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 Gtk;
 using System;
 using System.Collections;

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/EmbedWindow.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/EmbedWindow.cs   
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/EmbedWindow.cs   
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,3 +1,31 @@
+//
+// EmbedWindow.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 Gtk;
 using System;
 using System.Collections;

Added: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileDisplayBinding.cs
===================================================================
--- 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileDisplayBinding.cs   
    2006-01-18 15:56:37 UTC (rev 55732)
+++ 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileDisplayBinding.cs   
    2006-01-18 16:12:40 UTC (rev 55733)
@@ -0,0 +1,59 @@
+//
+// GladeFileDisplayBinding.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 System.IO;
+using MonoDevelop.Ide.Codons;
+using MonoDevelop.Ide.Gui;
+
+namespace GladeAddIn.Gui
+{
+       public class GladeFileDisplayBinding: IDisplayBinding
+       {
+               public bool CanCreateContentForFile (string fileName)
+               {
+                       return Path.GetExtension (fileName) == ".glade";
+               }
+               
+               public bool CanCreateContentForMimeType (string mimetype)
+               {
+                       return false;
+               }
+               
+               public IViewContent CreateContentForFile(string fileName)
+               {
+                       return null;
+               }
+               
+               public IViewContent CreateContentForMimeType (string mimeType, 
string content)
+               {
+                       return null;
+               }
+       }
+}

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs     
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs     
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GladeFileTemplate.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 System.IO;
 

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs       
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs       
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GladePalettePad.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 MonoDevelop.Ide.Gui;
@@ -15,6 +43,7 @@
                        try {
                                widget = GladeService.App.Palette;
                                widget.ShowAll ();
+                               HideWindowWidgets (widget);
                        } catch (Exception ex) {
                                Console.WriteLine (ex);
                        }
@@ -23,5 +52,21 @@
                public override Gtk.Widget Control {
                        get { return widget; }
                }
+               
+               void HideWindowWidgets (Gtk.Widget w)
+               {
+                       if (w is Gtk.RadioButton) {
+                               IntPtr data = w.GetData ("user");
+                               if (!data.Equals (IntPtr.Zero)) {
+                                       Gladeui.WidgetClass wc = new 
Gladeui.WidgetClass (data);
+                                       Type t = (Type) wc.Type;
+                                       if (typeof(Gtk.Window).IsAssignableFrom 
(t))
+                                               w.Hide ();
+                               }
+                       } else if (w is Gtk.Container) {
+                               foreach (Widget cw in ((Container)w).Children)
+                                       HideWindowWidgets (cw);
+                       }
+               }
        }
 }

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectNodeBuilder.cs
===================================================================
--- 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectNodeBuilder.cs   
    2006-01-18 15:56:37 UTC (rev 55732)
+++ 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectNodeBuilder.cs   
    2006-01-18 16:12:40 UTC (rev 55733)
@@ -4,7 +4,7 @@
 // Author:
 //   Lluis Sanchez Gual
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs       
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs       
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GladeProjectPad.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 MonoDevelop.Ide.Gui;

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs    
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs    
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GladePropertiesPad.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 MonoDevelop.Ide.Gui;

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeService.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeService.cs  
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeService.cs  
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,30 @@
-// created on 03/11/2005 at 11:43
+//
+// GladeService.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 System.Reflection;
@@ -23,6 +49,8 @@
                static CombineEntryEventHandler entryRemovedHander;
                static GladeWidgetTreePad widgetTreePad;
                internal static Gladeui.Project EmptyProject;
+               static string GuiBuilderLayout = "GUI Builder";
+               static string defaultLayout;
        
                static GladeService ()
                {
@@ -54,6 +82,7 @@
                                gladeApp.Project = EmptyProject;
                                if (widgetTreePad != null)
                                        widgetTreePad.Fill (null);
+//                             RestoreLayout ();
                                return;
                        }
 
@@ -62,14 +91,41 @@
                                gladeApp.Project = 
view.EditSession.GladeProject;
                                if (widgetTreePad != null)
                                        widgetTreePad.Fill 
(view.EditSession.GladeWidget);
+//                             SetDesignerLayout ();
                        }
                        else {
                                gladeApp.Project = EmptyProject;
                                if (widgetTreePad != null)
                                        widgetTreePad.Fill (null);
+//                             RestoreLayout ();
                        }
                }
                
+               static void SetDesignerLayout ()
+               {
+                       if (IdeApp.Workbench.CurrentLayout != GuiBuilderLayout) 
{
+                               bool exists = Array.IndexOf 
(IdeApp.Workbench.Layouts, GuiBuilderLayout) == -1;
+                               defaultLayout = IdeApp.Workbench.CurrentLayout;
+                               IdeApp.Workbench.CurrentLayout = 
GuiBuilderLayout;
+                               if (!exists) {
+                                       Pad p = IdeApp.Workbench.Pads 
[typeof(GladePalettePad)];
+                                       if (p != null) p.Visible = true;
+                                       p = IdeApp.Workbench.Pads 
[typeof(GladeWidgetTreePad)];
+                                       if (p != null) p.Visible = true;
+                                       p = IdeApp.Workbench.Pads 
[typeof(GladePropertiesPad)];
+                                       if (p != null) p.Visible = true;
+                               }
+                       }
+               }
+               
+               static void RestoreLayout ()
+               {
+                       if (defaultLayout != null) {
+                               IdeApp.Workbench.CurrentLayout = defaultLayout;
+                               defaultLayout = null;
+                       }
+               }
+               
                public static GuiBuilderProject[] GetGuiBuilderProjects 
(Project project)
                {
                        ArrayList list = (ArrayList) projects [project];

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs    
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs    
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GladeWidgetTreePad.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 System.Collections;
 using Gtk;

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderDisplayBinding.cs
===================================================================
--- 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderDisplayBinding.cs  
    2006-01-18 15:56:37 UTC (rev 55732)
+++ 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderDisplayBinding.cs  
    2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GuiBuilderDisplayBinding.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 MonoDevelop.Core.Gui;
 using MonoDevelop.Ide.Codons;

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderEditSession.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderEditSession.cs 
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderEditSession.cs 
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GuiBuilderEditSession.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 System.Reflection;
 using System.Collections;

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProject.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProject.cs     
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProject.cs     
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,30 @@
-// created on 03/11/2005 at 11:43
+//
+// GuiBuilderProject.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 System.Xml;

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProjectNodeBuilder.cs
===================================================================
--- 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProjectNodeBuilder.cs
  2006-01-18 15:56:37 UTC (rev 55732)
+++ 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderProjectNodeBuilder.cs
  2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,10 +1,10 @@
 //
-// TestNodeBuilder.cs
+// GuiBuilderProjectNodeBuilder.cs
 //
 // Author:
 //   Lluis Sanchez Gual
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderView.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderView.cs        
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderView.cs        
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// GuiBuilderView.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 MonoDevelop.Core;
 using MonoDevelop.Ide.Gui.Content;

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindow.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindow.cs      
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindow.cs      
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,5 +1,32 @@
-// created on 03/11/2005 at 11:43
+//
+// GuiBuilderWindow.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 System.Reflection;
 using System.Collections;

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindowNodeBuilder.cs
===================================================================
--- 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindowNodeBuilder.cs
   2006-01-18 15:56:37 UTC (rev 55732)
+++ 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GuiBuilderWindowNodeBuilder.cs
   2006-01-18 16:12:40 UTC (rev 55733)
@@ -4,7 +4,7 @@
 // Author:
 //   Lluis Sanchez Gual
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/PreviewBox.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/PreviewBox.cs    
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/PreviewBox.cs    
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// PreviewBox.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 Gdk;

Added: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs
===================================================================
--- 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs
     2006-01-18 15:56:37 UTC (rev 55732)
+++ 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs
     2006-01-18 16:12:40 UTC (rev 55733)
@@ -0,0 +1,84 @@
+//
+// ProjectFolderNodeBuilderExtension.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 MonoDevelop.Projects;
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Ide.Gui.Pads;
+using MonoDevelop.Ide.Gui.Pads.ProjectPad;
+using MonoDevelop.Components.Commands;
+
+namespace GladeAddIn.Gui
+{
+       class ProjectFolderNodeBuilderExtension: NodeBuilderExtension
+       {
+               public override bool CanBuildNode (Type dataType)
+               {
+                       return typeof(ProjectFolder).IsAssignableFrom 
(dataType) ||
+                                       typeof(Project).IsAssignableFrom 
(dataType);
+               }
+               
+               public override Type CommandHandlerType {
+                       get { return 
typeof(ProjectFolderNodeBuilderExtensionCommandHandler); }
+               }
+       }
+       
+       class ProjectFolderNodeBuilderExtensionCommandHandler: 
NodeCommandHandler
+       {
+               [CommandHandler (GladeAddIn.GladeCommands.AddNewDialog)]
+               public void AddNewDialogToProject()
+               {
+                       AddNewWindow ("GladeDialogFileTemplate");
+               }
+               
+               [CommandHandler (GladeAddIn.GladeCommands.AddNewWindow)]
+               public void AddNewWindowToProject()
+               {
+                       AddNewWindow ("GladeWindowFileTemplate");
+               }
+               
+               public void AddNewWindow (string id)
+               {
+                       Project project = CurrentNode.GetParentDataItem 
(typeof(Project), true) as Project;
+                       string path;
+                       if (CurrentNode.DataItem is ProjectFolder)
+                               path = 
((ProjectFolder)CurrentNode.DataItem).Path;
+                       else
+                               path = 
((Project)CurrentNode.DataItem).BaseDirectory;
+
+                       IdeApp.ProjectOperations.CreateProjectFile (project, 
path, id);
+                       
+                       using (IProgressMonitor m = 
IdeApp.Workbench.ProgressMonitors.GetSaveProgressMonitor ()) {
+                               project.Save (m);
+                       }
+                       CurrentNode.Expanded = true;
+               }
+       }
+}

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolder.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolder.cs 
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolder.cs 
2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,4 +1,32 @@
+//
+// WindowsFolder.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// 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 MonoDevelop.Projects;
 
 namespace GladeAddIn.Gui

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolderNodeBuilder.cs
===================================================================
--- 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolderNodeBuilder.cs  
    2006-01-18 15:56:37 UTC (rev 55732)
+++ 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/WindowsFolderNodeBuilder.cs  
    2006-01-18 16:12:40 UTC (rev 55733)
@@ -1,10 +1,10 @@
 //
-// TestNodeBuilder.cs
+// WindowsFolderNodeBuilder.cs
 //
 // Author:
 //   Lluis Sanchez Gual
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.addin.xml
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.addin.xml    2006-01-18 
15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.addin.xml    2006-01-18 
16:12:40 UTC (rev 55733)
@@ -35,8 +35,8 @@
        </Extension>
        
        <Extension path = "/MonoDevelop/FileTemplates">
-               <FileTemplate resource = "GladeDialog.xft.xml"/>
-               <FileTemplate resource = "GladeWindow.xft.xml"/>
+               <FileTemplate id = "GladeDialogFileTemplate" resource = 
"GladeDialog.xft.xml"/>
+               <FileTemplate id = "GladeWindowFileTemplate" resource = 
"GladeWindow.xft.xml"/>
        </Extension>
        
        <Extension path = 
"/SharpDevelop/Views/GladeFileNodeBuilder/ContextMenu">
@@ -51,5 +51,30 @@
                       class = "GladeAddIn.Gui.GuiBuilderDisplayBinding" />
        </Extension>
        
+       <Extension path = "/SharpDevelop/Commands">
+               <Command id = "GladeAddIn.GladeCommands.AddNewDialog"
+                               _label = "Add New Dialog" />
+               <Command id = "GladeAddIn.GladeCommands.AddNewWindow"
+                               _label = "Add New Window" />
+       </Extension>
+       
+       <Extension path = 
"/SharpDevelop/Views/ProjectBrowser/ContextMenu/ProjectBrowserNode/Add">
+               <CommandItem id = "GladeAddIn.GladeCommands.AddNewDialog" 
insertafter = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" />
+               <CommandItem id = "GladeAddIn.GladeCommands.AddNewWindow" />
+       </Extension>
+       
+       <Extension path = 
"/SharpDevelop/Views/ProjectBrowser/ContextMenu/DefaultDirectoryNode/Add">
+               <CommandItem id = "GladeAddIn.GladeCommands.AddNewDialog" 
insertafter = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" />
+               <CommandItem id = "GladeAddIn.GladeCommands.AddNewWindow" />
+       </Extension>
+       
+       <Extension path = 
"/SharpDevelop/Workbench/Pads/MonoDevelop.Ide.Gui.Pads.ProjectPad">
+               <NodeBuilder class = 
"GladeAddIn.Gui.ProjectFolderNodeBuilderExtension"/>
+       </Extension>
+       
+       <Extension path = "/SharpDevelop/Workbench/DisplayBindings">
+               <DisplayBinding class = 
"GladeAddIn.Gui.GladeFileDisplayBinding"/>
+       </Extension>
+       
 </AddIn>
 

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.mdp
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.mdp  2006-01-18 15:56:37 UTC 
(rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.mdp  2006-01-18 16:12:40 UTC 
(rev 55733)
@@ -47,6 +47,10 @@
     <File name="./GladeAddIn.Gui/GladeWidgetTreePad.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./GladeAddIn.Gui/ClassUtils.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./GladeAddIn.Gui/GladeFileTemplate.cs" subtype="Code" 
buildaction="Compile" />
+    <File name="./GladeAddIn.Commands" subtype="Directory" 
buildaction="Compile" />
+    <File name="./GladeAddIn.Commands/GladeCommands.cs" subtype="Code" 
buildaction="Compile" />
+    <File name="./GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs" 
subtype="Code" buildaction="Compile" />
+    <File name="./GladeAddIn.Gui/GladeFileDisplayBinding.cs" subtype="Code" 
buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="gladeui-sharp, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=ccf7d78a55e9f021" />
@@ -54,11 +58,11 @@
     <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.Core.Gui" />
     <ProjectReference type="Project" localcopy="True" refto="MonoDevelop.Core" 
/>
     <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.Projects" />
-    <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, 
Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, 
Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="System.Xml, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, 
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, 
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="System, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, 
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, 
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
   </References>
 </Project>
\ No newline at end of file

Modified: trunk/monodevelop/Extras/GladeAddIn/Makefile.am
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/Makefile.am     2006-01-18 15:56:37 UTC 
(rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/Makefile.am     2006-01-18 16:12:40 UTC 
(rev 55733)
@@ -21,6 +21,8 @@
 Metacity/ObjectManager.cs \
 Metacity/Preview.cs \
 Metacity/Theme.cs \
+GladeAddIn.Commands/GladeCommands.cs \
+GladeAddIn.Gui/ProjectFolderNodeBuilderExtension.cs \
 GladeAddIn.Gui/GladeFileTemplate.cs \
 GladeAddIn.Gui/GladePalettePad.cs \
 GladeAddIn.Gui/GladeProjectNodeBuilder.cs \
@@ -39,6 +41,7 @@
 GladeAddIn.Gui/GuiBuilderDisplayBinding.cs \
 GladeAddIn.Gui/GuiBuilderEditSession.cs \
 GladeAddIn.Gui/ClassUtils.cs \
+GladeAddIn.Gui/GladeFileDisplayBinding.cs \
 GladeAddIn.Gui/WindowsFolderNodeBuilder.cs
 
 RES = \

Modified: trunk/monodevelop/Extras/GladeAddIn/templates/GladeDialog.xft.xml
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/templates/GladeDialog.xft.xml   
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/templates/GladeDialog.xft.xml   
2006-01-18 16:12:40 UTC (rev 55733)
@@ -4,7 +4,7 @@
        <TemplateConfiguration>
                <_Name>Dialog</_Name>
                <Icon>md-empty-file-icon</Icon>
-               <Category>Glade</Category>
+               <Category>Gtk</Category>
                <LanguageName>*</LanguageName>
                <_Description>Creates a Glade dialog.</_Description>
                <Type>GladeAddIn.Gui.GladeFileTemplate</Type>

Modified: trunk/monodevelop/Extras/GladeAddIn/templates/GladeWindow.xft.xml
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/templates/GladeWindow.xft.xml   
2006-01-18 15:56:37 UTC (rev 55732)
+++ trunk/monodevelop/Extras/GladeAddIn/templates/GladeWindow.xft.xml   
2006-01-18 16:12:40 UTC (rev 55733)
@@ -4,7 +4,7 @@
        <TemplateConfiguration>
                <_Name>Window</_Name>
                <Icon>md-empty-file-icon</Icon>
-               <Category>Glade</Category>
+               <Category>Gtk</Category>
                <LanguageName>*</LanguageName>
                <_Description>Creates a Glade window.</_Description>
                <Type>GladeAddIn.Gui.GladeFileTemplate</Type>

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

Reply via email to