Author: danw
Date: 2005-04-05 12:53:18 -0400 (Tue, 05 Apr 2005)
New Revision: 42578
Modified:
trunk/stetic/ChangeLog
trunk/stetic/libstetic/wrapper/Widget.cs
trunk/stetic/stetic/ContextMenu.cs
Log:
* libstetic/wrapper/Widget.cs (ToString): override
* stetic/ContextMenu.cs (ContextMenu): Update for WidgetSite
removal; use the right context widget. Also, only include the
insensitive "name" label on the top-level menu.
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2005-04-05 16:45:47 UTC (rev 42577)
+++ trunk/stetic/ChangeLog 2005-04-05 16:53:18 UTC (rev 42578)
@@ -1,3 +1,11 @@
+2005-04-05 Dan Winship <[EMAIL PROTECTED]>
+
+ * libstetic/wrapper/Widget.cs (ToString): override
+
+ * stetic/ContextMenu.cs (ContextMenu): Update for WidgetSite
+ removal; use the right context widget. Also, only include the
+ insensitive "name" label on the top-level menu.
+
2005-04-04 Dan Winship <[EMAIL PROTECTED]>
* libstetic/PropertyDescriptor.cs (GladeName): fix for proxied
Modified: trunk/stetic/libstetic/wrapper/Widget.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Widget.cs 2005-04-05 16:45:47 UTC (rev
42577)
+++ trunk/stetic/libstetic/wrapper/Widget.cs 2005-04-05 16:53:18 UTC (rev
42578)
@@ -235,5 +235,13 @@
Wrapped.HierarchyChanged -= HierarchyChanged;
}
}
+
+ public override string ToString ()
+ {
+ if (Wrapped.Name != null)
+ return "[" + Wrapped.GetType ().Name + " '" +
Wrapped.Name + "' " + Wrapped.GetHashCode ().ToString () + "]";
+ else
+ return "[" + Wrapped.GetType ().Name + " " +
Wrapped.GetHashCode ().ToString () + "]";
+ }
}
}
Modified: trunk/stetic/stetic/ContextMenu.cs
===================================================================
--- trunk/stetic/stetic/ContextMenu.cs 2005-04-05 16:45:47 UTC (rev 42577)
+++ trunk/stetic/stetic/ContextMenu.cs 2005-04-05 16:53:18 UTC (rev 42578)
@@ -26,7 +26,7 @@
BuildContextMenu (Stetic.Wrapper.Widget.Lookup
(ph.Parent), false, false, ph);
}
- public ContextMenu (Stetic.Wrapper.Widget wrapper) : this
(wrapper, wrapper.Wrapped.Parent) {}
+ public ContextMenu (Stetic.Wrapper.Widget wrapper) : this
(wrapper, wrapper.Wrapped) {}
public ContextMenu (Stetic.Wrapper.Widget wrapper, Gtk.Widget
context)
{
@@ -34,9 +34,11 @@
this.wrapper = wrapper;
- item = LabelItem (wrapper.Wrapped.Name);
- item.Sensitive = false;
- Add (item);
+ if (context == wrapper.Wrapped) {
+ item = LabelItem (wrapper.Wrapped.Name);
+ item.Sensitive = false;
+ Add (item);
+ }
item = new MenuItem ("_Select");
item.Activated += DoSelect;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches