After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
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 555268 - No unset_model() for ComboBox or IconView
No unset_model() for ComboBox or IconView
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.14.x
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2008-10-06 17:31 UTC by Alexander Shaduri
Modified: 2008-11-10 14:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support unset_model() functions for all set_model()'s (9.84 KB, patch)
2008-11-09 12:17 UTC, Alexander Shaduri
none Details | Review

Description Alexander Shaduri 2008-10-06 17:31:58 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:
Comment 1 Murray Cumming 2008-10-08 20:20:57 UTC
Yes. A patch would be welcome.
Comment 2 Alexander Shaduri 2008-11-09 12:17:40 UTC
Created attachment 122258 [details] [review]
Support unset_model() functions for all set_model()'s
Comment 3 Alexander Shaduri 2008-11-09 12:23:40 UTC
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.
Comment 4 Murray Cumming 2008-11-10 14:11:35 UTC
Excellent. I have applied this to svn trunk after branching for gtkmm 2.14. Thanks.