Looking for documentation on how to add settings page to applications
I have just came across a problem which would required the adding of a settings page to an application (which is accessible through Settings -> Apps -> App icon).
Is there any documentation on this area?
Good question, but I'm not sure we will find documentation for it. However, why not just look at the device, pick a setting and have a look in
Spam Hunter ( 2017-06-09 12:03:16 +0200 )edit/usr/share/jolla-settings/entries
- these are .json entries, showing how they are laid out, easy enough (even for me!), but how to connect your new switch/setting with your app, this is the bit I am struggling with.Thanks! Meanwhile I have found them, and got rolling what I wanted. But again it would be nice if there would be any docs in the wiki with guidelines and so on. Is the Sailfish wiki user contributable?
My best answer on how connect the app with the settings is the Dconf.
martonmiklos ( 2017-06-09 12:06:58 +0200 )editIt would be nice to have a straightforward guide how to create the rpm to install an app settingspage on the device. Patches on openrepos that create settings are not available on harbour. Is it because it is not allowed?
rgrnetalk ( 2017-06-09 12:13:30 +0200 )edit@rgnetalk Yes it is forbidden: https://harbour.jolla.com/faq
RPM-Packaging In which locations can I install files? You are allowed to install: /usr/bin/<harbour_app_name> <- the executable binary /usr/share/applications/<harbour_app_name>.desktop <- the desktop file /usr/share/icons/hicolor/<size>/apps/<harbour_app_name>.png <- the icon files /usr/share/<harbour_app_name>/</harbour_app_name></harbour_app_name></size></harbour_app_name></harbour_app_name> <- anything else (data files, private shared libraries, private QML imports, etc..) goes here*
@Alex I would be curious about the security flaws. I think it could be secured with restrictions: - Limit the uploading of /usr/share/jolla-settings/entries/<harbour_app_name>.json - Check the contents to not to be able to mimic other apps settings icon</harbour_app_name>
martonmiklos ( 2017-06-09 12:24:53 +0200 )edit@martonmiklos I added the link to the pull request in my answer - have a look at the comments there. :)
Alex ( 2017-06-09 12:43:36 +0200 )edit