NotebookPages is not a SelectionModel, despite the docs saying it is

The docs state that gtk_notebook_get_pages returns a GListModel that also implements GtkSelectionModel, as stated here:

This does not seem to be true:

GtkWidget* notebook;
notebook = gtk_notebook_new();
printf("%b\n",  GTK_IS_SELECTION_MODEL(gtk_notebook_get_pages(GTK_NOTEBOOK(notebook))));
0

Am I missing something? GtkNotebookPages seems to be a GListModel but it does not seem to implement the selection model interface.

I’m using GTK 4.8.3, on fedora linux.

I am aware that notebook provides the switch-page signal, which is essentially the same functionality. NotebookPages not implementing the interface doesn’t lock me out of monitoring page selection, but I wanted someone to sanity check me before I open an issue that the docs have an error.

Please, file an issue on GitLab.

To be precise: the GtkNotebookPage internal type never implemented GtkSelectionModel. The documentation blurb was wrong when it was introduced in commit c65239155f93eb6fe1d38e203756f706cc415d6d, which was supposedly only a port from the old gtk-doc style docblocks to the modern gi-docgen Markdown docblocks.

Thank you for the quick reply, I opened the issue here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.