Skip to content

Commit a18c0c1

Browse files
committed
docs/migrating: Mention GTK 4 ABI concerns
1 parent 70ee117 commit a18c0c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/reference/nautilus-python-migrating-to-4.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ else:
4040
</informalexample>
4141
</simplesect>
4242

43+
<simplesect id="nautilus-python-migrating-to-4-other-libraries">
44+
<title>Direct use of GTK and other libraries</title>
45+
<para>If you use GTK directly, e.g. to create dialogue windows, you will need to <ulink url="https://docs.gtk.org/gtk4/migrating-3to4.html">upgrade the code to GTK 4</ulink> as well, since Nautilus switched to GTK 4 and it is not possible to use multiple versions of GTK in the same process. Do not forget to replace <code>gi.require_version("Gtk", "3.0")</code> with <code>gi.require_version("Gtk", "4.0")</code>, then.</para>
46+
<para>The other option is moving the window and dialogues into a separate program and having the extension just launch it. But unless the code base is very large, migrating to GTK 4 will probably be easier.</para>
47+
</simplesect>
48+
4349
<simplesect id="nautilus-python-migrating-to-4-more">
4450
<title>More information</title>
4551
<para>See the <ulink url="https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/927">relevant Nautilus change</ulink> for more context and the <ulink url="https://gitlab.gnome.org/GNOME/nautilus-python/-/merge_requests/11">corresponding nautilus-python update</ulink> for more migration examples.</para>

0 commit comments

Comments
 (0)