Merge lp:~ajalkane/ubuntu-filemanager-app/content-hub-multiselection into lp:ubuntu-filemanager-app

Proposed by Arto Jalkanen
Status: Superseded
Proposed branch: lp:~ajalkane/ubuntu-filemanager-app/content-hub-multiselection
Merge into: lp:ubuntu-filemanager-app
Prerequisite: lp:~ajalkane/ubuntu-filemanager-app/content-hub-preliminary
Diff against target: 321 lines (+139/-54)
7 files modified
README.contentHubDesktop (+65/-0)
apparmor.json (+1/-1)
manifest.json (+1/-0)
src/app/qml/components/FolderIconDelegate.qml (+1/-1)
src/app/qml/components/FolderListDelegate.qml (+2/-0)
src/app/qml/filemanager.qml (+14/-18)
src/app/qml/ui/FolderListPage.qml (+55/-34)
To merge this branch: bzr merge lp:~ajalkane/ubuntu-filemanager-app/content-hub-multiselection
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Arto Jalkanen Approve
David Planella Needs Fixing
Michael Sheldon (community) Needs Fixing
Carlos Jose Mazieri Needs Information
Ken VanDine Pending
Review via email: mp+220135@code.launchpad.net

This proposal has been superseded by a proposal from 2014-07-15.

Commit message

ContentHub file selecting support improved:

 - Buttons for accepting / cancelling selection
 - Can select multiple files

Description of the change

ContentHub file selecting support improved:

 - Buttons for accepting / cancelling selection
 - Can select multiple files

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
188. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

189. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

190. By Carlos Jose Mazieri

ActionPaths now is used in Actions.

Approved by Arto Jalkanen, Ubuntu Phone Apps Jenkins Bot.

191. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

192. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

193. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

194. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

195. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

196. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

197. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

198. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

199. By Victor Thompson

Fix qml errors occuring during application run. Fixes: https://bugs.launchpad.net/bugs/1316677.

Approved by Ubuntu Phone Apps Jenkins Bot.

200. By Leo Arias

Cleaned up the places autopilot tests.

Approved by Nicholas Skaggs, Ubuntu Phone Apps Jenkins Bot.

201. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

202. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

203. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

204. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

205. By Victor Thompson

* Don't turn off OSK
* Fix various test failures. Fixes: https://bugs.launchpad.net/bugs/1256856, https://bugs.launchpad.net/bugs/1316677, https://bugs.launchpad.net/bugs/1329818.

Approved by Brendan Donegan, Ubuntu Phone Apps Jenkins Bot, Leo Arias.

206. By Carlos Jose Mazieri

Code to complete Trash opearations: move into / restore from / restore all / empty trash.

Approved by Ubuntu Phone Apps Jenkins Bot, Arto Jalkanen.

207. By Carlos Jose Mazieri

some tests.

Approved by Ubuntu Phone Apps Jenkins Bot, Arto Jalkanen.

208. By Carlos Jose Mazieri

High level selection methods.

Approved by Arto Jalkanen, Ubuntu Phone Apps Jenkins Bot.

209. By David Planella

Add places model plugin.

Approved by Ubuntu Phone Apps Jenkins Bot.

210. By Leo Arias

Refactored the first group of context menu tests.

Approved by Nicholas Skaggs, Ubuntu Phone Apps Jenkins Bot.

211. By Nicholas Skaggs

Revert accidental merge. Fixes: https://bugs.launchpad.net/bugs/1331948.

Approved by Ubuntu Phone Apps Jenkins Bot.

212. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

213. By David Planella

Add places model plugin. Fixes: https://bugs.launchpad.net/bugs/1328332, https://bugs.launchpad.net/bugs/1330841, https://bugs.launchpad.net/bugs/1330843, https://bugs.launchpad.net/bugs/1330852, https://bugs.launchpad.net/bugs/1331702.

Approved by Ubuntu Phone Apps Jenkins Bot, Michael Spencer.

214. By Carlos Jose Mazieri

fixes the bug #1330223.

Approved by Carlos Jose Mazieri, Ubuntu Phone Apps Jenkins Bot.

215. By Carlos Jose Mazieri

removed PLUGIN_URI define directive and put it as hard coded in the plugin.h due to this define was not included in the CMakeLists.txt when changing build from qmake to cmake.

Approved by Carlos Jose Mazieri, Ubuntu Phone Apps Jenkins Bot.

Revision history for this message
Carlos Jose Mazieri (carlos-mazieri) wrote :

1. How do I test it?
   In order to see something I just changed the property FolderListPage::fileSelectorMode
   Otherwise it looks like normal filemanager

2. Running as I said above (maybe it is wrong) I could see the select button becomming enabled, but I would expect the item background color be changed.

3. %11 instead of %1
+ 89 + error(i18n.tr("File operation error"), i18n.tr("Unable to open '%11'").arg(filePath))

review: Needs Information
216. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Hi Carlos,

to test it you will need:

 - Compile and install FileManager as a click package
 - Compile and run this project: https://code.launchpad.net/~ken-vandine/+junk/hub-importer
 - From hub-importer you should be able to select FileManager as import source

Let me know if there's a problem.

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Carlos,

I added more comprehensive instructions for testing on desktop to the branch. After updating please see the file README.contentHubDesktop.

I hope I managed to put everything needed there. If not, let me know - I know I used weeks on this so better to ask if you hit a dead end than to waste time trying to figure it out, because I might have experienced the same problem.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

The content-hub implementation looks fine, I noticed a couple of more general issue you might want to look at though:

 * You'll need to merge from https://code.launchpad.net/~ajalkane/ubuntu-filemanager-app/content-hub-preliminary otherwise you'll run in to conflicts due to "Unable to open '%11'" having been fixed in that branch and also changed in a different way in this one.

 * There doesn't appear to be any visual indication that an item has been selected if it has a short name, items with long names that have been truncated get expanded and highlighted when selected, but items with names short enough not to be truncated don't appear to be highlighted.

 * It doesn't appear to be possible to select files from multiple directories, the original selection is lost when changing directory (this could be intentional though?)

review: Needs Fixing
217. By Alan Pope 🍺🐧🐱 🦄

bump framework. Fixes: https://bugs.launchpad.net/bugs/1336764.

Approved by Ubuntu Phone Apps Jenkins Bot.

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Thanks for looking into it.

 * Will do the merge

 * There SHOULD be visual indication. For me I see selected items' text in different color. I will try to reproduce this problem. I did only test with the list view, not with the icon view. Perhaps I forgot to make the changes to icon view.

 * This is as intended - That's how Ubuntu's file selection works also, you can't select files from several directories.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Michael,

I have done the merge and added support for highlighting items in item view (it was missing).

Carlos,

the README for building on desktop was incomplete. I have updated it accordingly (see the changes needed in manifest.json when building).

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Thanks Arto. Could you look into fixing the merge conflicts in the diff?

review: Needs Fixing
218. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

> Thanks Arto. Could you look into fixing the merge conflicts in the diff?

I will look into it on saturday.

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

> Thanks Arto. Could you look into fixing the merge conflicts in the diff?

I did the merge from trunk, and could build the click package. Unfortunately I'm unable to test because on 14.04 desktop at least I get following error when trying to install the click package (did apt-get update and apt-get dist-upgrade before this):

Cannot install ./com.ubuntu.filemanager_0.3.latest_i386.click: Framework "ubuntu-sdk-14.04-dev2" not present on system (use --force-missing-framework option to override)

So I just hope the merge is okay and perhaps Jenkins will complain if there's something more amiss.

219. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

Revision history for this message
David Planella (dpm) wrote :

On Sat, Jul 5, 2014 at 10:02 PM, Arto Jalkanen <email address hidden> wrote:

> > Thanks Arto. Could you look into fixing the merge conflicts in the diff?
>
> I did the merge from trunk, and could build the click package.
> Unfortunately I'm unable to test because on 14.04 desktop at least I get
> following error when trying to install the click package (did apt-get
> update and apt-get dist-upgrade before this):
>
> Cannot install ./com.ubuntu.filemanager_0.3.latest_i386.click: Framework
> "ubuntu-sdk-14.04-dev2" not present on system (use
> --force-missing-framework option to override)
>
>
Hi Arto,

Thanks for looking into this. You've got two options: either use the
--force-missing-framework as per the message above, or rather, as part of
the branch, fix the manifest to set the framework to ubuntu-sdk-14.*10*
-dev2.

I would recommend the later.

Cheers,
David.

220. By Alan Pope 🍺🐧🐱 🦄

Correctly fix framework. Fixes: https://bugs.launchpad.net/bugs/1336764.

Approved by David Planella, Ubuntu Phone Apps Jenkins Bot.

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

> On Sat, Jul 5, 2014 at 10:02 PM, Arto Jalkanen <email address hidden> wrote:
> Hi Arto,
>
> Thanks for looking into this. You've got two options: either use the
> --force-missing-framework as per the message above, or rather, as part of
> the branch, fix the manifest to set the framework to ubuntu-sdk-14.*10*
> -dev2.
>
> I would recommend the later.

The trunk got the ubuntu-sdk-14.10 fix into manifest.json. Unfortunately after merging it I still get the problem:

Cannot install ./com.ubuntu.filemanager_0.3.latest_i386.click: Framework "ubuntu-sdk-14.10-dev2" not present on system (use --force-missing-framework option to override)

I did manage to install it with --force-misosing-framework. But after doing "upstart-app-list" does not show FIleManager after that. Furthermore kenvandine's hub-importer failed to start now, not sure what that's related to, probably some dist-upgrade I did.

So I'll just push the changes and I hope they're okay from Jenkin's point of view.

Revision history for this message
David Planella (dpm) wrote :

On Sun, Jul 6, 2014 at 10:11 PM, Arto Jalkanen <email address hidden> wrote:

> > On Sat, Jul 5, 2014 at 10:02 PM, Arto Jalkanen <email address hidden>
> wrote:
> > Hi Arto,
> >
> > Thanks for looking into this. You've got two options: either use the
> > --force-missing-framework as per the message above, or rather, as part of
> > the branch, fix the manifest to set the framework to ubuntu-sdk-14.*10*
> > -dev2.
> >
> > I would recommend the later.
>
> The trunk got the ubuntu-sdk-14.10 fix into manifest.json. Unfortunately
> after merging it I still get the problem:
>
> Cannot install ./com.ubuntu.filemanager_0.3.latest_i386.click: Framework
> "ubuntu-sdk-14.10-dev2" not present on system (use
> --force-missing-framework option to override)
>
> I did manage to install it with --force-misosing-framework. But after
> doing "upstart-app-list" does not show FIleManager after that. Furthermore
> kenvandine's hub-importer failed to start now, not sure what that's related
> to, probably some dist-upgrade I did.
>

Hi Arto, a few questions:

- How are you installing the click package?
- Are you using a device, or the emulator? Which Ubuntu image are you using?
- Why are you using upstart-app-list instead of 'click list' to list the
installed packages? And what is the output of 'click list'?
- What is the output of 'click framework list'?

Cheers,
David.

>
> So I'll just push the changes and I hope they're okay from Jenkin's point
> of view.
>
>
> --
>
> https://code.launchpad.net/~ajalkane/ubuntu-filemanager-app/content-hub-multiselection/+merge/220135
> You are reviewing the proposed merge of
> lp:~ajalkane/ubuntu-filemanager-app/content-hub-multiselection into
> lp:ubuntu-filemanager-app.
>

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Arto Jalkanen (ajalkane) wrote :

> On Sun, Jul 6, 2014 at 10:11 PM, Arto Jalkanen <email address hidden> wrote:
>
> Hi Arto, a few questions:
>
> - How are you installing the click package?

Like this:

sudo click install --user=$USER ./com.ubuntu.filemanager_0.3.latest_i386.click

> - Are you using a device, or the emulator? Which Ubuntu image are you using?

I'm using desktop (14.04). This was recommended to me. I spent about two months battling with the emulator, but after a suggestion got it working in desktop. Never managed to get it working in emulator and I don't fancy trying to battle with the emulator anytime soon :P.

> - Why are you using upstart-app-list instead of 'click list' to list the
> installed packages? And what is the output of 'click list'?

This was my mistake. Should have used "click list", and using that the FileManager package is shown.

> - What is the output of 'click framework list'?

click: error: unknown command: framework

Revision history for this message
David Planella (dpm) wrote :

On Tue, Jul 8, 2014 at 10:30 PM, Arto Jalkanen <email address hidden> wrote:

> > On Sun, Jul 6, 2014 at 10:11 PM, Arto Jalkanen <email address hidden>
> wrote:
> >
> > Hi Arto, a few questions:
> >
> > - How are you installing the click package?
>
> Like this:
>
> sudo click install --user=$USER
> ./com.ubuntu.filemanager_0.3.latest_i386.click
>
>
Ah, ok. I'm not sure how good the support for click packages on a Unity 7
session is, though.

> > - Are you using a device, or the emulator? Which Ubuntu image are you
> using?
>
> I'm using desktop (14.04). This was recommended to me. I spent about two
> months battling with the emulator, but after a suggestion got it working in
> desktop. Never managed to get it working in emulator and I don't fancy
> trying to battle with the emulator anytime soon :P.
>
>
It's actually not that hard anymore, you can do everything from within Qt
Creator, and the i386 emulator is much, much faster!

You'll find a video with an intro here:
- http://youtu.be/z7v_N2fKuP0

And the slides:
-
http://www.slideshare.net/DavidPlanella/app-development-with-the-ubuntu-emulator

> > - Why are you using upstart-app-list instead of 'click list' to list the
> > installed packages? And what is the output of 'click list'?
>
> This was my mistake. Should have used "click list", and using that the
> FileManager package is shown.
>
> > - What is the output of 'click framework list'?
>
> click: error: unknown command: framework
>

In this case I believe you're using an old version of click. Do you have
the SDK team PPA installed, and is your 14.04 system up-to-date?

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

> On Tue, Jul 8, 2014 at 10:30 PM, Arto Jalkanen <email address hidden> wrote:
> > sudo click install --user=$USER
> > ./com.ubuntu.filemanager_0.3.latest_i386.click
> >
> >
> Ah, ok. I'm not sure how good the support for click packages on a Unity 7
> session is, though.
>
> It's actually not that hard anymore, you can do everything from within Qt
> Creator, and the i386 emulator is much, much faster!
>
> You'll find a video with an intro here:
> - http://youtu.be/z7v_N2fKuP0
>
> And the slides:
> -
> http://www.slideshare.net/DavidPlanella/app-development-with-the-ubuntu-
> emulator

Thanks. These seem like good information once I need to venture again into the emulator wonder-land :).

> > > - What is the output of 'click framework list'?
> >
> > click: error: unknown command: framework
>
> In this case I believe you're using an old version of click. Do you have
> the SDK team PPA installed, and is your 14.04 system up-to-date?

This was the problem. My SDK team PPA was disabled, I guess due to some update I had done.

Now it works and lists:

ubuntu-sdk-13.10
ubuntu-sdk-14.04-dev1
ubuntu-sdk-14.04-html-dev1
ubuntu-sdk-14.04-papi-dev1
ubuntu-sdk-14.04-qml-dev1

I tried running File Manager directly with:

upstart-app-launch com.ubuntu.filemanager_filemanager_0.3.latest

But File Manager would not start. The logs were not helpful:

cat ~/.cache/upstart/application-click-com.ubuntu.filemanager_filemanager_0.3.latest.log
pgrep: invalid user name: system

But it doesn't much matter. The merges from FileManager trunk are something that should not impede on content-hub integration changes I've done as such, and I have tested that it works on previous SDKs. Jenkins seems to be ok with the current changes, but of course it would be nice if anyone with working environment can do a quick check that File Manager at least can be started.

221. By Jason

Change 'caller' of GoToDialog to mainView. Fixes: https://bugs.launchpad.net/bugs/1331333.

Approved by Ubuntu Phone Apps Jenkins Bot, Arto Jalkanen.

222. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Top approving this since all the issues raised have been fixed.

review: Approve
223. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
224. By Arto Jalkanen

ContentHub file selecting support improved:

 - Buttons for accepting / cancelling selection
 - Can select multiple files.

Approved by Ubuntu Phone Apps Jenkins Bot, Arto Jalkanen.

225. By Alan Pope 🍺🐧🐱 🦄

Fix bug in tests. Fixes: https://bugs.launchpad.net/bugs/1342336.

Approved by Nicholas Skaggs, Ubuntu Phone Apps Jenkins Bot.

226. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

227. By Francis Ginther

Change version string to include bzr revno.

Approved by Ubuntu Phone Apps Jenkins Bot, Alan Pope ㋛.

228. By Francis Ginther

Move manifest.json to manifest.json.in to allow for cmake configure_file(), to correct the presence of @BZR_REVNO@ in the version string.

Approved by Ubuntu Phone Apps Jenkins Bot, Alan Pope ㋛.

229. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

230. By Alan Pope 🍺🐧🐱 🦄

fix 1343505 to remove urls. Fixes: https://bugs.launchpad.net/bugs/1343505.

Approved by Nicholas Skaggs, Ubuntu Phone Apps Jenkins Bot.

231. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

232. By David Planella

Fix to get the tests to go to places working again. Going forward, we should probably add the objectName to the model in the plugin instead. Fixes: https://bugs.launchpad.net/bugs/1342336.

Approved by Brendan Donegan, Ubuntu Phone Apps Jenkins Bot.

233. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

234. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

235. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

236. By Paweł Stołowski

Added X-Ubuntu-Default-Department-ID key to the desktop file. This is required by click scope to support departments for preinstalled applications.

Approved by Ubuntu Phone Apps Jenkins Bot.

237. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

238. By Launchpad Translations on behalf of ubuntu-filemanager-dev

Launchpad automatic translations update.

239. By David Planella

Makes the root locations in the path bar human-readable. Fixes: https://bugs.launchpad.net/bugs/1331699.

Approved by Ubuntu Phone Apps Jenkins Bot, Arto Jalkanen.

240. By David Planella

Fixes the missing dependency on the places plugin. Fixes: https://bugs.launchpad.net/bugs/1336464.

Approved by Alan Pope ㋛, Ubuntu Phone Apps Jenkins Bot.

241. By Arto Jalkanen

Bug 1347010: UI for only displaying files in MTP directories. For now, "Show all files" is always visible at start and non-MTP directories are not viewable. After clicking "Show all files", all files are shown.

TODO:
 - "Show all files" only when user has set PIN/password, if not all files are automatically shown
 - When "Show all files" clicked query PIN/password from user and if it's valid only then display all files

242. By Arto Jalkanen

A stub for PAM Authentication plugin. For now returns always true for authentication required and validation.

243. By Arto Jalkanen

Added authentication dialog, and a authentication failed notification.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'README.contentHubDesktop'
2--- README.contentHubDesktop 1970-01-01 00:00:00 +0000
3+++ README.contentHubDesktop 2014-07-08 20:16:44 +0000
4@@ -0,0 +1,65 @@
5+# Ubuntu File Manager
6+
7+File manager app for Ubuntu on the desktop and on mobile devices.
8+
9+## Testing Content-Hub support
10+
11+### For the desktop
12+
13+Install the following dependencies to run click applications:
14+
15+ sudo apt-get install upstart-app-launch-tools
16+
17+#### Build FileManager and install FileManager as click package
18+
19+Build FileManager as a click package and install it. At the time of this writing
20+this doesn't seem to be working with the SDK (due to cmake), but it can be done
21+from command line:
22+
23+First you must modify manifest.json and replace "architecture" value of "armhf" with "i386".
24+Just remember to change it back to armhf if you commit changes.
25+
26+After that you can build x86 version of the package and install it:
27+
28+ QT_SELECT=qt5 cmake . -DCLICK_MODE=1 && make -j2 && make install DESTDIR=install && click build install
29+ sudo click install --user=$USER ./com.ubuntu.filemanager_0.3.latest_i386.click
30+
31+#### Build and install hub-importer as click package
32+
33+Get the sources for building:
34+
35+ bzr branch lp:~ken-vandine/+junk/hub-importer
36+
37+You should be able to create click package out of it in SDK by opening the project and using Publish and Create package.
38+
39+Install the created package (example):
40+
41+ sudo click install --user=$USER com.ubuntu.developer.ken-vandine.hub-importer_0.2_all.click
42+
43+#### Running test
44+
45+Run hub-importer (example):
46+
47+ upstart-app-launch com.ubuntu.developer.ken-vandine.hub-importer_hub-importer_0.2
48+
49+Click "Select source" button.
50+
51+You should see File Manager as one of the choices. If you do not see File Manager, look at "Troubleshooting" section.
52+Click on File Manager, and File Manager should start. Now you should choose some pictures as that's the only thing
53+supported at the moment (even though FileManager allows selecting any type). You can select multiple files in a
54+directory if you so choose. Once you're satisfied with the seelction, click "Select". You should see the pictures
55+then in Hub Importer.
56+
57+#### Troubleshooting
58+
59+ - If you don't see File Manager as one of the choises in Hub Importer, then quit Hub Importer and run this script:
60+ /usr/lib/i386-linux-gnu/content-hub/content-hub-peer-hook
61+ Try running Hub Importer again after that and File Manager should show.
62+ If the above script does not exist, you can try locating something similar with:
63+ locate hook
64+ - If you have trouble running Hub Importer or the above still doesn't work, check the installed click packages with:
65+ click list
66+ It should show entry for both File Manager and Hub Importer. If it does not, installing the click package has not succeeded
67+ - If all else fails, check the logs for both Hub Importer and File Manager for further clues at:
68+ $HOME/.cache/upstart/
69+
70
71=== modified file 'apparmor.json'
72--- apparmor.json 2014-07-02 12:28:30 +0000
73+++ apparmor.json 2014-07-08 20:16:44 +0000
74@@ -2,4 +2,4 @@
75 "policy_version": 1.2,
76 "template": "unconfined",
77 "policy_groups": []
78-}
79+}
80\ No newline at end of file
81
82=== modified file 'manifest.json'
83--- manifest.json 2014-07-08 20:16:44 +0000
84+++ manifest.json 2014-07-08 20:16:44 +0000
85@@ -1,6 +1,7 @@
86 {
87 "description": "File Manager application",
88 "framework": "ubuntu-sdk-14.10-dev2",
89+ "_comment": "put i386 to architecture if you want build for x86, armhf for arm devices",
90 "architecture": "armhf",
91 "hooks": {
92 "filemanager": {
93
94=== modified file 'src/app/qml/components/FolderIconDelegate.qml'
95--- src/app/qml/components/FolderIconDelegate.qml 2014-06-22 12:45:32 +0000
96+++ src/app/qml/components/FolderIconDelegate.qml 2014-07-08 20:16:44 +0000
97@@ -36,7 +36,7 @@
98 radius: units.gu(2)
99 smooth: true
100 antialiasing: true
101- opacity: selected ? 0.5 : 0
102+ opacity: model.isSelected ? 0.5 : 0
103 color: UbuntuColors.orange
104
105 Behavior on opacity {
106
107=== modified file 'src/app/qml/components/FolderListDelegate.qml'
108--- src/app/qml/components/FolderListDelegate.qml 2014-06-22 12:45:32 +0000
109+++ src/app/qml/components/FolderListDelegate.qml 2014-07-08 20:16:44 +0000
110@@ -34,4 +34,6 @@
111
112 progression: model.isDir
113 iconFrame: false
114+
115+ selected: model.isSelected
116 }
117
118=== modified file 'src/app/qml/filemanager.qml'
119--- src/app/qml/filemanager.qml 2014-07-08 20:16:44 +0000
120+++ src/app/qml/filemanager.qml 2014-07-08 20:16:44 +0000
121@@ -21,11 +21,8 @@
122 import Ubuntu.Components.Popups 0.1
123 import Ubuntu.Unity.Action 1.0 as UnityActions
124 import U1db 1.0 as U1db
125-<<<<<<< TREE
126+import Ubuntu.Content 0.1
127 import com.ubuntu.PlacesModel 0.1
128-=======
129-import Ubuntu.Content 0.1
130->>>>>>> MERGE-SOURCE
131
132 import "ui"
133
134@@ -65,12 +62,6 @@
135 backgroundColor: "#797979"
136 footerColor: "#808080"
137
138-<<<<<<< TREE
139- PlacesModel {
140- id: userplaces
141- }
142-
143-=======
144 QtObject {
145 id: fileSelector
146 property var activeTransfer: null
147@@ -82,7 +73,10 @@
148 ContentItem {}
149 }
150
151->>>>>>> MERGE-SOURCE
152+ PlacesModel {
153+ id: userplaces
154+ }
155+
156 // HUD Actions
157 Action {
158 id: settingsAction
159@@ -117,16 +111,18 @@
160 function cancelFileSelector() {
161 console.log("Cancel file selector")
162 pageStack.pop()
163- // fileSelector.fileSelectorCompeonnt = null
164-
165+ fileSelector.fileSelectorComponent = null
166+ fileSelector.activeTransfer.state = ContentTransfer.Aborted
167 }
168
169- function acceptFileSelector(fileUrl) {
170- console.log("accept file selector " + fileUrl)
171- var result = fileSelectorResultComponent.createObject(mainView);
172- result.url = fileUrl
173+ function acceptFileSelector(fileUrls) {
174+ console.log("accept file selector " + fileUrls)
175+ var results = fileUrls.map(function(fileUrl) {
176+ return fileSelectorResultComponent.createObject(mainView, {"url": fileUrl})
177+ })
178+
179 if (fileSelector.activeTransfer !== null) {
180- fileSelector.activeTransfer.items = [ result ]
181+ fileSelector.activeTransfer.items = results
182 fileSelector.activeTransfer.state = ContentTransfer.Charged
183 console.log("set activeTransfer")
184 } else {
185
186=== modified file 'src/app/qml/ui/FolderListPage.qml'
187--- src/app/qml/ui/FolderListPage.qml 2014-07-08 20:16:44 +0000
188+++ src/app/qml/ui/FolderListPage.qml 2014-07-08 20:16:44 +0000
189@@ -37,9 +37,11 @@
190 property string folder
191 property bool loading: pageModel.awaitingResults
192
193- // Set to true if called as file selector
194+ // Set to true if called as file selector for ContentHub
195 property bool fileSelectorMode: false
196
197+ property FolderListSelection selectionManager: pageModel.selectionObject()
198+
199 onShowHiddenFilesChanged: {
200 pageModel.showHiddenFiles = folderListPage.showHiddenFiles
201 }
202@@ -237,38 +239,6 @@
203 }
204 }
205
206-<<<<<<< TREE
207-=======
208- Component {
209- id: selectFileDialog
210- ConfirmDialog {
211- property string filePath
212-
213- title: i18n.tr("Confirm selection")
214- text: filePath
215-
216- onAccepted: {
217- console.log("Create file accepted", filePath)
218- // IMPROVE: for now single select
219- acceptFileSelector("file:/" + filePath)
220- }
221- }
222- }
223-
224-
225- function openFile(filePath) {
226- // Just temporarily like this... finally should highlight selection and use buttons
227- if (fileSelectorMode) {
228- PopupUtils.open(selectFileDialog, folderListPage, { filePath: pageModel.path + "/" + filePath })
229- }
230- else {
231- if (!pageModel.openPath(filePath)) {
232- error(i18n.tr("File operation error"), i18n.tr("Unable to open '%1'").arg(filePath))
233- }
234- }
235- }
236-
237->>>>>>> MERGE-SOURCE
238 tools: ToolbarItems {
239 id: toolbar
240 locked: showToolbar
241@@ -378,6 +348,49 @@
242 expanded: showSidebar
243 }
244
245+ Item {
246+ id: bottomBar
247+ anchors {
248+ bottom: parent.bottom
249+ left: sidebar.right
250+ right: parent.right
251+ }
252+ height: fileSelectorMode ? bottomBarFileSelectorButtons.height : 0
253+ visible: fileSelectorMode
254+
255+ }
256+
257+ Row {
258+ id: bottomBarFileSelectorButtons
259+ anchors.horizontalCenter: parent.horizontalCenter
260+ anchors.bottom: bottomBar.bottom
261+ spacing: units.gu(5)
262+ visible: fileSelectorMode
263+
264+ Button {
265+ text: i18n.tr("Select")
266+ enabled: selectionManager.counter > 0
267+ onClicked: {
268+ var selectedAbsPaths = selectionManager.selectedAbsFilePaths();
269+ // For now support only selection in filesystem
270+ var selectedAbsUrls = selectedAbsPaths.map(function(item) {
271+ return "file://" + item;
272+ });
273+ console.log("FileSelector OK clicked, selected items: " + selectedAbsUrls)
274+
275+ acceptFileSelector(selectedAbsUrls)
276+ }
277+ }
278+ Button {
279+ text: i18n.tr("Cancel")
280+ onClicked: {
281+ console.log("FileSelector cancelled")
282+ cancelFileSelector()
283+ }
284+ }
285+ }
286+
287+
288 FolderIconView {
289 id: folderIconView
290
291@@ -387,6 +400,7 @@
292 anchors {
293 top: parent.top
294 bottom: parent.bottom
295+ bottomMargin: bottomBar.height
296 left: sidebar.right
297 right: parent.right
298 }
299@@ -403,6 +417,7 @@
300 anchors {
301 top: parent.top
302 bottom: parent.bottom
303+ bottomMargin: bottomBar.height
304 left: sidebar.right
305 right: parent.right
306 }
307@@ -711,7 +726,13 @@
308 }
309 } else {
310 console.log("Non dir clicked")
311- openFile(model.fileName)
312+ if (fileSelectorMode) {
313+ selectionManager.select(model.index,
314+ false,
315+ true);
316+ } else {
317+ openFile(model.fileName)
318+ }
319 // PopupUtils.open(Qt.resolvedUrl("FileActionDialog.qml"), root,
320 // {
321 // fileName: model.fileName,

Subscribers

People subscribed via source and target branches