Author: danw
Date: 2005-04-11 17:11:38 -0400 (Mon, 11 Apr 2005)
New Revision: 42806
Modified:
trunk/stetic/ChangeLog
trunk/stetic/TODO
trunk/stetic/libstetic/RadioGroupManager.cs
trunk/stetic/libstetic/wrapper/Container.cs
trunk/stetic/libstetic/wrapper/Notebook.cs
trunk/stetic/libstetic/wrapper/Widget.cs
Log:
* libstetic/RadioGroupManager.cs (this[Gtk.Widget]): track the
Destroyed event on radio widgets and update everything
appropriately when a radio widget is destroyed.
* libstetic/wrapper/Widget.cs (Delete): UnSelect when Deleting.
* libstetic/wrapper/Container.cs (UnSelect): clear the Project
selection when unselecting.
* TODO: misc updates
Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog 2005-04-11 20:35:56 UTC (rev 42805)
+++ trunk/stetic/ChangeLog 2005-04-11 21:11:38 UTC (rev 42806)
@@ -1,3 +1,16 @@
+2005-04-11 Dan Winship <[EMAIL PROTECTED]>
+
+ * libstetic/RadioGroupManager.cs (this[Gtk.Widget]): track the
+ Destroyed event on radio widgets and update everything
+ appropriately when a radio widget is destroyed.
+
+ * libstetic/wrapper/Widget.cs (Delete): UnSelect when Deleting.
+
+ * libstetic/wrapper/Container.cs (UnSelect): clear the Project
+ selection when unselecting.
+
+ * TODO: misc updates
+
2005-04-07 Dan Winship <[EMAIL PROTECTED]>
* glue/custom.c:
Modified: trunk/stetic/TODO
===================================================================
--- trunk/stetic/TODO 2005-04-11 20:35:56 UTC (rev 42805)
+++ trunk/stetic/TODO 2005-04-11 21:11:38 UTC (rev 42806)
@@ -28,17 +28,18 @@
you add/remove them.
- "Buttons" menu labels need to be better
- - Notebook has a bunch of problems:
- - tab labels start out with WidgetSites, but lose them
- if you edit the label properties
+ - Notebook has a few problems:
- should the child properties appear as properties of
the page or the tab? or both? or should they have
different properties?
- Switch with Prev/Next isn't implemented
- Widget.Sensitive needs special handling. Ideally we'd make
- the widget insensitive, but have its site intercept clicks
- anyway.
+ the widget insensitive, but intercept clicks on it anyway.
+ (This would have to be done via a separate Gdk.Window not
+ associated with that widget, because gtk_propagate_event()
+ filters out events to insensitive widgets before we get any
+ chance to see them.)
- Widget.Visible: glade treats this as a shadow property.
Should we?
@@ -49,10 +50,8 @@
- Layout/Fixed
- - Menubar, Toolbar. (Mike Kestner has some code here.) Use the
- new GtkAction-based stuff (?). Should also support the old
- stuff as well as far as creation/editing (Toolbar,
- ToolbarItem, etc)
+ - Menubar. (Mike Kestner has some code here.) Use the new
+ GtkAction-based stuff (?).
- Gnome widgets (the not-yet-deprecated ones anyway)
- Not in a separate "Gnome widgets" group.
Modified: trunk/stetic/libstetic/RadioGroupManager.cs
===================================================================
--- trunk/stetic/libstetic/RadioGroupManager.cs 2005-04-11 20:35:56 UTC (rev
42805)
+++ trunk/stetic/libstetic/RadioGroupManager.cs 2005-04-11 21:11:38 UTC (rev
42806)
@@ -103,6 +103,12 @@
return group;
}
+ void RadioDestroyed (object obj, EventArgs args)
+ {
+ Gtk.Widget radio = obj as Gtk.Widget;
+ this[radio] = null;
+ }
+
public string this[Gtk.Widget radio] {
get {
RadioGroup group = widgets[radio] as RadioGroup;
@@ -115,7 +121,9 @@
GLib.SList group_value;
RadioGroup oldGroup = widgets[radio] as
RadioGroup;
- if (oldGroup != null) {
+ if (oldGroup == null) {
+ radio.Destroyed += RadioDestroyed;
+ } else {
if (oldGroup.Name == value)
return;
oldGroup.Widgets.Remove (radio);
@@ -125,6 +133,13 @@
}
}
+ if (value == null) {
+ radio.Destroyed -= RadioDestroyed;
+ groupProperty.SetValue (radio, new
GLib.SList (IntPtr.Zero), null);
+ widgets.Remove (radio);
+ return;
+ }
+
RadioGroup newGroup = FindGroup (value);
if (newGroup == null)
newGroup = Add (value);
Modified: trunk/stetic/libstetic/wrapper/Container.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Container.cs 2005-04-11 20:35:56 UTC (rev
42805)
+++ trunk/stetic/libstetic/wrapper/Container.cs 2005-04-11 21:11:38 UTC (rev
42806)
@@ -290,8 +290,10 @@
public virtual void UnSelect (Stetic.Wrapper.Widget wrapper)
{
- if (selection == wrapper.Wrapped)
+ if (selection == wrapper.Wrapped) {
Select (null, false);
+ stetic.Selection = null;
+ }
}
public virtual void Select (Placeholder ph)
Modified: trunk/stetic/libstetic/wrapper/Notebook.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Notebook.cs 2005-04-11 20:35:56 UTC (rev
42805)
+++ trunk/stetic/libstetic/wrapper/Notebook.cs 2005-04-11 21:11:38 UTC (rev
42806)
@@ -194,7 +194,6 @@
{
AddItemGroup (type,
"Notebook Child Layout",
- "TabLabel",
"Position",
"TabPack",
"TabExpand",
Modified: trunk/stetic/libstetic/wrapper/Widget.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Widget.cs 2005-04-11 20:35:56 UTC (rev
42805)
+++ trunk/stetic/libstetic/wrapper/Widget.cs 2005-04-11 21:11:38 UTC (rev
42806)
@@ -174,6 +174,7 @@
public void Delete ()
{
+ UnSelect ();
if (ParentWrapper != null)
ParentWrapper.Delete (this);
else
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches