From commit-watcher at mono-cvs.ximian.com Sat Aug 7 02:43:58 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Sat, 7 Aug 2004 02:43:58 -0400 (EDT) Subject: [Monodevelop-patches-list] r1924 - in trunk/MonoDevelop/Core: . src/AddIns/DisplayBindings/SourceEditor src/AddIns/Misc/StartPage src/AddIns/prj2make-sharp-lib src/Libraries/MonoDevelop.Core src/Libraries/MonoDevelop.Gui.Utils src/Libraries/MonoDevelop.Gui.Widgets src/Main/Base src/Main/StartUp Message-ID: <20040807064358.CAAD19475C@mono-cvs.ximian.com> Author: tberman Date: 2004-08-07 02:43:58 -0400 (Sat, 07 Aug 2004) New Revision: 1924 Modified: trunk/MonoDevelop/Core/ChangeLog trunk/MonoDevelop/Core/configure.in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/ChangeLog trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/ChangeLog trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog trunk/MonoDevelop/Core/src/Main/Base/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/Main/Base/ChangeLog trunk/MonoDevelop/Core/src/Main/StartUp/AssemblyInfo.cs.in trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog Log: some small fixes to prepare for the 0.5.1 release. Modified: trunk/MonoDevelop/Core/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * configure.in: small changes for the 0.5.1 release on sunday. + 2004-07-08 Pawel Rozanski * build/data/resources/icons/Nemerle.File.Form Modified: trunk/MonoDevelop/Core/configure.in =================================================================== --- trunk/MonoDevelop/Core/configure.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/configure.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,6 +1,6 @@ AC_INIT(README) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(monodevelop, 0.6) +AM_INIT_AUTOMAKE(monodevelop, 0.5.1) AM_MAINTAINER_MODE AM_DISABLE_STATIC @@ -9,6 +9,8 @@ AM_PATH_GLIB_2_0 +ASSEMBLY_VERSION=0.5.1.0 + AC_PATH_PROG(MONO, mono) AC_PATH_PROG(MCS, mcs) AC_PATH_PROG(XDGMIME, update-mime-database, no) @@ -95,9 +97,10 @@ AC_SUBST(GLIB_MKENUMS) dnl find mono debugger -MONO_DEBUGGER_REQUIRED_VERSION=0.9 -PKG_CHECK_MODULES(MONO_DEBUGGER, mono-debugger >= $MONO_DEBUGGER_REQUIRED_VERSION, enable_debugger=yes, enable_debugger=no) -AC_SUBST(MONO_DEBUGGER_LIBS) +dnl MONO_DEBUGGER_REQUIRED_VERSION=0.9 +dnl PKG_CHECK_MODULES(MONO_DEBUGGER, mono-debugger >= $MONO_DEBUGGER_REQUIRED_VERSION, enable_debugger=yes, enable_debugger=no) +dnl AC_SUBST(MONO_DEBUGGER_LIBS) +enable_debugger=no MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`" AC_SUBST(MOZILLA_HOME) @@ -125,6 +128,7 @@ AC_SUBST(LIB_SUFFIX) AC_SUBST(LIB_PREFIX) +AC_SUBST(ASSEMBLY_VERSION) AC_OUTPUT([ Makefile @@ -200,7 +204,7 @@ echo " * Installation prefix = $prefix" echo " * GNOME prefix = $gnome_prefix" echo "" -echo " * mono-debugger $MONO_DEBUGGER_REQUIRED_VERSION: $enable_debugger" +echo " * mono-debugger: disabled in this release." echo "" echo " NOTE: if any of the above say 'no' you may install the" echo " corresponding development packages for them, and" Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -10,7 +10,7 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-07-05 John Luke * Gui/SourceEditorDisplayBinding.cs: Modified: trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -23,7 +23,7 @@ // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. Modified: trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-03-31 Todd Berman * Makefile.am: change from $(GECKO_SHARP) to @GECKO_SHARP@ for bugfix Modified: trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -11,7 +11,7 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] Modified: trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-06-17 John Luke * Makefile.am: add reference to MonoDevelop.Gui.Widgets Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -17,7 +17,7 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] [assembly: AssemblyDelaySign(false)] //[assembly: AssemblyKeyFile("..\\src\\Main\\Core\\CoreKey.key")] Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-07-05 Todd Berman * Services/GettextCatalog.cs: removed Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -7,7 +7,7 @@ [assembly: AssemblyProduct("MonoDevelop.Gui.Utils")] [assembly: AssemblyCopyright("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Utils/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-07-02 Todd Berman * FileIcons/FileIconLoader.cs: add a try catch that makes sure the Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -7,7 +7,7 @@ [assembly: AssemblyProduct("MonoDevelop.Gui.Widgets")] [assembly: AssemblyCopyright("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-06-21 John Luke * Tree/TreeView.cs: Scroll to the node when it is selected Modified: trunk/MonoDevelop/Core/src/Main/Base/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Main/Base/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -16,7 +16,7 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] // ..\\src\\SharpDevelop\\sharpdevelop.key Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-07-28 Fawad Halim * Services/File/DefaultFileService.cs: Added inner class FileInformation as a container for File Opening information. Overloaded OpenFile to accept a delegate to call after File Opening. Modified: trunk/MonoDevelop/Core/src/Main/StartUp/AssemblyInfo.cs.in =================================================================== --- trunk/MonoDevelop/Core/src/Main/StartUp/AssemblyInfo.cs.in 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Main/StartUp/AssemblyInfo.cs.in 2004-08-07 06:43:58 UTC (rev 1924) @@ -20,7 +20,7 @@ [assembly: AssemblyCopyright("(c) 2004 MonoDevelop Team and Mike Krueger 2000-2003")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("@VERSION at .0.0")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] // ..\\src\\SharpDevelop\\sharpdevelop.key Modified: trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog 2004-07-30 15:35:22 UTC (rev 1923) +++ trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) @@ -1,3 +1,7 @@ +2004-08-07 Todd Berman + + * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. + 2004-07-01 John Luke * MonoDevelopMain.cs: return 1 on error and 0 otherwise From commit-watcher at mono-cvs.ximian.com Sun Aug 8 23:13:26 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Sun, 8 Aug 2004 23:13:26 -0400 (EDT) Subject: [Monodevelop-patches-list] r1925 - in trunk/MonoDevelop/Core/src/Main/Base: . Services Message-ID: <20040809031326.46C1F9475C@mono-cvs.ximian.com> Author: tberman Date: 2004-08-08 23:13:26 -0400 (Sun, 08 Aug 2004) New Revision: 1925 Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog trunk/MonoDevelop/Core/src/Main/Base/Services/SystemAssemblyService.cs Log: fix issue w/ new mscorlib location. Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-08-07 06:43:58 UTC (rev 1924) +++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-08-09 03:13:26 UTC (rev 1925) @@ -1,3 +1,7 @@ +2004-08-09 Todd Berman + + * Services/SystemAssemblyService.cs: Work w/ cvs HEAD and 1.0.x + 2004-08-07 Todd Berman * AssemblyInfo.cs.in: Use new ASSEMBLY_VERSION variable. Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/SystemAssemblyService.cs =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/Services/SystemAssemblyService.cs 2004-08-07 06:43:58 UTC (rev 1924) +++ trunk/MonoDevelop/Core/src/Main/Base/Services/SystemAssemblyService.cs 2004-08-09 03:13:26 UTC (rev 1925) @@ -35,7 +35,10 @@ base.InitializeService (); //Pull up assemblies from the installed mono system. string prefix = Path.GetDirectoryName (typeof (int).Assembly.Location); - foreach (string assembly in Directory.GetFiles (Path.Combine (Path.Combine (prefix, "mono"), "1.0"), "*.dll")) { + if (prefix.IndexOf ("mono/1.0") == -1) { + prefix = Path.Combine (Path.Combine (prefix, "mono"), "1.0"); + } + foreach (string assembly in Directory.GetFiles (prefix, "*.dll")) { AddAssembly (assembly, "MONO-SYSTEM"); } From commit-watcher at mono-cvs.ximian.com Mon Aug 9 13:30:08 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Mon, 9 Aug 2004 13:30:08 -0400 (EDT) Subject: [Monodevelop-patches-list] r1926 - in trunk/MonoDevelop: . Extras Extras/PythonBinding Extras/PythonBinding/Gui Extras/PythonBinding/Project Extras/PythonBinding/templates Message-ID: <20040809173008.6BFDC9475C@mono-cvs.ximian.com> Author: jluke Date: 2004-08-09 13:30:08 -0400 (Mon, 09 Aug 2004) New Revision: 1926 Added: trunk/MonoDevelop/Extras/ trunk/MonoDevelop/Extras/PythonBinding/ trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs trunk/MonoDevelop/Extras/PythonBinding/Gui/ trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs trunk/MonoDevelop/Extras/PythonBinding/Makefile trunk/MonoDevelop/Extras/PythonBinding/Project/ trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs trunk/MonoDevelop/Extras/PythonBinding/README trunk/MonoDevelop/Extras/PythonBinding/TODO trunk/MonoDevelop/Extras/PythonBinding/templates/ trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml Log: add an initial binding for IronPython * some assembly required Added: trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,14 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("PythonBinding")] +[assembly: AssemblyDescription("Python binding for MonoDevelop")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("(c) 2004 John Luke")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("0.0.0.0")] +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] Added: trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,78 @@ +using System; +using System.IO; +using Gtk; + +using MonoDevelop.Internal.Project; +using MonoDevelop.Internal.ExternalTool; +using MonoDevelop.Gui.Dialogs; +using MonoDevelop.Core.Services; +using MonoDevelop.Core.Properties; +using MonoDevelop.Core.AddIns.Codons; +using MonoDevelop.Services; + +namespace PythonBinding +{ + public class CompilerParametersPanel : AbstractOptionPanel + { + PythonCompilerParameters compilerParameters = null; + Entry outputPath = new Entry (); + Entry assemblyName = new Entry (); + RadioButton exeTarget = new RadioButton ("exe"); + RadioButton dllTarget; + CheckButton debug = new CheckButton (GettextCatalog.GetString ("Include debug information")); + + public override void LoadPanelContents() + { + this.compilerParameters = (PythonCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config"); + + dllTarget = new RadioButton (exeTarget, "dll"); + SetupUI (); + RestoreValues (); + this.ShowAll (); + } + + public override bool StorePanelContents() + { + compilerParameters.AssemblyName = assemblyName.Text; + compilerParameters.OutputPath = outputPath.Text; + compilerParameters.IncludeDebugInformation = debug.Active; + if (exeTarget.Active) + compilerParameters.CompilationTarget = CompilationTarget.Exe; + else + compilerParameters.CompilationTarget = CompilationTarget.Dll; + + return true; + } + + void SetupUI () + { + VBox vbox = new VBox (false, 6); + Label outputLabel = new Label (); + outputLabel.Markup = String.Format ("{0}", GettextCatalog.GetString ("Output path")); + vbox.PackStart (outputLabel, false, true, 0); + vbox.PackStart (outputPath, false, true, 0); + Label assemblyLabel = new Label (); + assemblyLabel.Markup = String.Format ("{0}", GettextCatalog.GetString ("Assembly name")); + vbox.PackStart (assemblyLabel, false, true, 0); + vbox.PackStart (assemblyName, false, true, 0); + Label targetLabel = new Label (); + targetLabel.Markup = String.Format ("{0}", GettextCatalog.GetString ("Target options")); + vbox.PackStart (targetLabel, false, true, 0); + vbox.PackStart (exeTarget, false, true, 0); + vbox.PackStart (dllTarget, false, true, 0); + vbox.PackStart (debug, false, true, 0); + this.Add (vbox); + } + + void RestoreValues () + { + assemblyName.Text = compilerParameters.AssemblyName; + outputPath.Text = compilerParameters.OutputPath; + if (compilerParameters.CompilationTarget == CompilationTarget.Exe) + exeTarget.Active = true; + else + dllTarget.Active = true; + debug.Active = compilerParameters.IncludeDebugInformation; + } + } +} Added: trunk/MonoDevelop/Extras/PythonBinding/Makefile =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/Makefile 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/Makefile 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,45 @@ + +CSC = mcs /debug +ASSEMBLY = PythonBinding.dll +ADDIN = PythonBinding.addin.xml + +TEMPLATE1 = templates/PythonConsoleProject.xpt.xml +TEMPLATE2 = templates/PythonGtkProject.xpt.xml + +DLLS = /r:../../Core/build/bin/MonoDevelop.Core.dll \ + /r:../../Core/build/bin/MonoDevelop.Base.dll \ + /r:../../Core/build/bin/MonoDevelop.SourceEditor.dll \ + /r:../../Core/build/bin/MonoDevelop.Gui.Widgets.dll \ + -pkg:gtk-sharp + +# $(BASE_DEPENDENCIES_LIBS) + +FILES = \ +./Gui/CompilerParametersPanel.cs \ +./Project/CompilationTarget.cs \ +./Project/PythonProject.cs \ +./Project/PythonCompilerParameters.cs \ +./PythonCompilerManager.cs \ +./AssemblyInfo.cs \ +./PythonLanguageBinding.cs \ +./PythonExecutionManager.cs + +#build_sources = $(addprefix $(srcdir)/, $(FILES)) + +#assemblydir = $(libdir)/monodevelop/AddIns/AddIns/BackendBindings +#assembly_DATA = $(ASSEMBLY) + +all: $(ASSEMBLY) + +$(ASSEMBLY): $(FILES) + $(CSC) $(FILES) $(DLLS) /out:$(ASSEMBLY) /target:library \ + && cp $(ASSEMBLY) ../../Core/build/AddIns/AddIns/BackendBindings/. \ + && cp $(ADDIN) ../../Core/build/AddIns/AddIns/BackendBindings/. \ + && cp $(TEMPLATE1) ../../Core/build/AddIns/AddIns/BackendBindings/templates/. \ + && cp $(TEMPLATE2) ../../Core/build/AddIns/AddIns/BackendBindings/templates/. + +#CLEANFILES = $(ASSEMBLY) +#EXTRA_DIST = $(FILES) + +clean: + rm -f $(ASSEMBLY) Added: trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,11 @@ +using System; + +namespace PythonBinding +{ + public enum CompilationTarget + { + Exe, + Dll, + } +} + Added: trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,107 @@ +using System; +using System.ComponentModel; +using System.IO; +using System.Text; +using System.Xml; + +using MonoDevelop.Gui.Components; +using MonoDevelop.Internal.Project; + +namespace PythonBinding +{ + /// + /// This class handles project specific compiler parameters + /// + public class PythonCompilerParameters : AbstractProjectConfiguration + { + CompilerOptions compilerOptions = new CompilerOptions (); + + public CompilerOptions CurrentCompilerOptions { + get { + return compilerOptions; + } + } + + [LocalizedProperty("Output path", Description = "The path where the assembly is created.")] + public string OutputPath { + get { + return OutputDirectory; + } + set { + OutputDirectory = value; + } + } + + [LocalizedProperty("Output assembly", Description = "The assembly name.")] + public string AssemblyName { + get { + return OutputAssembly; + } + set { + OutputAssembly = value; + } + } + + [DefaultValue(CompilationTarget.Exe)] + [LocalizedProperty("Compilation Target", Description = "The compilation target of the source code. (/dll, /exe)")] + public CompilationTarget CompilationTarget { + get { + return compilerOptions.compilationTarget; + } + set { + compilerOptions.compilationTarget = value; + } + } + + [DefaultValue(false)] + [LocalizedProperty("Include debug information", Description = "Specifies if debug information should be omited. (/DEBUG)")] + public bool IncludeDebugInformation { + get { + return compilerOptions.includeDebugInformation; + } + set { + compilerOptions.includeDebugInformation = value; + } + } + + public PythonCompilerParameters () + { + } + + public PythonCompilerParameters (string name) + { + this.name = name; + } + + [XmlNodeName("CompilerOptions")] + public class CompilerOptions + { + [XmlAttribute("compilationTarget")] + public CompilationTarget compilationTarget = CompilationTarget.Exe; + + [XmlAttribute("includeDebugInformation")] + internal bool includeDebugInformation = false; + + public string GenerateOptions () + { + StringBuilder options = new StringBuilder (); + switch (compilationTarget) { + case PythonBinding.CompilationTarget.Dll: + options.Append ("/dll "); + break; + case PythonBinding.CompilationTarget.Exe: + options.Append ("/exe "); + break; + default: + throw new System.NotSupportedException ("Unsupported compilation target : " + compilationTarget); + } + + if (includeDebugInformation) { + options.Append ("/DEBUG "); + } + + return options.ToString (); + } + } + } +} Added: trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,42 @@ +using System; +using System.IO; +using System.Collections; +using System.Xml; + +using MonoDevelop.Internal.Project; +using MonoDevelop.Internal.Templates; + +namespace PythonBinding +{ + public class PythonProject : AbstractProject + { + public override string ProjectType { + get { + return PythonLanguageBinding.LanguageName; + } + } + + public override IConfiguration CreateConfiguration () + { + return new PythonCompilerParameters (); + } + + public PythonProject () + { + } + + public PythonProject (ProjectCreateInformation info, XmlElement projectOptions) + { + if (info != null) { + Name = info.ProjectName; + Configurations.Add (CreateConfiguration ("Debug")); + Configurations.Add (CreateConfiguration ("Release")); + foreach (PythonCompilerParameters parameter in Configurations) { + parameter.OutputDirectory = Path.Combine (info.BinPath, parameter.Name); + parameter.OutputAssembly = Name; + } + } + } + } +} + Added: trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + Added: trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,69 @@ +using System; +using System.IO; +using System.CodeDom.Compiler; +using Gtk; + +using MonoDevelop.Gui.Components; +using MonoDevelop.Services; +using MonoDevelop.Core.Services; +using MonoDevelop.Internal.Project; +using MonoDevelop.Gui; + +namespace PythonBinding +{ + public class PythonCompilerManager + { + FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService)); + + public string GetCompiledOutputName (string fileName) + { + return Path.ChangeExtension (fileName, ".exe"); + } + + public string GetCompiledOutputName (IProject project) + { + PythonProject p = (PythonProject) project; + PythonCompilerParameters compilerparameters = (PythonCompilerParameters) p.ActiveConfiguration; + string exe = fileUtilityService.GetDirectoryNameWithSeparator (compilerparameters.OutputDirectory) + compilerparameters.OutputAssembly + ".exe"; + return exe; + } + + public bool CanCompile (string fileName) + { + return Path.GetExtension (fileName).ToLower () == ".py"; + } + + ICompilerResult Compile (PythonCompilerParameters compilerparameters, string[] fileNames) + { + // just pretend we compiled + // and leave it to the runtime for now + return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), ""); + } + + public ICompilerResult CompileFile (string fileName, PythonCompilerParameters compilerparameters) + { + // just pretend we compiled + // and leave it to the runtime for now + return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), ""); + } + + public ICompilerResult CompileProject (IProject project) + { + // just pretend we compiled + // and leave it to the runtime for now + return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), ""); + } + + string GetCompilerName () + { + return "IronPythonConsole"; + } + + ICompilerResult ParseOutput (TempFileCollection tf, StreamReader sr) + { + // just pretend we compiled + // and leave it to the runtime for now + return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), ""); + } + } +} Added: trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,52 @@ +using System; +using System.IO; +using System.Diagnostics; +using System.Collections; +using System.Reflection; +using System.Xml; +using System.CodeDom.Compiler; +using Gtk; + +using MonoDevelop.Internal.Project; +using MonoDevelop.Gui; +using MonoDevelop.Services; +using MonoDevelop.Core.Services; + +namespace PythonBinding +{ + public class PythonExecutionManager + { + public void Execute (string filename, bool debug) + { + ProcessStartInfo psi = new ProcessStartInfo ("IronPythonConsole", filename); + psi.WorkingDirectory = Path.GetDirectoryName (filename); + psi.UseShellExecute = false; + } + + public void Execute(IProject project, bool debug) + { + //PythonCompilerParameters parameters = (PythonCompilerParameters) project.ActiveConfiguration; + //FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService)); + + string files = ""; + + foreach (ProjectFile finfo in project.ProjectFiles) { + if (finfo.Subtype != Subtype.Directory) { + switch (finfo.BuildAction) { + case BuildAction.Compile: + files += String.Format ("{0} ", finfo.Name); + break; + } + } + } + Console.WriteLine (files); + + string fullCommand = String.Format ("-e \"IronPythonConsole {0};read -p 'press any key to continue...' -n1\"", files); + ProcessStartInfo psi = new ProcessStartInfo ("xterm", fullCommand); + //psi.WorkingDirectory = Path.GetDirectoryName (exe); + psi.UseShellExecute = false; + Process p = Process.Start (psi); + p.WaitForExit (); + } + } +} Added: trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,113 @@ +// +// +// +// +// +// + +using System; +using System.IO; +using System.Diagnostics; +using System.Collections; +using System.Reflection; +using System.Resources; +using System.Xml; +using System.CodeDom.Compiler; +using System.Threading; +using Gtk; + +using MonoDevelop.Internal.Project; +using MonoDevelop.Internal.Templates; +using MonoDevelop.Gui; + +namespace PythonBinding +{ + public class PythonLanguageBinding : ILanguageBinding + { + public const string LanguageName = "Python"; + + PythonExecutionManager executionManager = new PythonExecutionManager(); + PythonCompilerManager compilerManager = new PythonCompilerManager(); + + public string Language { + get { + return LanguageName; + } + } + + public void Execute(string filename) + { + Execute (filename, false); + } + + public void Execute(string filename, bool debug) + { + Debug.Assert(executionManager != null); + executionManager.Execute(filename, debug); + } + + public void Execute (IProject project) + { + Execute (project, false); + } + + public void DebugProject (IProject project) + { + Execute (project, true); + } + + public void Execute(IProject project, bool debug) + { + Debug.Assert(executionManager != null); + executionManager.Execute(project, debug); + } + + public string GetCompiledOutputName(string fileName) + { + Debug.Assert(compilerManager != null); + return compilerManager.GetCompiledOutputName(fileName); + } + + public string GetCompiledOutputName(IProject project) + { + Debug.Assert(compilerManager != null); + return compilerManager.GetCompiledOutputName(project); + } + + public bool CanCompile(string fileName) + { + Debug.Assert(compilerManager != null); + return compilerManager.CanCompile(fileName); + } + + public ICompilerResult CompileFile(string fileName) + { + Debug.Assert(compilerManager != null); + PythonCompilerParameters param = new PythonCompilerParameters(); + param.OutputAssembly = Path.ChangeExtension(fileName, ".exe"); + return compilerManager.CompileFile(fileName, param); + } + + public ICompilerResult CompileProject(IProject project) + { + Debug.Assert(compilerManager != null); + return compilerManager.CompileProject(project); + } + + public ICompilerResult RecompileProject(IProject project) + { + return CompileProject(project); + } + + public IProject CreateProject(ProjectCreateInformation info, XmlElement projectOptions) + { + return new PythonProject(info, projectOptions); + } + + public void GenerateMakefile (IProject project, Combine parentCombine) + { + throw new NotImplementedException (); + } + + } +} Added: trunk/MonoDevelop/Extras/PythonBinding/README =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/README 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/README 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,7 @@ + +This is a binding for IronPython and MonoDevelop. +See http://ironpython.com + +You will need to have IronPythonConsole an executable in +your path that executes the interpreter correctly. + Added: trunk/MonoDevelop/Extras/PythonBinding/TODO =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/TODO 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/TODO 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,3 @@ + +- allow compile & run instead of fake compile & run +- options and stuff Added: trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,33 @@ + + Added: trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml =================================================================== --- trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml 2004-08-09 03:13:26 UTC (rev 1925) +++ trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml 2004-08-09 17:30:08 UTC (rev 1926) @@ -0,0 +1,48 @@ + + From commit-watcher at mono-cvs.ximian.com Tue Aug 10 00:28:04 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Tue, 10 Aug 2004 00:28:04 -0400 (EDT) Subject: [Monodevelop-patches-list] r1927 - in trunk/MonoDevelop/Core/src: AddIns/DisplayBindings/SourceEditor/Gui/Dialogs AddIns/Nunit/Commands Main/Base Main/Base/Gui/Dialogs Main/Base/Gui/Dialogs/OptionPanels/IDEOptions Message-ID: <20040810042804.863889475C@mono-cvs.ximian.com> Author: tberman Date: 2004-08-10 00:28:04 -0400 (Tue, 10 Aug 2004) New Revision: 1927 Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceInFilesDialog.cs trunk/MonoDevelop/Core/src/AddIns/Nunit/Commands/NunitCommands.cs trunk/MonoDevelop/Core/src/Main/Base/ChangeLog trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs Log: patch from emrysk to fix default project location to ~/Projects Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceInFilesDialog.cs =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceInFilesDialog.cs 2004-08-09 17:30:08 UTC (rev 1926) +++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceInFilesDialog.cs 2004-08-10 04:28:04 UTC (rev 1927) @@ -264,7 +264,7 @@ "MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", System.IO.Path.Combine ( System.Environment.GetEnvironmentVariable ("HOME"), - "MonoDevelopProjects")).ToString (); + "Projects")).ToString (); } fd.Complete (defaultFolder); Modified: trunk/MonoDevelop/Core/src/AddIns/Nunit/Commands/NunitCommands.cs =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/Nunit/Commands/NunitCommands.cs 2004-08-09 17:30:08 UTC (rev 1926) +++ trunk/MonoDevelop/Core/src/AddIns/Nunit/Commands/NunitCommands.cs 2004-08-10 04:28:04 UTC (rev 1927) @@ -16,7 +16,7 @@ NunitService nunitService = (NunitService) MonoDevelop.Core.Services.ServiceManager.Services.GetService (typeof (NunitService)); using (FileSelector fs = new FileSelector ("Load test assembly")) { - string defaultPath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "MonoDevelopProjects"); + string defaultPath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "Projects"); fs.Complete (defaultPath); if (fs.Run () == (int) Gtk.ResponseType.Ok) Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-08-09 17:30:08 UTC (rev 1926) +++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-08-10 04:28:04 UTC (rev 1927) @@ -1,3 +1,10 @@ +2004-08-10 Todd Berman + + * Gui/Dialogs/NewProjectDialog.cs: + * Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs: Patch from + Samuel Kaufman to change the default project location to ~/Projects. + + 2004-08-09 Todd Berman * Services/SystemAssemblyService.cs: Work w/ cvs HEAD and 1.0.x Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs 2004-08-09 17:30:08 UTC (rev 1926) +++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs 2004-08-10 04:28:04 UTC (rev 1927) @@ -321,7 +321,7 @@ hbox_for_browser.PackStart (entry_location, true, true, 0); - entry_location.DefaultPath = propertyService.GetProperty ("MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", fileUtilityService.GetDirectoryNameWithSeparator (Environment.GetEnvironmentVariable ("HOME")) + "MonoDevelopProjects").ToString (); + entry_location.DefaultPath = propertyService.GetProperty ("MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", fileUtilityService.GetDirectoryNameWithSeparator (Environment.GetEnvironmentVariable ("HOME")) + "Projects").ToString (); PathChanged (null, null); Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs 2004-08-09 17:30:08 UTC (rev 1926) +++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs 2004-08-10 04:28:04 UTC (rev 1927) @@ -81,7 +81,7 @@ projectLocationTextBox.GtkEntry.Text = PropertyService.GetProperty( "MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", System.IO.Path.Combine(System.Environment.GetEnvironmentVariable ("HOME"), - "MonoDevelopProjects")).ToString(); + "Projects")).ToString(); projectLocationTextBox.DirectoryEntry = true; // // setup the properties From commit-watcher at mono-cvs.ximian.com Tue Aug 10 00:35:42 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Tue, 10 Aug 2004 00:35:42 -0400 (EDT) Subject: [Monodevelop-patches-list] r1928 - trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib Message-ID: <20040810043542.AF7B79475C@mono-cvs.ximian.com> Author: tberman Date: 2004-08-10 00:35:42 -0400 (Tue, 10 Aug 2004) New Revision: 1928 Modified: trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml Log: string change. Modified: trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml =================================================================== --- trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml 2004-08-10 04:28:04 UTC (rev 1927) +++ trunk/MonoDevelop/Core/src/AddIns/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml 2004-08-10 04:35:42 UTC (rev 1928) @@ -13,7 +13,7 @@ From commit-watcher at mono-cvs.ximian.com Tue Aug 10 01:09:51 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Tue, 10 Aug 2004 01:09:51 -0400 (EDT) Subject: [Monodevelop-patches-list] r1929 - in trunk/MonoDevelop/Core/src/Main/Base: . Gui/Dialogs/CombineConfiguration Message-ID: <20040810050951.43CFC9475C@mono-cvs.ximian.com> Author: tberman Date: 2004-08-10 01:09:51 -0400 (Tue, 10 Aug 2004) New Revision: 1929 Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs Log: fix dumb leftover issue. closes bug 61795 Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-08-10 04:35:42 UTC (rev 1928) +++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-08-10 05:09:51 UTC (rev 1929) @@ -1,5 +1,10 @@ 2004-08-10 Todd Berman + * Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs: fix left + over ${RES:} strings. + +2004-08-10 Todd Berman + * Gui/Dialogs/NewProjectDialog.cs: * Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs: Patch from Samuel Kaufman to change the default project location to ~/Projects. Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs =================================================================== --- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs 2004-08-10 04:35:42 UTC (rev 1928) +++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs 2004-08-10 05:09:51 UTC (rev 1929) @@ -51,17 +51,8 @@ this.combine = (Combine)((IProperties)CustomizationObject).GetProperty("Combine"); - ActionLabel.Text = StringParserService.Parse( - "${res:Dialog.Options.CombineOptions.Startup.ActionLabel}"); - - // Setting up RadioButtons - - singleRadioButton.Label = StringParserService.Parse( - "${res:Dialog.Options.CombineOptions.Startup.SingleStartupRadioButton}"); singleRadioButton.Active = combine.SingleStartupProject; singleRadioButton.Clicked += new EventHandler(OnSingleRadioButtonClicked); - multipleRadioButton.Label = StringParserService.Parse( - "${res:Dialog.Options.CombineOptions.Startup.MultipleStartupRadioButton}"); multipleRadioButton.Active = !combine.SingleStartupProject; singleRadioButton.Clicked += new EventHandler(OptionsChanged); @@ -89,11 +80,9 @@ entryTreeView.Model = store; TreeIter iter = new TreeIter (); - string entryHeader = StringParserService.Parse( - "${res:Dialog.Options.CombineOptions.Startup.EntryColumnHeader}"); + string entryHeader = StringParserService.Parse("Entry"); entryTreeView.AppendColumn (entryHeader, new CellRendererText (), "text", 0); - string actionHeader = StringParserService.Parse( - "${res:Dialog.Options.CombineOptions.Startup.ActionColumnHeader}"); + string actionHeader = StringParserService.Parse( "Action"); entryTreeView.AppendColumn (actionHeader, new CellRendererText (), "text", 1); // sanity check to ensure we had a proper execture definitions save last time rounf From commit-watcher at mono-cvs.ximian.com Wed Aug 11 07:31:15 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Wed, 11 Aug 2004 07:31:15 -0400 (EDT) Subject: [Monodevelop-patches-list] r1930 - in branches/MonoDevelop-plan-43: . build/bin build/lib/monodevelop src src/Content src/Core src/Editor src/Node src/Workbench Message-ID: <20040811113115.A0F409475C@mono-cvs.ximian.com> Author: jzwart Date: 2004-08-11 07:31:15 -0400 (Wed, 11 Aug 2004) New Revision: 1930 Added: branches/MonoDevelop-plan-43/ChangeLog Modified: branches/MonoDevelop-plan-43/build/bin/monodevelop.exe branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config branches/MonoDevelop-plan-43/build/lib/monodevelop/content.dll branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.dll branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin branches/MonoDevelop-plan-43/build/lib/monodevelop/node.dll branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.dll branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin branches/MonoDevelop-plan-43/src/Content/ContentManager.cs branches/MonoDevelop-plan-43/src/Content/content.build branches/MonoDevelop-plan-43/src/Core/core.build branches/MonoDevelop-plan-43/src/Editor/editor.build branches/MonoDevelop-plan-43/src/Node/FileNode.cs branches/MonoDevelop-plan-43/src/Node/node.build branches/MonoDevelop-plan-43/src/Workbench/workbench.build branches/MonoDevelop-plan-43/src/plugins.build Log: 2004-08-11 Jeroen Zwartepoorte Start keeping a ChangeLog. This revision should compile with the latest nant nightly build: 20040811. This version is required because of the filterchain changes. Added: branches/MonoDevelop-plan-43/ChangeLog =================================================================== --- branches/MonoDevelop-plan-43/ChangeLog 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/ChangeLog 2004-08-11 11:31:15 UTC (rev 1930) @@ -0,0 +1,5 @@ +2004-08-11 Jeroen Zwartepoorte + + Start keeping a ChangeLog. This revision should compile with the latest + nant nightly build: 20040811. This version is required because of the + filterchain changes. Modified: branches/MonoDevelop-plan-43/build/bin/monodevelop.exe =================================================================== (Binary files differ) Modified: branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config =================================================================== --- branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config 2004-08-11 11:31:15 UTC (rev 1930) @@ -1,10 +1,10 @@ - +? - + - +
Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/content.dll =================================================================== (Binary files differ) Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin =================================================================== --- branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin 2004-08-11 11:31:15 UTC (rev 1930) @@ -1,5 +1,5 @@ - +? - /home/jeroen/Projects/monodevelop/build/lib/monodevelop/content.dll + /home/jeroen/Projects/MonoDevelop-plan-43/build/lib/monodevelop/content.dll Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.dll =================================================================== (Binary files differ) Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin =================================================================== --- branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin 2004-08-11 11:31:15 UTC (rev 1930) @@ -1,5 +1,5 @@ - /home/jeroen/Projects/monodevelop/build/lib/monodevelop/editor.dll + @assembly@ Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/node.dll =================================================================== (Binary files differ) Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin =================================================================== --- branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin 2004-08-11 11:31:15 UTC (rev 1930) @@ -1,5 +1,5 @@ - +? - /home/jeroen/Projects/monodevelop/build/lib/monodevelop/node.dll + /home/jeroen/Projects/MonoDevelop-plan-43/build/lib/monodevelop/node.dll Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.dll =================================================================== (Binary files differ) Modified: branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin =================================================================== --- branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin 2004-08-11 11:31:15 UTC (rev 1930) @@ -1,5 +1,5 @@ - +? - /home/jeroen/Projects/monodevelop/build/lib/monodevelop/workbench.dll + /home/jeroen/Projects/MonoDevelop-plan-43/build/lib/monodevelop/workbench.dll Modified: branches/MonoDevelop-plan-43/src/Content/ContentManager.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Content/ContentManager.cs 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/Content/ContentManager.cs 2004-08-11 11:31:15 UTC (rev 1930) @@ -63,7 +63,7 @@ if (resp != (int)ResponseType.Ok) return; - string mimetype = Mime.GetMimeType (fcd.Filename); + string mimetype = MimeType.GetMimeTypeForUri (fcd.Filename); log.Debug ("Mimetype for " + fcd.Filename + " is " + mimetype); // Find a FileNode Type for the specified mimetype. Modified: branches/MonoDevelop-plan-43/src/Content/content.build =================================================================== --- branches/MonoDevelop-plan-43/src/Content/content.build 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/Content/content.build 2004-08-11 11:31:15 UTC (rev 1930) @@ -5,7 +5,7 @@ - + @@ -19,8 +19,13 @@ - - + + + + + + + Modified: branches/MonoDevelop-plan-43/src/Core/core.build =================================================================== --- branches/MonoDevelop-plan-43/src/Core/core.build 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/Core/core.build 2004-08-11 11:31:15 UTC (rev 1930) @@ -13,9 +13,14 @@ - - - + + + + + + + + Modified: branches/MonoDevelop-plan-43/src/Editor/editor.build =================================================================== --- branches/MonoDevelop-plan-43/src/Editor/editor.build 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/Editor/editor.build 2004-08-11 11:31:15 UTC (rev 1930) @@ -19,8 +19,13 @@ - - + + + + + + + Modified: branches/MonoDevelop-plan-43/src/Node/FileNode.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Node/FileNode.cs 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/Node/FileNode.cs 2004-08-11 11:31:15 UTC (rev 1930) @@ -35,22 +35,22 @@ public override bool CanDelete { get { return uri.Exists && - ((File.GetAttributes (filename) & - FileAttributes.ReadOnly) != FileAttributes.ReadOnly); + ((uri.GetFileInfo ().Permissions & + FilePermissions.AccessWritable) == FilePermissions.AccessWritable); } } public override bool CanRename { get { return uri.Exists && - ((File.GetAttributes (filename) & - FileAttributes.ReadOnly) != FileAttributes.ReadOnly); + ((uri.GetFileInfo ().Permissions & + FilePermissions.AccessWritable) == FilePermissions.AccessWritable); } } public override bool CanRevert { get { - return Vfs.Exists (filename); + return uri.Exists; } } @@ -58,8 +58,8 @@ get { return !uri.Exists || (uri.Exists && - ((File.GetAttributes (filename) & - FileAttributes.ReadOnly) != FileAttributes.ReadOnly)); + ((uri.GetFileInfo ().Permissions & + FilePermissions.AccessWritable) == FilePermissions.AccessWritable)); } } @@ -89,7 +89,7 @@ public override string DisplayName { get { - return Path.GetFileName (filename); + return uri.ExtractShortName (); } } @@ -107,13 +107,13 @@ public override string LongDisplayName { get { - return Path.GetFullPath (filename); + return uri.ToString (); } } public string MimeType { get { - return mimetype; + return uri.MimeType.Name; } } Modified: branches/MonoDevelop-plan-43/src/Node/node.build =================================================================== --- branches/MonoDevelop-plan-43/src/Node/node.build 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/Node/node.build 2004-08-11 11:31:15 UTC (rev 1930) @@ -16,8 +16,13 @@ - - + + + + + + + Modified: branches/MonoDevelop-plan-43/src/Workbench/workbench.build =================================================================== --- branches/MonoDevelop-plan-43/src/Workbench/workbench.build 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/Workbench/workbench.build 2004-08-11 11:31:15 UTC (rev 1930) @@ -16,8 +16,13 @@ - - + + + + + + + Modified: branches/MonoDevelop-plan-43/src/plugins.build =================================================================== --- branches/MonoDevelop-plan-43/src/plugins.build 2004-08-10 05:09:51 UTC (rev 1929) +++ branches/MonoDevelop-plan-43/src/plugins.build 2004-08-11 11:31:15 UTC (rev 1930) @@ -17,6 +17,12 @@ + + + + + + @@ -33,6 +39,10 @@ + + + + From commit-watcher at mono-cvs.ximian.com Wed Aug 11 09:49:39 2004 From: commit-watcher at mono-cvs.ximian.com (commit-watcher at mono-cvs.ximian.com) Date: Wed, 11 Aug 2004 09:49:39 -0400 (EDT) Subject: [Monodevelop-patches-list] r1931 - in branches/MonoDevelop-plan-43: . src src/Libraries src/Libraries/Gdl src/Plugins src/Plugins/Content src/Plugins/Editor src/Plugins/Node src/Plugins/Workbench Message-ID: <20040811134939.7AD2E9475C@mono-cvs.ximian.com> Author: jzwart Date: 2004-08-11 09:49:39 -0400 (Wed, 11 Aug 2004) New Revision: 1931 Added: branches/MonoDevelop-plan-43/src/Libraries/ branches/MonoDevelop-plan-43/src/Libraries/Gdl/ branches/MonoDevelop-plan-43/src/Libraries/Gdl/AssemblyInfo.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DetachedHandler.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/Dock.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockBar.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItem.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemBehavior.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemGrip.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockLayout.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockMaster.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockNotebook.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockObject.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockObjectFlags.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockPaned.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockParamFlags.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockPlaceholder.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockPlacement.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockRequest.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockedHandler.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/GdlDockTest.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/Stock.cs branches/MonoDevelop-plan-43/src/Libraries/Gdl/gdl.build branches/MonoDevelop-plan-43/src/Libraries/Gdl/stock-close-12.png branches/MonoDevelop-plan-43/src/Libraries/Gdl/stock-menu-left-12.png branches/MonoDevelop-plan-43/src/Libraries/Gdl/stock-menu-right-12.png branches/MonoDevelop-plan-43/src/Libraries/libraries.build branches/MonoDevelop-plan-43/src/Plugins/ branches/MonoDevelop-plan-43/src/Plugins/Content/ branches/MonoDevelop-plan-43/src/Plugins/Content/ContentManager.cs branches/MonoDevelop-plan-43/src/Plugins/Content/content.build branches/MonoDevelop-plan-43/src/Plugins/Editor/ branches/MonoDevelop-plan-43/src/Plugins/Editor/editor.build branches/MonoDevelop-plan-43/src/Plugins/Node/ branches/MonoDevelop-plan-43/src/Plugins/Node/FileNode.cs branches/MonoDevelop-plan-43/src/Plugins/Node/node.build branches/MonoDevelop-plan-43/src/Plugins/Workbench/ branches/MonoDevelop-plan-43/src/Plugins/Workbench/workbench.build branches/MonoDevelop-plan-43/src/Plugins/plugins.build Removed: branches/MonoDevelop-plan-43/src/Content/ branches/MonoDevelop-plan-43/src/Editor/ branches/MonoDevelop-plan-43/src/Node/ branches/MonoDevelop-plan-43/src/Plugins/Content/ContentManager.cs branches/MonoDevelop-plan-43/src/Plugins/Content/content.build branches/MonoDevelop-plan-43/src/Plugins/Editor/editor.build branches/MonoDevelop-plan-43/src/Plugins/Node/FileNode.cs branches/MonoDevelop-plan-43/src/Plugins/Node/node.build branches/MonoDevelop-plan-43/src/Plugins/Workbench/workbench.build branches/MonoDevelop-plan-43/src/Workbench/ branches/MonoDevelop-plan-43/src/plugins.build Modified: branches/MonoDevelop-plan-43/ChangeLog Log: 2004-08-11 Jeroen Zwartepoorte Move plugins to src/Plugins directory and add a new src/Libaries dir which contains the Gdl library only for now. Modified: branches/MonoDevelop-plan-43/ChangeLog =================================================================== --- branches/MonoDevelop-plan-43/ChangeLog 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/ChangeLog 2004-08-11 13:49:39 UTC (rev 1931) @@ -1,5 +1,10 @@ 2004-08-11 Jeroen Zwartepoorte + Move plugins to src/Plugins directory and add a new src/Libaries dir + which contains the Gdl library only for now. + +2004-08-11 Jeroen Zwartepoorte + Start keeping a ChangeLog. This revision should compile with the latest nant nightly build: 20040811. This version is required because of the filterchain changes. Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/AssemblyInfo.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/AssemblyInfo.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/AssemblyInfo.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes specify the key for the sign of your assembly. See the +// .NET Framework documentation for more information about signing. +// This is not required, if you don't want signing let these attributes like they're. +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/DetachedHandler.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/DetachedHandler.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/DetachedHandler.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,21 @@ +using System; + +namespace Gdl +{ + public delegate void DetachedHandler (object o, DetachedArgs args); + + public class DetachedArgs : EventArgs { + private bool recursive; + + public DetachedArgs (bool recursive) + { + this.recursive = recursive; + } + + public bool Recursive { + get { + return recursive; + } + } + } +} Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/Dock.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/Dock.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/Dock.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,589 @@ +// created on 05/06/2004 at 11:21 A + +using System; +using System.Collections; +using Gtk; + +namespace Gdl +{ + public class Dock : DockObject + { + private readonly float SplitRatio = 0.3f; + private DockObject root = null; + private bool floating; + private Widget window; + private bool autoTitle; + private int floatX; + private int floatY; + private int width = -1; + private int height = -1; + private Gdk.GC xorGC; + private string title; + + protected Dock (IntPtr raw) : base (raw) { } + + public Dock () : this (null, false) + { + } + + public Dock (Dock original, bool floating) + : this (original, floating, 0, 0, -1, -1) + { + } + + public Dock (Dock original, bool floating, int x, int y, int width, int height) + { + floatX = x; + floatY = y; + this.width = width; + this.height = height; + this.floating = floating; + + SetFlag (WidgetFlags.NoWindow); + if (original != null) + Bind (original.Master); + + /* create a master for the dock if none was provided */ + if (Master == null) { + DockObjectFlags &= ~(DockObjectFlags.Automatic); + Bind (new DockMaster ()); + } + + if (floating) { + /* create floating window for this dock */ + window = new Window (WindowType.Toplevel); + Window wnd = window as Window; + + /* set position and default size */ + wnd.WindowPosition = WindowPosition.Mouse; + wnd.SetDefaultSize (width, height); + wnd.TypeHint = Gdk.WindowTypeHint.Normal; + + /* metacity ignores this */ + wnd.Move (floatX, floatY); + + /* connect to the configure event so we can track down window geometry */ + wnd.ConfigureEvent += new ConfigureEventHandler (OnFloatingConfigure); + + /* set the title */ + SetWindowTitle (); + + /* set transient for the first dock if that is a non-floating dock */ + DockObject controller = Master.Controller; + if (controller != null && controller is Dock) { + if (!((Dock)controller).Floating) { + if (controller.Toplevel != null && controller.Toplevel is Window) { + wnd.TransientFor = (Window)controller.Toplevel; + } + } + } + + wnd.Add (this); + wnd.DeleteEvent += new DeleteEventHandler (OnFloatingDelete); + } + + DockObjectFlags |= DockObjectFlags.Attached; + } + + public bool Floating { + get { + return floating; + } + set { + floating = value; + } + } + + public int FloatX { + get { + return floatX; + } + set { + floatX = value; + if (floating && window != null && window is Window) + ((Window)window).Resize (width, height); + } + } + + public int FloatY { + get { + return floatY; + } + set { + floatY = value; + if (floating && window != null && window is Window) + ((Window)window).Resize (width, height); + } + } + + public int Height { + get { + return height; + } + set { + height = value; + if (floating && window != null && window is Window) + ((Window)window).Resize (width, height); + } + } + + private bool IsController { + get { + if (Master == null) + return false; + return Master.Controller == this; + } + } + + public ICollection NamedItems { + get { + return Master.DockObjects; + } + } + + public DockObject Root { + get { + return root; + } + set { + root = value; + } + } + + public string Title { + get { + return title; + } + set { + title = value; + } + } + + public int Width { + get { return width; } + set { + width = value; + if (floating && window != null && window is Window) + ((Window)window).Resize (width, height); + } + } + + protected override void OnSizeRequested (ref Requisition requisition) + { + requisition.Width = 2 * (int)BorderWidth; + requisition.Height = 2 * (int)BorderWidth; + + if (root != null && root.Visible) { + Requisition rootReq = root.SizeRequest (); + requisition.Width += rootReq.Width; + requisition.Height += rootReq.Height; + } + } + + protected override void OnSizeAllocated (Gdk.Rectangle allocation) + { + base.OnSizeAllocated (allocation); + + if (root != null && root.Visible) { + int bw = (int)BorderWidth; + Gdk.Rectangle childAlloc; + + childAlloc.X = allocation.X + bw; + childAlloc.Y = allocation.Y + bw; + childAlloc.Width = Math.Max (1, allocation.Width - 2 * bw); + childAlloc.Height = Math.Max (1, allocation.Height - 2 * bw); + + root.SizeAllocate (childAlloc); + } + } + + protected override void OnMapped () + { + base.OnMapped (); + + if (root != null && root.Visible && !root.IsMapped) + root.Map (); + } + + protected override void OnUnmapped () + { + base.OnUnmapped (); + + if (root != null && root.Visible && root.IsMapped) + root.Unmap (); + + if (window != null) + window.Unmap (); + } + + protected override void OnShown () + { + base.OnShown (); + + if (floating && window != null) + window.ShowAll (); + + if (IsController) { + foreach (DockObject item in Master.TopLevelDocks) { + if (item == this) + continue; + if (item.IsAutomatic) + item.Show (); + } + } + } + + protected override void OnHidden () + { + base.OnHidden (); + + if (floating && window != null) + window.Hide (); + + if (IsController) { + foreach (DockObject item in Master.TopLevelDocks) { + if (item == this) + continue; + if (item.IsAutomatic) + item.Hide (); + } + } + } + + protected override void OnDestroyed () + { + if (window != null) { + window.Destroy (); + floating = false; + window = null; + } + + if (xorGC != null) + xorGC = null; + + base.OnDestroyed (); + } + + protected override void OnAdded (Widget widget) + { + DockItem child = widget as DockItem; + AddItem (child, DockPlacement.Top); + } + + protected override void OnRemoved (Widget widget) + { + bool wasVisible = widget.Visible; + + if (root == widget) { + root.DockObjectFlags &= ~(DockObjectFlags.Attached); + root = null; + widget.Unparent (); + + if (wasVisible && Visible) + QueueResize (); + } + } + + protected override void ForAll (bool include_internals, CallbackInvoker invoker) + { + if (root != null) + invoker.Invoke (root); + } + + public override void OnDetached (bool recursive) + { + if (recursive && root != null) + root.Detach (recursive); + + DockObjectFlags &= ~(DockObjectFlags.Attached); + } + + public override void OnReduce () + { + if (root != null) + return; + + if (IsAutomatic) { + Destroy (); + } else if (!IsAttached) { + if (floating) + Hide (); + else if (Parent != null && Parent is Container) + ((Container)Parent).Remove (this); + } + } + + public override bool OnDockRequest (int x, int y, ref DockRequest request) + { + bool mayDock = false; + + /* we get (x,y) in our allocation coordinates system */ + + /* Get dock size. */ + Gdk.Rectangle alloc = Allocation; + int bw = (int)BorderWidth; + + /* Get coordinates relative to our allocation area. */ + int relX = x - alloc.X; + int relY = y - alloc.Y; + + /* Check if coordinates are in GdlDock widget. */ + if (relX > 0 && relX < alloc.Width && + relY > 0 && relY < alloc.Height) { + + /* It's inside our area. */ + mayDock = true; + + /* Set docking indicator rectangle to the Dock size. */ + request.X = alloc.X + bw; + request.Y = alloc.Y + bw; + request.Width = alloc.Width - 2 * bw; + request.Height = alloc.Height - 2 * bw; + + /* If Dock has no root item yet, set the dock + itself as possible target. */ + if (root == null) { + request.Position = DockPlacement.Top; + request.Target = this; + } else { + request.Target = root; + + /* See if it's in the BorderWidth band. */ + if (relX < bw) { + request.Position = DockPlacement.Left; + request.Width = (int)(request.Width * SplitRatio); + } else if (relX > alloc.Width - bw) { + request.Position = DockPlacement.Right; + request.X += (int)(request.Width * (1 - SplitRatio)); + request.Width = (int)(request.Width * SplitRatio); + } else if (relY < bw) { + request.Position = DockPlacement.Top; + request.Height = (int)(request.Height * SplitRatio); + } else if (relY > alloc.Height - bw) { + request.Position = DockPlacement.Bottom; + request.Y += (int)(request.Height * (1 - SplitRatio)); + request.Height = (int)(request.Height * SplitRatio); + } else { + /* Otherwise try our children. */ + /* give them allocation coordinates + (we are a NoWindow widget) */ + mayDock = root.OnDockRequest (x, y, ref request); + } + } + } + + return mayDock; + } + + public override void OnDocked (DockObject requestor, DockPlacement position, object data) + { + /* only dock items allowed at this time */ + if (!(requestor is DockItem)) + return; + + if (position == DockPlacement.Floating) { + int x = 0, y = 0, width = -1, height = -1; + if (data != null && data is Gdk.Rectangle) { + Gdk.Rectangle rect = (Gdk.Rectangle)data; + x = rect.X; + y = rect.Y; + width = rect.Width; + height = rect.Height; + } + + AddFloatingItem ((DockItem)requestor, x, y, width, height); + } else if (root != null) { + /* This is somewhat a special case since we know + which item to pass the request on because we only + have one child */ + root.Dock (requestor, position, null); + SetWindowTitle (); + } else { /* Item about to be added is root item. */ + root = requestor; + root.DockObjectFlags |= DockObjectFlags.Attached; + root.Parent = this; + ((DockItem)root).ShowGrip (); + + /* Realize the item (create its corresponding GdkWindow) + when the Dock has been realized. */ + if (IsRealized) + root.Realize (); + + /* Map the widget if it's visible and the parent is + visible and has been mapped. This is done to make + sure that the GdkWindow is visible. */ + if (Visible && root.Visible) { + if (IsMapped) + root.Map (); + + /* Make the widget resize. */ + root.QueueResize (); + } + + SetWindowTitle (); + } + } + + public override bool OnReorder (DockObject requestor, DockPlacement position, object data) + { + if (Floating && position == DockPlacement.Floating && root == requestor) { + if (window != null && data != null && data is Gdk.Rectangle) { + Gdk.Rectangle rect = (Gdk.Rectangle)data; + ((Window)window).Move (rect.X, rect.Y); + return true; + } + } + + return false; + } + + public override bool OnChildPlacement (DockObject child, ref DockPlacement placement) + { + if (root == child) { + if (placement == DockPlacement.None || + placement == DockPlacement.Floating) + placement = DockPlacement.Top; + return true; + } + + return false; + } + + public override void OnPresent (DockObject child) + { + if (Floating && window != null && window is Window) + ((Window)window).Present (); + } + + public void AddItem (DockItem item, DockPlacement placement) + { + if (item == null) + return; + + if (placement == DockPlacement.Floating) + AddFloatingItem (item, 0, 0, -1, -1); + else + Dock (item, placement, null); + } + + public void AddFloatingItem (DockItem item, int x, int y, int width, int height) + { + Dock dock = new Dock (this, true, x, y, width, height); + + if (Visible) { + dock.Show (); + if (IsMapped) + dock.Map (); + dock.QueueResize (); + } + + dock.AddItem (item, DockPlacement.Top); + } + + public DockItem GetItemByName (string name) + { + if (name == null) + return null; + + DockObject found = Master.GetObject (name); + if (found != null && found is DockItem) + return (DockItem)found; + else + return null; + } + + public DockPlaceholder GetPlaceholderByName (string name) + { + if (name == null) + return null; + + DockObject found = Master.GetObject (name); + if (found != null && found is DockPlaceholder) + return (DockPlaceholder)found; + else + return null; + } + + public static Dock GetTopLevel (DockObject obj) + { + DockObject parent = obj; + while (parent != null && !(parent is Dock)) + parent = parent.ParentObject; + + return parent != null ? (Dock)parent : null; + } + + public void XorRect (Gdk.Rectangle rect) + { + if (xorGC == null) { + if (IsRealized) { + Gdk.GCValues values = new Gdk.GCValues (); + values.Function = Gdk.Function.Invert; + values.SubwindowMode = Gdk.SubwindowMode.IncludeInferiors; + xorGC = new Gdk.GC (GdkWindow); + xorGC.SetValues (values, Gdk.GCValuesMask.Function | + Gdk.GCValuesMask.Subwindow); + } else { + return; + } + } + + xorGC.SetLineAttributes (1, Gdk.LineStyle.OnOffDash, + Gdk.CapStyle.NotLast, + Gdk.JoinStyle.Bevel); + xorGC.SetDashes (1, new sbyte[] { 1, 1}, 2); + + GdkWindow.DrawRectangle (xorGC, false, rect.X, rect.Y, + rect.Width, rect.Height); + + xorGC.SetDashes (0, new sbyte[] { 1, 1}, 2); + + GdkWindow.DrawRectangle (xorGC, false, rect.X + 1, + rect.Y + 1, rect.Width - 2, + rect.Height - 2); + } + + private void SetWindowTitle () + { + if (window == null) + return; + + if (!autoTitle && LongName != null) + title = LongName; + else if (Master != null) + title = Master.DefaultTitle; + + if (title == null && root != null) + title = root.LongName; + + if (title == null) { + autoTitle = true; + title = "Dock " + Master.DockNumber++; + LongName = title; + } + + ((Window)window).Title = title; + } + + [GLib.ConnectBefore] + private void OnFloatingConfigure (object o, ConfigureEventArgs e) + { + floatX = e.Event.X; + floatY = e.Event.Y; + width = e.Event.Width; + height = e.Event.Height; + + e.RetVal = false; + } + + private void OnFloatingDelete (object o, DeleteEventArgs e) + { + if (root != null) + /* this will call reduce on ourselves, hiding + the window if appropiate */ + ((DockItem)root).HideItem (); + + e.RetVal = true; + } + } +} Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockBar.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockBar.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockBar.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,85 @@ +// created on 6/24/2004 at 7:43 PM + +using System; +using System.Collections; +using Gtk; + +namespace Gdl +{ + public class DockBar : VBox + { + DockMaster master; + Tooltips tooltips = new Tooltips (); + + public DockBar (Dock dock) + { + Console.WriteLine ("new dockbar"); + master = dock.Master; + } + + public DockMaster Master { + get { + return master; + } + set { + master = value; + } + } + + public void AddItem (DockItem item) + { + Console.WriteLine ("adding item to dockbar"); + Button button = new Button (); + button.Relief = ReliefStyle.None; + Image image = new Image (item.StockId, IconSize.SmallToolbar); + button.Add (image); + button.Clicked += OnDockButtonClicked; + // check if already there + tooltips.SetTip (button, item.Name, item.Name); + item.DockBar = this; + item.DockBarButton = button; + this.PackStart (button, false, false, 0); + button.ShowAll (); + } + + public void Attach (DockMaster master) + { + this.master = master; + master.LayoutChanged += OnLayoutChanged; + } + + public void RemoveItem (DockItem item) + { + // check if there + this.Remove (item.DockBarButton); + } + + void UpdateDockItems () + { + foreach (DockItem item in master.DockObjects) + { + if (item.Iconified) + this.AddItem (item); + else + this.RemoveItem (item); + } + } + + void OnLayoutChanged (object o, EventArgs args) + { + UpdateDockItems (); + } + + void OnDockButtonClicked (object o, EventArgs args) + { + DockItem item = (DockItem) o; //FIXME: o is a Button + DockObject controller = item.Master.Controller; + item.DockBar = null; + // remove Iconified flag + item.Flags |= (int) DockObjectFlags.Iconified; + item.Show (); + this.RemoveItem (item); + controller.QueueResize (); + } + } +} \ No newline at end of file Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItem.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItem.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItem.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,947 @@ +// created on 06/06/2004 at 10:09 P +using System; +using Gtk; + +namespace Gdl +{ + public delegate void DockItemMotionHandler (DockItem o, int x, int y); + public delegate void DockItemDragBeginHandler (DockItem o); + public delegate void DockItemDragEndHandler (DockItem o, bool cancelled); + + public class DockItem : DockObject + { + private readonly float SplitRatio = 0.4f; + private Widget child = null; + private DockItemBehavior behavior = DockItemBehavior.Normal; + private Orientation orientation = Orientation.Vertical; + private bool resize = false; + private int dragoffX = 0; + private int dragoffY = 0; + private Menu menu = null; + private DockBar dockBar; + private DockItemGrip grip; + private Button dockButton; + private uint gripSize; + private Widget tabLabel = null; + private int preferredWidth = -1; + private int preferredHeight = -1; + private DockPlaceholder ph = null; + private int startX; + private int startY; + + public event DockItemMotionHandler DockItemMotion; + public event DockItemDragBeginHandler DockItemDragBegin; + public event DockItemDragEndHandler DockItemDragEnd; + + static DockItem () + { + Rc.ParseString ("style \"gdl-dock-item-default\" {\n" + + "xthickness = 0\n" + + "ythickness = 0\n" + + "}\n" + + "class \"Gdl_DockItem\" " + + "style : gtk \"gdl-dock-item-default\"\n"); + } + + protected DockItem () + { + Flags |= (int)WidgetFlags.NoWindow; + + if (HasGrip) { + grip = new DockItemGrip (this); + grip.Parent = this; + grip.Show (); + } + } + + protected DockItem (IntPtr raw) : base (raw) { } + + public DockItem (string name, string longName, DockItemBehavior behavior) : this () + { + Name = name; + LongName = longName; + Behavior = behavior; + } + + public DockItem (string name, string longName, string stockid, + DockItemBehavior behavior) : this (name, longName, behavior) + { + StockId = stockid; + } + + public DockItemBehavior Behavior { + get { + return behavior; + } + set { + DockItemBehavior oldBehavior = behavior; + behavior = value; + if (((oldBehavior ^ behavior) & DockItemBehavior.Locked) != 0) { + if (Master != null) + Master.EmitLayoutChangedEvent (); + } + EmitPropertyEvent ("Behavior"); + } + } + + public bool CantClose { + get { + return ((Behavior & DockItemBehavior.CantClose) != 0); + } + } + + public bool CantIconify { + get { + return ((Behavior & DockItemBehavior.CantIconify) != 0); + } + } + + public new Widget Child { + get { + return child; + } + set { + child = value; + } + } + + public DockBar DockBar { + get { + return dockBar; + } + set { + dockBar = value; + } + } + + public Button DockBarButton { + get { + return dockButton; + } + set { + dockButton = value; + } + } + + public int DragOffX { + get { + return dragoffX; + } + set { + dragoffX = value; + } + } + + public int DragOffY { + get { + return dragoffY; + } + set { + dragoffY = value; + } + } + + public bool GripShown { + get { + return (HasGrip && !Locked && grip.Visible); + } + } + + public virtual bool HasGrip { + get { + return true; + } + } + + public bool Iconified { + get { + return ((DockObjectFlags & DockObjectFlags.Iconified) != 0); + } + } + + public bool InDrag { + get { + return ((DockObjectFlags & DockObjectFlags.InDrag) != 0); + } + } + + public bool InPreDrag { + get { + return ((DockObjectFlags & DockObjectFlags.InPreDrag) != 0); + } + } + + public override bool IsCompound { + get { + return false; + } + } + + public bool Locked { + get { + return ((behavior & DockItemBehavior.Locked) != 0); + } + set { + DockItemBehavior oldBehavior = behavior; + if (value) + behavior |= DockItemBehavior.Locked; + else + behavior &= ~(DockItemBehavior.Locked); + + if ((oldBehavior ^ behavior) != 0) { + if (Master != null) + Master.EmitLayoutChangedEvent (); + EmitPropertyEvent ("Locked"); + } + } + } + + public Orientation Orientation { + get { + return orientation; + } + set { + SetOrientation (value); + EmitPropertyEvent ("Orientation"); + } + } + + public int PreferredHeight { + get { + return preferredHeight; + } + set { + preferredHeight = value; + } + } + + public int PreferredWidth { + get { + return preferredWidth; + } + set { + preferredWidth = value; + } + } + + public Requisition PreferredSize { + get { + Requisition req = new Requisition (); + req.Width = Math.Max (preferredWidth, Allocation.Width); + req.Height = Math.Max (preferredHeight, Allocation.Height); + return req; + } + } + + public bool Resize { + get { + return resize; + } + set { + resize = value; + QueueResize (); + EmitPropertyEvent ("Resize"); + } + } + + public Widget TabLabel { + get { + return tabLabel; + } + set { + tabLabel = value; + } + } + + public bool UserAction { + get { + return ((DockObjectFlags & DockObjectFlags.UserAction) != 0); + } + } + + protected override void OnAdded (Widget widget) + { + if (widget is DockObject) { + Console.WriteLine ("You can't add a DockObject to a DockItem"); + return; + } + + if (Child != null) { + Console.WriteLine ("This DockItem already has a child"); + return; + } + + widget.Parent = this; + Child = widget; + } + + protected override void OnRemoved (Widget widget) + { + bool wasVisible = widget.Visible; + + if (grip == widget) { + widget.Unparent (); + grip = null; + if (wasVisible) + QueueResize (); + return; + } else if (widget != Child) { + return; + } + + if (InDrag) + EndDrag (true); + + widget.Unparent (); + Child = null; + + if (wasVisible) + QueueResize (); + } + + protected override void ForAll (bool include_internals, CallbackInvoker invoker) + { + if (include_internals && grip != null) + invoker.Invoke (grip); + if (Child != null) + invoker.Invoke (Child); + } + + protected override void OnSizeRequested (ref Requisition requisition) + { + requisition.Width = ((int)BorderWidth + Style.XThickness) * 2; + requisition.Height = ((int)BorderWidth + Style.YThickness) * 2; + + Requisition childReq; + if (Child != null && Child.Visible) { + childReq = Child.SizeRequest (); + } else { + childReq.Width = 0; + childReq.Height = 0; + } + + Requisition gripReq; + gripReq.Width = gripReq.Height = 0; + + if (Orientation == Orientation.Horizontal) { + if (GripShown) { + gripReq = grip.SizeRequest (); + requisition.Width += gripReq.Width; + } + + if (Child != null) { + requisition.Width += childReq.Width; + requisition.Height += Math.Max (childReq.Height, + gripReq.Height); + } + } else { + if (GripShown) { + gripReq = grip.SizeRequest (); + requisition.Height += gripReq.Height; + } + + if (Child != null) { + requisition.Width += Math.Max (childReq.Width, + gripReq.Width); + requisition.Height += childReq.Height; + } + } + } + + protected override void OnSizeAllocated (Gdk.Rectangle allocation) + { + base.OnSizeAllocated (allocation); + + if (IsRealized) { + GdkWindow.MoveResize (allocation.X, allocation.Y, + allocation.Width, allocation.Height); + } + + if (Child != null && Child.Visible) { + int bw = (int)BorderWidth; + Gdk.Rectangle childAlloc; + + childAlloc.X = bw + Style.XThickness; + childAlloc.Y = bw + Style.YThickness; + childAlloc.Width = allocation.Width - 2 * (bw + Style.XThickness); + childAlloc.Height = allocation.Height - 2 * (bw + Style.YThickness); + + if (GripShown) { + Gdk.Rectangle gripAlloc = childAlloc; + Requisition gripReq = grip.SizeRequest (); + + if (Orientation == Orientation.Horizontal) { + childAlloc.X += gripReq.Width; + childAlloc.Width -= gripReq.Width; + gripAlloc.Width = gripReq.Width; + } else { + childAlloc.Y += gripReq.Height; + childAlloc.Height -= gripReq.Height; + gripAlloc.Height = gripReq.Height; + } + + grip.SizeAllocate (gripAlloc); + } + + Child.SizeAllocate (childAlloc); + } + } + + protected override void OnMapped () + { + SetFlag (WidgetFlags.Mapped); + + GdkWindow.Show (); + + if (Child != null && Child.Visible && !Child.IsMapped) + Child.Map (); + if (grip != null && grip.Visible && !grip.IsMapped) + grip.Map (); + } + + protected override void OnUnmapped () + { + ClearFlag (WidgetFlags.Mapped); + + GdkWindow.Hide (); + + if (grip != null) + grip.Unmap (); + } + + protected override void OnRealized () + { + Flags |= (int)WidgetFlags.Realized; + + Gdk.WindowAttr attributes = new Gdk.WindowAttr (); + attributes.X = Allocation.X; + attributes.Y = Allocation.Y; + attributes.Height = Allocation.Height; + attributes.Width = Allocation.Width; + attributes.WindowType = Gdk.WindowType.Child; + attributes.Wclass = Gdk.WindowClass.InputOutput; + attributes.visual = Visual; + attributes.colormap = Colormap; + attributes.EventMask = (int)(Events | + Gdk.EventMask.ExposureMask | + Gdk.EventMask.Button1MotionMask | + Gdk.EventMask.ButtonPressMask | + Gdk.EventMask.ButtonReleaseMask); + + Gdk.WindowAttributesType attributes_mask = + Gdk.WindowAttributesType.X | + Gdk.WindowAttributesType.Y | + Gdk.WindowAttributesType.Colormap | + Gdk.WindowAttributesType.Visual; + GdkWindow = new Gdk.Window (ParentWindow, attributes, (int)attributes_mask); + GdkWindow.UserData = Handle; + + Style = Style.Attach (GdkWindow); + Style.SetBackground (GdkWindow, State); + + GdkWindow.SetBackPixmap (null, true); + + if (Child != null) + Child.ParentWindow = GdkWindow; + if (grip != null) + grip.ParentWindow = GdkWindow; + } + + protected override void OnStyleSet (Style style) + { + if (IsRealized && !IsNoWindow) { + Style.SetBackground (GdkWindow, State); + if (IsDrawable) + GdkWindow.Clear (); + } + } + + /*protected override void OnDestroyed () + { + if (tabLabel != null) + tabLabel = null; + if (menu != null) { + menu.Detach (); + menu = null; + } + if (grip != null) { + Remove (grip); + grip = null; + } + if (ph != null) { + ph = null; + } + base.OnDestroyed (); + }*/ + + protected override bool OnExposeEvent (Gdk.EventExpose evnt) + { + if (IsDrawable && evnt.Window == GdkWindow) { + Style.PaintBox (Style, GdkWindow, State, + ShadowType.None, evnt.Area, this, + "dockitem", 0, 0, -1, -1); + base.OnExposeEvent (evnt); + } + + return false; + } + + protected override bool OnButtonPressEvent (Gdk.EventButton evnt) + { + if (!EventInGripWindow (evnt) || Locked) + return false; + + bool eventHandled = false; + bool inHandle; + Gdk.Cursor cursor = null; + + /* Check if user clicked on the drag handle. */ + switch (Orientation) { + case Orientation.Horizontal: + inHandle = evnt.X < grip.Allocation.Width; + break; + case Orientation.Vertical: + inHandle = evnt.Y < grip.Allocation.Height; + break; + default: + inHandle = false; + break; + } + + /* Left mousebutton click on dockitem. */ + if (evnt.Button == 1 && evnt.Type == Gdk.EventType.ButtonPress) { + /* Set in_drag flag, grab pointer and call begin drag operation. */ + if (inHandle) { + startX = (int)evnt.X; + startY = (int)evnt.Y; + DockObjectFlags |= DockObjectFlags.InPreDrag; + cursor = new Gdk.Cursor (Display, Gdk.CursorType.Fleur); + grip.TitleWindow.Cursor = cursor; + eventHandled = true; + } + } else if (evnt.Type == Gdk.EventType.ButtonRelease && evnt.Button == 1) { + if (InDrag) { + /* User dropped widget somewhere. */ + EndDrag (false); + eventHandled = true; + } else if (InPreDrag) { + DockObjectFlags &= ~(DockObjectFlags.InPreDrag); + eventHandled = true; + } + + /* we check the window since if the item was redocked it's + been unrealized and maybe it's not realized again yet */ + if (grip.TitleWindow != null) { + cursor = new Gdk.Cursor (Display, Gdk.CursorType.Hand2); + grip.TitleWindow.Cursor = cursor; + } + } else if (evnt.Button == 3 && evnt.Type == Gdk.EventType.ButtonPress && inHandle) { + DockPopupMenu (evnt.Button, evnt.Time); + eventHandled = true; + } + + return eventHandled; + } + + protected override bool OnButtonReleaseEvent (Gdk.EventButton evnt) + { + return OnButtonPressEvent (evnt); + } + + protected override bool OnMotionNotifyEvent (Gdk.EventMotion evnt) + { + if (!EventInGripWindow (evnt)) + return false; + + if (InPreDrag) { + if (Drag.CheckThreshold (this, startX, startY, + (int)evnt.X, (int)evnt.Y)) { + DockObjectFlags &= ~(DockObjectFlags.InPreDrag); + dragoffX = startX; + dragoffY = startY; + StartDrag (); + } + } + + if (!InDrag) + return false; + + int newX = (int)evnt.XRoot; + int newY = (int)evnt.YRoot; + + OnDragMotion (newX, newY); + DockItemMotionHandler handler = DockItemMotion; + if (handler != null) + handler (this, newX, newY); + + return true; + } + + protected override bool OnKeyPressEvent (Gdk.EventKey evnt) + { + if (InDrag && evnt.Key == Gdk.Key.Escape) { + EndDrag (false); + return true; + } + + return base.OnKeyPressEvent (evnt); + } + + public override bool OnDockRequest (int x, int y, ref DockRequest request) + { + /* we get (x,y) in our allocation coordinates system */ + + /* Get item's allocation. */ + Gdk.Rectangle alloc = Allocation; + + /* Get coordinates relative to our window. */ + int relX = x - alloc.X; + int relY = y - alloc.Y; + + /* Location is inside. */ + if (relX > 0 && relX < alloc.Width && + relY > 0 && relY < alloc.Height) { + int divider = -1; + + /* these are for calculating the extra docking parameter */ + Requisition other = ((DockItem)request.Applicant).PreferredSize; + Requisition my = PreferredSize; + + /* Calculate location in terms of the available space (0-100%). */ + float rx = (float) relX / alloc.Width; + float ry = (float) relY / alloc.Height; + + /* Determine dock location. */ + if (rx < SplitRatio) { + request.Position = DockPlacement.Left; + divider = other.Width; + } else if (rx > (1 - SplitRatio)) { + request.Position = DockPlacement.Right; + rx = 1 - rx; + divider = Math.Max (0, my.Width - other.Width); + } else if (ry < SplitRatio && ry < rx) { + request.Position = DockPlacement.Top; + divider = other.Height; + } else if (ry > (1 - SplitRatio) && (1 - ry) < rx) { + request.Position = DockPlacement.Bottom; + divider = Math.Max (0, my.Height - other.Height); + } else { + request.Position = DockPlacement.Center; + } + + /* Reset rectangle coordinates to entire item. */ + request.X = 0; + request.Y = 0; + request.Width = alloc.Width; + request.Height = alloc.Height; + + /* Calculate docking indicator rectangle size for new locations. + Only do this when we're not over the item's current location. */ + if (request.Applicant != this) { + switch (request.Position) { + case DockPlacement.Top: + request.Height = (int)(request.Height * SplitRatio); + break; + case DockPlacement.Bottom: + request.Y += (int)(request.Height * (1 - SplitRatio)); + request.Height = (int)(request.Height * SplitRatio); + break; + case DockPlacement.Left: + request.Width = (int)(request.Width * SplitRatio); + break; + case DockPlacement.Right: + request.X += (int)(request.Width * (1 - SplitRatio)); + request.Width = (int)(request.Width * SplitRatio); + break; + case DockPlacement.Center: + request.X = (int)(request.Width * SplitRatio / 2); + request.Y = (int)(request.Height * SplitRatio / 2); + request.Width = (int)(request.Width * (1 - SplitRatio / 2)) - request.X; + request.Height = (int)(request.Height * (1 - SplitRatio / 2)) - request.Y; + break; + default: + break; + } + } + + /* adjust returned coordinates so they have the same + origin as our window */ + request.X += alloc.X; + request.Y += alloc.Y; + + /* Set possible target location and return true. */ + request.Target = this; + + /* fill-in other dock information */ + if (request.Position != DockPlacement.Center && divider >= 0) + request.Extra = divider; + + return true; + } else { /* No docking possible at this location. */ + return false; + } + } + + public override void OnDocked (DockObject requestor, DockPlacement position, object data) + { + DockObject parent = ParentObject; + DockObject newParent = null; + bool addOurselvesFirst; + + switch (position) { + case DockPlacement.Top: + case DockPlacement.Bottom: + newParent = new DockPaned (Orientation.Vertical); + addOurselvesFirst = (position == DockPlacement.Bottom); + break; + case DockPlacement.Left: + case DockPlacement.Right: + newParent = new DockPaned (Orientation.Horizontal); + addOurselvesFirst = (position == DockPlacement.Right); + break; + case DockPlacement.Center: + newParent = new DockNotebook (); + addOurselvesFirst = true; + break; + default: + Console.WriteLine ("Unsupported docking strategy"); + return; + } + + if (parent != null) + parent.Freeze (); + + DockObjectFlags |= DockObjectFlags.InReflow; + Detach (false); + newParent.Freeze (); + newParent.Bind (Master); + + if (addOurselvesFirst) { + newParent.Add (this); + newParent.Add (requestor); + } else { + newParent.Add (requestor); + newParent.Add (this); + } + + if (parent != null) + parent.Add (newParent); + + if (Visible) + newParent.Show (); + + if (position != DockPlacement.Center && data != null && + data is System.Int32) { + //PORT THIS: + //g_object_set (G_OBJECT (newParent), "position", g_value_get_uint (other_data), NULL); + } + + DockObjectFlags &= ~(DockObjectFlags.InReflow); + + newParent.Thaw (); + if (parent != null) + parent.Thaw (); + } + + protected virtual void OnDragBegin () + { + } + + protected virtual void OnDragEnd (bool cancelled) + { + } + + protected virtual void OnDragMotion (int x, int y) + { + } + + private void DetachMenu (Widget item, Menu menu) + { + if (item is DockItem) + ((DockItem)item).menu = null; + } + + public void DockPopupMenu (uint button, uint time) + { + if (menu == null) { + menu = new Menu (); + menu.AttachToWidget (this, new MenuDetachFunc (DetachMenu)); + + MenuItem mitem = new MenuItem ("Hide"); + mitem.Activated += new EventHandler (ItemHideCb); + menu.Append (mitem); + } + menu.ShowAll (); + menu.Popup (null, null, null, IntPtr.Zero, button, time); + + } + + private void ItemHideCb (object o, EventArgs e) + { + HideItem (); + } + + private void StartDrag () + { + if (!IsRealized) + Realize (); + + DockObjectFlags |= DockObjectFlags.InDrag; + + /* grab the pointer so we receive all mouse events */ + Gdk.Cursor fleur = new Gdk.Cursor (Gdk.CursorType.Fleur); + + /* grab the keyboard & pointer */ + Grab.Add (this); + + OnDragBegin (); + DockItemDragBeginHandler handler = DockItemDragBegin; + if (handler != null) + handler (this); + } + + private void EndDrag (bool cancel) + { + /* Release pointer & keyboard. */ + Grab.Remove (Grab.Current); + + OnDragEnd (cancel); + DockItemDragEndHandler handler = DockItemDragEnd; + if (handler != null) + handler (this, cancel); + + DockObjectFlags &= ~(DockObjectFlags.InDrag); + } + + private void ShowHideGrip () + { + if (grip != null) { + if (GripShown) + grip.Show (); + else + grip.Hide (); + } + QueueResize (); + } + + public void DockTo (DockItem target, DockPlacement position) + { + if (target == null && position != DockPlacement.Floating) + return; + + if (position == DockPlacement.Floating || target == null) { + if (!IsBound) { + Console.WriteLine ("Attempting to bind an unbound item"); + return; + } + + dragoffX = dragoffY = 0; + ((Dock)Master.Controller).AddFloatingItem (this, 0, 0, -1, -1); + } else { + target.Dock (this, position, null); + } + } + + public virtual void SetOrientation (Orientation orientation) + { + if (Orientation != orientation) { + this.orientation = orientation; + if (IsDrawable) + QueueDraw (); + QueueResize (); + EmitPropertyEvent ("orientation"); + } + } + + public void HideGrip () + { + if (GripShown) + ShowHideGrip (); + } + + public void ShowGrip () + { + if (!GripShown) + ShowHideGrip (); + } + + public void Bind (Dock dock) + { + if (dock == null) + return; + + Bind (dock.Master); + } + + public void HideItem () + { + if (!IsAttached) + /* already hidden/detached */ + return; + + /* if the object is manual, create a new placeholder to be + able to restore the position later */ + if (!IsAutomatic) + ph = new DockPlaceholder (this, false); + + Freeze (); + + /* hide our children first, so they can also set placeholders */ + if (IsCompound) + Foreach (new Callback (HideChildItem)); + + Detach (true); + Thaw (); + } + + private void HideChildItem (Widget widget) + { + if (!(widget is DockItem)) + return; + + DockItem item = widget as DockItem; + item.HideItem (); + } + + public void IconifyItem () + { + DockObjectFlags |= DockObjectFlags.Iconified; + HideItem (); + } + + public void ShowItem () + { + DockObjectFlags &= ~(DockObjectFlags.Iconified); + + if (ph != null) { + ph.Add (this); + ph = null; + } else if (IsBound) { + if (Master.Controller != null) { + Master.Controller.Dock (this, DockPlacement.Floating, null); + } + } + } + + public virtual void SetDefaultPosition (DockObject reference) + { + ph = null; + + if (reference != null && reference.IsAttached) { + if (reference is DockPlaceholder) { + ph = (DockPlaceholder)reference; + } else { + ph = new DockPlaceholder (reference, true); + } + } + } + + private bool EventInGripWindow (Gdk.Event evnt) + { + if (grip != null && grip.TitleWindow == evnt.Window) + return true; + else + return false; + } + } +} Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemBehavior.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemBehavior.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemBehavior.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,21 @@ +using System; + +namespace Gdl +{ + [Flags] + public enum DockItemBehavior + { + Normal, + NeverFloating = 1 << 0, + NeverVertical = 1 << 1, + NeverHorizontal = 1 << 2, + Locked = 1 << 3, + CantDockTop = 1 << 4, + CantDockBottom = 1 << 5, + CantDockLeft = 1 << 6, + CantDockRight = 1 << 7, + CantDockCenter = 1 << 8, + CantClose = 1 << 9, + CantIconify = 1 << 10, + } +} Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemGrip.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemGrip.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockItemGrip.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,448 @@ +// created on 07/06/2004 at 2:52 P + +using System; +using Gtk; + +namespace Gdl +{ + public class DockItemGrip : Container + { + private DockItem item; + private Gdk.Window titleWindow; + private Button closeButton; + private Button iconifyButton; + private Tooltips tooltips; + private Gdk.Pixbuf icon = null; + private string title; + private Pango.Layout layout = null; + + protected DockItemGrip (IntPtr raw) : base (raw) { } + + protected DockItemGrip () + { + Flags |= (int)WidgetFlags.NoWindow; + + Widget.PushCompositeChild (); + closeButton = new Button (); + Widget.PopCompositeChild (); + + closeButton.Flags &= ~(int)WidgetFlags.CanFocus; + closeButton.Parent = this; + closeButton.Relief = ReliefStyle.None; + closeButton.Show (); + + Image image = new Image (Gdl.Stock.Close, IconSize.Menu); + closeButton.Add (image); + image.Show (); + + closeButton.Clicked += new EventHandler (CloseClicked); + + Widget.PushCompositeChild (); + iconifyButton = new Button (); + Widget.PopCompositeChild (); + + iconifyButton.Flags &= ~(int)(WidgetFlags.CanFocus); + iconifyButton.Parent = this; + iconifyButton.Relief = ReliefStyle.None; + iconifyButton.Show (); + + image = new Image (Gdl.Stock.MenuLeft, IconSize.Menu); + iconifyButton.Add (image); + image.Show (); + + iconifyButton.Clicked += new EventHandler (IconifyClicked); + + tooltips = new Tooltips (); + tooltips.SetTip (iconifyButton, "Iconify", "Iconify this dock"); + tooltips.SetTip (closeButton, "Close", "Close this dock"); + } + + public DockItemGrip (DockItem item) : this () + { + if (item == null) + throw new ArgumentNullException ("A valid DockItem must be given"); + Item = item; + } + + private Gdk.Pixbuf Icon { + get { + if (icon == null && item.StockId != null) + icon = RenderIcon (item.StockId, IconSize.Menu, ""); + return icon; + } + } + + public DockItem Item { + get { + return item; + } + set { + item = value; + item.PropertyChanged += OnPropertyChanged; + + if (!item.CantClose) + closeButton.Show (); + else + closeButton.Hide (); + + if (!item.CantIconify) + iconifyButton.Show (); + else + iconifyButton.Hide (); + + icon = null; + layout = null; + title = null; + } + } + + private Pango.Layout Layout { + get { + if (layout == null) { + layout = CreatePangoLayout (Title); + layout.SingleParagraphMode = true; + } + return layout; + } + } + + private string Title { + get { + if (title == null) { + if (item.LongName != null) + title = item.LongName; + else + title = ""; + } + return title; + } + set { + title = value; + if (layout != null) + layout.SetText (Title); + } + } + + private Gdk.Rectangle TitleArea { + get { + Gdk.Rectangle area; + int bw = (int)BorderWidth; + int height, width; + + area.Width = Allocation.Width - 2 * bw; + + Layout.GetPixelSize (out width, out height); + + if (closeButton.Visible) { + height = Math.Max (height, closeButton.Allocation.Height); + area.Width -= closeButton.Allocation.Width; + } + + if (iconifyButton.Visible) { + height = Math.Max (height, iconifyButton.Allocation.Height); + area.Width -= iconifyButton.Allocation.Width; + } + + area.X = Allocation.X + bw; + area.Y = Allocation.Y + bw; + area.Height = height; + + if (Direction == TextDirection.Rtl) + area.X += (Allocation.Width - 2 * bw) - area.Width; + + return area; + } + } + + public Gdk.Window TitleWindow { + get { + return titleWindow; + } + set { + titleWindow = value; + } + } + + private void OnPropertyChanged (object o, string name) + { + switch (name) { + case "StockId": + icon = RenderIcon (item.StockId, IconSize.Menu, ""); + break; + case "LongName": + Title = item.LongName; + break; + case "Behavior": + if (!item.CantClose) + closeButton.Show (); + else + closeButton.Hide (); + + if (!item.CantIconify) + iconifyButton.Show (); + else + iconifyButton.Hide (); + break; + default: + break; + } + } + + /*protected override void OnDestroyed () + { + if (layout != null) + layout = null; + if (icon != null) + icon = null; + if (tooltips != null) + tooltips = null; + if (item != null) { + //TODO: Disconnect future signal handlers for notify. + } + item = null; + base.OnDestroyed (); + }*/ + + protected override bool OnExposeEvent (Gdk.EventExpose evnt) + { + Gdk.Rectangle titleArea = TitleArea; + Gdk.Rectangle exposeArea; + + if (Icon != null) { + Gdk.Rectangle pixbufRect; + pixbufRect.Width = icon.Width; + pixbufRect.Height = icon.Height; + + if (Direction == TextDirection.Rtl) { + pixbufRect.X = titleArea.X + titleArea.Width - pixbufRect.Width; + } else { + pixbufRect.X = titleArea.X; + titleArea.X += pixbufRect.Width + 1; + } + + titleArea.Width -= pixbufRect.Width - 1; + pixbufRect.Y = titleArea.Y + (titleArea.Height - pixbufRect.Height) / 2; + + if (evnt.Area.Intersect (pixbufRect, out exposeArea)) { + Gdk.GC gc = Style.BackgroundGC (State); + GdkWindow.DrawPixbuf (gc, icon, 0, 0, pixbufRect.X, + pixbufRect.Y, pixbufRect.Width, + pixbufRect.Height, Gdk.RgbDither.None, + 0, 0); + } + } + + if (titleArea.Intersect (evnt.Area, out exposeArea)) { + int width, height, textX, textY; + Layout.GetPixelSize (out width, out height); + + if (Direction == TextDirection.Rtl) + textX = titleArea.X + titleArea.Width - width; + else + textX = titleArea.X; + + textY = titleArea.Y + (titleArea.Height - height) / 2; + + Style.PaintLayout (Style, GdkWindow, State, true, + exposeArea, this, null, textX, + textY, layout); + } + + return base.OnExposeEvent (evnt); + } + + private void CloseClicked (object o, EventArgs e) + { + item.HideItem (); + } + + private void IconifyClicked (object o, EventArgs e) + { + item.IconifyItem (); + iconifyButton.InButton = false; + iconifyButton.Leave (); + } + + protected override void OnRealized () + { + base.OnRealized (); + + if (titleWindow == null) { + Gdk.WindowAttr attributes = new Gdk.WindowAttr (); + Gdk.Rectangle area = TitleArea; + + attributes.X = area.X; + attributes.Y = area.Y; + attributes.Width = area.Width; + attributes.Height = area.Height; + attributes.WindowType = Gdk.WindowType.Temp; + attributes.Wclass = Gdk.WindowClass.InputOnly; + attributes.OverrideRedirect = true; + attributes.EventMask = (int) (Events | + Gdk.EventMask.ButtonPressMask | + Gdk.EventMask.ButtonReleaseMask | + Gdk.EventMask.ButtonMotionMask); + + titleWindow = new Gdk.Window (ParentWindow, attributes, + (int) (Gdk.WindowAttributesType.X | + Gdk.WindowAttributesType.Y | + Gdk.WindowAttributesType.Noredir)); + + titleWindow.UserData = Handle; + titleWindow.Cursor = new Gdk.Cursor (Display, Gdk.CursorType.Hand2); + } + } + + protected override void OnUnrealized () + { + if (titleWindow != null) { + titleWindow.UserData = IntPtr.Zero; + titleWindow.Destroy (); + titleWindow = null; + } + + base.OnUnrealized (); + } + + protected override void OnMapped () + { + base.OnMapped (); + + if (titleWindow != null) + titleWindow.Show (); + } + + protected override void OnUnmapped () + { + if (titleWindow != null) + titleWindow.Hide (); + + base.OnUnmapped (); + } + + protected override void OnSizeRequested (ref Requisition requisition) + { + requisition.Width = (int)BorderWidth * 2; + requisition.Height = (int)BorderWidth * 2; + + if (closeButton.Visible) { + Requisition childReq = closeButton.SizeRequest (); + requisition.Width += childReq.Width; + requisition.Height = Math.Max (requisition.Height, + childReq.Height); + } + + if (iconifyButton.Visible) { + Requisition childReq = iconifyButton.SizeRequest (); + requisition.Width += childReq.Width; + requisition.Height = Math.Max (requisition.Height, + childReq.Height); + } + + if (Icon != null) { + requisition.Width += icon.Width + 1; + requisition.Height = Math.Max (requisition.Height, + icon.Height); + } + } + + private void EllipsizeLayout (int width) + { + if (width <= 0) { + layout.SetText (""); + return; + } + + int w, h, ell_w, ell_h, x, empty; + layout.GetPixelSize (out w, out h); + if (w <= width) return; + + Pango.Layout ell = layout.Copy (); + ell.SetText ("..."); + ell.GetPixelSize (out ell_w, out ell_h); + if (width < ell_w) { + layout.SetText (""); + return; + } + + width -= ell_w; + Pango.LayoutLine line = layout.GetLine (0); + string text = layout.Text; + if (line.XToIndex (width * 1024, out x, out empty)) { + layout.SetText (text.Substring (0, x) + "..."); + } + } + + protected override void OnSizeAllocated (Gdk.Rectangle allocation) + { + base.OnSizeAllocated (allocation); + + Gdk.Rectangle childAlloc; + int bw = (int)BorderWidth; + + if (Direction == TextDirection.Rtl) + childAlloc.X = allocation.X + bw; + else + childAlloc.X = allocation.X + allocation.Width - bw; + childAlloc.Y = allocation.Y + bw; + + if (closeButton.Visible) { + Requisition buttonReq = closeButton.SizeRequest (); + + if (Direction != TextDirection.Rtl) + childAlloc.X -= buttonReq.Width; + childAlloc.Width = buttonReq.Width; + childAlloc.Height = buttonReq.Height; + + closeButton.SizeAllocate (childAlloc); + + if (Direction == TextDirection.Rtl) + childAlloc.X += buttonReq.Width; + } + + if (iconifyButton.Visible) { + Requisition buttonReq = iconifyButton.SizeRequest (); + + if (Direction != TextDirection.Rtl) + childAlloc.X -= buttonReq.Width; + childAlloc.Width = buttonReq.Width; + childAlloc.Height = buttonReq.Height; + + iconifyButton.SizeAllocate (childAlloc); + + if (Direction == TextDirection.Rtl) + childAlloc.X += buttonReq.Width; + } + + if (TitleWindow != null) { + layout.SetText (title); + + Gdk.Rectangle area = TitleArea; + titleWindow.MoveResize (area.X, area.Y,area.Width, area.Height); + + if (Icon != null) + area.Width -= icon.Width + 1; + + EllipsizeLayout (area.Width); + } + } + + protected override void OnAdded (Widget widget) + { + Console.WriteLine ("You can't add a widget to DockItemGrip directly"); + } + + protected override void OnRemoved (Widget widget) + { + Console.WriteLine ("You can't remove a widget from DockItemGrip directly"); + } + + protected override void ForAll (bool include_internals, CallbackInvoker invoker) + { + if (include_internals) { + invoker.Invoke (closeButton); + invoker.Invoke (iconifyButton); + } + } + } +} Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockLayout.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockLayout.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockLayout.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,84 @@ +// created on 6/24/2004 at 7:39 PM + +using System; +using System.Collections; +using Gtk; + +namespace Gdl +{ + // stub so I can compile in MD + public class DockLayout + { + DockMaster master; + Widget itemsui; + Widget layoutsui; + string[] layouts; + bool dirty; + + public DockLayout (Dock dock) + { + } + + public DockMaster Master { + get { + return master; + } + set { + master = value; + } + } + + // generated had Dirty and IsDirty + public bool IsDirty { + get { + return dirty; + } + } + + public Widget ItemsUi { + get { + return itemsui; + } + } + + public Widget LayoutsUi { + get { + return layoutsui; + } + } + + public void Attach (DockMaster master) + { + this.master = master; + } + + public void DeleteLayout (string name) + { + } + + public string[] GetLayouts (bool includeDefault) + { + return layouts; + } + + public void LoadLayout (string newLayout) + { + } + + public void LoadFromFile (string configFile) + { + } + + public void RunManager () + { + } + + public void SaveLayout (string currentLayout) + { + } + + public void SaveToFile (string file) + { + } + } +} \ No newline at end of file Added: branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockMaster.cs =================================================================== --- branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockMaster.cs 2004-08-11 11:31:15 UTC (rev 1930) +++ branches/MonoDevelop-plan-43/src/Libraries/Gdl/DockMaster.cs 2004-08-11 13:49:39 UTC (rev 1931) @@ -0,0 +1,425 @@ +// created on 05/06/2004 at 11:14 A +using System; +using System.Collections; +using Gtk; + +namespace Gdl +{ + public class DockMaster + { + private object obj; + private Hashtable dockObjects = new Hashtable (); + private ArrayList toplevelDocks = new ArrayList (); + private DockObject controller = null; + private int dockNumber = 1; + private int number = 1; + private string defaultTitle; + private Gdk.GC rootXorGC; + private bool rectDrawn; + private Dock rectOwner; + private DockRequest request; + private uint idle_layout_changed_id; + private Hashtable lockedItems = new Hashtable (); + private Hashtable unlockedItems = new Hashtable (); + + public event EventHandler LayoutChanged; + + public DockMaster () + { + } + + public string DefaultTitle { + get { + return defaultTitle; + } + set { + defaultTitle = value; + } + } + + public int DockNumber { + get { + return dockNumber; + } + set { + dockNumb