=== chihchun_afk is now known as chihchun | ||
=== athairus is now known as afkthairus | ||
dubstar_04 | Good morning!! Any DownloadManager experts? | 06:46 |
---|---|---|
=== tsdgeos_ is now known as tsdgeos | ||
dubstar_04 | Good morning!! Any DownloadManager experts? | 08:20 |
popey | dubstar_04: i think Elleo and kenvandine are the ones I'd point to :) | 08:44 |
dubstar_04 | popey: Thanks | 08:51 |
popey | ken will be asleep right now tho | 08:52 |
dubstar_04 | Elleo: kenvandine: I can download items using the download manager. when i select the download in the filetransfer indicator my app opens but there doesnt seem to be a way to handle the file or tell what triggered the app to open. | 08:52 |
dubstar_04 | I was expecting this to be handled by the contentHub transfers. Am I missing something? | 08:53 |
dubstar_04 | popey: hopefully he will see it later. | 08:54 |
popey | you could look at other apps which receive files like docviewer? | 08:55 |
popey | or music? | 08:55 |
dubstar_04 | popey: doc viewer uses this: https://developer.ubuntu.com/api/apps/qml/sdk-15.04.4/Ubuntu.Components.UriHandler/ | 09:04 |
dubstar_04 | thanks!! | 09:04 |
kalikiana_ | t1mp: You need to update components.api https://code.launchpad.net/~tpeeters/ubuntu-ui-toolkit/apl-header-height/+merge/298166 | 09:21 |
t1mp | right | 09:22 |
t1mp | thanks :) | 09:22 |
krampstudio | Hi, I need some help in ubuntu touch scope development in JS. | 09:26 |
krampstudio | I don't get how I can add filters to the scope | 09:26 |
krampstudio | http://paste.ubuntu.com/17737732/ | 09:28 |
krampstudio | near line 38 | 09:29 |
krampstudio | any appdevs? | 09:40 |
rpadovani | davidcalle, ^^ | 09:42 |
=== _salem is now known as salem_ | ||
davidcalle | krampstudio: hi, let me have a look! | 10:28 |
davidcalle | krampstudio: there is a pretty good example here http://bazaar.launchpad.net/~marcustomlinson/unity-js-scopes/filters_example/view/head:/examples/filters/src/filters.js | 10:32 |
davidcalle | krampstudio: you can disregard lines 42>343, this part is just creating fake results to display | 10:32 |
davidcalle | krampstudio: if you are still blocked with the example, try pinging marcustomlinson about it in #ubuntu-touch, he is the author of the example and maintainer of the JS api | 10:34 |
krampstudio | thanks davidcalle | 10:44 |
krampstudio | I'll let you know | 10:44 |
=== chihchun_afk is now known as chihchun | ||
=== davidcalle is now known as davidcalle_afk | ||
=== afkthairus is now known as athairus | ||
=== javiercrowsoft1 is now known as javiercrowsoft | ||
=== javiercrowsoft1 is now known as javiercrowsoft | ||
=== JanC is now known as Guest91547 | ||
=== JanC_ is now known as JanC | ||
Dubstar_04 | kenvandine: are you about? | 20:14 |
kenvandine | Dubstar_04, yup, what's up? | 20:14 |
Dubstar_04 | I was wondering if you could help me with some contenthub stuff? | 20:14 |
kenvandine | sure | 20:15 |
Dubstar_04 | I would like to get the 'real' filename of the file being received in onImportRequested: | 20:16 |
Dubstar_04 | is that possible? | 20:16 |
Dubstar_04 | the transfer url seems to have extra formatting in. | 20:17 |
kenvandine | what do you mean by "real" | 20:17 |
kenvandine | it's just a QUrl | 20:17 |
Dubstar_04 | so the 'real' filename would be 'myawesomefile.ext' | 20:18 |
kenvandine | ok | 20:18 |
kenvandine | QUrl provides api for that kind of thing, but I don't think it's exposed via qml | 20:19 |
Dubstar_04 | the url.toString() gives the path to the file but the filename is /myawesomefile_-_3289892383879.ext | 20:19 |
kenvandine | it would probably be safe to split on '/' an use the end | 20:20 |
Dubstar_04 | it would be cool if i could do url.fileName and i get the real filename | 20:20 |
Dubstar_04 | or transfer.items[i].fileName | 20:21 |
kenvandine | the fileName is usually not very useful without the path | 20:21 |
kenvandine | but i guess for display ? | 20:21 |
Dubstar_04 | I want to open the file in my app and display the correct name. the user can then save the file if they wish. | 20:22 |
kenvandine | you could look at filemanager-app to see what they do for parsing paths/files | 20:22 |
Dubstar_04 | i could regex it but if some crazy person uses _-_ in the filename i could end up with all sorts of weird results? | 20:24 |
kenvandine | it should be safe to just split on '/' | 20:24 |
kenvandine | a filename won't have that | 20:25 |
kenvandine | then use the last item in the array | 20:25 |
Dubstar_04 | this is the url file:///home/phablet/.cache/design.marthamengineering/HubIncoming/1/JamesLineCircle_-_360808331247353977.dxf | 20:26 |
kenvandine | right | 20:27 |
kenvandine | split('/') | 20:27 |
Dubstar_04 | the original filename was JamesLineCircle.dxf | 20:27 |
kenvandine | oh... | 20:27 |
kenvandine | contenthub didn't add the _-_360808331247353977 | 20:28 |
Dubstar_04 | oh | 20:28 |
kenvandine | Dubstar_04, content-hub itself doesn't change the file name | 20:28 |
kenvandine | the app creating the transfer must be | 20:28 |
Dubstar_04 | kenvandine: double oh | 20:28 |
Dubstar_04 | maybe this is coming from telegram then? | 20:28 |
kenvandine | has to be | 20:29 |
Dubstar_04 | I have been sharing files using telegram and opening them from there. | 20:29 |
kenvandine | content-hub isn't doing it | 20:29 |
Dubstar_04 | great!! simple solution. | 20:29 |
kenvandine | :) | 20:29 |
Dubstar_04 | thanks. | 20:29 |
Dubstar_04 | next question; | 20:29 |
kenvandine | np | 20:29 |
Dubstar_04 | do items clicked in the filetransfer indicator go through content hub? | 20:30 |
kenvandine | Dubstar_04, depends :) | 20:30 |
kenvandine | downloads from the browser? | 20:30 |
kenvandine | Dubstar_04, the answer is not automatically | 20:30 |
Dubstar_04 | so i use downloadmanager to download a file. when its complete i want to click the item in the indicator, it opens my app but i dont know how to handle it. | 20:31 |
Dubstar_04 | no browser involved. | 20:32 |
kenvandine | i think your app would need to create the transfer as well as the download and reference them | 20:32 |
kenvandine | Elleo, ^^ | 20:32 |
kenvandine | Dubstar_04, Elleo had done that work | 20:33 |
kenvandine | the transfer object can have the download ID | 20:33 |
* kenvandine doesn't remember how it works :) | 20:33 | |
Dubstar_04 | Yeah its not clear in the docs and i can't find any examples. | 20:34 |
kenvandine | i'm actually not sure if that is available in the QML API | 20:34 |
kenvandine | it was done for the browser | 20:34 |
Dubstar_04 | kenvandine: thankyou. | 20:47 |
kenvandine | Dubstar_04, sorry i couldn't help more, Elleo will be around in the morning | 20:47 |
Dubstar_04 | kenvandine: you have been a lot of help. | 20:49 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!