Permalink
Browse files

2006-02-24 Lluis Sanchez Gual <lluis@novell.com>

	* libsteticui/Glade.cs: Use the new api for reading/writing.
	* libsteticui/Palette.cs: Update the palette when the
	  registry changes.
	* libsteticui/ProjectView.cs: Update the project tree when
	  the project has been reloaded (due for example to a
	  registry change).
	* libsteticui/Makefile.am: Updated.
	* libsteticui/Project.cs: Make it aware of changes in the
	  registry. When the registry changes, reload the project.
	  Added Read/Write and Load/Save methods, based on the
	  native format. Added ProjectReloaded event, which is fired
	  after the project has been reloaded due to a registry change.
	  Other minor changes.
	* libsteticui/SignalsEditor.cs: Refresh when the project is
	  reloaded. Addded SignalActivated, which is fired when double-
	  clicking an event.
	* libsteticui/ContextMenu.cs: Get class descriptors from wrappers,
	  instead of looking up in the registry. Track some other api
	  changes.
	* libsteticui/PropertyGrid.cs: Refresh when the project is
	  reloaded. Track some api changes.
	  
	* libstetic/ParamSpec.cs: Commented out some methods and
	  properties which depend on P/Invoke calls.
	* libstetic/ItemGroup.cs: Delegate item creation to the
	  owner class.
	* libstetic/wrapper/Button.cs:
	* libstetic/wrapper/Container.cs: Replaced glade export/import 
	  methods by Read/Write methods. Implemented code generation.
	* libstetic/wrapper/Widget.cs: Select the widget when it gets
	  the focus. Changed InternalChildId by InternalChildProperty,
	  which has more useful information. Made Visible a wrapper
	  property for all widgets. Replaced glade export/import 
	  methods by Read/Write methods. Implemented code generation.
	* libstetic/wrapper/Window.cs: Implemented code generation.
	* libstetic/wrapper/ComboBox.cs: Removed unneeded override.
	* libstetic/wrapper/objects.xml: Added some init-properties
	  and wrapper attributes. 
	* libstetic/wrapper/Table.cs: Fixed bug when setting column
	  count.
	* libstetic/wrapper/Dialog.cs: Track api changes. Don't throw
	  the buttons changed event while reading from xml.
	
	* libstetic/wrapper/RadioMenuItem.cs:
	* libstetic/wrapper/ImageMenuItem.cs:
	* libstetic/wrapper/Notebook.cs:
	* libstetic/wrapper/MenuItem.cs:
	* libstetic/wrapper/ButtonBox.cs:
	* libstetic/wrapper/Box.cs:
	* libstetic/wrapper/Expander.cs:
	* libstetic/wrapper/CheckButton.cs:
	* libstetic/wrapper/ToolButton.cs:
	* libstetic/wrapper/Frame.cs:
	* libstetic/wrapper/RadioButton.cs:
	* libstetic/wrapper/OptionMenu.cs:
	* libstetic/editor/ResponseId.cs:
	* libstetic/editor/Enumeration.cs:
	* libstetic/editor/GroupPicker.cs:
	* libstetic/editor/Flags.cs:
	* libstetic/ItemDescriptor.cs:
	* libstetic/wrapper/RadioToolButton.cs: Track api changes.
	
	* libstetic/SignalDescriptor.cs: Moved all code that depends
	  on Type and Reflection to TypedSignalDescriptor. Added
	  ParameterDescriptor, which replaces ParameterInfo.
	* libstetic/CommandDescriptor.cs: Made several changes to avoid
	  ClassDescriptor.WrapperType, which has been removed. Instead
	  of getting the method to call from the wrapped type, it gets
	  it from the type of the object when the command is invoked.
	* libstetic/editor/Char.cs: Fix worng type check.
	* libstetic/editor/Accelerator.cs: Removed glue P/Invokes.
	* libstetic/Placeholder.cs: Looks loke GdkWindow.SetBackPixmap
	  doesn't work very well. Draw filled rectangle instead.
	* libstetic/HandleWindow.cs:  If the window is embedded in a
	  preview box, use the gdk window of that box, which has more room
	  for drawing the handles.
	* libstetic/PropertyDescriptor.cs: Moved all code that depends
	  on Type and Reflection to TypedPropertyDescriptor. 
	  Added StringToValue and ValueToString methods for parsing and
	  converting values to string.
	
	* libstetic/GladeUtils.cs: Track api changes. Removed dependencies
	  to some ParamSpec properties that have been removed. The most
	  complex one to remove is the type of the glade property. Now it
	  is taken from the type of the corresponding class property.
	* libstetic/EnumDescriptor.cs: Use the registry to lookup the type
	  of the enum. The registry will look in all available libraries.
	* libstetic/ClassDescriptor.cs: Moved all code that depends
	  on Type and Reflection to TypedClassDescriptor.
	* libstetic/Makefile.am: Updated.
	* libstetic/ObjectWrapper.cs: Replaced glade export/import 
	  methods by Read/Write methods with support for native format.
	  Added ClassDescriptor property. There is no need to lookup
	  for classes in the registry since it can be accessed most of
	  the time from wrappers.
	* libstetic/Registry.cs: Added support for external widget
	  libraries.
	
	* ErrorWidget.cs:
	* EmbedWindow.cs:
	* Shadow.cs:
	* TypedClassDescriptor.cs:
	* TypedPropertyDescriptor.cs:
	* TypedSignalDescriptor.cs:
	* WidgetLibrary.cs:
	* Metacity/*:
	* wrapper/Entry.cs:
	* WidgetUtils.cs:
	* GeneratorContext.cs:
	* PreviewBox.cs:
	* AssemblyWidgetLibrary.cs:
	* WidgetLibrary.cs: New files.
	
	* Makefile.am:
	* configure.in: Removed glue directory from the build.
	
	* stetic/Stetic.cs: Added support for code generation from
	the command line.
	* stetic/stetic.in: Added debug option.
	* stetic/Makefile.am: Updated.
	* stetic/Glade.cs: Moved to libsteticui.
	* stetic/UIManager.cs: Added Load and Save commands.


svn path=/trunk/stetic/; revision=57239
  • Loading branch information...
2 parents 15a5765 + af70298 commit d3d1029669529cac4967f259f5bd2866a81c160d @slluis slluis committed Feb 24, 2006
Showing with 3,586 additions and 759 deletions.
  1. +125 −0 ChangeLog
  2. +1 −1 Makefile.am
  3. +0 −1 configure.in
  4. +54 −0 libstetic/AssemblyWidgetLibrary.cs
  5. +67 −99 libstetic/ClassDescriptor.cs
  6. +23 −35 libstetic/CommandDescriptor.cs
  7. +106 −0 libstetic/EmbedWindow.cs
  8. +9 −1 libstetic/EnumDescriptor.cs
  9. +54 −0 libstetic/ErrorWidget.cs
  10. +116 −0 libstetic/GeneratorContext.cs
  11. +69 −30 libstetic/GladeUtils.cs
  12. +13 −2 libstetic/HandleWindow.cs
  13. +1 −6 libstetic/ItemDescriptor.cs
  14. +6 −13 libstetic/ItemGroup.cs
  15. +21 −2 libstetic/Makefile.am
  16. +19 −0 libstetic/Metacity/ButtonFunction.cs
  17. +35 −0 libstetic/Metacity/ButtonLayout.cs
  18. +29 −0 libstetic/Metacity/FrameFlags.cs
  19. +21 −0 libstetic/Metacity/FrameType.cs
  20. +19 −0 libstetic/Metacity/ObjectManager.cs
  21. +121 −0 libstetic/Metacity/Preview.cs
  22. +40 −0 libstetic/Metacity/Theme.cs
  23. +44 −26 libstetic/ObjectWrapper.cs
  24. +28 −6 libstetic/ParamSpec.cs
  25. +10 −2 libstetic/Placeholder.cs
  26. +348 −0 libstetic/PreviewBox.cs
  27. +80 −199 libstetic/PropertyDescriptor.cs
  28. +137 −43 libstetic/Registry.cs
  29. +116 −0 libstetic/Shadow.cs
  30. +32 −44 libstetic/SignalDescriptor.cs
  31. +133 −0 libstetic/TypedClassDescriptor.cs
  32. +221 −0 libstetic/TypedPropertyDescriptor.cs
  33. +60 −0 libstetic/TypedSignalDescriptor.cs
  34. +103 −0 libstetic/WidgetLibrary.cs
  35. +199 −0 libstetic/WidgetUtils.cs
  36. +7 −3 libstetic/editor/Accelerator.cs
  37. +1 −1 libstetic/editor/Char.cs
  38. +1 −1 libstetic/editor/Enumeration.cs
  39. +1 −1 libstetic/editor/Flags.cs
  40. +10 −8 libstetic/editor/GroupPicker.cs
  41. +1 −1 libstetic/editor/ResponseId.cs
  42. +1 −1 libstetic/wrapper/Box.cs
  43. +15 −10 libstetic/wrapper/Button.cs
  44. +11 −3 libstetic/wrapper/ButtonBox.cs
  45. +2 −2 libstetic/wrapper/CheckButton.cs
  46. +0 −6 libstetic/wrapper/ComboBox.cs
  47. +214 −45 libstetic/wrapper/Container.cs
  48. +10 −1 libstetic/wrapper/Dialog.cs
  49. +15 −0 libstetic/wrapper/Entry.cs
  50. +7 −6 libstetic/wrapper/Expander.cs
  51. +6 −6 libstetic/wrapper/Frame.cs
  52. +2 −2 libstetic/wrapper/ImageMenuItem.cs
  53. +2 −2 libstetic/wrapper/MenuItem.cs
  54. +6 −6 libstetic/wrapper/Notebook.cs
  55. +7 −7 libstetic/wrapper/OptionMenu.cs
  56. +4 −4 libstetic/wrapper/RadioButton.cs
  57. +4 −4 libstetic/wrapper/RadioMenuItem.cs
  58. +4 −4 libstetic/wrapper/RadioToolButton.cs
  59. +27 −21 libstetic/wrapper/Table.cs
  60. +2 −2 libstetic/wrapper/ToolButton.cs
  61. +97 −33 libstetic/wrapper/Widget.cs
  62. +29 −0 libstetic/wrapper/Window.cs
  63. +9 −6 libstetic/wrapper/objects.xml
  64. +263 −0 libsteticui/CodeGenerator.cs
  65. +15 −11 libsteticui/ContextMenu.cs
  66. +12 −8 {stetic → libsteticui}/Glade.cs
  67. +3 −1 libsteticui/Makefile.am
  68. +12 −0 libsteticui/Palette.cs
  69. +145 −21 libsteticui/Project.cs
  70. +9 −1 libsteticui/ProjectView.cs
  71. +25 −10 libsteticui/PropertyGrid.cs
  72. +26 −3 libsteticui/SignalsEditor.cs
  73. +1 −2 stetic/Makefile.am
  74. +68 −2 stetic/Stetic.cs
  75. +51 −3 stetic/UIManager.cs
  76. +1 −1 stetic/stetic.in
View
125 ChangeLog
@@ -1,3 +1,128 @@
+2006-02-24 Lluis Sanchez Gual <lluis@novell.com>
+
+ * libsteticui/Glade.cs: Use the new api for reading/writing.
+ * libsteticui/Palette.cs: Update the palette when the
+ registry changes.
+ * libsteticui/ProjectView.cs: Update the project tree when
+ the project has been reloaded (due for example to a
+ registry change).
+ * libsteticui/Makefile.am: Updated.
+ * libsteticui/Project.cs: Make it aware of changes in the
+ registry. When the registry changes, reload the project.
+ Added Read/Write and Load/Save methods, based on the
+ native format. Added ProjectReloaded event, which is fired
+ after the project has been reloaded due to a registry change.
+ Other minor changes.
+ * libsteticui/SignalsEditor.cs: Refresh when the project is
+ reloaded. Addded SignalActivated, which is fired when double-
+ clicking an event.
+ * libsteticui/ContextMenu.cs: Get class descriptors from wrappers,
+ instead of looking up in the registry. Track some other api
+ changes.
+ * libsteticui/PropertyGrid.cs: Refresh when the project is
+ reloaded. Track some api changes.
+
+ * libstetic/ParamSpec.cs: Commented out some methods and
+ properties which depend on P/Invoke calls.
+ * libstetic/ItemGroup.cs: Delegate item creation to the
+ owner class.
+ * libstetic/wrapper/Button.cs:
+ * libstetic/wrapper/Container.cs: Replaced glade export/import
+ methods by Read/Write methods. Implemented code generation.
+ * libstetic/wrapper/Widget.cs: Select the widget when it gets
+ the focus. Changed InternalChildId by InternalChildProperty,
+ which has more useful information. Made Visible a wrapper
+ property for all widgets. Replaced glade export/import
+ methods by Read/Write methods. Implemented code generation.
+ * libstetic/wrapper/Window.cs: Implemented code generation.
+ * libstetic/wrapper/ComboBox.cs: Removed unneeded override.
+ * libstetic/wrapper/objects.xml: Added some init-properties
+ and wrapper attributes.
+ * libstetic/wrapper/Table.cs: Fixed bug when setting column
+ count.
+ * libstetic/wrapper/Dialog.cs: Track api changes. Don't throw
+ the buttons changed event while reading from xml.
+
+ * libstetic/wrapper/RadioMenuItem.cs:
+ * libstetic/wrapper/ImageMenuItem.cs:
+ * libstetic/wrapper/Notebook.cs:
+ * libstetic/wrapper/MenuItem.cs:
+ * libstetic/wrapper/ButtonBox.cs:
+ * libstetic/wrapper/Box.cs:
+ * libstetic/wrapper/Expander.cs:
+ * libstetic/wrapper/CheckButton.cs:
+ * libstetic/wrapper/ToolButton.cs:
+ * libstetic/wrapper/Frame.cs:
+ * libstetic/wrapper/RadioButton.cs:
+ * libstetic/wrapper/OptionMenu.cs:
+ * libstetic/editor/ResponseId.cs:
+ * libstetic/editor/Enumeration.cs:
+ * libstetic/editor/GroupPicker.cs:
+ * libstetic/editor/Flags.cs:
+ * libstetic/ItemDescriptor.cs:
+ * libstetic/wrapper/RadioToolButton.cs: Track api changes.
+
+ * libstetic/SignalDescriptor.cs: Moved all code that depends
+ on Type and Reflection to TypedSignalDescriptor. Added
+ ParameterDescriptor, which replaces ParameterInfo.
+ * libstetic/CommandDescriptor.cs: Made several changes to avoid
+ ClassDescriptor.WrapperType, which has been removed. Instead
+ of getting the method to call from the wrapped type, it gets
+ it from the type of the object when the command is invoked.
+ * libstetic/editor/Char.cs: Fix worng type check.
+ * libstetic/editor/Accelerator.cs: Removed glue P/Invokes.
+ * libstetic/Placeholder.cs: Looks loke GdkWindow.SetBackPixmap
+ doesn't work very well. Draw filled rectangle instead.
+ * libstetic/HandleWindow.cs: If the window is embedded in a
+ preview box, use the gdk window of that box, which has more room
+ for drawing the handles.
+ * libstetic/PropertyDescriptor.cs: Moved all code that depends
+ on Type and Reflection to TypedPropertyDescriptor.
+ Added StringToValue and ValueToString methods for parsing and
+ converting values to string.
+
+ * libstetic/GladeUtils.cs: Track api changes. Removed dependencies
+ to some ParamSpec properties that have been removed. The most
+ complex one to remove is the type of the glade property. Now it
+ is taken from the type of the corresponding class property.
+ * libstetic/EnumDescriptor.cs: Use the registry to lookup the type
+ of the enum. The registry will look in all available libraries.
+ * libstetic/ClassDescriptor.cs: Moved all code that depends
+ on Type and Reflection to TypedClassDescriptor.
+ * libstetic/Makefile.am: Updated.
+ * libstetic/ObjectWrapper.cs: Replaced glade export/import
+ methods by Read/Write methods with support for native format.
+ Added ClassDescriptor property. There is no need to lookup
+ for classes in the registry since it can be accessed most of
+ the time from wrappers.
+ * libstetic/Registry.cs: Added support for external widget
+ libraries.
+
+ * ErrorWidget.cs:
+ * EmbedWindow.cs:
+ * Shadow.cs:
+ * TypedClassDescriptor.cs:
+ * TypedPropertyDescriptor.cs:
+ * TypedSignalDescriptor.cs:
+ * WidgetLibrary.cs:
+ * Metacity/*:
+ * wrapper/Entry.cs:
+ * WidgetUtils.cs:
+ * GeneratorContext.cs:
+ * PreviewBox.cs:
+ * AssemblyWidgetLibrary.cs:
+ * WidgetLibrary.cs: New files.
+
+ * Makefile.am:
+ * configure.in: Removed glue directory from the build.
+
+ * stetic/Stetic.cs: Added support for code generation from
+ the command line.
+ * stetic/stetic.in: Added debug option.
+ * stetic/Makefile.am: Updated.
+ * stetic/Glade.cs: Moved to libsteticui.
+ * stetic/UIManager.cs: Added Load and Save commands.
+
2006-02-09 Lluis Sanchez Gual <lluis@novell.com>
* stetic.pc.in: Add a reference to the new libsteticui dll.
View
@@ -1,4 +1,4 @@
-SUBDIRS = glue libstetic libsteticui stetic
+SUBDIRS = libstetic libsteticui stetic
pkgconfigdir = $(prefix)/lib/pkgconfig
pkgconfig_DATA = stetic.pc
View
@@ -33,7 +33,6 @@ AC_SUBST(STETIC_LIBS)
AC_OUTPUT([
Makefile
-glue/Makefile
libstetic/Makefile
libsteticui/Makefile
stetic/Makefile
@@ -0,0 +1,54 @@
+using System;
+using System.Reflection;
+using System.Xml;
+
+namespace Stetic
+{
+ public class AssemblyWidgetLibrary: WidgetLibrary
+ {
+ Assembly assembly;
+
+ public AssemblyWidgetLibrary (Assembly assembly)
+ {
+ this.assembly = assembly;
+ }
+
+ public AssemblyWidgetLibrary (string assemblyPath)
+ {
+ assembly = Assembly.LoadFrom (assemblyPath);
+ }
+
+ public override void Load ()
+ {
+ System.IO.Stream stream = assembly.GetManifestResourceStream ("objects.xml");
+ if (stream == null)
+ throw new InvalidOperationException ("objects.xml file not found in assembly: " + assembly.Location);
+
+ XmlDocument objects = new XmlDocument ();
+ objects.Load (stream);
+ stream.Close ();
+ Load (objects);
+ }
+
+ protected override ClassDescriptor LoadClassDescriptor (XmlElement element)
+ {
+ return new TypedClassDescriptor (assembly, element);
+ }
+
+ public override Type GetType (string typeName)
+ {
+ Type t = assembly.GetType (typeName, false);
+ if (t != null) return t;
+
+ // Look in referenced assemblies
+
+ foreach (AssemblyName an in assembly.GetReferencedAssemblies ()) {
+ Assembly a = Assembly.Load (an);
+ t = a.GetType (typeName);
+ if (t != null) return t;
+ }
+ return null;
+ }
+ }
+
+}
Oops, something went wrong.

0 comments on commit d3d1029

Please sign in to comment.