From e078969d64486bf1211be1fdb878f8311451ae9c Mon Sep 17 00:00:00 2001 From: Alan McGovern Date: Tue, 9 Oct 2012 22:00:58 +0100 Subject: [PATCH] [Gtk] Correctly load stock icons This is the only way we get a working stock icon. I'm not sure if SetFromIconName is supposed to work in this scenario, but it does not. --- Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs b/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs index 9ce89fef..dc1ced31 100644 --- a/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs @@ -102,9 +102,7 @@ namespace Xwt.GtkBackend secondaryText = message.SecondaryText; } - image.Stock = message.Icon; - image.SetFromIconName (Util.ToGtkStock (message.Icon), Gtk.IconSize.Dialog); -// image.Pixbuf = ImageService.GetPixbuf (message.Icon, IconSize.Dialog); + image.SetFromStock (Util.ToGtkStock (message.Icon), Gtk.IconSize.Dialog); StringBuilder markup = new StringBuilder (@""); markup.Append (GLib.Markup.EscapeText (primaryText));