Author: mkestner
Date: 2005-06-22 15:18:19 -0400 (Wed, 22 Jun 2005)
New Revision: 46383
Modified:
trunk/gtk-sharp/ChangeLog
trunk/gtk-sharp/sample/GtkDemo/DemoHyperText.cs
trunk/gtk-sharp/sample/GtkDemo/DemoTreeStore.cs
Log:
2005-06-22 Mike Kestner <[EMAIL PROTECTED]>
* sample/GtkDemo/DemoHyperText.cs : replace PersistentData usage that
breaks on csc.
* sample/GtkDemo/DemoTreeStore.cs : fix a 2.0 usage.
Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog 2005-06-22 19:16:45 UTC (rev 46382)
+++ trunk/gtk-sharp/ChangeLog 2005-06-22 19:18:19 UTC (rev 46383)
@@ -1,5 +1,11 @@
2005-06-22 Mike Kestner <[EMAIL PROTECTED]>
+ * sample/GtkDemo/DemoHyperText.cs : replace PersistentData usage that
+ breaks on csc.
+ * sample/GtkDemo/DemoTreeStore.cs : fix a 2.0 usage.
+
+2005-06-22 Mike Kestner <[EMAIL PROTECTED]>
+
* generator/ManagedCallString.cs : don't assume ref for structs.
* generator/VMSignature.cs : don't assume ref for structs.
Modified: trunk/gtk-sharp/sample/GtkDemo/DemoHyperText.cs
===================================================================
--- trunk/gtk-sharp/sample/GtkDemo/DemoHyperText.cs 2005-06-22 19:16:45 UTC
(rev 46382)
+++ trunk/gtk-sharp/sample/GtkDemo/DemoHyperText.cs 2005-06-22 19:18:19 UTC
(rev 46383)
@@ -7,6 +7,7 @@
*/
using System;
+using System.Collections;
using Gtk;
namespace GtkDemo
@@ -40,6 +41,8 @@
ShowAll ();
}
+ Hashtable tag_pages = new Hashtable ();
+
// Inserts a piece of text into the buffer, giving it the usual
// appearance of a hyperlink in a web browser: blue and
underlined.
// Additionally, attaches some data on the tag, to make it
recognizable
@@ -49,7 +52,7 @@
TextTag tag = new TextTag (null);
tag.Foreground = "blue";
tag.Underline = Pango.Underline.Single;
- tag.PersistentData.Add ("page", page);
+ tag_pages [tag] = page;
buffer.TagTable.Add (tag);
buffer.InsertWithTags (ref iter, text, tag);
}
@@ -97,7 +100,7 @@
void FollowIfLink (TextView view, TextIter iter)
{
foreach (TextTag tag in iter.Tags) {
- object page = tag.PersistentData ["page"];
+ object page = tag_pages [tag];
if (page is int)
ShowPage (view.Buffer, (int)page);
}
@@ -112,7 +115,7 @@
TextIter iter = view.GetIterAtLocation (x, y);
foreach (TextTag tag in iter.Tags) {
- if (tag.PersistentData ["page"] is int) {
+ if (tag_pages [tag] is int) {
hovering = true;
break;
}
Modified: trunk/gtk-sharp/sample/GtkDemo/DemoTreeStore.cs
===================================================================
--- trunk/gtk-sharp/sample/GtkDemo/DemoTreeStore.cs 2005-06-22 19:16:45 UTC
(rev 46382)
+++ trunk/gtk-sharp/sample/GtkDemo/DemoTreeStore.cs 2005-06-22 19:18:19 UTC
(rev 46383)
@@ -46,7 +46,7 @@
sw.Add (treeView);
// expand all rows after the treeview widget has been
realized
- treeView.Realized += ExpandRows;
+ treeView.Realized += new EventHandler (ExpandRows);
SetDefaultSize (650, 400);
ShowAll ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches