Exemplo n.º 1
0
		Gdk.Pixbuf GetPixbuf (Gtk.IconTheme theme, string name)
		{
			try {
				return theme.LoadIcon (name, 16, 0);
			} catch {
				return RenderIcon (name, Gtk.IconSize.Menu, null);
			}
		}
Exemplo n.º 2
0
 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;
         }
     }
 }
Exemplo n.º 3
0
 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;
         }
     }
 }