Author: lluis
Date: 2007-05-17 10:55:57 -0400 (Thu, 17 May 2007)
New Revision: 77565

Modified:
   trunk/stetic/ChangeLog
   trunk/stetic/libstetic/wrapper/Notebook.cs
   trunk/stetic/libstetic/wrapper/objects.xml
Log:
* libstetic/wrapper/Notebook.cs, libstetic/wrapper/objects.xml: Added
  CurrentPage property to Notebook.

Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog      2007-05-17 14:25:45 UTC (rev 77564)
+++ trunk/stetic/ChangeLog      2007-05-17 14:55:57 UTC (rev 77565)
@@ -1,5 +1,10 @@
 2007-05-17  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
+       * libstetic/wrapper/Notebook.cs, libstetic/wrapper/objects.xml: Added
+         CurrentPage property to Notebook.
+
+2007-05-17  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
        * libsteticui/CecilSignalDescriptor.cs: Added missing null check.
        * libsteticui/ProjectBackend.cs: Remove debug cwl.
        * libstetic/wrapper/Container.cs: Don't show the main window if the

Modified: trunk/stetic/libstetic/wrapper/Notebook.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Notebook.cs  2007-05-17 14:25:45 UTC (rev 
77564)
+++ trunk/stetic/libstetic/wrapper/Notebook.cs  2007-05-17 14:55:57 UTC (rev 
77565)
@@ -19,7 +19,14 @@
                                }
                                InsertPage (0);
                        }
+                       notebook.SwitchPage += OnPageChanged;
                }
+               
+               public override void Dispose ()
+               {
+                       notebook.SwitchPage -= OnPageChanged;
+                       base.Dispose ();
+               }
 
                protected override ObjectWrapper ReadChild (ObjectReader 
reader, XmlElement child_elem)
                {
@@ -40,6 +47,12 @@
                                GladeUtils.SetChildProperty (child_elem, 
"type", "tab");
                        return child_elem;
                }
+               public override void Read (ObjectReader reader, XmlElement 
element)
+               {
+                       object cp = GladeUtils.ExtractProperty (element, 
"CurrentPage", 0);
+                       base.Read (reader, element);
+                       notebook.CurrentPage = (int) cp;
+               }
 
                protected override void GenerateChildBuildCode 
(GeneratorContext ctx, CodeExpression parentExp, Widget wrapper)
                {
@@ -233,5 +246,10 @@
                                return false;
                        }
                }
+               
+               void OnPageChanged (object s, Gtk.SwitchPageArgs args)
+               {
+                       EmitNotify ("CurrentPage");
+               }
        }
 }

Modified: trunk/stetic/libstetic/wrapper/objects.xml
===================================================================
--- trunk/stetic/libstetic/wrapper/objects.xml  2007-05-17 14:25:45 UTC (rev 
77564)
+++ trunk/stetic/libstetic/wrapper/objects.xml  2007-05-17 14:55:57 UTC (rev 
77565)
@@ -921,6 +921,7 @@
            label="Notebook" icon="notebook.png" palette-category="container">
        <itemgroups>
            <itemgroup label="Notebook Properties">
+               <property name="CurrentPage" />
                <property name="EnablePopup" />
                <property name="TabPos" />
                <property name="ShowBorder" />

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to