diff --git a/sample/GtkDemo/DemoHyperText.cs b/sample/GtkDemo/DemoHyperText.cs index cada07643..80d859d60 100644 --- a/sample/GtkDemo/DemoHyperText.cs +++ b/sample/GtkDemo/DemoHyperText.cs @@ -67,7 +67,7 @@ namespace GtkDemo TextTag tag = new TextTag ("link"); tag.Foreground = "blue"; tag.Underline = Pango.Underline.Single; - tag.Data.Add ("page", page); + tag.PersistentData.Add ("page", page); buffer.TagTable.Add (tag); buffer.InsertWithTags (ref iter, text, tag); @@ -118,7 +118,7 @@ namespace GtkDemo { foreach (TextTag tag in iter.Tags) { - int page = (int) tag.Data ["page"]; + int page = (int) tag.PersistentData ["page"]; if (page != 0) ShowPage (view.Buffer, page); } @@ -135,7 +135,7 @@ namespace GtkDemo foreach (TextTag tag in iter.Tags) { - int page = (int) tag.Data ["page"]; + int page = (int) tag.PersistentData ["page"]; if (page != 0) { hovering = true; break; diff --git a/sample/GtkDemo/DemoTreeStore.cs b/sample/GtkDemo/DemoTreeStore.cs index 5ae89a18e..483b21a33 100644 --- a/sample/GtkDemo/DemoTreeStore.cs +++ b/sample/GtkDemo/DemoTreeStore.cs @@ -66,7 +66,7 @@ namespace GtkDemo private void ItemToggled (object sender, ToggledArgs args) { CellRendererToggle cellRendererToggle = sender as CellRendererToggle; - int column = (int) cellRendererToggle.Data["column"]; + int column = (int) cellRendererToggle.PersistentData["column"]; Gtk.TreeIter iter; if (store.GetIterFromString (out iter, args.Path)) @@ -82,7 +82,7 @@ namespace GtkDemo // column for holiday names CellRendererText rendererText = new CellRendererText (); rendererText.Xalign = 0.0f; - rendererText.Data ["column"] = Column.HolidayName; + rendererText.PersistentData ["column"] = Column.HolidayName; TreeViewColumn column = new TreeViewColumn ("Holiday", rendererText, "text", Column.HolidayName); treeView.InsertColumn (column, (int) Column.HolidayName); @@ -90,7 +90,7 @@ namespace GtkDemo // alex column CellRendererToggle rendererToggle = new CellRendererToggle (); rendererToggle.Xalign = 0.0f; - rendererToggle.Data ["column"] = Column.Alex; + rendererToggle.PersistentData ["column"] = Column.Alex; rendererToggle.Toggled += new ToggledHandler (ItemToggled); rendererToggle.Visible = true; rendererToggle.Activatable = true; @@ -104,7 +104,7 @@ namespace GtkDemo // havoc column rendererToggle = new CellRendererToggle (); rendererToggle.Xalign = 0.0f; - rendererToggle.Data ["column"] = Column.Havoc; + rendererToggle.PersistentData ["column"] = Column.Havoc; rendererToggle.Toggled += new ToggledHandler (ItemToggled); column = new TreeViewColumn ("Havoc", rendererToggle, "active", (int) Column.Havoc); column.Visible = true; @@ -118,7 +118,7 @@ namespace GtkDemo // tim column rendererToggle = new CellRendererToggle (); rendererToggle.Xalign = 0.0f; - rendererToggle.Data ["column"] = Column.Tim; + rendererToggle.PersistentData ["column"] = Column.Tim; rendererToggle.Toggled += new ToggledHandler (ItemToggled); column = new TreeViewColumn ("Tim", rendererToggle, "active", (int) Column.Tim); column.Visible = true; @@ -132,7 +132,7 @@ namespace GtkDemo // owen column rendererToggle = new CellRendererToggle (); rendererToggle.Xalign = 0.0f; - rendererToggle.Data ["column"] = Column.Owen; + rendererToggle.PersistentData ["column"] = Column.Owen; rendererToggle.Toggled += new ToggledHandler (ItemToggled); column = new TreeViewColumn ("Owen", rendererToggle, "active", (int) Column.Owen); column.Visible = true; @@ -146,7 +146,7 @@ namespace GtkDemo // dave column rendererToggle = new CellRendererToggle (); rendererToggle.Xalign = 0.0f; - rendererToggle.Data ["column"] = Column.Dave; + rendererToggle.PersistentData ["column"] = Column.Dave; rendererToggle.Toggled += new ToggledHandler (ItemToggled); column = new TreeViewColumn ("Dave", rendererToggle, "active", (int) Column.Dave); column.Visible = true; diff --git a/sample/GtkDemo/TODO b/sample/GtkDemo/TODO index b6b4e5e66..a87b2779b 100644 --- a/sample/GtkDemo/TODO +++ b/sample/GtkDemo/TODO @@ -1,6 +1,5 @@ General - general C#-ification - - get rid of GLib.Object.Data usage DemoMain - syntax highlighting