After an evaluation, the migration from Bugzilla to GitLab is ongoing. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore. Some older issues are still tracked here (until migrated to Gitlab).
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301597 - ComboBox should derive from CellEditable
ComboBox should derive from CellEditable
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.6.x
Other All
: Normal normal
: 3
Assigned To: gtkmm-forge
gtkmm-forge
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2005-04-22 15:25 UTC by Murray Cumming
Modified: 2010-09-08 10:36 UTC (History)
4 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments

Description Murray Cumming 2005-04-22 15:25:26 UTC
Since GTK+ 2.6, GtkComboBox implements the GtkCellEditable interface, but we
can't add this base without breaking ABI.

This also means that the GtkCellRenderer::signal_editing_started() sends a null
Gtk::CellEditable* parameter when used with a Gtk::CellRendererCombo. Until we
can fix this, by breaking ABI, you must use the C API ( g_signal_connect() ).
Comment 1 Murray Cumming 2006-07-18 20:11:33 UTC
A few other classes have gained new base classes (implementing new GInterfaces). I've added TODOs in the code.
Comment 2 Murray Cumming 2009-06-12 20:15:31 UTC
This is done in the gtkmm-maybe3 branch.
Comment 3 JinZeyu 2009-07-31 03:38:27 UTC
And, what about checkbox?
Gtk::CellRenderer::signal_editing_started() doesn't work?
Comment 4 Murray Cumming 2009-07-31 08:01:52 UTC
JinZeyu, sorry I don't understand your question. Could you please explain what you mean?
Comment 5 JinZeyu 2009-08-10 05:29:39 UTC
  Gtk::TreeModel::ColumnRecord lv_userlist_m_Column;
  Glib::RefPtr<Gtk::ListStore> lv_userlist_m_refTreeModel;
  //Gtk::TreeModelColumn      <bool>  lv_userlist_check;
  Gtk::TreeModelColumn<Glib::ustring> lv_userlist_check;
  Gtk::TreeView *lv_userlist;
  lv_userlist = Gtk::manage(new Gtk::TreeView());
  lv_userlist_m_Column.add(lv_userlist_check);
  lv_userlist_m_refTreeModel = Gtk::ListStore::create(lv_userlist_m_Column);
  lv_userlist->set_model(lv_userlist_m_refTreeModel);
  lv_userlist->append_column_editable("Apply to terminal",lv_userlist_check);
  lv_userlist->get_column(0)->set_min_width(90);
  lv_userlist->get_column_cell_renderer(0)->signal_editing_started().connect(sigc::mem_fun(*this,&TmainWindow::on_someFunction));

when I double click the cell and start to edit,on_someFunction was called.
but if declare lv_userlist_check as follow:
   Gtk::TreeModelColumn<bool>  lv_userlist_check;
however I click the cell(it looks like a checkbox),on_someFunction doesn't work
Comment 6 Murray Cumming 2009-09-21 07:54:32 UTC
Jinzeyu, that's not related to this bug. Please file a separate bug if necessary. I don't know if it would make sense for a checkbox would support a signal editing signal, but maybe we can find out.
Comment 7 Goran Sterjov 2010-01-11 05:42:34 UTC
This becomes a pretty big problem when implementing a custom viewer using CellRendererCombo as start_editing() will return NULL due to the dynamic_cast in CellRenderer::start_editing. As a result I can't get the CellEditable to display in my custom widget.

It would seem that custom cell viewers will need to work around this by using the C API directly as you would for signal_editing_started(), although it is a pain to do so. The documentation should probably mention this
Comment 8 Murray Cumming 2010-09-08 10:36:30 UTC
This is done in git master, and it's in gtkmm 2.90.* releases already.

Note You need to log in before you can comment on or make changes to this bug.