Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#685 closed Enhancement (fixed)

Use XDG user dir to set download directory

Reported by: LucaFerretti Owned by: charles
Priority: Normal Milestone: 1.06
Component: GTK+ Client Version: 1.04
Severity: Minor Keywords:
Cc:

Description

The xdg-user-dir is a freedesktop.org tool/spec useful to manage well known user directoris (i.e. desktop, music folder, video folder, documents folder...). This tool/spec is useful because:

  • defines and creates common directories
  • update directory names to match current locale

It's used in GNOME Desktop starting from 2.20.

It could be intersting set the default download directory checking the one defined by xdg-user-dirs, instead picking up $HOME.

Glib provides the g_get_user_special_dir() but unfortunately starting from recent 2.14 release.

I think the better way to do implement this in Transmission is use the $DOWNLOAD directory defined by xdg-user-dirs if default-download-directory key in configuration is empty.

PS note that the default location is $HOME/Download/ but some vendors (read Ubuntu) have changed it to $HOME/Desktop :-(

Change History (7)

comment:1 Changed 14 years ago by LucaFerretti

  • Component changed from Transmission to GTK+ Client
  • Owner set to charles

comment:2 Changed 14 years ago by charles

  • Type changed from Bug to Enhancement
  • Version changed from 1.03 to 1.04

comment:3 Changed 14 years ago by charles

  • Severity changed from Normal to Minor

comment:4 Changed 14 years ago by charles

  • Milestone changed from None Set to 1.10
  • Resolution set to fixed
  • Status changed from new to closed

trunk: r5082

Note that this will only affect new users.

To avoid confusion, existing users' settings are preserved.

comment:5 Changed 14 years ago by charles

1.0x: r5083

comment:6 Changed 14 years ago by charles

  • Milestone changed from 1.10 to 1.06

comment:7 Changed 14 years ago by charles

Also see r5214, which is useful though it wasn't reported in time for 1.06. Basically if g_get_user_special_dir() fails we fall back to g_get_home_dir() again.

Note: See TracTickets for help on using tickets.