View Single Post
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#162
Originally Posted by Android_808 View Post
Sorry, been unwell again the last few weeks. I was wondering the same thing a few months ago as part of something else (finding WM/shell during runtime). Would it be better to look at implementing/following XDG? We use it for menus and autostart iirc but not sure about user-dirs.dirs. As I understand it we could just add XDG_CAMERA_DIR to the config file and use that where needed.
Yes, but seems there is no way to get that custom dir besides using xdg-user-dir. And even then it is problematic, as it will return $HOME for missing definitions.

The trouble then is Glib doesn't seem to have a direct (GUserDirectory) method of using this, it would require manually processing the config file for each app or just creating a routine within libhildonfm/libhildon.
This is what I was hoping to avoid, but so far I don't see any other way.

OR, we cheat and just make it XDG_PICTURES_DIR/DCIM
Won't work, as both videos and images are stored in DCIM folder. Also, iiuc DCF requires DCIM to be in the root folder.


https://wiki.archlinux.org/index.php...er_directories
or for a N9 example:
https://fravaccaro.wordpress.com/201...r-screenshots/

Edit:
For custom paths, reading the config file would need something like xdg_user_dir_lookup_with_fallback
https://cgit.freedesktop.org/xdg/xdg...r-dir-lookup.c
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 7 Users Say Thank You to freemangordon For This Useful Post: