* sample/GtkDemo/DemoStockBrowser.cs: update this to work with

that. (It used to crash.)

svn path=/trunk/gtk-sharp/; revision=37996
This commit is contained in:
Dan Winship 2004-12-20 19:47:40 +00:00
parent 86d4828d5d
commit c87558b526
2 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,9 @@
ConstStockItem struct so the p/invoke layer won't try to free
static strings. [#70589]
* sample/GtkDemo/DemoStockBrowser.cs: update this to work with
that. (It used to crash.)
2004-12-20 Mike Kestner <mkestner@novell.com>
* generator/Property.cs : generate Interface properties.

View File

@ -115,8 +115,9 @@ namespace GtkDemo
foreach (string s in stock_ids)
{
Gtk.StockItem si = new StockItem ();
if (Gtk.StockManager.Lookup (s, ref si)) {
Gtk.StockItem si;
si = Gtk.Stock.Lookup (s);
if (si.StockId != null) {
Gdk.Pixbuf icon = this.RenderIcon (s, IconSize.Menu, "");
StockInfo info = new StockInfo ();
info.Icon = icon;