mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-26 01:11:02 +00:00
use new PersistentData instead of Data
svn path=/trunk/gtk-sharp/; revision=41844
This commit is contained in:
parent
35395fbfe0
commit
1b4913630b
|
@ -67,7 +67,7 @@ namespace GtkDemo
|
||||||
TextTag tag = new TextTag ("link");
|
TextTag tag = new TextTag ("link");
|
||||||
tag.Foreground = "blue";
|
tag.Foreground = "blue";
|
||||||
tag.Underline = Pango.Underline.Single;
|
tag.Underline = Pango.Underline.Single;
|
||||||
tag.Data.Add ("page", page);
|
tag.PersistentData.Add ("page", page);
|
||||||
buffer.TagTable.Add (tag);
|
buffer.TagTable.Add (tag);
|
||||||
|
|
||||||
buffer.InsertWithTags (ref iter, text, tag);
|
buffer.InsertWithTags (ref iter, text, tag);
|
||||||
|
@ -118,7 +118,7 @@ namespace GtkDemo
|
||||||
{
|
{
|
||||||
foreach (TextTag tag in iter.Tags)
|
foreach (TextTag tag in iter.Tags)
|
||||||
{
|
{
|
||||||
int page = (int) tag.Data ["page"];
|
int page = (int) tag.PersistentData ["page"];
|
||||||
if (page != 0)
|
if (page != 0)
|
||||||
ShowPage (view.Buffer, page);
|
ShowPage (view.Buffer, page);
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ namespace GtkDemo
|
||||||
|
|
||||||
foreach (TextTag tag in iter.Tags)
|
foreach (TextTag tag in iter.Tags)
|
||||||
{
|
{
|
||||||
int page = (int) tag.Data ["page"];
|
int page = (int) tag.PersistentData ["page"];
|
||||||
if (page != 0) {
|
if (page != 0) {
|
||||||
hovering = true;
|
hovering = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace GtkDemo
|
||||||
private void ItemToggled (object sender, ToggledArgs args)
|
private void ItemToggled (object sender, ToggledArgs args)
|
||||||
{
|
{
|
||||||
CellRendererToggle cellRendererToggle = sender as CellRendererToggle;
|
CellRendererToggle cellRendererToggle = sender as CellRendererToggle;
|
||||||
int column = (int) cellRendererToggle.Data["column"];
|
int column = (int) cellRendererToggle.PersistentData["column"];
|
||||||
|
|
||||||
Gtk.TreeIter iter;
|
Gtk.TreeIter iter;
|
||||||
if (store.GetIterFromString (out iter, args.Path))
|
if (store.GetIterFromString (out iter, args.Path))
|
||||||
|
@ -82,7 +82,7 @@ namespace GtkDemo
|
||||||
// column for holiday names
|
// column for holiday names
|
||||||
CellRendererText rendererText = new CellRendererText ();
|
CellRendererText rendererText = new CellRendererText ();
|
||||||
rendererText.Xalign = 0.0f;
|
rendererText.Xalign = 0.0f;
|
||||||
rendererText.Data ["column"] = Column.HolidayName;
|
rendererText.PersistentData ["column"] = Column.HolidayName;
|
||||||
TreeViewColumn column = new TreeViewColumn ("Holiday", rendererText,
|
TreeViewColumn column = new TreeViewColumn ("Holiday", rendererText,
|
||||||
"text", Column.HolidayName);
|
"text", Column.HolidayName);
|
||||||
treeView.InsertColumn (column, (int) Column.HolidayName);
|
treeView.InsertColumn (column, (int) Column.HolidayName);
|
||||||
|
@ -90,7 +90,7 @@ namespace GtkDemo
|
||||||
// alex column
|
// alex column
|
||||||
CellRendererToggle rendererToggle = new CellRendererToggle ();
|
CellRendererToggle rendererToggle = new CellRendererToggle ();
|
||||||
rendererToggle.Xalign = 0.0f;
|
rendererToggle.Xalign = 0.0f;
|
||||||
rendererToggle.Data ["column"] = Column.Alex;
|
rendererToggle.PersistentData ["column"] = Column.Alex;
|
||||||
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
||||||
rendererToggle.Visible = true;
|
rendererToggle.Visible = true;
|
||||||
rendererToggle.Activatable = true;
|
rendererToggle.Activatable = true;
|
||||||
|
@ -104,7 +104,7 @@ namespace GtkDemo
|
||||||
// havoc column
|
// havoc column
|
||||||
rendererToggle = new CellRendererToggle ();
|
rendererToggle = new CellRendererToggle ();
|
||||||
rendererToggle.Xalign = 0.0f;
|
rendererToggle.Xalign = 0.0f;
|
||||||
rendererToggle.Data ["column"] = Column.Havoc;
|
rendererToggle.PersistentData ["column"] = Column.Havoc;
|
||||||
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
||||||
column = new TreeViewColumn ("Havoc", rendererToggle, "active", (int) Column.Havoc);
|
column = new TreeViewColumn ("Havoc", rendererToggle, "active", (int) Column.Havoc);
|
||||||
column.Visible = true;
|
column.Visible = true;
|
||||||
|
@ -118,7 +118,7 @@ namespace GtkDemo
|
||||||
// tim column
|
// tim column
|
||||||
rendererToggle = new CellRendererToggle ();
|
rendererToggle = new CellRendererToggle ();
|
||||||
rendererToggle.Xalign = 0.0f;
|
rendererToggle.Xalign = 0.0f;
|
||||||
rendererToggle.Data ["column"] = Column.Tim;
|
rendererToggle.PersistentData ["column"] = Column.Tim;
|
||||||
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
||||||
column = new TreeViewColumn ("Tim", rendererToggle, "active", (int) Column.Tim);
|
column = new TreeViewColumn ("Tim", rendererToggle, "active", (int) Column.Tim);
|
||||||
column.Visible = true;
|
column.Visible = true;
|
||||||
|
@ -132,7 +132,7 @@ namespace GtkDemo
|
||||||
// owen column
|
// owen column
|
||||||
rendererToggle = new CellRendererToggle ();
|
rendererToggle = new CellRendererToggle ();
|
||||||
rendererToggle.Xalign = 0.0f;
|
rendererToggle.Xalign = 0.0f;
|
||||||
rendererToggle.Data ["column"] = Column.Owen;
|
rendererToggle.PersistentData ["column"] = Column.Owen;
|
||||||
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
||||||
column = new TreeViewColumn ("Owen", rendererToggle, "active", (int) Column.Owen);
|
column = new TreeViewColumn ("Owen", rendererToggle, "active", (int) Column.Owen);
|
||||||
column.Visible = true;
|
column.Visible = true;
|
||||||
|
@ -146,7 +146,7 @@ namespace GtkDemo
|
||||||
// dave column
|
// dave column
|
||||||
rendererToggle = new CellRendererToggle ();
|
rendererToggle = new CellRendererToggle ();
|
||||||
rendererToggle.Xalign = 0.0f;
|
rendererToggle.Xalign = 0.0f;
|
||||||
rendererToggle.Data ["column"] = Column.Dave;
|
rendererToggle.PersistentData ["column"] = Column.Dave;
|
||||||
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
||||||
column = new TreeViewColumn ("Dave", rendererToggle, "active", (int) Column.Dave);
|
column = new TreeViewColumn ("Dave", rendererToggle, "active", (int) Column.Dave);
|
||||||
column.Visible = true;
|
column.Visible = true;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
General
|
General
|
||||||
- general C#-ification
|
- general C#-ification
|
||||||
- get rid of GLib.Object.Data usage
|
|
||||||
|
|
||||||
DemoMain
|
DemoMain
|
||||||
- syntax highlighting
|
- syntax highlighting
|
||||||
|
|
Loading…
Reference in a new issue