File dialog doesn't return current filter in Ubuntu 20.04

Bug #1973564 reported by Ted Gould
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-desktop-portal (Ubuntu)
Fix Released
Low
Unassigned
Focal
Fix Released
Low
Ted Gould
xdg-desktop-portal-gtk (Ubuntu)
Fix Released
Low
Unassigned
Focal
Fix Released
Low
Ted Gould

Bug Description

* Impact
The file dialog implementation doesn't return the current filter. It is in the spec and it is fixed in newer versions of the portals. But the 1.6.0 version doesn't return it.

This is an issue for Inkscape which uses the filter to select which file format someone wishes to save as if they override the defaults. This works well on Ubuntu 22.04.

* Test case

$ snap install --candidate inkscape.

In Inkscape if you just draw on the canvas and hit save a save dialog will appear. There is a selector at the bottom right that adjust which files you see, but also which format you want to save in. So if you make your file "test.pdf" and select "Portable Document Format (*.pdf)" in the selector you should get a PDF file. Before these patches you will get a file "test.pdf" which is actually an SVG file. After the patches you'll get a "test.pdf" that is actually a PDF.

* Regression potential

That's a change to the fileselector portal so check that opening and saving files in a few snaps and flatpaks still works as intended

Revision history for this message
Ted Gould (ted) wrote :

Attaching a debdiff. For what ever reason this doesn't seem to fix Inkscape. Though the D-Bus traffic is the same one 20.04 and 22.04 after this change.

Chris Guiver (guiverc)
summary: - File dialog doesn't return current filter in Ubuntu 20.02
+ File dialog doesn't return current filter in Ubuntu 20.04
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "xdg-desktop-portal-gtk-1.6.0-2.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks Ted. Do you maybe has a small testcase that can be used there? It feels like we should figure out why the change isn't working for inkscape before uploading a SRU

Revision history for this message
Ted Gould (ted) wrote :

Okay, so it turns out that the implementation wrapper also doesn't pass the value.

Revision history for this message
Ted Gould (ted) wrote :

The way that I'm testing this is with the candidate release for Inkscape. Which is 1.2, you can grab as a snap with: snap install --candidate inkscape.

In Inkscape if you just draw on the canvas and hit save a save dialog will appear. There is a selector at the bottom right that adjust which files you see, but also which format you want to save in. So if you make your file "test.pdf" and select "Portable Document Format (*.pdf)" in the selector you should get a PDF file. Before these patches you will get a file "test.pdf" which is actually an SVG file. After the patches you'll get a "test.pdf" that is actually a PDF.

Changed in xdg-desktop-portal (Ubuntu):
status: New → Fix Released
importance: Undecided → Low
Changed in xdg-desktop-portal-gtk (Ubuntu):
importance: Undecided → Low
status: New → Fix Committed
Changed in xdg-desktop-portal-gtk (Ubuntu Focal):
importance: Undecided → Low
Changed in xdg-desktop-portal (Ubuntu Focal):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks Ted, I've added the bug reference to the changelog and uploaded for you

Changed in xdg-desktop-portal (Ubuntu Focal):
status: New → Fix Committed
Changed in xdg-desktop-portal-gtk (Ubuntu):
status: Fix Committed → Fix Released
Changed in xdg-desktop-portal-gtk (Ubuntu Focal):
status: New → Fix Committed
Changed in xdg-desktop-portal (Ubuntu Focal):
assignee: nobody → Ted Gould (ted)
Changed in xdg-desktop-portal-gtk (Ubuntu Focal):
assignee: nobody → Ted Gould (ted)
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Ted, or anyone else affected,

Accepted xdg-desktop-portal into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xdg-desktop-portal/1.6.0-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote :

Hello Ted, or anyone else affected,

Accepted xdg-desktop-portal-gtk into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xdg-desktop-portal-gtk/1.6.0-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ted Gould (ted) wrote :

I've installed the two packages and Inkscape behaves as expected. Played around with some other apps and I haven't noticed any ill effects.

Thank you for everyone's help in getting this fixed!

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal-gtk - 1.6.0-1ubuntu1

---------------
xdg-desktop-portal-gtk (1.6.0-1ubuntu1) focal; urgency=medium

  * Return the current filter selected from file dialogs
    - d/patches/filechooser-current-filter.patch
      (lp: #1973564)

 -- Ted Gould <email address hidden> Wed, 18 May 2022 15:30:59 +0200

Changed in xdg-desktop-portal-gtk (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for xdg-desktop-portal-gtk has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal - 1.6.0-1ubuntu1

---------------
xdg-desktop-portal (1.6.0-1ubuntu1) focal; urgency=medium

  * Pass the current_filter from XDG Portal save dialogs through
    - d/patches/pass-current-filter-on-save.patch
      (lp: #1973564)

 -- Ted Gould <email address hidden> Mon, 16 May 2022 10:58:47 -0500

Changed in xdg-desktop-portal (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.