Re: Pixbufs in ComboBox columns
- From: Murray Cumming <murrayc murrayc com>
- To: Rick L Vinyard Jr <rvinyard cs nmsu edu>
- Cc: gtkmm-list gnome org
- Subject: Re: Pixbufs in ComboBox columns
- Date: Fri, 17 Mar 2006 10:01:49 +0100
On Thu, 2006-03-16 at 20:08 -0700, Rick L Vinyard Jr wrote:
> I have a model that looks like this:
>
> class ModelColumns: public Gtk::TreeModelColumnRecord {
> public:
> ModelColumns() {
> add(picture);
> add(name);
> }
>
> Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > picture;
> Gtk::TreeModelColumn<Glib::ustring> name;
> };
>
> After doing "all the other stuff" like declaring an instance of the
> ColumnRecord, creating a ListStore instance, loading the pixbufs (tested
> the pixbufs in a Gtk::Image and they're fine), filling the model, etc.,
> I'm adding the columns with just:
> pack_start(columns.picture);
> pack_start(columns.name);
>
>
> But, I'm getting errors like below:
>
> (process:23146): GLib-GObject-CRITICAL **: gtype.c:2215: initialization
> assertion failed, use IA__g_type_init() prior to this function
That code is somehow running before Gtk::Main runs, I guess. Maybe it's
a static instance, or a member of a static instance.
[snip]
> But, the ComboBox interface doesn't have a method that accepts a
> TreeViewColumn. Any suggestions or examples on how to approach putting a
> pixbuf into a ComboBox column?
That should work fine. Try changing/patching an example in gtkmm to
double-check.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]