On Thu, 16 Aug 2012 22:41:28 +0800 Just Fill Bugs <mozbug...@yahoo.com.au> wrote:
> 于 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! Sorry, I mean loading the Pixbuf of the file-type / mime-type of a file - Not simply loading a file into a pixbuf. That is a bit more complicated getting... Sorry for not being more precise. /Andreas _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list