Author: lluis
Date: 2008-01-25 10:57:03 -0500 (Fri, 25 Jan 2008)
New Revision: 93913
Modified:
trunk/stetic/ChangeLog
trunk/stetic/libstetic/editor/WidgetSelector.cs
trunk/stetic/libstetic/wrapper/Label.cs
trunk/stetic/libstetic/wrapper/objects.xml
Log:
* libstetic/wrapper/Label.cs: Fix generation of MnemonicWidget property
assignment.
* libstetic/wrapper/objects.xml: The default way of
* libstetic/editor/WidgetSelector.cs: Sort the list of widgets. Hide
unselectable widgets.
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2008-01-25 15:56:31 UTC (rev 93912)
+++ trunk/stetic/ChangeLog 2008-01-25 15:57:03 UTC (rev 93913)
@@ -1,3 +1,11 @@
+2008-01-25 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * libstetic/wrapper/Label.cs: Fix generation of MnemonicWidget property
+ assignment.
+ * libstetic/wrapper/objects.xml: The default way of
+ * libstetic/editor/WidgetSelector.cs: Sort the list of widgets. Hide
+ unselectable widgets.
+
2008-01-21 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* libsteticui/GuiDispatchServerSink.cs, libsteticui/WidgetDesigner.cs,
Modified: trunk/stetic/libstetic/editor/WidgetSelector.cs
===================================================================
--- trunk/stetic/libstetic/editor/WidgetSelector.cs 2008-01-25 15:56:31 UTC
(rev 93912)
+++ trunk/stetic/libstetic/editor/WidgetSelector.cs 2008-01-25 15:57:03 UTC
(rev 93913)
@@ -16,6 +16,7 @@
{
store = new ListStore (typeof(Pixbuf), typeof(string));
Model = store;
+ store.SetSortColumnId (1, SortType.Ascending);
CellRendererPixbuf crp = new CellRendererPixbuf ();
CellRendererText crt = new CellRendererText ();
PackStart (crp, false);
@@ -48,10 +49,12 @@
void FillWidgets (Stetic.Wrapper.Widget widget, int level)
{
- TreeIter iter = store.AppendValues
(widget.ClassDescriptor.Icon, widget.Wrapped.Name);
- widgets [widget.Wrapped.Name] = iter;
+ if (!widget.Unselectable) {
+ TreeIter iter = store.AppendValues
(widget.ClassDescriptor.Icon, widget.Wrapped.Name);
+ widgets [widget.Wrapped.Name] = iter;
+ }
Gtk.Container cont = widget.Wrapped as Gtk.Container;
- if (cont != null) {
+ if (cont != null &&
widget.ClassDescriptor.AllowChildren) {
foreach (Gtk.Widget child in cont.AllChildren) {
Stetic.Wrapper.Widget cwidget =
Stetic.Wrapper.Widget.Lookup (child);
if (cwidget != null)
Modified: trunk/stetic/libstetic/wrapper/Label.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Label.cs 2008-01-25 15:56:31 UTC (rev
93912)
+++ trunk/stetic/libstetic/wrapper/Label.cs 2008-01-25 15:57:03 UTC (rev
93913)
@@ -27,17 +27,20 @@
internal protected override void GeneratePostBuildCode
(GeneratorContext ctx, CodeExpression var)
{
if (mnem != null) {
- CodeExpression memVar =
ctx.WidgetMap.GetWidgetExp (mnem);
- if (memVar != null) {
- ctx.Statements.Add (
- new CodeAssignStatement (
- new
CodePropertyReferenceExpression (
- var,
- "MnemonicWidget"
- ),
- memVar
- )
- );
+ Widget targetWidget = GetTopLevel ().FindChild
(mnem);
+ if (targetWidget != null) {
+ CodeExpression memVar =
ctx.WidgetMap.GetWidgetExp (targetWidget);
+ if (memVar != null) {
+ ctx.Statements.Add (
+ new CodeAssignStatement
(
+ new
CodePropertyReferenceExpression (
+ var,
+
"MnemonicWidget"
+ ),
+ memVar
+ )
+ );
+ }
}
}
base.GeneratePostBuildCode (ctx, var);
Modified: trunk/stetic/libstetic/wrapper/objects.xml
===================================================================
--- trunk/stetic/libstetic/wrapper/objects.xml 2008-01-25 15:56:31 UTC (rev
93912)
+++ trunk/stetic/libstetic/wrapper/objects.xml 2008-01-25 15:57:03 UTC (rev
93913)
@@ -851,7 +851,7 @@
<property name="UseMarkup" />
<property name="UseUnderline" />
<property name="Wrap" />
- <property name="MnemonicWidget" glade-override="true"
editor="Stetic.Editor.WidgetSelector"/>
+ <property name="MnemonicWidget" glade-override="true"
editor="Stetic.Editor.WidgetSelector" default=""/>
<property name="Justify" />
<property name="Selectable" />
<property name="Ellipsize" gtk-version="2.6"/>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches