Notices


Reply
Thread Tools
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#21
Originally Posted by Ygriega View Post
I honestly would be surprised if this works - after I've learnt that Jolla doesn't change the OS-defaults for the Pictures folder even if the user explicitly said that pictures should be stored on the SD card. Until now, only the images in the "Pictures" standard path and all sub-folders are taken into account. And this path remains the same no matter what you set in the Camera app.

Maybe I'll include the SD card folder (if existing) in the search in the next release, maybe I'll ask Jolla in parallel why the standard paths (see http://doc.qt.io/qt-5/qstandardpaths.html) are not updated.

Moreover, if anybody knows a Harbour-compatible way to access the Gallery's indexed data, just let me know. Most certainly easier then...
Tweetian or Prostogram can able choose picture from sdcard, they are both in Jolla store

And there is source code, Prostogram: https://github.com/neochapay/prostogram
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica
 
Posts: 17 | Thanked: 107 times | Joined on Jan 2017 @ Berlin, Germany
#22
Originally Posted by TMavica View Post
Tweetian or Prostogram can able choose picture from sdcard, they are both in Jolla store

And there is source code, Prostogram: https://github.com/neochapay/prostogram
Well, of course I know that digging into the source code is always possible and I know that other applications somehow solved it. It's just somehow frustrating when you ask a concrete question and you get the answer "read the source code, the solution is somewhere there". What comes in addition is that even the image gallery example from the SDK uses code which must not be used for Harbour.

But OK, maybe I should simply stop hoping for some official re-use component or at least a semi-official guidance for such a common task. I stop complaining and spend some additional hours on understanding other solutions and - if feasible - adopt them.

However, any concrete assistance which saves time for a SFOS newbie developer (and possibly also other devs who have the same issue) is still very much appreciated. Maybe it's really easy and I've just been too stupid to find it.
 

The Following 3 Users Say Thank You to Ygriega For This Useful Post:
velox's Avatar
Posts: 394 | Thanked: 1,341 times | Joined on Dec 2009
#23
I've had a quick scan through the prostogram source to help you out and it just seems to do it like this when a button is clicked:

Code:
            var imagePicker = pageStack.push("Sailfish.Pickers.ImagePickerPage")
            imagePicker.selectedContentChanged.connect(function () {
                pageStack.push(Qt.resolvedUrl("SendPhotoPage.qml"),{image_url: imagePicker.selectedContent})
            })
A quick google showed no official documentation about it, but a few questions whether or not Pickers imports are to be allowed in harbour. prostogram does not seem to import pickers as such, only silica.
__________________
slumber: sensors enabled sleep timer for SFOS (translations/input/… appreciated if you've got some spare time)
talefish: directory based audiobook player for SFOS
nofono: ofono restart for SFOS
___
list of i486/noarch packages on openrepos (jolla tablet)
 

The Following 2 Users Say Thank You to velox For This Useful Post:
Posts: 17 | Thanked: 107 times | Joined on Jan 2017 @ Berlin, Germany
#24
Originally Posted by velox View Post
I've had a quick scan through the prostogram source to help you out and it just seems to do it like this when a button is clicked:

Code:
            var imagePicker = pageStack.push("Sailfish.Pickers.ImagePickerPage")
            imagePicker.selectedContentChanged.connect(function () {
                pageStack.push(Qt.resolvedUrl("SendPhotoPage.qml"),{image_url: imagePicker.selectedContent})
            })
A quick google showed no official documentation about it, but a few questions whether or not Pickers imports are to be allowed in harbour. prostogram does not seem to import pickers as such, only silica.
Thanks, velox. That certainly saved some of my life time. I also saw the exact same code in the sources of Tweetian, so there's a reason that it works for both of the applications...

As you already said - they don't officially import "Sailfish.Pickers", but just reference them in a hard-coded String. Well, that's also most certainly the reason why they passed Harbour QA as Sailfish.Pickers wasn't officially supported until ***ta-daaa*** 16 days ago. I couldn't believe it, but it's now allowed for Harbour: https://github.com/sailfish-sdk/sdk-...mlimports.conf

Of course, there is always a downside: Piepmatz must be able to select 1-4 images and not just a single one. At least on my device ImagePickerPage is not configurable. So in order to achieve my goal I would build it in a way that the dialog needs to be opened up to 4 times in case you want to add 4 images or (illegally) import the ImageModel which comes with Sailfish.Gallery into my page. However, I already found that before and that's what I became angry about as it's not officially supported...

To sum it up: I will stick to my custom solution for the time being and add the SD card path to my model. Should fix TMavica's (and potentially also other's) problem here...
 

The Following User Says Thank You to Ygriega For This Useful Post:
Posts: 17 | Thanked: 107 times | Joined on Jan 2017 @ Berlin, Germany
#25
Originally Posted by TMavica View Post
Tweetian or Prostogram can able choose picture from sdcard, they are both in Jolla store

And there is source code, Prostogram: https://github.com/neochapay/prostogram
You should have a PM about a test version with SD card support. If not, please contact me via e-mail!
 

The Following User Says Thank You to Ygriega For This Useful Post:
Posts: 17 | Thanked: 107 times | Joined on Jan 2017 @ Berlin, Germany
#26
Piepmatz 0.4 is now in OpenRepos. Harbour seems to have issues currently, but I'll upload it there as well soon(tm).

Especially if you want to get rid of the crashes/freezes during scrolling, you should update now! But, there are also some additional changes:
  • Retweet with comment
  • Load more tweets in timeline
  • Improved video playback (now with remaining time)
  • Better link preview
  • Bugfix: Crash/Freeze on scrolling (OK, I mentioned that already )
  • Bugfix: Error loading direct messages with suspended user
 

The Following 4 Users Say Thank You to Ygriega For This Useful Post:
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#27
Would you like to remove the words just below the icons inside the apps?
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica
 
Posts: 17 | Thanked: 107 times | Joined on Jan 2017 @ Berlin, Germany
#28
Originally Posted by TMavica View Post
Would you like to remove the words just below the icons inside the apps?
No, I wouldn't like that... Are they that disturbing?
 

The Following User Says Thank You to Ygriega For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:24.