GNOME Bugzilla – Bug 555268
No unset_model() for ComboBox or IconView
Last modified: 2008-11-10 14:11:35 UTC
Please describe the problem: Since it's impossible to pass 0 to ComboBox::set_model() or IconView::set_model(), there should be respective unset_model() functions provided. TreeView has unset_model() already since 2.8 (the documentation doesn't mention the 2.8 version though, making developers think that it's there since at least 2.4). Steps to reproduce: n/a Actual results: Expected results: Does this happen every time? Other information:
Yes. A patch would be welcome.
Created attachment 122258 [details] [review] Support unset_model() functions for all set_model()'s
I attached a patch against SVN trunk (2008-11-09). I'm not sure about your policy of adding new API functions, so I marked them as "since 2.16". I also wanted to add examples of using pure GTK for older versions of gtkmm to the documentation of unset_model()'s, but I'm not sure how to do that with all the automatic gtk names -> gtkmm names processing going on. The relevant changelog entry (included in the patch): * gtk/src/cellview.ccg: * gtk/src/cellview.hg: Added unset_model(). * gtk/src/combobox.ccg: * gtk/src/combobox.hg: Added unset_model(). * gtk/src/entrycompletion.ccg: * gtk/src/entrycompletion.hg: Added unset_model(). * gtk/src/iconview.ccg: * gtk/src/iconview.hg: Added unset_model(). * gtk/src/treeview.hg: Marked unset_model() as available since 2.8. * gtk/src/gtk_docs_override.xml: Added overrides for gtk_tree_view_set_model(), gtk_cell_view_set_model(), gtk_entry_completion_set_model(), gtk_entry_completion_set_model() and gtk_combo_box_set_model(), because their documentation contained an incorrect method of unsetting the models.
Excellent. I have applied this to svn trunk after branching for gtkmm 2.14. Thanks.