mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
Notebook: Update doc on how to accept dropped tabs
It was still giving out-of-date info about how GTK3 did this. Update per reading the current code, so readers have proper guidance on doing this.
This commit is contained in:
parent
6e0ac83d99
commit
473881357c
@ -6991,9 +6991,10 @@ gtk_notebook_get_tab_detachable (GtkNotebook *notebook,
|
||||
*
|
||||
* If you want a widget to interact with a notebook through DnD
|
||||
* (i.e.: accept dragged tabs from it) it must be set as a drop
|
||||
* destination and accept the target “GTK_NOTEBOOK_TAB”. The notebook
|
||||
* will fill the selection with a GtkWidget** pointing to the child
|
||||
* widget that corresponds to the dropped tab.
|
||||
* destination by adding to it a [class@Gtk.DropTarget] controller that accepts
|
||||
* the GType `GTK_TYPE_NOTEBOOK_PAGE`. The `:value` of said drop target will be
|
||||
* preloaded with a [class@Gtk.NotebookPage] object that corresponds to the
|
||||
* dropped tab, so you can process the value via `::accept` or `::drop` signals.
|
||||
*
|
||||
* Note that you should use [method@Gtk.Notebook.detach_tab] instead
|
||||
* of [method@Gtk.Notebook.remove_page] if you want to remove the tab
|
||||
|
Loading…
Reference in New Issue
Block a user