Author: lluis
Date: 2006-01-13 12:54:31 -0500 (Fri, 13 Jan 2006)
New Revision: 55527

Modified:
   trunk/monodevelop/Extras/GladeAddIn/ChangeLog
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs
   trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs
Log:
2006-01-13 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   

        * GladeAddIn.Gui/GladePropertiesPad.cs: 
        * GladeAddIn.Gui/GladePalettePad.cs:
        * GladeAddIn.Gui/GladeWidgetTreePad.cs:
        * GladeAddIn.Gui/GladeProjectPad.cs: Set a better default placement
        for the pads.
        
        * GladeAddIn.Gui/GladeFileTemplate.cs: When adding a window or
        dialog, create a new glade file if it doesn't yet exist.



Modified: trunk/monodevelop/Extras/GladeAddIn/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/ChangeLog       2006-01-13 17:53:31 UTC 
(rev 55526)
+++ trunk/monodevelop/Extras/GladeAddIn/ChangeLog       2006-01-13 17:54:31 UTC 
(rev 55527)
@@ -1,3 +1,14 @@
+2006-01-13 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   
+
+       * GladeAddIn.Gui/GladePropertiesPad.cs: 
+       * GladeAddIn.Gui/GladePalettePad.cs:
+       * GladeAddIn.Gui/GladeWidgetTreePad.cs:
+       * GladeAddIn.Gui/GladeProjectPad.cs: Set a better default placement
+       for the pads.
+       
+       * GladeAddIn.Gui/GladeFileTemplate.cs: When adding a window or
+       dialog, create a new glade file if it doesn't yet exist.
+
 2006-01-10 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   
 
        Initial implementation of the glade-3 add-in

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs     
2006-01-13 17:53:31 UTC (rev 55526)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeFileTemplate.cs     
2006-01-13 17:54:31 UTC (rev 55527)
@@ -1,5 +1,6 @@
 
 using System;
+using System.IO;
 
 using MonoDevelop.Core;
 using MonoDevelop.Projects;
@@ -16,7 +17,21 @@
                        GuiBuilderProject[] projects = 
GladeService.GetGuiBuilderProjects (project);
                        GuiBuilderProject gproject = null;
                        if (projects.Length == 0) {
-                               throw new UserException ("The project '" + 
project.Name + "' does not contain any glade file.");
+                               // Create an empty glade file
+                               string gladeFile = Path.Combine 
(project.BaseDirectory, "gui.glade");
+                               StreamWriter sw = new StreamWriter (gladeFile);
+                               sw.WriteLine ("<?xml version=\"1.0\" 
standalone=\"no\"?> <!--*- mode: xml -*-->");
+                               sw.WriteLine ("<!DOCTYPE glade-interface SYSTEM 
\"http://glade.gnome.org/glade-2.0.dtd\";>");
+                               sw.WriteLine ("<glade-interface>");
+                               sw.WriteLine ("</glade-interface>");
+                               sw.Close ();
+                               ProjectFile file = new ProjectFile (gladeFile, 
BuildAction.EmbedAsResource);
+                               project.ProjectFiles.Add (file);
+                               projects = GladeService.GetGuiBuilderProjects 
(project);
+                               if (projects.Length > 0)
+                                       gproject = projects [0];
+                               else
+                                       throw new UserException ("A new glade 
file for the window could not be created.");
                        } else {
                                gproject = projects [0];
                        }

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs       
2006-01-13 17:53:31 UTC (rev 55526)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePalettePad.cs       
2006-01-13 17:54:31 UTC (rev 55527)
@@ -11,6 +11,7 @@
                
                public GladePalettePad (): base ("")
                {
+                       DefaultPlacement = "right";
                        try {
                                widget = GladeService.App.Palette;
                                widget.ShowAll ();

Modified: trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs       
2006-01-13 17:53:31 UTC (rev 55526)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeProjectPad.cs       
2006-01-13 17:54:31 UTC (rev 55527)
@@ -13,6 +13,7 @@
                
                public GladeProjectPad (): base ("")
                {
+                       DefaultPlacement = "bottom";
                        pview = new Gladeui.ProjectView 
(Gladeui.ProjectViewType.Tree);
                        GladeService.App.AddProjectView (pview);
                        pview.ShowAll ();

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs    
2006-01-13 17:53:31 UTC (rev 55526)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladePropertiesPad.cs    
2006-01-13 17:54:31 UTC (rev 55527)
@@ -12,6 +12,7 @@
                
                public GladePropertiesPad (): base ("")
                {
+                       DefaultPlacement = 
"GladeAddIn.Gui.GladeWidgetTreePad/right; bottom";
                        VBox box = new VBox ();
                        CheckButton la = new CheckButton ("Map to code");
                //      box.PackStart (la, false, false, 6);

Modified: 
trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs
===================================================================
--- trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs    
2006-01-13 17:53:31 UTC (rev 55526)
+++ trunk/monodevelop/Extras/GladeAddIn/GladeAddIn.Gui/GladeWidgetTreePad.cs    
2006-01-13 17:54:31 UTC (rev 55527)
@@ -20,6 +20,7 @@
                
                public GladeWidgetTreePad (): base ("")
                {
+                       DefaultPlacement = 
"GladeAddIn.Gui.GladePropertiesPad/left; bottom";
                        store = new Gtk.TreeStore (
                                typeof (Gdk.Pixbuf), // image
                                typeof (string),     // name

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

Reply via email to