Reply
Thread Tools
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#161
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. 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.

OR, we cheat and just make it XDG_PICTURES_DIR/DCIM

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

Last edited by Android_808; 2017-04-07 at 08:25.
 

The Following 8 Users Say Thank You to Android_808 For This Useful 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:
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#163
There is a function in the linked source file that allows a fallback directory to be set, that seems about the closest I can come up with at the moment.

What's DCF?
 

The Following 4 Users Say Thank You to Android_808 For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#164
Originally Posted by Android_808 View Post
There is a function in the linked source file that allows a fallback directory to be set, that seems about the closest I can come up with at the moment.
I don't get what you mean - the source you've linked is the one of xdg-user-dir executable, so how's that helpful?

What's DCF?
https://en.wikipedia.org/wiki/Design...ra_File_system
__________________
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 5 Users Say Thank You to freemangordon For This Useful Post:
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#165
If we implement a function based on the fallback version in that file you could add XDG_CAMERA_DIR to the user-dirs.dir config file (with a default value equal to the Nokia equivalent) so users could specify their own location if desired. The function would then load the file and return this value if present, if not use a hard-coded default location. If the function was added to libhildon as part of something like hildon-utils.c all hildon apps would have access. To cheat even more, you could just give the function the same name as the glib version and #define the Nokia values to the XDG equivalents.

On a side note, are there any updates that need adding to the Fremantle-GTK3 version (utils/userland wise)? I've still got to work out a few issues with the current state of libhildon3 and then check to see if I need to restore any features in the current hildon-desktop implementation. After that I'll look to working out the Devuan kinks.
 

The Following 6 Users Say Thank You to Android_808 For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#166
Originally Posted by Android_808 View Post
If we implement a function based on the fallback version in that file you could add XDG_CAMERA_DIR to the user-dirs.dir config file (with a default value equal to the Nokia equivalent) so users could specify their own location if desired. The function would then load the file and return this value if present, if not use a hard-coded default location. If the function was added to libhildon as part of something like hildon-utils.c all hildon apps would have access. To cheat even more, you could just give the function the same name as the glib version and #define the Nokia values to the XDG equivalents.
Ah, I see. Yep, I was thinking about the same (adding hildon_get_user_named_dir to libhildon), I was just hoping there is already something in place I can use instead.

On a side note, are there any updates that need adding to the Fremantle-GTK3 version (utils/userland wise)? I've still got to work out a few issues with the current state of libhildon3 and then check to see if I need to restore any features in the current hildon-desktop implementation. After that I'll look to working out the Devuan kinks.
Lots of - upstream upstart integration, moving the stuff from upstart-dev to maemo-system-services(-dev) etc., you'd better have a look at https://github.com/fremantle-gtk2. Maybe I should have done a list, but...
__________________
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 6 Users Say Thank You to freemangordon For This Useful Post:
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#167
No worries. I need to take a look at gettting hildon-desktop running first anyway before I start worrying about the rest. Everything just taking longer at the moment due to repeating illness, probably from the stress at work.

I'm going to take a look at adding some support for the DESKTOP_SESSION, XDG_SESSION_DESKTOP or XDG_CURRENT_DESKTOP environment settings in hildon-desktop. Just needs to be set at runtime to allow apps to detect running desktop environment. For now it has no use but going forward it will help should I look at making hildon-menu integrated into a GtkHeaderBar for testing hildon in non hildon-desktop enviroments (weston-based, mutter-based etc.)
 

The Following 6 Users Say Thank You to Android_808 For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#168
In the meanwhile I was able to port libhildonfm and hildon-home to gio. More work is needed in libhildon, but still
Attached Images
 
__________________
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 18 Users Say Thank You to freemangordon For This Useful Post:
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#169
Love where this project is going. Thank you guys. Keep it up!
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 

The Following 5 Users Say Thank You to mr_pingu For This Useful Post:
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#170
Sick of this recurring illness now.

Updated my VBox installation earlier and my Debian VM in the hope that I can resume work on this again very soon. I noticed in the fremantle-gtk2 repo that you have removed the GTK module and opted for a forked GTK instead. Were you hitting a roadblock/problem with the module method?

In terms of GTK3, I know the module method will not guarantee 100% compatibility with the existing Hildon API. GtkIMContext related code, as previously mentioned, is a no go due to being unable to access the context.

This leaves me with a few choices, do I keep as much API in tact as possible or ditch compatibility like in my original attempt and create a cut down or API incompatible library (like with GTK2 and 3), following the deprecation messages left by the original devs.

Another option would be to suspend work on hildon-desktop GTK3 and instead add GTK3 support to the fremantle-gtk2 environment.
 

The Following 8 Users Say Thank You to Android_808 For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:44.