Bug 456919 - when a sound is selected with the file chooser in g-s-p, make sure to default to /usr/share/sounds if that dir exists
Summary: when a sound is selected with the file chooser in g-s-p, make sure to default...
Alias: None
Product: Fedora
Classification: Fedora
Component: control-center
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F10DesktopTarget
TreeView+ depends on / blocked
Reported: 2008-07-28 16:37 UTC by Lennart Poettering
Modified: 2008-10-10 09:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-10-10 09:20:45 UTC
Type: ---

Attachments (Terms of Use)
Set a default directory (926 bytes, patch)
2008-10-09 16:14 UTC, Bastien Nocera
no flags Details | Diff

Description Lennart Poettering 2008-07-28 16:37:43 UTC
Summary says it all.

Comment 1 Bastien Nocera 2008-07-28 16:51:56 UTC
When you manage to say all that in the subject, it means it's too long.

But the problem is that we use XDG_DATA_DIRS. Which one of the directories
should we select? Or should we force using $(datadir)/sounds?

Comment 2 Matthias Clasen 2008-08-01 03:43:09 UTC
Since you add only /usr/share/sounds to the shortcuts list, not all
$XDG_DATA_DIRS/sound, it would seem logical to open the file chooser in that
directory too.

Comment 3 Lennart Poettering 2008-08-06 13:41:47 UTC
The first part of XDG_DATA_DIRS perhaps? 

I guess it would even be OK to hard code that to $(datadir)/sounds since if XDG_DATA_DIRS is not set (wich it usually is not) it would default to that dir anyway (plus /usr/share/local)

Comment 4 Bastien Nocera 2008-08-08 14:46:08 UTC
The default for g_get_system_data_dirs() is:
- when XDG_DATA_DIRS isn't set:
-> /usr/local/share/:/usr/share/
- when set, well, all bets are off.

I'd hard-code it to $(datadir)/sounds myself...

Comment 5 Matthias Clasen 2008-08-08 14:54:40 UTC
Yeah /usr/share/sounds is the only sane default. 
Since that is the only place where a newly installed system will have sounds...

Comment 6 Bastien Nocera 2008-10-09 16:14:49 UTC
Created attachment 319874 [details]
Set a default directory

We use whatever we managed to insert first as a shortcut folder for the default directory. Not tested.

Comment 7 Bastien Nocera 2008-10-10 09:20:45 UTC
Fixed in

Note You need to log in before you can comment on or make changes to this bug.