Re: getting the icon pixbuf for a file
- From: Just Fill Bugs <mozbugbox yahoo com au>
- To: gtk-app-devel-list gnome org
- Subject: Re: getting the icon pixbuf for a file
- Date: Thu, 16 Aug 2012 22:41:28 +0800
ä 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!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]