于 08/16/2012 07:58 PM, Andreas Rönnquist 写道:
Hey
I am trying to get the icon bitmap for a file and insert it into a
TreeView widget - That is the pixbuf for the mime-type of a file. Is
there any examples of doing this in plain C using GTK/GLib?
I am satisfied with an example that work in Linux - Win32 isn't equally
important to me.
<http://developer.gnome.org/gdk-pixbuf/unstable/gdk-pixbuf-File-Loading.html>
#include <gdk-pixbuf/gdk-pixbuf.h>
...
GdkPixbuf *pix;
pix = gdk_pixbuf_new_from_file (fname, None);
if (!pix) return;
...
boom! cannot be easier than that!
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list