Migrating to gtkmm 2.4, cellrenderer problems
- From: Leandro Fanzone <leandro hasar com>
- To: gtkmm-list gnome org
- Subject: Migrating to gtkmm 2.4, cellrenderer problems
- Date: Fri, 04 Mar 2005 14:01:24 -0300
I am migrating code from gtkmm 2.0 to gtkmm 2.4, and I have some custom
cellrenderer code that I copied from someone of this list without
understanding quite completely the inner working of it. It's a
cellrenderer to show a fixed point number in a TreeView. I managed to
understand that generate_cellrenderer was moved from
TreeViewColumn_CellRendererGeneration to CellRenderer_Generation, but
the last line from this following code still puzzles me:
unsigned n = TreeView.append_column("Precio", RendererPrecio); //
RendererPrecio => custom cellrenderer for fixed point numbers, based on
CellRendererText
Gtk::TreeViewColumn *pColumn = TreeView.get_column(n-1);
pColumn->add_attribute(RendererPrecio.property_amount(), cols.Precio);
RendererPrecio.property_editable() = true;
RendererPrecio.signal_edited().connect(SigC::bind(SigC::slot(TreeView,
&Gtk::TreeView::_auto_store_on_cellrenderer_text_edited_numerical<Util::Amount>),
cols.Precio.index()) );
I understood that _auto_store_on_cellrenderer_text_edited_numerical now
was moved to TreeView_Private; I could change the SigC::slot thing to
mem_fun:
RendererPrecio.signal_edited().connect(sigc::bind(sigc::mem_fun(TreeView,
&Gtk::TreeView_Private::_auto_store_on_cellrenderer_text_edited_numerical<Util::Amount>),
cols.Precio.index()) );
But I still got an error with gcc 3.3.1 on cygwin:
error: no matching function for call to 'mem_fun(Gtk::TreeView&,
<unknown type>)'.
I don't quite understand if this is a problem of SigC migration or if
something changed about custom cellrenderers. Any help or hint will be
really appreciated, thanks a lot.
Leandro Fanzone.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]