Author: lluis
Date: 2006-06-12 12:56:28 -0400 (Mon, 12 Jun 2006)
New Revision: 61631
Added:
trunk/stetic/libstetic/wrapper/pixmaps/expander.png
Modified:
trunk/stetic/ChangeLog
trunk/stetic/libstetic/editor/ActionToolbar.cs
trunk/stetic/libstetic/wrapper/ColorButton.cs
trunk/stetic/libstetic/wrapper/Widget.cs
trunk/stetic/libstetic/wrapper/objects.xml
trunk/stetic/libsteticui/PropertyTree.cs
trunk/stetic/libsteticui/WidgetActionBar.cs
Log:
2006-05-12 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* libsteticui/PropertyTree.cs: Don't show empty item groups.
* libsteticui/WidgetActionBar.cs: Call the virtual AddWidgetCommands
only once per widget.
* libstetic/editor/ActionToolbar.cs: Remove debug code.
* libstetic/wrapper/Widget.cs: When deleting a widget unselect it if
it is the current selection. Fixes bugs #78620 and 78622.
* libstetic/wrapper/ColorButton.cs: Don't generate the Alpha property
if the value is -1 (not set).
* libstetic/wrapper/objects.xml:
* libstetic/wrapper/pixmaps/expander.png: Added icon for the expander
widget by ml.
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2006-06-12 16:29:36 UTC (rev 61630)
+++ trunk/stetic/ChangeLog 2006-06-12 16:56:28 UTC (rev 61631)
@@ -1,3 +1,19 @@
+2006-05-12 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * libsteticui/PropertyTree.cs: Don't show empty item groups.
+ * libsteticui/WidgetActionBar.cs: Call the virtual AddWidgetCommands
+ only once per widget.
+ * libstetic/editor/ActionToolbar.cs: Remove debug code.
+ * libstetic/wrapper/Widget.cs: When deleting a widget unselect it if
+ it is the current selection. Fixes bugs #78620 and 78622.
+ * libstetic/wrapper/ColorButton.cs: Don't generate the Alpha property
+ if the value is -1 (not set).
+
+ * libstetic/wrapper/objects.xml:
+ * libstetic/wrapper/pixmaps/expander.png: Added icon for the expander
+ widget by ml.
+
+
2006-05-09 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* libstetic/CommandDescriptor.cs:
Modified: trunk/stetic/libstetic/editor/ActionToolbar.cs
===================================================================
--- trunk/stetic/libstetic/editor/ActionToolbar.cs 2006-06-12 16:29:36 UTC
(rev 61630)
+++ trunk/stetic/libstetic/editor/ActionToolbar.cs 2006-06-12 16:56:28 UTC
(rev 61631)
@@ -119,14 +119,12 @@
public bool ShowInsertPlaceholder {
get { return showPlaceholder; }
set {
- Console.WriteLine ("ShowInsertPlaceholder: " +
value);
showPlaceholder = value;
if (value && addLabel == null) {
AddCreateItemLabel ();
} else if (!value && addLabel != null) {
Remove (addLabel);
addLabel = null;
- Console.WriteLine
("actionTree.Children.Count: " + actionTree.Children.Count);
if (actionTree.Children.Count == 0)
AddSpacerItem ();
}
Modified: trunk/stetic/libstetic/wrapper/ColorButton.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/ColorButton.cs 2006-06-12 16:29:36 UTC
(rev 61630)
+++ trunk/stetic/libstetic/wrapper/ColorButton.cs 2006-06-12 16:56:28 UTC
(rev 61631)
@@ -1,4 +1,5 @@
using System;
+using System.CodeDom;
namespace Stetic.Wrapper {
@@ -24,5 +25,13 @@
}
}
}
+
+ protected override void GeneratePropertySet (GeneratorContext
ctx, CodeVariableReferenceExpression var, PropertyDescriptor prop)
+ {
+ if (prop.Name == "Alpha" && Alpha == -1)
+ return;
+ else
+ base.GeneratePropertySet (ctx, var, prop);
+ }
}
}
Modified: trunk/stetic/libstetic/wrapper/Widget.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Widget.cs 2006-06-12 16:29:36 UTC (rev
61630)
+++ trunk/stetic/libstetic/wrapper/Widget.cs 2006-06-12 16:56:28 UTC (rev
61631)
@@ -257,6 +257,9 @@
public void Delete ()
{
+ if (Project.Selection == Wrapped)
+ Project.Selection = null;
+
if (ParentWrapper != null)
ParentWrapper.Delete (this);
else
Modified: trunk/stetic/libstetic/wrapper/objects.xml
===================================================================
--- trunk/stetic/libstetic/wrapper/objects.xml 2006-06-12 16:29:36 UTC (rev
61630)
+++ trunk/stetic/libstetic/wrapper/objects.xml 2006-06-12 16:56:28 UTC (rev
61631)
@@ -791,7 +791,7 @@
</object>
<object type="Gtk.Expander,gtk-sharp" wrapper="Stetic.Wrapper.Expander"
- label="Expander" palette-category="container">
+ label="Expander" icon="expander.png" palette-category="container">
<itemgroups>
<itemgroup label="Expander Properties">
<property name="Expanded" />
Added: trunk/stetic/libstetic/wrapper/pixmaps/expander.png
===================================================================
(Binary files differ)
Property changes on: trunk/stetic/libstetic/wrapper/pixmaps/expander.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/stetic/libsteticui/PropertyTree.cs
===================================================================
--- trunk/stetic/libsteticui/PropertyTree.cs 2006-06-12 16:29:36 UTC (rev
61630)
+++ trunk/stetic/libsteticui/PropertyTree.cs 2006-06-12 16:56:28 UTC (rev
61631)
@@ -151,18 +151,21 @@
public void AddGroup (ItemGroup igroup, object instance)
{
- InstanceData idata = new InstanceData (instance);
-
- TreeIter iter = store.AppendValues (igroup.Label, null,
true, idata);
-
+ ArrayList props = new ArrayList ();
foreach (ItemDescriptor item in igroup) {
if (item.IsInternal)
continue;
if (item is PropertyDescriptor)
- AppendProperty (iter,
(PropertyDescriptor)item, idata);
- else if (item is CommandDescriptor)
- AppendCommand ((CommandDescriptor)item);
+ props.Add (item);
}
+
+ if (props.Count == 0)
+ return;
+
+ InstanceData idata = new InstanceData (instance);
+ TreeIter iter = store.AppendValues (igroup.Label, null,
true, idata);
+ foreach (PropertyDescriptor item in props)
+ AppendProperty (iter, (PropertyDescriptor)item,
idata);
}
protected void AppendProperty (PropertyDescriptor prop, object
instance)
@@ -189,11 +192,6 @@
propertyRows [prop] = store.GetStringFromIter (iter);
}
- protected void AppendCommand (CommandDescriptor prop)
- {
- // Ignore commands for now. They are added to the
widget action bar
- }
-
protected virtual void OnObjectChanged ()
{
}
Modified: trunk/stetic/libsteticui/WidgetActionBar.cs
===================================================================
--- trunk/stetic/libsteticui/WidgetActionBar.cs 2006-06-12 16:29:36 UTC (rev
61630)
+++ trunk/stetic/libsteticui/WidgetActionBar.cs 2006-06-12 16:56:28 UTC (rev
61631)
@@ -13,6 +13,7 @@
WidgetTreeCombo combo;
ToolItem comboItem;
Stetic.Wrapper.Widget selection;
+ Stetic.Wrapper.Container.ContainerChild packingSelection;
Hashtable editors, wrappers;
Hashtable sensitives, invisibles;
ArrayList toggles;
@@ -68,12 +69,12 @@
{
if (selection != null) {
selection.Notify -= Notified;
- Stetic.Wrapper.Container.ContainerChild
packingSelection = Stetic.Wrapper.Container.ChildWrapper (selection);
if (packingSelection != null)
packingSelection.Notify -= Notified;
}
selection = null;
+ packingSelection = null;
editors.Clear ();
wrappers.Clear ();
@@ -109,7 +110,7 @@
combo.SetSelection (selection);
selection.Notify += Notified;
- Stetic.Wrapper.Container.ContainerChild
packingSelection = Stetic.Wrapper.Container.ChildWrapper (selection);
+ packingSelection =
Stetic.Wrapper.Container.ChildWrapper (selection);
if (packingSelection != null)
packingSelection.Notify += Notified;
@@ -119,6 +120,11 @@
protected virtual void AddWidgetCommands (ObjectWrapper wrapper)
{
+ AddCommands (wrapper);
+ }
+
+ void AddCommands (ObjectWrapper wrapper)
+ {
foreach (ItemGroup igroup in
wrapper.ClassDescriptor.ItemGroups) {
foreach (ItemDescriptor desc in igroup) {
if (desc is CommandDescriptor)
@@ -130,7 +136,7 @@
if (widget != null) {
Stetic.Wrapper.Container.ContainerChild
packingSelection = Stetic.Wrapper.Container.ChildWrapper (widget);
if (packingSelection != null)
- AddWidgetCommands (packingSelection);
+ AddCommands (packingSelection);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches