After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633896 - Use XDG_DOCUMENTS_DIR as the default location for documents printed to files
Use XDG_DOCUMENTS_DIR as the default location for documents printed to files
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.91.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-11-03 11:11 UTC by Bilal Akhtar
Modified: 2010-11-10 09:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch applied in Ubuntu to fix this bug. (933 bytes, patch)
2010-11-03 11:11 UTC, Bilal Akhtar
none Details | Review
print to G_USER_DIRECTORY_DOCUMENTS by default (1.23 KB, patch)
2010-11-09 13:29 UTC, Marek Kašík
needs-work Details | Review

Description Bilal Akhtar 2010-11-03 11:11:02 UTC
Created attachment 173768 [details] [review]
Patch applied in Ubuntu to fix this bug.

When I select 'Print to File' in a Gtkprintunixdialog, the default location for saving the file is the user's home folder. It should rightfully be the $XDG_DOCUMENTS_DIR of the system, for example, /home/username/Documents .

Attached patch fixes issue.

Ubuntu bug: https://bugs.launchpad.net/hundredpapercuts/+bug/611011
Comment 1 Javier Jardón (IRC: jjardon) 2010-11-03 16:29:31 UTC
I think this makes sense.
Also, It's related to this propossed GnomeGoal: http://live.gnome.org/GnomeGoals/PrintToFile
Comment 2 Marek Kašík 2010-11-09 13:29:43 UTC
Created attachment 174133 [details] [review]
print to G_USER_DIRECTORY_DOCUMENTS by default

Hi,

it seems logical to me.
The attached patch changes the default directory from the current directory to the G_USER_DIRECTORY_DOCUMENTS for file backend. It is a different patch from the Ubuntu one. This sets the directory directly in the file backend.
I left the print directory set to the current directory in the test backend, it makes sense there.

Regards

Marek
Comment 3 Matthias Clasen 2010-11-09 17:39:58 UTC
Review of attachment 174133 [details] [review]:

The documents dir may not be set, so you need to check that and fall back to the previous location. Other than that, this looks fine.
Comment 4 Marek Kašík 2010-11-10 09:53:55 UTC
Hi,

> The documents dir may not be set, so you need to check that and fall back to
> the previous location. Other than that, this looks fine.

I'm sorry about that. I've modified the patch accordingly and committed it.

Marek