Author: lluis
Date: 2007-05-31 08:33:30 -0400 (Thu, 31 May 2007)
New Revision: 78314
Modified:
trunk/stetic/ChangeLog
trunk/stetic/libstetic/wrapper/objects.xml
trunk/stetic/libsteticui/Project.cs
trunk/stetic/libsteticui/ProjectBackend.cs
Log:
* libsteticui/ProjectBackend.cs, libsteticui/Project.cs: Added method
for getting all widget types included in a project.
* libstetic/wrapper/objects.xml: Gtk.Bin now inherits the properties of
Gtk.Container.
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2007-05-31 11:30:16 UTC (rev 78313)
+++ trunk/stetic/ChangeLog 2007-05-31 12:33:30 UTC (rev 78314)
@@ -1,5 +1,12 @@
2007-05-31 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+ * libsteticui/ProjectBackend.cs, libsteticui/Project.cs: Added method
+ for getting all widget types included in a project.
+ * libstetic/wrapper/objects.xml: Gtk.Bin now inherits the properties of
+ Gtk.Container.
+
+2007-05-31 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
* libsteticui/CecilClassDescriptor.cs: Added missing null check when
checking for base classes in FindEvent.
Modified: trunk/stetic/libstetic/wrapper/objects.xml
===================================================================
--- trunk/stetic/libstetic/wrapper/objects.xml 2007-05-31 11:30:16 UTC (rev
78313)
+++ trunk/stetic/libstetic/wrapper/objects.xml 2007-05-31 12:33:30 UTC (rev
78314)
@@ -311,7 +311,7 @@
</itemgroups>
</object>
- <object type="Gtk.Bin,gtk-sharp" base-type="Gtk.Widget"
wrapper="Stetic.Wrapper.Bin"
+ <object type="Gtk.Bin,gtk-sharp" base-type="Gtk.Container"
wrapper="Stetic.Wrapper.Bin"
label="Bin" icon="custom.png">
</object>
Modified: trunk/stetic/libsteticui/Project.cs
===================================================================
--- trunk/stetic/libsteticui/Project.cs 2007-05-31 11:30:16 UTC (rev 78313)
+++ trunk/stetic/libsteticui/Project.cs 2007-05-31 12:33:30 UTC (rev 78314)
@@ -315,6 +315,12 @@
return (ComponentType[]) types.ToArray
(typeof(ComponentType));
}
+ // Returns a list of all support widget types (including base
classes)
+ public string[] GetWidgetTypes ()
+ {
+ return ProjectBackend.GetWidgetTypes ();
+ }
+
public void RemoveComponent (WidgetInfo component)
{
ProjectBackend.RemoveWidget (component.Name);
Modified: trunk/stetic/libsteticui/ProjectBackend.cs
===================================================================
--- trunk/stetic/libsteticui/ProjectBackend.cs 2007-05-31 11:30:16 UTC (rev
78313)
+++ trunk/stetic/libsteticui/ProjectBackend.cs 2007-05-31 12:33:30 UTC (rev
78314)
@@ -3,6 +3,7 @@
using System.IO;
using System.Xml;
using System.Collections;
+using System.Collections.Generic;
using System.Collections.Specialized;
using System.CodeDom;
using Mono.Unix;
@@ -196,6 +197,21 @@
return list;
}
+ public string[] GetWidgetTypes ()
+ {
+ List<string> list = new List<string> ();
+ foreach (WidgetLibrary lib in app.GetProjectLibraries
(this)) {
+ // Don't include in the list widgets which are
internal (when the library is
+ // not internal to the project) and deprecated
ones.
+ bool isInternalLib = IsInternalLibrary
(lib.Name);
+ foreach (ClassDescriptor cd in lib.AllClasses) {
+ if (!cd.Deprecated && (isInternalLib ||
!cd.IsInternal))
+ list.Add (cd.Name);
+ }
+ }
+ return list.ToArray ();
+ }
+
public IResourceProvider ResourceProvider {
get { return resourceProvider; }
set { resourceProvider = value; }
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches