Gdk.Pixbuf GetPixbuf (Gtk.IconTheme theme, string name) { try { return theme.LoadIcon (name, 16, 0); } catch { return RenderIcon (name, Gtk.IconSize.Menu, null); } }
public static Gdk.Pixbuf TryLoadIcon(Gtk.IconTheme theme, string icon_name, int size, Gtk.IconLookupFlags flags) { try { return theme.LoadIcon (icon_name, size, flags); } catch { try { return theme.LoadIcon ("gtk-missing-image", size, flags); } catch { return null; } } }
public static Gdk.Pixbuf TryLoadIcon(Gtk.IconTheme theme, string[] names, int size, Gtk.IconLookupFlags flags) { try { var info = theme.ChooseIcon (names, size, flags); return info.LoadIcon (); } catch { try { return theme.LoadIcon ("gtk-missing-image", size, flags); } catch { return null; } } }