Author: lluis
Date: 2006-06-12 13:00:53 -0400 (Mon, 12 Jun 2006)
New Revision: 61632
Modified:
trunk/monodevelop/Extras/MonoDevelop.GtkCore/ChangeLog
trunk/monodevelop/Extras/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkCoreService.cs
trunk/monodevelop/Extras/MonoDevelop.GtkCore/lib/libstetic.dll
trunk/monodevelop/Extras/MonoDevelop.GtkCore/lib/libsteticui.dll
Log:
2006-06-12 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.GtkCore/GtkCoreService.cs: If a member has a
[Browsable(false)]
attribute, don't add it to the objects.xml file. Also don't add
read-only properties.
* lib/*: Updated from stetic module. Fixes bugs #78622 and #78620.
Adds an icon for expander and fixes a bug in ColorButton (fix by ml)
Modified: trunk/monodevelop/Extras/MonoDevelop.GtkCore/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.GtkCore/ChangeLog 2006-06-12
16:56:28 UTC (rev 61631)
+++ trunk/monodevelop/Extras/MonoDevelop.GtkCore/ChangeLog 2006-06-12
17:00:53 UTC (rev 61632)
@@ -1,3 +1,11 @@
+2006-06-12 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.GtkCore/GtkCoreService.cs: If a member has a
[Browsable(false)]
+ attribute, don't add it to the objects.xml file. Also don't add
+ read-only properties.
+ * lib/*: Updated from stetic module. Fixes bugs #78622 and #78620.
+ Adds an icon for expander and fixes a bug in ColorButton (fix by ml)
+
2006-06-11 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* lib/libsteticui.dll:
Modified:
trunk/monodevelop/Extras/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkCoreService.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkCoreService.cs
2006-06-12 16:56:28 UTC (rev 61631)
+++
trunk/monodevelop/Extras/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkCoreService.cs
2006-06-12 17:00:53 UTC (rev 61632)
@@ -88,12 +88,10 @@
continue;
IdeApp.ProjectOperations.ParserDatabase.UpdateFile (project, args.FileName,
null);
-
- foreach (IClass cls in info.GetExportedClasses
())
- if (cls.Region.FileName ==
args.FileName) {
+ foreach (IClass cls in info.GetExportedClasses
()) {
+ if (cls.Region.FileName ==
args.FileName)
UpdateObjectsFile (project,
cls, null);
- return;
- }
+ }
}
}
@@ -181,17 +179,21 @@
static void MergeObject (XmlElement objectElem, IClass
widgetClass, IClass wrapperClass)
{
foreach (IProperty prop in widgetClass.Properties)
- MergeProperty (objectElem, prop);
+ if (IsBrowsable (prop))
+ MergeProperty (objectElem, prop);
foreach (IEvent ev in widgetClass.Events)
- MergeEvent (objectElem, ev);
+ if (IsBrowsable (ev))
+ MergeEvent (objectElem, ev);
if (wrapperClass != null) {
foreach (IProperty prop in
wrapperClass.Properties)
- MergeProperty (objectElem, prop);
+ if (IsBrowsable (prop))
+ MergeProperty (objectElem,
prop);
foreach (IEvent ev in wrapperClass.Events)
- MergeEvent (objectElem, ev);
+ if (IsBrowsable (ev))
+ MergeEvent (objectElem, ev);
}
// Remove old properties
@@ -200,11 +202,11 @@
foreach (XmlElement xprop in objectElem.SelectNodes
("itemgroups/itemgroup/property")) {
string cat =
((XmlElement)xprop.ParentNode).GetAttribute ("name");
IProperty prop = widgetClass.Properties
[xprop.GetAttribute ("name")];
- if (prop != null && cat == GetCategory (prop))
+ if (prop != null && cat == GetCategory (prop)
&& IsBrowsable (prop))
continue;
if (wrapperClass != null) {
prop = wrapperClass.Properties
[xprop.GetAttribute ("name")];
- if (prop != null && cat == GetCategory
(prop))
+ if (prop != null && cat == GetCategory
(prop) && IsBrowsable (prop))
continue;
}
toDelete.Add (xprop);
@@ -215,11 +217,11 @@
foreach (XmlElement xevent in objectElem.SelectNodes
("signals/itemgroup/signal")) {
string cat =
((XmlElement)xevent.ParentNode).GetAttribute ("name");
IEvent evnt = widgetClass.Events
[xevent.GetAttribute ("name")];
- if (evnt != null && cat == GetCategory (evnt))
+ if (evnt != null && cat == GetCategory (evnt)
&& IsBrowsable (evnt))
continue;
if (wrapperClass != null) {
evnt = wrapperClass.Events
[xevent.GetAttribute ("name")];
- if (evnt != null && cat == GetCategory
(evnt))
+ if (evnt != null && cat == GetCategory
(evnt) && IsBrowsable (evnt))
continue;
}
toDelete.Add (xevent);
@@ -308,6 +310,27 @@
return "";
}
+ static bool IsBrowsable (IMember member)
+ {
+ IProperty prop = member as IProperty;
+ if (prop != null && (!prop.CanGet || !prop.CanSet))
+ return false;
+
+ foreach (IAttributeSection section in
member.Attributes) {
+ foreach (IAttribute at in section.Attributes) {
+ if (at.Name == "Browsable" || at.Name
== "BrowsableAttribute" || at.Name ==
"System.ComponentModel.BrowsableAttribute"|| at.Name ==
"System.ComponentModel.Browsable") {
+ if (at.PositionalArguments !=
null && at.PositionalArguments.Length > 0) {
+ CodePrimitiveExpression
exp = at.PositionalArguments [0] as CodePrimitiveExpression;
+ if (exp != null &&
exp.Value != null && exp.Value is bool) {
+ return (bool)
exp.Value;
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
static public IClass[] GetExportableClasses (Project project)
{
IParserContext pctx =
IdeApp.ProjectOperations.ParserDatabase.GetProjectParserContext (project);
Modified: trunk/monodevelop/Extras/MonoDevelop.GtkCore/lib/libstetic.dll
===================================================================
(Binary files differ)
Modified: trunk/monodevelop/Extras/MonoDevelop.GtkCore/lib/libsteticui.dll
===================================================================
(Binary files differ)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches