Skip to content

Portage from GTK3 to GTK4 #113

Open
Open

Description

@LouKev

Hi, I'm currently using this library in a GTK3 project. It work well. But the project is transitioning to GTK4 and it cause interference with the GTK3 needed by NFD. I think I already know the answer but I still ask, is there a portage to GTK4 in the pipe ? If no, is it a big deal ? I've never did this, would it cost my soul to try to do it myself ?

Activity

  1. btzy commented on Oct 25, 2024

    @btzy

    I have some half-attempted code for this from more than three years ago (btzy/nativefiledialog-extended#38), but it was abandoned because it was quite non-trivial, GTK4 made it more difficult to just get the file name because it deals with non-local files, and most users of such cross-platform file dialog libraries do not already use some version of GTK.

    Why can't you directly use the file dialog API provided by GTK4 if you're already using GTK4? The API is Gtk.FileChooserNative (though it seems deprecated and I'm not sure if the replacement also opens a native dialog).

  2. LouKev commented on Oct 28, 2024

    @LouKev
    Author

    @btzy Thanks for your answer, you are right I should implement the GTK4 functions I need. But to be honest there is a lot of resources for GTK3 but not for GTK4...
    Anyway if I in the end, use your project and improve it, I'll let you know.

  3. ssokolow commented on Jul 27, 2026

    @ssokolow

    (though it seems deprecated and I'm not sure if the replacement also opens a native dialog).

    The replacement (Gtk.FileDialog) only opens a native dialog. As mentioned here, it has no fallback if a user installing a desktop a la carte forgets to install an XDG File Chooser Portal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions