Merge lp:~artmello/gallery-app/gallery-app-sdk_1_3 into lp:gallery-app
- gallery-app-sdk_1_3
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Renato Araujo Oliveira Filho | ||||
Approved revision: | 1271 | ||||
Merged at revision: | 1243 | ||||
Proposed branch: | lp:~artmello/gallery-app/gallery-app-sdk_1_3 | ||||
Merge into: | lp:gallery-app | ||||
Diff against target: |
3436 lines (+589/-1177) 83 files modified
rc/qml/AlbumEditor/AlbumCoverMenu.qml (+3/-3) rc/qml/AlbumEditor/AlbumEditMenu.qml (+4/-4) rc/qml/AlbumEditor/AlbumEditor.qml (+10/-20) rc/qml/AlbumViewer/AlbumCover.qml (+3/-3) rc/qml/AlbumViewer/AlbumCoverList.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageContents.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipper.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipperPage.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayout.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutAdd.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftDoubleLandscape.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftPortrait.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightDoubleLandscape.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightPortrait.qml (+2/-2) rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml (+2/-2) rc/qml/AlbumViewer/AlbumOpener.qml (+2/-2) rc/qml/AlbumViewer/AlbumPageComponent.qml (+2/-2) rc/qml/AlbumViewer/AlbumPageIndicator.qml (+3/-3) rc/qml/AlbumViewer/AlbumPreviewComponent.qml (+2/-2) rc/qml/AlbumViewer/AlbumSpreadViewer.qml (+2/-2) rc/qml/AlbumViewer/AlbumViewer.qml (+35/-39) rc/qml/AlbumViewer/AlbumViewerAnimated.qml (+3/-3) rc/qml/AlbumViewer/AlbumViewerTransition.qml (+0/-404) rc/qml/AlbumViewer/AlbumViewerTransitionPortraitPage.qml (+0/-171) rc/qml/AlbumsOverview.qml (+59/-46) rc/qml/Components/AspectArea.qml (+2/-2) rc/qml/Components/Checkerboard.qml (+3/-10) rc/qml/Components/CheckerboardDelegate.qml (+2/-2) rc/qml/Components/DeleteDialog.qml (+4/-4) rc/qml/Components/DeleteOrDeleteWithContentsDialog.qml (+5/-5) rc/qml/Components/EventCard.qml (+4/-4) rc/qml/Components/MediaGrid.qml (+7/-5) rc/qml/Components/MediaSelector.qml (+3/-3) rc/qml/Components/MouseAreaWithMultipoint.qml (+2/-2) rc/qml/Components/PopupAlbumPicker.qml (+4/-4) rc/qml/Components/SwipeArea.qml (+3/-3) rc/qml/Components/TextEditOnClick.qml (+2/-2) rc/qml/EventsOverview.qml (+63/-30) rc/qml/GalleryApplication.qml (+4/-4) rc/qml/LoadingScreen.qml (+3/-10) rc/qml/MainScreen.qml (+21/-18) rc/qml/MediaViewer/ExtrasPhotoEditorPage.qml (+5/-5) rc/qml/MediaViewer/GalleryPhotoComponent.qml (+2/-2) rc/qml/MediaViewer/GalleryPhotoEditorPage.qml (+4/-4) rc/qml/MediaViewer/MediaListView.qml (+3/-3) rc/qml/MediaViewer/MediaViewer.qml (+25/-14) rc/qml/MediaViewer/PhotoEditor.qml (+4/-4) rc/qml/MediaViewer/PhotoEditor/ActionsBar.qml (+4/-4) rc/qml/MediaViewer/PhotoEditor/BusyIndicator.qml (+2/-2) rc/qml/MediaViewer/PhotoEditor/CropCorner.qml (+3/-3) rc/qml/MediaViewer/PhotoEditor/CropDragArea.qml (+2/-2) rc/qml/MediaViewer/PhotoEditor/CropInteractor.qml (+3/-3) rc/qml/MediaViewer/PhotoEditor/CropOverlay.qml (+3/-3) rc/qml/MediaViewer/PhotoEditor/EditStack.qml (+3/-3) rc/qml/MediaViewer/PhotoEditor/ExposureAdjuster.qml (+3/-3) rc/qml/MediaViewer/PhotoViewerTransition.qml (+2/-2) rc/qml/MediaViewer/PopupPhotoViewer.qml (+26/-10) rc/qml/MediaViewer/SingleMediaViewer.qml (+6/-6) rc/qml/OrganicView/OrganicAlbumView.qml (+2/-2) rc/qml/OrganicView/OrganicItemInteraction.qml (+3/-3) rc/qml/OrganicView/OrganicMediaList.qml (+7/-6) rc/qml/OrganicView/OrganicView.qml (+3/-10) rc/qml/PhotosOverview.qml (+62/-37) rc/qml/PickerScreen.qml (+3/-11) rc/qml/Utility/DissolveAnimation.qml (+2/-2) rc/qml/Utility/EditingHUD.qml (+3/-3) rc/qml/Utility/ExpandAnimation.qml (+2/-2) rc/qml/Utility/FadeInAnimation.qml (+2/-2) rc/qml/Utility/FadeOutAnimation.qml (+2/-2) rc/qml/Utility/PhotosToolbarActions.qml (+0/-57) rc/qml/Utility/SelectionState.qml (+2/-2) rc/qml/Utility/SelectionToolbarAction.qml (+0/-82) src/photo/photo.cpp (+1/-0) src/photo/photo.h (+4/-1) tests/autopilot/gallery_app/emulators/album_view.py (+27/-0) tests/autopilot/gallery_app/emulators/photo_viewer.py (+35/-12) tests/autopilot/gallery_app/emulators/picker_screen.py (+3/-3) tests/autopilot/gallery_app/tests/test_album_editor.py (+1/-1) tests/autopilot/gallery_app/tests/test_album_view.py (+22/-14) tests/autopilot/gallery_app/tests/test_albums_view.py (+2/-3) tests/autopilot/gallery_app/tests/test_events_view.py (+2/-3) tests/autopilot/gallery_app/tests/test_photo_viewer.py (+15/-9) tests/autopilot/gallery_app/tests/test_photos_view.py (+2/-3) |
||||
To merge this branch: | bzr merge lp:~artmello/gallery-app/gallery-app-sdk_1_3 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Renato Araujo Oliveira Filho (community) | Approve | ||
Review via email:
|
Commit message
Update QML code to work with Ubuntu.Components 1.3
Description of the change
Update QML code to work with Ubuntu.Components 1.3
- 1247. By Arthur Mello
-
Fix camera icon on Photos/Events view
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
- 1248. By Arthur Mello
-
Fix header on AlbumViewer and PopupPhotoViewer
Fix camera icon on AlbumsOverview
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1247
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1249. By Arthur Mello
-
Toggle header visibility
- 1250. By Arthur Mello
-
Fix typo
- 1251. By Arthur Mello
-
Fix toggle fullscreen
- 1252. By Arthur Mello
-
Fix header visibility and fullscreen on AlbumViewer
- 1253. By Arthur Mello
-
Fix check for camera button on PhotosView
- 1254. By Arthur Mello
-
Fix camera button check for events view
- 1255. By Arthur Mello
-
Fix check for camera button in Albums view
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1248
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1255
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1256. By Arthur Mello
-
Fix aspect ratio of thumbnails for Events/Photos overview
- 1257. By Arthur Mello
-
Make share picker header equal from MediaViewer and Photos/Events view
- 1258. By Arthur Mello
-
Fix PickerScreen
- 1259. By Arthur Mello
-
Fix AP tests for PopupPhotoViewer
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1258
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1260. By Arthur Mello
-
Fix AP tests related with AlbumViewer
- 1261. By Arthur Mello
-
Fix flake8 issues
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1259
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1262. By Arthur Mello
-
Fix AP tests
- 1263. By Arthur Mello
-
Fix canBeEdited property to remove warning log message
- 1264. By Arthur Mello
-
Fix header issue on PopupPhotoViewer
- 1265. By Arthur Mello
-
Remove legacy code from old album viewer animations not used anymore
- 1266. By Arthur Mello
-
Move AlbumEditor to a Loader
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1261
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1261
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1267. By Arthur Mello
-
Update version for other Ubuntu imports
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renato Araujo Oliveira Filho (renatofilho) : | # |
- 1268. By Arthur Mello
-
Update all QtQuick imports
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renato Araujo Oliveira Filho (renatofilho) : | # |
- 1269. By Arthur Mello
-
Fix typo
- 1270. By Arthur Mello
-
Fix more QtQuick imports
- 1271. By Arthur Mello
-
Fix GalleryApplication import
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
code looks good.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1266
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1266
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === removed file 'rc/img/background-paper.png' |
2 | Binary files rc/img/background-paper.png 2012-06-06 19:42:55 +0000 and rc/img/background-paper.png 1970-01-01 00:00:00 +0000 differ |
3 | === removed file 'rc/img/camera@18.png' |
4 | Binary files rc/img/camera@18.png 2012-12-06 10:33:29 +0000 and rc/img/camera@18.png 1970-01-01 00:00:00 +0000 differ |
5 | === removed file 'rc/img/select@18.png' |
6 | Binary files rc/img/select@18.png 2012-12-06 10:33:29 +0000 and rc/img/select@18.png 1970-01-01 00:00:00 +0000 differ |
7 | === modified file 'rc/qml/AlbumEditor/AlbumCoverMenu.qml' |
8 | --- rc/qml/AlbumEditor/AlbumCoverMenu.qml 2015-02-16 22:52:55 +0000 |
9 | +++ rc/qml/AlbumEditor/AlbumCoverMenu.qml 2015-11-05 19:26:06 +0000 |
10 | @@ -17,9 +17,9 @@ |
11 | * Eric Gregory <eric@yorba.org> |
12 | */ |
13 | |
14 | -import QtQuick 2.0 |
15 | -import Ubuntu.Components.Popups 0.1 |
16 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
17 | +import QtQuick 2.4 |
18 | +import Ubuntu.Components.Popups 1.3 |
19 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
20 | import "../AlbumViewer" |
21 | |
22 | /*! |
23 | |
24 | === modified file 'rc/qml/AlbumEditor/AlbumEditMenu.qml' |
25 | --- rc/qml/AlbumEditor/AlbumEditMenu.qml 2013-07-17 12:52:46 +0000 |
26 | +++ rc/qml/AlbumEditor/AlbumEditMenu.qml 2015-11-05 19:26:06 +0000 |
27 | @@ -1,5 +1,5 @@ |
28 | /* |
29 | - * Copyright (C) 2012 Canonical Ltd |
30 | + * Copyright (C) 2012-2015 Canonical Ltd |
31 | * |
32 | * This program is free software: you can redistribute it and/or modify |
33 | * it under the terms of the GNU General Public License version 3 as |
34 | @@ -17,9 +17,9 @@ |
35 | * Eric Gregory <eric@yorba.org> |
36 | */ |
37 | |
38 | -import QtQuick 2.0 |
39 | -import Ubuntu.Components.Popups 0.1 |
40 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
41 | +import QtQuick 2.4 |
42 | +import Ubuntu.Components.Popups 1.3 |
43 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
44 | |
45 | /*! |
46 | Popover to show the context menu for an album |
47 | |
48 | === modified file 'rc/qml/AlbumEditor/AlbumEditor.qml' |
49 | --- rc/qml/AlbumEditor/AlbumEditor.qml 2014-12-11 01:37:01 +0000 |
50 | +++ rc/qml/AlbumEditor/AlbumEditor.qml 2015-11-05 19:26:06 +0000 |
51 | @@ -1,5 +1,5 @@ |
52 | /* |
53 | - * Copyright (C) 2011-2012 Canonical Ltd |
54 | + * Copyright (C) 2011-2015 Canonical Ltd |
55 | * |
56 | * This program is free software: you can redistribute it and/or modify |
57 | * it under the terms of the GNU General Public License version 3 as |
58 | @@ -18,10 +18,10 @@ |
59 | * Eric Gregory <eric@yorba.org> |
60 | */ |
61 | |
62 | -import QtQuick 2.0 |
63 | +import QtQuick 2.4 |
64 | import Gallery 1.0 |
65 | -import Ubuntu.Components 1.1 |
66 | -import Ubuntu.Components.Popups 0.1 |
67 | +import Ubuntu.Components 1.3 |
68 | +import Ubuntu.Components.Popups 1.3 |
69 | import "../../js/GalleryUtility.js" as GalleryUtility |
70 | import "../../js/GraphicsRoutines.js" as GraphicsRoutines |
71 | import "../AlbumViewer" |
72 | @@ -87,8 +87,6 @@ |
73 | */ |
74 | property real canonicalHeight: units.gu(80) |
75 | |
76 | - property Rectangle backgroundGlass: overviewGlass |
77 | - |
78 | property bool showAlbumCover: true |
79 | |
80 | /*! |
81 | @@ -119,16 +117,6 @@ |
82 | editorRect = GalleryUtility.getRectRelativeTo(cover.internalRect, albumEditor); |
83 | } |
84 | |
85 | - Rectangle { |
86 | - id: overviewGlass |
87 | - width: parent.width |
88 | - height: header ? parent.height - header.height : parent.height |
89 | - y: header.height |
90 | - |
91 | - color: "black" |
92 | - opacity: 0.0 |
93 | - } |
94 | - |
95 | onAlbumChanged: resetEditorRect() // HACK: works, but not conceptually correct. |
96 | onWidthChanged: resetEditorRect() |
97 | onHeightChanged: resetEditorRect() |
98 | @@ -143,10 +131,12 @@ |
99 | acceptedButtons: Qt.LeftButton | Qt.RightButton |
100 | anchors.fill: parent |
101 | onPressed: { |
102 | - coverMenu.hide(); |
103 | + if (coverMenu) { |
104 | + coverMenu.hide(); |
105 | + } |
106 | cover.editingDone(); |
107 | - closeAlbum(); |
108 | - |
109 | + if(album.newAlbum) |
110 | + albumModel.destroyAlbum(album); |
111 | albumEditor.closeRequested(albumEditor.album, false); |
112 | } |
113 | } |
114 | @@ -155,7 +145,7 @@ |
115 | id: coverArea |
116 | |
117 | x: (parent.width - width) / 2 |
118 | - y: Math.max((parent.height - height) / 2, minimumTopMargin, header.height) |
119 | + y: Math.max((parent.height - height) / 2, minimumTopMargin) |
120 | |
121 | width: GraphicsRoutines.clamp( |
122 | preferredCoverWidth, minimumCoverWidth, canonicalWidth) |
123 | |
124 | === modified file 'rc/qml/AlbumViewer/AlbumCover.qml' |
125 | --- rc/qml/AlbumViewer/AlbumCover.qml 2014-10-10 01:24:24 +0000 |
126 | +++ rc/qml/AlbumViewer/AlbumCover.qml 2015-11-05 19:26:06 +0000 |
127 | @@ -1,5 +1,5 @@ |
128 | /* |
129 | - * Copyright (C) 2012 Canonical Ltd |
130 | + * Copyright (C) 2012-2015 Canonical Ltd |
131 | * |
132 | * This program is free software: you can redistribute it and/or modify |
133 | * it under the terms of the GNU General Public License version 3 as |
134 | @@ -19,9 +19,9 @@ |
135 | * Eric Gregory <eric@yorba.org> |
136 | */ |
137 | |
138 | -import QtQuick 2.0 |
139 | +import QtQuick 2.4 |
140 | import Gallery 1.0 |
141 | -import Ubuntu.Components 0.1 |
142 | +import Ubuntu.Components 1.3 |
143 | import "../Components" |
144 | |
145 | /*! |
146 | |
147 | === modified file 'rc/qml/AlbumViewer/AlbumCoverList.qml' |
148 | --- rc/qml/AlbumViewer/AlbumCoverList.qml 2013-06-20 11:54:49 +0000 |
149 | +++ rc/qml/AlbumViewer/AlbumCoverList.qml 2015-11-05 19:26:06 +0000 |
150 | @@ -1,5 +1,5 @@ |
151 | /* |
152 | - * Copyright (C) 2012 Canonical Ltd |
153 | + * Copyright (C) 2012-2015 Canonical Ltd |
154 | * |
155 | * This program is free software: you can redistribute it and/or modify |
156 | * it under the terms of the GNU General Public License version 3 as |
157 | @@ -17,7 +17,7 @@ |
158 | * Eric Gregory <eric@yorba.org> |
159 | */ |
160 | |
161 | -import QtQuick 2.0 |
162 | +import QtQuick 2.4 |
163 | import Gallery 1.0 |
164 | |
165 | /*! |
166 | |
167 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageContents.qml' |
168 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageContents.qml 2014-03-19 15:15:28 +0000 |
169 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageContents.qml 2015-11-05 19:26:06 +0000 |
170 | @@ -1,5 +1,5 @@ |
171 | /* |
172 | - * Copyright (C) 2012 Canonical Ltd |
173 | + * Copyright (C) 2012-2015 Canonical Ltd |
174 | * |
175 | * This program is free software: you can redistribute it and/or modify |
176 | * it under the terms of the GNU General Public License version 3 as |
177 | @@ -17,7 +17,7 @@ |
178 | * Charles Lindsay <chaz@yorba.org> |
179 | */ |
180 | |
181 | -import QtQuick 2.0 |
182 | +import QtQuick 2.4 |
183 | import Gallery 1.0 |
184 | import ".." |
185 | |
186 | |
187 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipper.qml' |
188 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipper.qml 2013-03-06 10:36:54 +0000 |
189 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipper.qml 2015-11-05 19:26:06 +0000 |
190 | @@ -1,5 +1,5 @@ |
191 | /* |
192 | - * Copyright (C) 2012 Canonical Ltd |
193 | + * Copyright (C) 2012-2015 Canonical Ltd |
194 | * |
195 | * This program is free software: you can redistribute it and/or modify |
196 | * it under the terms of the GNU General Public License version 3 as |
197 | @@ -17,7 +17,7 @@ |
198 | * Charles Lindsay <chaz@yorba.org> |
199 | */ |
200 | |
201 | -import QtQuick 2.0 |
202 | +import QtQuick 2.4 |
203 | import Gallery 1.0 |
204 | import "../../../js/Gallery.js" as Gallery |
205 | |
206 | |
207 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipperPage.qml' |
208 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipperPage.qml 2013-03-06 10:36:54 +0000 |
209 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageFlipperPage.qml 2015-11-05 19:26:06 +0000 |
210 | @@ -1,5 +1,5 @@ |
211 | /* |
212 | - * Copyright (C) 2012 Canonical Ltd |
213 | + * Copyright (C) 2012-2015 Canonical Ltd |
214 | * |
215 | * This program is free software: you can redistribute it and/or modify |
216 | * it under the terms of the GNU General Public License version 3 as |
217 | @@ -17,7 +17,7 @@ |
218 | * Charles Lindsay <chaz@yorba.org> |
219 | */ |
220 | |
221 | -import QtQuick 2.0 |
222 | +import QtQuick 2.4 |
223 | import ".." |
224 | |
225 | // A page included inside the AlbumPageFlipper; see notes there. Tightly |
226 | |
227 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayout.qml' |
228 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayout.qml 2013-03-06 10:36:54 +0000 |
229 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayout.qml 2015-11-05 19:26:06 +0000 |
230 | @@ -1,5 +1,5 @@ |
231 | /* |
232 | - * Copyright (C) 2012 Canonical Ltd |
233 | + * Copyright (C) 2012-2015 Canonical Ltd |
234 | * |
235 | * This program is free software: you can redistribute it and/or modify |
236 | * it under the terms of the GNU General Public License version 3 as |
237 | @@ -17,7 +17,7 @@ |
238 | * Charles Lindsay <chaz@yorba.org> |
239 | */ |
240 | |
241 | -import QtQuick 2.0 |
242 | +import QtQuick 2.4 |
243 | |
244 | // AlbumPageLayouts are all loaded from AlbumPageContents, and should inherit |
245 | // its properties. |
246 | |
247 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutAdd.qml' |
248 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutAdd.qml 2013-03-06 10:36:54 +0000 |
249 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutAdd.qml 2015-11-05 19:26:06 +0000 |
250 | @@ -1,5 +1,5 @@ |
251 | /* |
252 | - * Copyright (C) 2011-2012 Canonical Ltd |
253 | + * Copyright (C) 2011-2015 Canonical Ltd |
254 | * |
255 | * This program is free software: you can redistribute it and/or modify |
256 | * it under the terms of the GNU General Public License version 3 as |
257 | @@ -17,7 +17,7 @@ |
258 | * Eric Gregory <eric@yorba.org> |
259 | */ |
260 | |
261 | -import QtQuick 2.0 |
262 | +import QtQuick 2.4 |
263 | |
264 | // This page layout is used only for empty albums. |
265 | AlbumPageLayout { |
266 | |
267 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftDoubleLandscape.qml' |
268 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftDoubleLandscape.qml 2013-03-06 10:36:54 +0000 |
269 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftDoubleLandscape.qml 2015-11-05 19:26:06 +0000 |
270 | @@ -1,5 +1,5 @@ |
271 | /* |
272 | - * Copyright (C) 2011 Canonical Ltd |
273 | + * Copyright (C) 2011-2015 Canonical Ltd |
274 | * |
275 | * This program is free software: you can redistribute it and/or modify |
276 | * it under the terms of the GNU General Public License version 3 as |
277 | @@ -18,7 +18,7 @@ |
278 | * Charles Lindsay <chaz@yorba.org> |
279 | */ |
280 | |
281 | -import QtQuick 2.0 |
282 | +import QtQuick 2.4 |
283 | |
284 | /*! |
285 | */ |
286 | |
287 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftPortrait.qml' |
288 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftPortrait.qml 2013-03-06 10:36:54 +0000 |
289 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutLeftPortrait.qml 2015-11-05 19:26:06 +0000 |
290 | @@ -1,5 +1,5 @@ |
291 | /* |
292 | - * Copyright (C) 2011 Canonical Ltd |
293 | + * Copyright (C) 2011-2015 Canonical Ltd |
294 | * |
295 | * This program is free software: you can redistribute it and/or modify |
296 | * it under the terms of the GNU General Public License version 3 as |
297 | @@ -18,7 +18,7 @@ |
298 | * Charles Lindsay <chaz@yorba.org> |
299 | */ |
300 | |
301 | -import QtQuick 2.0 |
302 | +import QtQuick 2.4 |
303 | |
304 | /*! |
305 | */ |
306 | |
307 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightDoubleLandscape.qml' |
308 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightDoubleLandscape.qml 2013-03-06 10:36:54 +0000 |
309 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightDoubleLandscape.qml 2015-11-05 19:26:06 +0000 |
310 | @@ -1,5 +1,5 @@ |
311 | /* |
312 | - * Copyright (C) 2012 Canonical Ltd |
313 | + * Copyright (C) 2012-2015 Canonical Ltd |
314 | * |
315 | * This program is free software: you can redistribute it and/or modify |
316 | * it under the terms of the GNU General Public License version 3 as |
317 | @@ -17,7 +17,7 @@ |
318 | * Charles Lindsay <chaz@yorba.org> |
319 | */ |
320 | |
321 | -import QtQuick 2.0 |
322 | +import QtQuick 2.4 |
323 | |
324 | /*! |
325 | */ |
326 | |
327 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightPortrait.qml' |
328 | --- rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightPortrait.qml 2013-03-06 10:36:54 +0000 |
329 | +++ rc/qml/AlbumViewer/AlbumInternals/AlbumPageLayoutRightPortrait.qml 2015-11-05 19:26:06 +0000 |
330 | @@ -1,5 +1,5 @@ |
331 | /* |
332 | - * Copyright (C) 2011 Canonical Ltd |
333 | + * Copyright (C) 2011-2015 Canonical Ltd |
334 | * |
335 | * This program is free software: you can redistribute it and/or modify |
336 | * it under the terms of the GNU General Public License version 3 as |
337 | @@ -18,7 +18,7 @@ |
338 | * Charles Lindsay <chaz@yorba.org> |
339 | */ |
340 | |
341 | -import QtQuick 2.0 |
342 | +import QtQuick 2.4 |
343 | |
344 | /*! |
345 | */ |
346 | |
347 | === modified file 'rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml' |
348 | --- rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml 2015-03-27 23:12:41 +0000 |
349 | +++ rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml 2015-11-05 19:26:06 +0000 |
350 | @@ -1,5 +1,5 @@ |
351 | /* |
352 | - * Copyright (C) 2011 Canonical Ltd |
353 | + * Copyright (C) 2011-2015 Canonical Ltd |
354 | * |
355 | * This program is free software: you can redistribute it and/or modify |
356 | * it under the terms of the GNU General Public License version 3 as |
357 | @@ -17,7 +17,7 @@ |
358 | * Jim Nelson <jim@yorba.org> |
359 | */ |
360 | |
361 | -import QtQuick 2.0 |
362 | +import QtQuick 2.4 |
363 | import Gallery 1.0 |
364 | import "../../../js/Gallery.js" as Gallery |
365 | |
366 | |
367 | === modified file 'rc/qml/AlbumViewer/AlbumOpener.qml' |
368 | --- rc/qml/AlbumViewer/AlbumOpener.qml 2013-06-20 11:54:49 +0000 |
369 | +++ rc/qml/AlbumViewer/AlbumOpener.qml 2015-11-05 19:26:06 +0000 |
370 | @@ -1,5 +1,5 @@ |
371 | /* |
372 | - * Copyright (C) 2012 Canonical Ltd |
373 | + * Copyright (C) 2012-2015 Canonical Ltd |
374 | * |
375 | * This program is free software: you can redistribute it and/or modify |
376 | * it under the terms of the GNU General Public License version 3 as |
377 | @@ -17,7 +17,7 @@ |
378 | * Charles Lindsay <chaz@yorba.org> |
379 | */ |
380 | |
381 | -import QtQuick 2.0 |
382 | +import QtQuick 2.4 |
383 | import Gallery 1.0 |
384 | |
385 | // A component to show an album thumbnail in closed or open state, and |
386 | |
387 | === modified file 'rc/qml/AlbumViewer/AlbumPageComponent.qml' |
388 | --- rc/qml/AlbumViewer/AlbumPageComponent.qml 2013-06-20 11:54:49 +0000 |
389 | +++ rc/qml/AlbumViewer/AlbumPageComponent.qml 2015-11-05 19:26:06 +0000 |
390 | @@ -1,5 +1,5 @@ |
391 | /* |
392 | - * Copyright (C) 2012 Canonical Ltd |
393 | + * Copyright (C) 2012-2015 Canonical Ltd |
394 | * |
395 | * This program is free software: you can redistribute it and/or modify |
396 | * it under the terms of the GNU General Public License version 3 as |
397 | @@ -18,7 +18,7 @@ |
398 | * Charles Lindsay <chaz@yorba.org> |
399 | */ |
400 | |
401 | -import QtQuick 2.0 |
402 | +import QtQuick 2.4 |
403 | import Gallery 1.0 |
404 | import "AlbumInternals" |
405 | import "../../js/Gallery.js" as Gallery |
406 | |
407 | === modified file 'rc/qml/AlbumViewer/AlbumPageIndicator.qml' |
408 | --- rc/qml/AlbumViewer/AlbumPageIndicator.qml 2013-06-20 11:54:49 +0000 |
409 | +++ rc/qml/AlbumViewer/AlbumPageIndicator.qml 2015-11-05 19:26:06 +0000 |
410 | @@ -1,5 +1,5 @@ |
411 | /* |
412 | - * Copyright (C) 2012 Canonical Ltd |
413 | + * Copyright (C) 2012-2015 Canonical Ltd |
414 | * |
415 | * This program is free software: you can redistribute it and/or modify |
416 | * it under the terms of the GNU General Public License version 3 as |
417 | @@ -18,9 +18,9 @@ |
418 | * Eric Gregory <eric@yorba.org> |
419 | */ |
420 | |
421 | -import QtQuick 2.0 |
422 | +import QtQuick 2.4 |
423 | import Gallery 1.0 |
424 | -import Ubuntu.Components 0.1 |
425 | +import Ubuntu.Components 1.3 |
426 | |
427 | /*! |
428 | */ |
429 | |
430 | === modified file 'rc/qml/AlbumViewer/AlbumPreviewComponent.qml' |
431 | --- rc/qml/AlbumViewer/AlbumPreviewComponent.qml 2013-06-20 11:54:49 +0000 |
432 | +++ rc/qml/AlbumViewer/AlbumPreviewComponent.qml 2015-11-05 19:26:06 +0000 |
433 | @@ -1,5 +1,5 @@ |
434 | /* |
435 | - * Copyright (C) 2011 Canonical Ltd |
436 | + * Copyright (C) 2011-2015 Canonical Ltd |
437 | * |
438 | * This program is free software: you can redistribute it and/or modify |
439 | * it under the terms of the GNU General Public License version 3 as |
440 | @@ -18,7 +18,7 @@ |
441 | * Charles Lindsay <chaz@yorba.org> |
442 | */ |
443 | |
444 | -import QtQuick 2.0 |
445 | +import QtQuick 2.4 |
446 | |
447 | /*! |
448 | */ |
449 | |
450 | === modified file 'rc/qml/AlbumViewer/AlbumSpreadViewer.qml' |
451 | --- rc/qml/AlbumViewer/AlbumSpreadViewer.qml 2013-06-20 11:54:49 +0000 |
452 | +++ rc/qml/AlbumViewer/AlbumSpreadViewer.qml 2015-11-05 19:26:06 +0000 |
453 | @@ -1,5 +1,5 @@ |
454 | /* |
455 | - * Copyright (C) 2012 Canonical Ltd |
456 | + * Copyright (C) 2012-2015 Canonical Ltd |
457 | * |
458 | * This program is free software: you can redistribute it and/or modify |
459 | * it under the terms of the GNU General Public License version 3 as |
460 | @@ -18,7 +18,7 @@ |
461 | * Charles Lindsay <chaz@yorba.org> |
462 | */ |
463 | |
464 | -import QtQuick 2.0 |
465 | +import QtQuick 2.4 |
466 | import Gallery 1.0 |
467 | import "../../js/GalleryUtility.js" as GalleryUtility |
468 | import "AlbumInternals" |
469 | |
470 | === modified file 'rc/qml/AlbumViewer/AlbumViewer.qml' |
471 | --- rc/qml/AlbumViewer/AlbumViewer.qml 2015-02-09 13:18:07 +0000 |
472 | +++ rc/qml/AlbumViewer/AlbumViewer.qml 2015-11-05 19:26:06 +0000 |
473 | @@ -1,5 +1,5 @@ |
474 | /* |
475 | - * Copyright (C) 2011 Canonical Ltd |
476 | + * Copyright (C) 2011-2015 Canonical Ltd |
477 | * |
478 | * This program is free software: you can redistribute it and/or modify |
479 | * it under the terms of the GNU General Public License version 3 as |
480 | @@ -18,8 +18,8 @@ |
481 | * Lucas Beeler <lucas@yorba.org> |
482 | */ |
483 | |
484 | -import QtQuick 2.0 |
485 | -import Ubuntu.Components 1.1 |
486 | +import QtQuick 2.4 |
487 | +import Ubuntu.Components 1.3 |
488 | import Gallery 1.0 |
489 | import "../../js/Gallery.js" as Gallery |
490 | import "../../js/GalleryUtility.js" as GalleryUtility |
491 | @@ -106,11 +106,6 @@ |
492 | |
493 | title: i18n.tr("Album") |
494 | |
495 | - Image { |
496 | - anchors.fill: parent |
497 | - source: "../../img/background-paper.png" |
498 | - } |
499 | - |
500 | function closeAlbum() { |
501 | if (photoViewerLoader.item && photoViewerLoader.item.isPoppedUp) { |
502 | photoViewerLoader.item.closePopupPhotoViewer(); |
503 | @@ -195,12 +190,17 @@ |
504 | if (hit.objectName === "addButton") |
505 | showMediaSelector(); |
506 | else if (!hit.mediaSource) { |
507 | - overview.toggleHeaderVisibility(); |
508 | + albumViewer.header.visible = !albumViewer.header.visible; |
509 | + if (!APP.desktopMode) |
510 | + setFullScreen(!albumViewer.header.visible); |
511 | return; |
512 | } |
513 | |
514 | albumViewer.mediaCurrentlyInView = hit.mediaSource.path; |
515 | photoViewerLoader.fadeOpen(hit.mediaSource); |
516 | + photoViewerLoader.item.header.visible = false; |
517 | + if (!APP.desktopMode) |
518 | + setFullScreen(true); |
519 | } |
520 | |
521 | // Long press/right click. |
522 | @@ -311,7 +311,6 @@ |
523 | onOpened: { |
524 | photoViewerLoader.item.title = albumViewer.title; |
525 | overview.pushPage(target); |
526 | - overview.setHeaderVisibility(false); |
527 | } |
528 | onCloseRequested: { |
529 | albumViewer.mediaCurrentlyInView = ""; |
530 | @@ -322,6 +321,7 @@ |
531 | } |
532 | |
533 | photoViewerLoader.item.fadeClosed(); |
534 | + albumViewer.header.visible = true; |
535 | } |
536 | onClosed: { |
537 | overview.popPage(); |
538 | @@ -362,36 +362,32 @@ |
539 | } |
540 | } |
541 | |
542 | - /// Contains the actions for the toolbar in the album view |
543 | - head.actions: [ |
544 | - Action { |
545 | - objectName: "addButton" |
546 | - text: i18n.tr("Add to album") // text in HUD |
547 | - iconName: "add" |
548 | - onTriggered: showMediaSelector(); |
549 | - }, |
550 | - Action { |
551 | - objectName: "deleteButton" |
552 | - text: i18n.tr("Delete") |
553 | - iconName: "delete" |
554 | - onTriggered: { |
555 | - albumTrashDialog.album = album; |
556 | - albumTrashDialog.show(); |
557 | + header: PageHeader { |
558 | + objectName: "albumViewerHeader" |
559 | + title: albumViewer.title |
560 | + /// Contains the actions for the toolbar in the album view |
561 | + trailingActionBar.actions: [ |
562 | + Action { |
563 | + objectName: "addButton" |
564 | + text: i18n.tr("Add to album") // text in HUD |
565 | + iconName: "add" |
566 | + onTriggered: showMediaSelector(); |
567 | + }, |
568 | + Action { |
569 | + objectName: "deleteButton" |
570 | + text: i18n.tr("Delete") |
571 | + iconName: "delete" |
572 | + onTriggered: { |
573 | + albumTrashDialog.album = album; |
574 | + albumTrashDialog.show(); |
575 | + } |
576 | } |
577 | + ] |
578 | + |
579 | + leadingActionBar.actions: Action { |
580 | + objectName: "backButton" |
581 | + iconName: "back" |
582 | + onTriggered: __close(); |
583 | } |
584 | - ] |
585 | - |
586 | - head.backAction: Action { |
587 | - iconName: "back" |
588 | - onTriggered: __close(); |
589 | - } |
590 | - |
591 | - Rectangle { |
592 | - id: headerBackground |
593 | - |
594 | - width: parent.width |
595 | - height: header.height |
596 | - |
597 | - visible: header.visible |
598 | } |
599 | } |
600 | |
601 | === modified file 'rc/qml/AlbumViewer/AlbumViewerAnimated.qml' |
602 | --- rc/qml/AlbumViewer/AlbumViewerAnimated.qml 2014-06-09 23:17:03 +0000 |
603 | +++ rc/qml/AlbumViewer/AlbumViewerAnimated.qml 2015-11-05 19:26:06 +0000 |
604 | @@ -1,5 +1,5 @@ |
605 | /* |
606 | - * Copyright (C) 2013 Canonical Ltd |
607 | + * Copyright (C) 2013-2015 Canonical Ltd |
608 | * |
609 | * This program is free software: you can redistribute it and/or modify |
610 | * it under the terms of the GNU General Public License version 3 as |
611 | @@ -14,8 +14,8 @@ |
612 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
613 | */ |
614 | |
615 | -import QtQuick 2.0 |
616 | -import Ubuntu.Components 0.1 |
617 | +import QtQuick 2.4 |
618 | +import Ubuntu.Components 1.3 |
619 | import Gallery 1.0 |
620 | |
621 | /*! @brief AlbumViewerAnimated shows an album, and performs animations when opening and closing |
622 | |
623 | === removed file 'rc/qml/AlbumViewer/AlbumViewerTransition.qml' |
624 | --- rc/qml/AlbumViewer/AlbumViewerTransition.qml 2014-03-19 12:10:38 +0000 |
625 | +++ rc/qml/AlbumViewer/AlbumViewerTransition.qml 1970-01-01 00:00:00 +0000 |
626 | @@ -1,404 +0,0 @@ |
627 | -/* |
628 | - * Copyright (C) 2011 Canonical Ltd |
629 | - * |
630 | - * This program is free software: you can redistribute it and/or modify |
631 | - * it under the terms of the GNU General Public License version 3 as |
632 | - * published by the Free Software Foundation. |
633 | - * |
634 | - * This program is distributed in the hope that it will be useful, |
635 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
636 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
637 | - * GNU General Public License for more details. |
638 | - * |
639 | - * You should have received a copy of the GNU General Public License |
640 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
641 | - * |
642 | - * Authors: |
643 | - * Charles Lindsay <chaz@yorba.org> |
644 | - */ |
645 | - |
646 | -import QtQuick 2.0 |
647 | -import Gallery 1.0 |
648 | -import "../../js/Gallery.js" as Gallery |
649 | -import "../Utility" |
650 | - |
651 | -// Some custom components and animations that we want to invoke whenever we |
652 | -// bring up the album viewer. |
653 | -Item { |
654 | - id: albumViewerTransition |
655 | - |
656 | - /*! |
657 | - */ |
658 | - signal transitionToAlbumViewerCompleted() |
659 | - /*! |
660 | - */ |
661 | - signal transitionFromAlbumViewerCompleted() |
662 | - /*! |
663 | - */ |
664 | - signal dissolveCompleted(variant fadeOutTarget, variant fadeInTarget) |
665 | - |
666 | - /*! |
667 | - */ |
668 | - property Album album |
669 | - /*! |
670 | - */ |
671 | - property Rectangle backgroundGlass |
672 | - /*! |
673 | - */ |
674 | - property int duration: Gallery.SLOW_DURATION |
675 | - /*! |
676 | - */ |
677 | - property int easing: Easing.InQuint |
678 | - /*! |
679 | - */ |
680 | - property bool isPortrait |
681 | - |
682 | - // Read-only |
683 | - /*! |
684 | - */ |
685 | - property bool animationRunning: showAlbumViewerAnimation.running || |
686 | - hideAlbumViewerAnimation.running || dissolveAlbumViewerTransition.running |
687 | - |
688 | - // internal |
689 | - /*! |
690 | - */ |
691 | - property bool hideStayingOpen |
692 | - /*! |
693 | - */ |
694 | - property variant expandAlbum: albumOpenerLandscape |
695 | - /*! |
696 | - */ |
697 | - property bool flipOnClose: isPortrait |
698 | - |
699 | - /*! |
700 | - */ |
701 | - function transitionToAlbumViewer(album, thumbnailRect) { |
702 | - albumViewerTransition.album = album; |
703 | - expandAlbum = albumOpenerLandscape; |
704 | - |
705 | - expandAlbum.insideLeftPage = (isPortrait |
706 | - ? album.currentPage // Anything -- invisible. |
707 | - : expandAlbum.defaultInsideLeftPage); |
708 | - expandAlbum.insideRightPage = (isPortrait |
709 | - ? album.currentPage |
710 | - : expandAlbum.defaultInsideRightPage); |
711 | - |
712 | - expandAlbum.x = thumbnailRect.x; |
713 | - expandAlbum.y = thumbnailRect.y; |
714 | - expandAlbum.width = thumbnailRect.width; |
715 | - expandAlbum.height = thumbnailRect.height; |
716 | - |
717 | - expandAlbum.showCover = album.closed; |
718 | - |
719 | - showAlbumViewerAnimation.screenRect = getFullscreenRect(album.closed); |
720 | - showAlbumViewerAnimation.start(); |
721 | - } |
722 | - |
723 | - /*! |
724 | - */ |
725 | - function transitionFromAlbumViewer(album, thumbnailRect, stayOpen, viewingPage) { |
726 | - // Set up portrait mode even-numbered page close transition. |
727 | - albumOpenerPortrait.viewingPage = viewingPage; |
728 | - flipOnClose = isPortrait && viewingPage !== album.currentPage && stayOpen && |
729 | - !viewingPage == 0; |
730 | - |
731 | - albumViewerTransition.album = album; |
732 | - expandAlbum = flipOnClose ? albumOpenerPortrait : albumOpenerLandscape; |
733 | - |
734 | - expandAlbum.insideLeftPage = (isPortrait |
735 | - ? viewingPage // Anything -- invisible. |
736 | - : expandAlbum.defaultInsideLeftPage); |
737 | - expandAlbum.insideRightPage = (isPortrait |
738 | - ? viewingPage |
739 | - : expandAlbum.defaultInsideRightPage); |
740 | - |
741 | - var rect = getFullscreenRect(!stayOpen); |
742 | - expandAlbum.x = rect.x; |
743 | - expandAlbum.y = rect.y; |
744 | - expandAlbum.width = rect.width; |
745 | - expandAlbum.height = rect.height; |
746 | - |
747 | - hideStayingOpen = stayOpen; |
748 | - albumOpenerLandscape.showCover = !stayOpen || viewingPage == 0; |
749 | - |
750 | - /* The Album preview doesn't like when the album is set to page zero, |
751 | - it actually expects its property closed to be set to true in that case. |
752 | - But we cant set that during the animation or it will think we're |
753 | - flipping to closed, so we set it at the end */ |
754 | - hideAlbumViewerAnimation.setAlbumClosedAtEnd = viewingPage == 0; |
755 | - hideAlbumViewerAnimation.thumbnailRect = thumbnailRect; |
756 | - hideAlbumViewerAnimation.start(); |
757 | - } |
758 | - |
759 | - /*! |
760 | - */ |
761 | - function dissolve(fadeOutTarget, fadeInTarget) { |
762 | - dissolveAlbumViewerTransition.fadeOutTarget = fadeOutTarget || dissolveDummy; |
763 | - dissolveAlbumViewerTransition.fadeInTarget = fadeInTarget || dissolveDummy; |
764 | - dissolveAlbumViewerTransition.start(); |
765 | - } |
766 | - |
767 | - // internal |
768 | - function getFullscreenRect(portraitHalfOpen) { |
769 | - var rect = {"x": 0, "y": 0, "width": 0, "height": 0}; |
770 | - |
771 | - // This code is kind of hacky. There's just lots of special casing that we |
772 | - // need, and it didn't seem worth it to come up with a cleaner abstraction |
773 | - // for what amounts to one-off animation code. |
774 | - |
775 | - // We have to compensate for the frame, present in the animation but not in |
776 | - // the album viewer. |
777 | - var frameWidth = width * expandAlbum.frameToContentWidth; |
778 | - // Normally, the spread's width is half of how it appears when open. |
779 | - if (!isPortrait) |
780 | - frameWidth /= 2; |
781 | - var frameHeight = height * expandAlbum.frameToContentHeight; |
782 | - |
783 | - // Normally, we center it. For portrait, we set it flush on one side or |
784 | - // the other (if it'll be half-open, flush left, otherwise right; this is |
785 | - // because of our thumbnail image having a border on only one side). |
786 | - if (isPortrait) |
787 | - rect.x = (portraitHalfOpen ? 0 : width - frameWidth); |
788 | - else |
789 | - rect.x = (width - frameWidth) / 2; |
790 | - rect.y = (height - frameHeight) / 2; // Centered. |
791 | - rect.width = frameWidth; |
792 | - rect.height = frameHeight; |
793 | - |
794 | - // Move the thing left 1/4 of the thing's width. This is to match the |
795 | - // opener, which slides right 1/4 of the way at its "half-open" state |
796 | - // (actually, 0.25 openFraction). |
797 | - if (isPortrait && portraitHalfOpen) |
798 | - rect.x -= frameWidth / 4; |
799 | - |
800 | - return rect; |
801 | - } |
802 | - |
803 | - AlbumOpener { |
804 | - id: albumOpenerLandscape |
805 | - |
806 | - album: parent.album |
807 | - isPreview: true |
808 | - contentHasPreviewFrame: true |
809 | - |
810 | - visible: false |
811 | - load: visible |
812 | - } |
813 | - |
814 | - AlbumViewerTransitionPortraitPage { |
815 | - id: albumOpenerPortrait |
816 | - |
817 | - album: parent.album |
818 | - isPreview: true |
819 | - contentHasPreviewFrame: true |
820 | - |
821 | - visible: false |
822 | - load: visible |
823 | - } |
824 | - |
825 | - SequentialAnimation { |
826 | - id: showAlbumViewerAnimation |
827 | - |
828 | - property var screenRect: {"x": 0, "y": 0, "width": 0, "height": 0} |
829 | - |
830 | - PropertyAction { target: expandAlbum; property: "visible"; value: true; } |
831 | - |
832 | - ParallelAnimation { |
833 | - ExpandAnimation { |
834 | - target: expandAlbum |
835 | - endX: showAlbumViewerAnimation.screenRect.x |
836 | - endY: showAlbumViewerAnimation.screenRect.y |
837 | - endWidth: showAlbumViewerAnimation.screenRect.width |
838 | - endHeight: showAlbumViewerAnimation.screenRect.height |
839 | - duration: albumViewerTransition.duration |
840 | - easingType: albumViewerTransition.easing |
841 | - } |
842 | - |
843 | - NumberAnimation { |
844 | - target: expandAlbum |
845 | - property: "openFraction" |
846 | - from: (album && album.closed ? 0 : 1) |
847 | - to: isPortrait ? (album && album.closed ? 0.25 : 1) : 0.5 |
848 | - duration: albumViewerTransition.duration |
849 | - easing.type: albumViewerTransition.easing |
850 | - } |
851 | - |
852 | - NumberAnimation { |
853 | - target: expandAlbum |
854 | - property: "topMargin" |
855 | - from: expandAlbum.previewTopMargin |
856 | - to: expandAlbum.pageTopMargin |
857 | - duration: albumViewerTransition.duration |
858 | - easing.type: albumViewerTransition.easing |
859 | - } |
860 | - NumberAnimation { |
861 | - target: expandAlbum |
862 | - property: "bottomMargin" |
863 | - from: expandAlbum.previewBottomMargin |
864 | - to: expandAlbum.pageBottomMargin |
865 | - duration: albumViewerTransition.duration |
866 | - easing.type: albumViewerTransition.easing |
867 | - } |
868 | - NumberAnimation { |
869 | - target: expandAlbum |
870 | - property: "gutterMargin" |
871 | - from: expandAlbum.previewGutterMargin |
872 | - to: expandAlbum.pageGutterMargin |
873 | - duration: albumViewerTransition.duration |
874 | - easing.type: albumViewerTransition.easing |
875 | - } |
876 | - NumberAnimation { |
877 | - target: expandAlbum |
878 | - property: "outerMargin" |
879 | - from: expandAlbum.previewOuterMargin |
880 | - to: expandAlbum.pageOuterMargin |
881 | - duration: albumViewerTransition.duration |
882 | - easing.type: albumViewerTransition.easing |
883 | - } |
884 | - NumberAnimation { |
885 | - target: expandAlbum |
886 | - property: "insideMargin" |
887 | - from: expandAlbum.previewInsideMargin |
888 | - to: expandAlbum.pageInsideMargin |
889 | - duration: albumViewerTransition.duration |
890 | - easing.type: albumViewerTransition.easing |
891 | - } |
892 | - |
893 | - FadeInAnimation { |
894 | - target: backgroundGlass |
895 | - duration: albumViewerTransition.duration |
896 | - easingType: albumViewerTransition.easing |
897 | - } |
898 | - } |
899 | - |
900 | - PropertyAction { target: expandAlbum; property: "visible"; value: false; } |
901 | - PropertyAction { target: backgroundGlass; property: "visible"; value: false; } |
902 | - |
903 | - onRunningChanged: { |
904 | - if (running) |
905 | - return; |
906 | - |
907 | - album.closed = false; |
908 | - if (album.currentPage == album.firstValidCurrentPage) |
909 | - album.currentPage = album.firstContentPage; |
910 | - |
911 | - transitionToAlbumViewerCompleted(); |
912 | - } |
913 | - } |
914 | - |
915 | - SequentialAnimation { |
916 | - id: hideAlbumViewerAnimation |
917 | - |
918 | - property variant thumbnailRect: {"x": 0, "y": 0, "width": 0, "height": 0} |
919 | - property bool setAlbumClosedAtEnd: false |
920 | - |
921 | - PropertyAction { target: expandAlbum; property: "visible"; value: true; } |
922 | - |
923 | - ParallelAnimation { |
924 | - ExpandAnimation { |
925 | - target: expandAlbum |
926 | - endX: hideAlbumViewerAnimation.thumbnailRect.x |
927 | - endY: hideAlbumViewerAnimation.thumbnailRect.y |
928 | - endWidth: hideAlbumViewerAnimation.thumbnailRect.width |
929 | - endHeight: hideAlbumViewerAnimation.thumbnailRect.height |
930 | - duration: albumViewerTransition.duration |
931 | - easingType: albumViewerTransition.easing |
932 | - } |
933 | - |
934 | - NumberAnimation { |
935 | - target: expandAlbum |
936 | - property: "openFraction" |
937 | - |
938 | - from: { |
939 | - if (flipOnClose) |
940 | - return 0; |
941 | - else if (isPortrait) |
942 | - return (hideStayingOpen ? 1 : 0.25); // same as "to" property |
943 | - else |
944 | - return 0.5; |
945 | - } |
946 | - |
947 | - to: flipOnClose ? 1 : (hideStayingOpen ? 1 : 0) |
948 | - |
949 | - duration: albumViewerTransition.duration |
950 | - easing.type: albumViewerTransition.easing |
951 | - } |
952 | - |
953 | - NumberAnimation { |
954 | - target: expandAlbum |
955 | - property: "topMargin" |
956 | - from: expandAlbum.pageTopMargin |
957 | - to: expandAlbum.previewTopMargin |
958 | - duration: albumViewerTransition.duration |
959 | - easing.type: albumViewerTransition.easing |
960 | - } |
961 | - NumberAnimation { |
962 | - target: expandAlbum |
963 | - property: "bottomMargin" |
964 | - from: expandAlbum.pageBottomMargin |
965 | - to: expandAlbum.previewBottomMargin |
966 | - duration: albumViewerTransition.duration |
967 | - easing.type: albumViewerTransition.easing |
968 | - } |
969 | - NumberAnimation { |
970 | - target: expandAlbum |
971 | - property: "gutterMargin" |
972 | - from: expandAlbum.pageGutterMargin |
973 | - to: expandAlbum.previewGutterMargin |
974 | - duration: albumViewerTransition.duration |
975 | - easing.type: albumViewerTransition.easing |
976 | - } |
977 | - NumberAnimation { |
978 | - target: expandAlbum |
979 | - property: "outerMargin" |
980 | - from: expandAlbum.pageOuterMargin |
981 | - to: expandAlbum.previewOuterMargin |
982 | - duration: albumViewerTransition.duration |
983 | - easing.type: albumViewerTransition.easing |
984 | - } |
985 | - NumberAnimation { |
986 | - target: expandAlbum |
987 | - property: "insideMargin" |
988 | - from: expandAlbum.pageInsideMargin |
989 | - to: expandAlbum.previewInsideMargin |
990 | - duration: albumViewerTransition.duration |
991 | - easing.type: albumViewerTransition.easing |
992 | - } |
993 | - |
994 | - FadeOutAnimation { |
995 | - target: backgroundGlass |
996 | - duration: albumViewerTransition.duration |
997 | - easingType: albumViewerTransition.easing |
998 | - } |
999 | - } |
1000 | - |
1001 | - PropertyAction { target: expandAlbum; property: "visible"; value: false; } |
1002 | - |
1003 | - onRunningChanged: { |
1004 | - if (running) |
1005 | - return; |
1006 | - |
1007 | - if (album) |
1008 | - album.closed = !hideStayingOpen || setAlbumClosedAtEnd; |
1009 | - |
1010 | - transitionFromAlbumViewerCompleted(); |
1011 | - } |
1012 | - } |
1013 | - |
1014 | - DissolveAnimation { |
1015 | - id: dissolveAlbumViewerTransition |
1016 | - |
1017 | - fadeOutTarget: dissolveDummy |
1018 | - fadeInTarget: dissolveDummy |
1019 | - easingType: albumViewerTransition.easing |
1020 | - |
1021 | - onRunningChanged: { |
1022 | - if (!running) |
1023 | - dissolveCompleted(fadeOutTarget, fadeInTarget); |
1024 | - } |
1025 | - } |
1026 | - |
1027 | - Item { |
1028 | - id: dissolveDummy |
1029 | - } |
1030 | -} |
1031 | |
1032 | === removed file 'rc/qml/AlbumViewer/AlbumViewerTransitionPortraitPage.qml' |
1033 | --- rc/qml/AlbumViewer/AlbumViewerTransitionPortraitPage.qml 2013-06-20 11:54:49 +0000 |
1034 | +++ rc/qml/AlbumViewer/AlbumViewerTransitionPortraitPage.qml 1970-01-01 00:00:00 +0000 |
1035 | @@ -1,171 +0,0 @@ |
1036 | -/* |
1037 | - * Copyright (C) 2012 Canonical Ltd |
1038 | - * |
1039 | - * This program is free software: you can redistribute it and/or modify |
1040 | - * it under the terms of the GNU General Public License version 3 as |
1041 | - * published by the Free Software Foundation. |
1042 | - * |
1043 | - * This program is distributed in the hope that it will be useful, |
1044 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1045 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1046 | - * GNU General Public License for more details. |
1047 | - * |
1048 | - * You should have received a copy of the GNU General Public License |
1049 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1050 | - * |
1051 | - * Authors: |
1052 | - * Eric Gregory <eric@yorba.org> |
1053 | - */ |
1054 | - |
1055 | -import QtQuick 2.0 |
1056 | -import Gallery 1.0 |
1057 | -import "../Components" |
1058 | - |
1059 | -// AlbumViewerTransitionPortraitPage is just like AlbumOpener, except it only |
1060 | -// shows one page at a time. This is intended for use in AlbumViewerTransition |
1061 | -// as a replacement for AlbumOpener when used in portrait mode and closing |
1062 | -// an even-numbered page. |
1063 | -Item { |
1064 | - id: albumViewerTransitionPortraitPage |
1065 | - |
1066 | - // public |
1067 | - property Album album |
1068 | - /*! |
1069 | - */ |
1070 | - property bool isPreview: false |
1071 | - /*! |
1072 | - */ |
1073 | - property bool contentHasPreviewFrame: false |
1074 | - /*! |
1075 | - */ |
1076 | - property int viewingPage |
1077 | - |
1078 | - /*! |
1079 | - */ |
1080 | - property int insideLeftPage: defaultInsideLeftPage |
1081 | - /*! |
1082 | - */ |
1083 | - property int insideRightPage: defaultInsideRightPage |
1084 | - |
1085 | - // Here, openFraction refers to how "flipped" the page is, rather than |
1086 | - // how open the album is. |
1087 | - property real openFraction: 0 |
1088 | - |
1089 | - /*! |
1090 | - */ |
1091 | - property real topMargin: previewTopMargin |
1092 | - /*! |
1093 | - */ |
1094 | - property real bottomMargin: previewBottomMargin |
1095 | - /*! |
1096 | - */ |
1097 | - property real gutterMargin: previewGutterMargin |
1098 | - /*! |
1099 | - */ |
1100 | - property real outerMargin: previewOuterMargin |
1101 | - /*! |
1102 | - */ |
1103 | - property real insideMargin: previewInsideMargin |
1104 | - |
1105 | - // readonly |
1106 | - /*! |
1107 | - */ |
1108 | - property bool isFlipping: (openFraction != 0 && openFraction != 1) |
1109 | - /*! |
1110 | - */ |
1111 | - property alias frameToContentWidth: page.frameToContentWidth |
1112 | - /*! |
1113 | - */ |
1114 | - property alias frameToContentHeight: page.frameToContentHeight |
1115 | - |
1116 | - /*! |
1117 | - */ |
1118 | - property alias load: page.load |
1119 | - |
1120 | - /*! |
1121 | - */ |
1122 | - property int defaultInsideLeftPage: page.leftPageForCurrent(currentOrFirstContentPage) |
1123 | - /*! |
1124 | - */ |
1125 | - property int defaultInsideRightPage: page.rightPageForCurrent(currentOrFirstContentPage) |
1126 | - |
1127 | - /*! |
1128 | - */ |
1129 | - property alias pageTopMargin: page.pageTopMargin |
1130 | - /*! |
1131 | - */ |
1132 | - property alias pageBottomMargin: page.pageBottomMargin |
1133 | - /*! |
1134 | - */ |
1135 | - property alias pageGutterMargin: page.pageGutterMargin |
1136 | - /*! |
1137 | - */ |
1138 | - property alias pageOuterMargin: page.pageOuterMargin |
1139 | - /*! |
1140 | - */ |
1141 | - property alias pageInsideMargin: page.pageInsideMargin |
1142 | - |
1143 | - /*! |
1144 | - */ |
1145 | - property alias previewTopMargin: page.previewTopMargin |
1146 | - /*! |
1147 | - */ |
1148 | - property alias previewBottomMargin: page.previewBottomMargin |
1149 | - /*! |
1150 | - */ |
1151 | - property alias previewGutterMargin: page.previewGutterMargin |
1152 | - /*! |
1153 | - */ |
1154 | - property alias previewOuterMargin: page.previewOuterMargin |
1155 | - /*! |
1156 | - */ |
1157 | - property alias previewInsideMargin: page.previewInsideMargin |
1158 | - |
1159 | - // internal |
1160 | - /*! |
1161 | - */ |
1162 | - property int currentOrFirstContentPage: (!album |
1163 | - ? -1 |
1164 | - : (album.currentPage == album.firstValidCurrentPage |
1165 | - ? album.firstContentPage |
1166 | - : album.currentPage)) |
1167 | - |
1168 | - onAlbumChanged: openFraction = (!album || album.closed ? 0 : 1) |
1169 | - |
1170 | - Connections { |
1171 | - target: album |
1172 | - ignoreUnknownSignals: true |
1173 | - onClosedChanged: openFraction = (album.closed ? 0 : 1) |
1174 | - } |
1175 | - |
1176 | - Item { |
1177 | - id: shifter |
1178 | - |
1179 | - x: width * openFraction // Shift it over as it opens so the visuals stay centered. |
1180 | - y: 0 |
1181 | - width: parent.width |
1182 | - height: parent.height |
1183 | - |
1184 | - AlbumPageComponent { |
1185 | - id: page |
1186 | - |
1187 | - anchors.fill: parent |
1188 | - |
1189 | - album: albumViewerTransitionPortraitPage.album |
1190 | - |
1191 | - frontPage: viewingPage |
1192 | - backPage: album !== null ? album.currentPage : viewingPage |
1193 | - |
1194 | - isPreview: albumOpenerPortrait.isPreview |
1195 | - contentHasPreviewFrame: albumViewerTransitionPortraitPage.contentHasPreviewFrame |
1196 | - |
1197 | - flipFraction: -openFraction |
1198 | - |
1199 | - topMargin: albumViewerTransitionPortraitPage.topMargin |
1200 | - bottomMargin: albumViewerTransitionPortraitPage.bottomMargin |
1201 | - gutterMargin: albumViewerTransitionPortraitPage.gutterMargin |
1202 | - outerMargin: albumViewerTransitionPortraitPage.outerMargin |
1203 | - insideMargin: albumViewerTransitionPortraitPage.insideMargin |
1204 | - } |
1205 | - } |
1206 | -} |
1207 | |
1208 | === modified file 'rc/qml/AlbumsOverview.qml' |
1209 | --- rc/qml/AlbumsOverview.qml 2015-02-09 13:18:07 +0000 |
1210 | +++ rc/qml/AlbumsOverview.qml 2015-11-05 19:26:06 +0000 |
1211 | @@ -1,5 +1,5 @@ |
1212 | /* |
1213 | - * Copyright (C) 2013 Canonical Ltd |
1214 | + * Copyright (C) 2013-2015 Canonical Ltd |
1215 | * |
1216 | * This program is free software: you can redistribute it and/or modify |
1217 | * it under the terms of the GNU General Public License version 3 as |
1218 | @@ -14,8 +14,8 @@ |
1219 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1220 | */ |
1221 | |
1222 | -import QtQuick 2.0 |
1223 | -import Ubuntu.Components 0.1 |
1224 | +import QtQuick 2.4 |
1225 | +import Ubuntu.Components 1.3 |
1226 | import Gallery 1.0 |
1227 | import "AlbumEditor" |
1228 | import "AlbumViewer" |
1229 | @@ -64,9 +64,6 @@ |
1230 | onActiveChanged: { |
1231 | if (active) { |
1232 | root.visible = true; |
1233 | - // FIXME: contentY is not correct after we return of an AlbumViewer animation |
1234 | - if (contentY != 0) |
1235 | - contentY = header.height * -1; |
1236 | } |
1237 | } |
1238 | |
1239 | @@ -181,9 +178,9 @@ |
1240 | setFullScreen(true); |
1241 | overview.pushPage(albumViewer); |
1242 | if (object.containedCount > 0) |
1243 | - overview.setHeaderVisibility(false); |
1244 | + albumViewer.header.visible = false; |
1245 | else |
1246 | - overview.setHeaderVisibility(true); |
1247 | + albumViewer.header.visible = true; |
1248 | } |
1249 | else |
1250 | albumViewer.visible = true |
1251 | @@ -208,10 +205,7 @@ |
1252 | |
1253 | visible: false |
1254 | |
1255 | - onEditClicked: { |
1256 | - albumEditor.album = album |
1257 | - overview.pushPage(albumEditor) |
1258 | - } |
1259 | + onEditClicked: albumEditorLoader.load(album) |
1260 | |
1261 | onDeleteClicked: { |
1262 | albumTrashDialog.album = album |
1263 | @@ -228,34 +222,27 @@ |
1264 | } |
1265 | |
1266 | /// Contains the actions for the toolbar in the albums tab |
1267 | - tools: ToolbarItems { |
1268 | - id: albumOverviewTools |
1269 | - ToolbarButton { |
1270 | - action: Action { |
1271 | - objectName: "addButton" |
1272 | - text: i18n.tr("Add new album") // Text in HUD |
1273 | - iconName: "add" |
1274 | - onTriggered: { |
1275 | - var album = albumCollectionModel.createOrphan(); |
1276 | - album.title = i18n.tr("New Photo Album"); |
1277 | - album.subtitle = i18n.tr("Subtitle"); |
1278 | + head.actions: [ |
1279 | + Action { |
1280 | + objectName: "addButton" |
1281 | + text: i18n.tr("Add new album") // Text in HUD |
1282 | + iconName: "add" |
1283 | + onTriggered: { |
1284 | + var album = albumCollectionModel.createOrphan(); |
1285 | + album.title = i18n.tr("New Photo Album"); |
1286 | + album.subtitle = i18n.tr("Subtitle"); |
1287 | |
1288 | - albumEditor.album = album; |
1289 | - overview.pushPage(albumEditor); |
1290 | - } |
1291 | - } |
1292 | - text: i18n.tr("Add") // text in toolbar |
1293 | - } |
1294 | - ToolbarButton { |
1295 | - action: Action { |
1296 | - objectName: "cameraButton" |
1297 | - text: i18n.tr("Camera") |
1298 | - visible: !APP.desktopMode |
1299 | - iconSource: Qt.resolvedUrl("../img/camera.png") |
1300 | - onTriggered: Qt.openUrlExternally("appid://com.ubuntu.camera/camera/current-user-version") |
1301 | - } |
1302 | - } |
1303 | - } |
1304 | + albumEditorLoader.load(album) |
1305 | + } |
1306 | + }, |
1307 | + Action { |
1308 | + objectName: "cameraButton" |
1309 | + text: i18n.tr("Camera") |
1310 | + visible: !APP.desktopMode |
1311 | + iconName: "camera-app-symbolic" |
1312 | + onTriggered: Qt.openUrlExternally("appid://com.ubuntu.camera/camera/current-user-version") |
1313 | + } |
1314 | + ] |
1315 | |
1316 | AlbumViewer { |
1317 | id: albumViewer |
1318 | @@ -268,13 +255,39 @@ |
1319 | onQuickCloseRequested: isAlbumOpened = false; |
1320 | } |
1321 | |
1322 | - AlbumEditor { |
1323 | - id: albumEditor |
1324 | - objectName: "albumEditor" |
1325 | + Loader { |
1326 | + id: albumEditorLoader |
1327 | anchors.fill: parent |
1328 | - visible: false |
1329 | - |
1330 | - onMediaSelectorHidden: albumEditorCheckerboardHidden(newScrollPos); |
1331 | - onCloseRequested: overview.popPage(); |
1332 | + |
1333 | + property var album |
1334 | + |
1335 | + onStatusChanged: { |
1336 | + if (status === Loader.Ready) { |
1337 | + albumEditorLoader.item.album = albumEditorLoader.album |
1338 | + overview.pushPage(albumEditorLoader.item) |
1339 | + } |
1340 | + } |
1341 | + |
1342 | + function load(album) { |
1343 | + albumEditorLoader.album = album |
1344 | + sourceComponent = albumEditorComponent |
1345 | + } |
1346 | + |
1347 | + Component { |
1348 | + id: albumEditorComponent |
1349 | + AlbumEditor { |
1350 | + id: albumEditor |
1351 | + objectName: "albumEditor" |
1352 | + anchors.fill: parent |
1353 | + visible: false |
1354 | + |
1355 | + onMediaSelectorHidden: albumEditorCheckerboardHidden(newScrollPos); |
1356 | + onCloseRequested: { |
1357 | + overview.popPage() |
1358 | + albumEditorLoader.album = null |
1359 | + albumEditorLoader.sourceComponent = null |
1360 | + } |
1361 | + } |
1362 | + } |
1363 | } |
1364 | } |
1365 | |
1366 | === modified file 'rc/qml/Components/AspectArea.qml' |
1367 | --- rc/qml/Components/AspectArea.qml 2013-06-20 11:54:49 +0000 |
1368 | +++ rc/qml/Components/AspectArea.qml 2015-11-05 19:26:06 +0000 |
1369 | @@ -1,5 +1,5 @@ |
1370 | /* |
1371 | - * Copyright (C) 2012 Canonical Ltd |
1372 | + * Copyright (C) 2012-2015 Canonical Ltd |
1373 | * |
1374 | * This program is free software: you can redistribute it and/or modify |
1375 | * it under the terms of the GNU General Public License version 3 as |
1376 | @@ -17,7 +17,7 @@ |
1377 | * Charles Lindsay <chaz@yorba.org> |
1378 | */ |
1379 | |
1380 | -import QtQuick 2.0 |
1381 | +import QtQuick 2.4 |
1382 | |
1383 | // An item that contains an inside area the maximum size of a particular aspect |
1384 | // ratio (similar to the Image.PreserveAspectFit fillMode of QtQuick's Image |
1385 | |
1386 | === modified file 'rc/qml/Components/Checkerboard.qml' |
1387 | --- rc/qml/Components/Checkerboard.qml 2013-06-20 11:54:49 +0000 |
1388 | +++ rc/qml/Components/Checkerboard.qml 2015-11-05 19:26:06 +0000 |
1389 | @@ -1,5 +1,5 @@ |
1390 | /* |
1391 | - * Copyright (C) 2011 Canonical Ltd |
1392 | + * Copyright (C) 2011-2015 Canonical Ltd |
1393 | * |
1394 | * This program is free software: you can redistribute it and/or modify |
1395 | * it under the terms of the GNU General Public License version 3 as |
1396 | @@ -19,8 +19,8 @@ |
1397 | * Charles Lindsay <chaz@yorba.org> |
1398 | */ |
1399 | |
1400 | -import QtQuick 2.0 |
1401 | -import Ubuntu.Components 0.1 |
1402 | +import QtQuick 2.4 |
1403 | +import Ubuntu.Components 1.3 |
1404 | import "../../js/Gallery.js" as Gallery |
1405 | import "../../js/GalleryUtility.js" as GalleryUtility |
1406 | import "../Utility" |
1407 | @@ -197,13 +197,6 @@ |
1408 | |
1409 | clip: true |
1410 | |
1411 | - Image { |
1412 | - anchors.fill: parent |
1413 | - |
1414 | - source: "../../img/background-paper.png" |
1415 | - fillMode: Image.Tile |
1416 | - } |
1417 | - |
1418 | GridView { |
1419 | id: grid |
1420 | objectName: "grid" |
1421 | |
1422 | === modified file 'rc/qml/Components/CheckerboardDelegate.qml' |
1423 | --- rc/qml/Components/CheckerboardDelegate.qml 2013-06-20 11:54:49 +0000 |
1424 | +++ rc/qml/Components/CheckerboardDelegate.qml 2015-11-05 19:26:06 +0000 |
1425 | @@ -1,5 +1,5 @@ |
1426 | /* |
1427 | - * Copyright (C) 2012 Canonical Ltd |
1428 | + * Copyright (C) 2012-2015 Canonical Ltd |
1429 | * |
1430 | * This program is free software: you can redistribute it and/or modify |
1431 | * it under the terms of the GNU General Public License version 3 as |
1432 | @@ -17,7 +17,7 @@ |
1433 | * Charles Lindsay <chaz@yorba.org> |
1434 | */ |
1435 | |
1436 | -import QtQuick 2.0 |
1437 | +import QtQuick 2.4 |
1438 | import "../../js/GalleryUtility.js" as GalleryUtility |
1439 | |
1440 | // A child delegate for a Checkerboard. Tightly coupled to Checkerboard due to |
1441 | |
1442 | === modified file 'rc/qml/Components/DeleteDialog.qml' |
1443 | --- rc/qml/Components/DeleteDialog.qml 2014-08-13 14:28:00 +0000 |
1444 | +++ rc/qml/Components/DeleteDialog.qml 2015-11-05 19:26:06 +0000 |
1445 | @@ -1,5 +1,5 @@ |
1446 | /* |
1447 | - * Copyright (C) 2013 Canonical Ltd |
1448 | + * Copyright (C) 2013-2015 Canonical Ltd |
1449 | * |
1450 | * This program is free software: you can redistribute it and/or modify |
1451 | * it under the terms of the GNU General Public License version 3 as |
1452 | @@ -14,9 +14,9 @@ |
1453 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1454 | */ |
1455 | |
1456 | -import QtQuick 2.0 |
1457 | -import Ubuntu.Components 0.1 |
1458 | -import Ubuntu.Components.Popups 0.1 |
1459 | +import QtQuick 2.4 |
1460 | +import Ubuntu.Components 1.3 |
1461 | +import Ubuntu.Components.Popups 1.3 |
1462 | import "../../js/Gallery.js" as Gallery |
1463 | |
1464 | /*! |
1465 | |
1466 | === modified file 'rc/qml/Components/DeleteOrDeleteWithContentsDialog.qml' |
1467 | --- rc/qml/Components/DeleteOrDeleteWithContentsDialog.qml 2014-04-17 00:22:15 +0000 |
1468 | +++ rc/qml/Components/DeleteOrDeleteWithContentsDialog.qml 2015-11-05 19:26:06 +0000 |
1469 | @@ -1,5 +1,5 @@ |
1470 | /* |
1471 | - * Copyright (C) 2012 Canonical Ltd |
1472 | + * Copyright (C) 2012-2015 Canonical Ltd |
1473 | * |
1474 | * This program is free software: you can redistribute it and/or modify |
1475 | * it under the terms of the GNU General Public License version 3 as |
1476 | @@ -17,10 +17,10 @@ |
1477 | * Eric Gregory <eric@yorba.org> |
1478 | */ |
1479 | |
1480 | -import QtQuick 2.0 |
1481 | -import Ubuntu.Components 0.1 |
1482 | -import Ubuntu.Components.Popups 0.1 |
1483 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
1484 | +import QtQuick 2.4 |
1485 | +import Ubuntu.Components 1.3 |
1486 | +import Ubuntu.Components.Popups 1.3 |
1487 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
1488 | import Gallery 1.0 |
1489 | |
1490 | /*! |
1491 | |
1492 | === modified file 'rc/qml/Components/EventCard.qml' |
1493 | --- rc/qml/Components/EventCard.qml 2015-05-21 10:13:59 +0000 |
1494 | +++ rc/qml/Components/EventCard.qml 2015-11-05 19:26:06 +0000 |
1495 | @@ -1,5 +1,5 @@ |
1496 | /* |
1497 | - * Copyright (C) 2012 Canonical Ltd |
1498 | + * Copyright (C) 2012-2015 Canonical Ltd |
1499 | * |
1500 | * This program is free software: you can redistribute it and/or modify |
1501 | * it under the terms of the GNU General Public License version 3 as |
1502 | @@ -20,8 +20,8 @@ |
1503 | * Lucas Beeler <lucas@yorba.org> |
1504 | */ |
1505 | |
1506 | -import QtQuick 2.0 |
1507 | -import Ubuntu.Components 0.1 |
1508 | +import QtQuick 2.4 |
1509 | +import Ubuntu.Components 1.3 |
1510 | import "../../js/Gallery.js" as Gallery |
1511 | import "../Utility" |
1512 | |
1513 | @@ -37,7 +37,7 @@ |
1514 | */ |
1515 | |
1516 | radius: "medium" |
1517 | - color: "#dddddd" |
1518 | + backgroundColor: "#dddddd" |
1519 | opacity: 0.8 |
1520 | |
1521 | width: units.gu(12) |
1522 | |
1523 | === modified file 'rc/qml/Components/MediaGrid.qml' |
1524 | --- rc/qml/Components/MediaGrid.qml 2015-07-27 22:39:25 +0000 |
1525 | +++ rc/qml/Components/MediaGrid.qml 2015-11-05 19:26:06 +0000 |
1526 | @@ -1,5 +1,5 @@ |
1527 | /* |
1528 | - * Copyright (C) 2013 Canonical Ltd |
1529 | + * Copyright (C) 2013-2015 Canonical Ltd |
1530 | * |
1531 | * This program is free software: you can redistribute it and/or modify |
1532 | * it under the terms of the GNU General Public License version 3 as |
1533 | @@ -14,8 +14,9 @@ |
1534 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1535 | */ |
1536 | |
1537 | -import QtQuick 2.0 |
1538 | -import Ubuntu.Components 0.1 |
1539 | +import QtQuick 2.4 |
1540 | +import Ubuntu.Components 1.3 |
1541 | +import Ubuntu.Thumbnailer 0.1 |
1542 | import Gallery 1.0 |
1543 | import "../OrganicView" |
1544 | import "../Utility" |
1545 | @@ -79,9 +80,10 @@ |
1546 | height: photosGrid.thumbnailSize |
1547 | |
1548 | radius: "medium" |
1549 | - property bool isLoading: image.status === Image.Loading |
1550 | + property bool isLoading: source.status === Image.Loading |
1551 | |
1552 | - image: Image { |
1553 | + sourceFillMode: UbuntuShape.PreserveAspectCrop |
1554 | + source: Image { |
1555 | id: thumbImage |
1556 | source: "image://thumbnailer/" + mediaSource.path + "?at=" + Date.now() |
1557 | asynchronous: true |
1558 | |
1559 | === modified file 'rc/qml/Components/MediaSelector.qml' |
1560 | --- rc/qml/Components/MediaSelector.qml 2014-08-27 02:20:58 +0000 |
1561 | +++ rc/qml/Components/MediaSelector.qml 2015-11-05 19:26:06 +0000 |
1562 | @@ -1,5 +1,5 @@ |
1563 | /* |
1564 | - * Copyright (C) 2013 Canonical Ltd |
1565 | + * Copyright (C) 2013-2015 Canonical Ltd |
1566 | * |
1567 | * This program is free software: you can redistribute it and/or modify |
1568 | * it under the terms of the GNU General Public License version 3 as |
1569 | @@ -14,9 +14,9 @@ |
1570 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1571 | */ |
1572 | |
1573 | -import QtQuick 2.0 |
1574 | +import QtQuick 2.4 |
1575 | import Gallery 1.0 |
1576 | -import Ubuntu.Components 1.1 |
1577 | +import Ubuntu.Components 1.3 |
1578 | import "../../js/Gallery.js" as Gallery |
1579 | import "../OrganicView" |
1580 | import "../Utility" |
1581 | |
1582 | === modified file 'rc/qml/Components/MouseAreaWithMultipoint.qml' |
1583 | --- rc/qml/Components/MouseAreaWithMultipoint.qml 2014-04-04 21:34:42 +0000 |
1584 | +++ rc/qml/Components/MouseAreaWithMultipoint.qml 2015-11-05 19:26:06 +0000 |
1585 | @@ -1,5 +1,5 @@ |
1586 | /* |
1587 | - * Copyright (C) 2014 Canonical Ltd |
1588 | + * Copyright (C) 2014-2015 Canonical Ltd |
1589 | * |
1590 | * This program is free software: you can redistribute it and/or modify |
1591 | * it under the terms of the GNU General Public License version 3 as |
1592 | @@ -14,7 +14,7 @@ |
1593 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1594 | */ |
1595 | |
1596 | -import QtQuick 2.0 |
1597 | +import QtQuick 2.4 |
1598 | Item { |
1599 | id: mouseAreaWithMultipoint |
1600 | |
1601 | |
1602 | === modified file 'rc/qml/Components/PopupAlbumPicker.qml' |
1603 | --- rc/qml/Components/PopupAlbumPicker.qml 2014-09-02 09:28:39 +0000 |
1604 | +++ rc/qml/Components/PopupAlbumPicker.qml 2015-11-05 19:26:06 +0000 |
1605 | @@ -1,5 +1,5 @@ |
1606 | /* |
1607 | - * Copyright (C) 2011 Canonical Ltd |
1608 | + * Copyright (C) 2011-2015 Canonical Ltd |
1609 | * |
1610 | * This program is free software: you can redistribute it and/or modify |
1611 | * it under the terms of the GNU General Public License version 3 as |
1612 | @@ -18,10 +18,10 @@ |
1613 | * Charles Lindsay <chaz@yorba.org> |
1614 | */ |
1615 | |
1616 | -import QtQuick 2.0 |
1617 | +import QtQuick 2.4 |
1618 | import Gallery 1.0 |
1619 | -import Ubuntu.Components 0.1 |
1620 | -import Ubuntu.Components.Popups 0.1 |
1621 | +import Ubuntu.Components 1.3 |
1622 | +import Ubuntu.Components.Popups 1.3 |
1623 | import "../AlbumViewer" |
1624 | import "../../js/Gallery.js" as Gallery |
1625 | |
1626 | |
1627 | === modified file 'rc/qml/Components/SwipeArea.qml' |
1628 | --- rc/qml/Components/SwipeArea.qml 2013-06-20 11:54:49 +0000 |
1629 | +++ rc/qml/Components/SwipeArea.qml 2015-11-05 19:26:06 +0000 |
1630 | @@ -1,5 +1,5 @@ |
1631 | /* |
1632 | - * Copyright (C) 2012 Canonical Ltd |
1633 | + * Copyright (C) 2012-2015 Canonical Ltd |
1634 | * |
1635 | * This program is free software: you can redistribute it and/or modify |
1636 | * it under the terms of the GNU General Public License version 3 as |
1637 | @@ -18,8 +18,8 @@ |
1638 | * Charles Lindsay <chaz@yorba.org> |
1639 | */ |
1640 | |
1641 | -import QtQuick 2.0 |
1642 | -import Ubuntu.Components 0.1 |
1643 | +import QtQuick 2.4 |
1644 | +import Ubuntu.Components 1.3 |
1645 | |
1646 | // Because some QML components' natural swiping motion requires custom |
1647 | // event handling, this emulates it and allows for programmatic control |
1648 | |
1649 | === modified file 'rc/qml/Components/TextEditOnClick.qml' |
1650 | --- rc/qml/Components/TextEditOnClick.qml 2014-10-08 15:16:02 +0000 |
1651 | +++ rc/qml/Components/TextEditOnClick.qml 2015-11-05 19:26:06 +0000 |
1652 | @@ -1,5 +1,5 @@ |
1653 | /* |
1654 | - * Copyright (C) 2012 Canonical Ltd |
1655 | + * Copyright (C) 2012-2015 Canonical Ltd |
1656 | * |
1657 | * This program is free software: you can redistribute it and/or modify |
1658 | * it under the terms of the GNU General Public License version 3 as |
1659 | @@ -17,7 +17,7 @@ |
1660 | * Eric Gregory <eric@yorba.org> |
1661 | */ |
1662 | |
1663 | -import QtQuick 2.0 |
1664 | +import QtQuick 2.4 |
1665 | |
1666 | // Editable text area that becomes editable when clicked. Editing ends when |
1667 | // enter is pressed or when done() is called. The isEditing property indicates |
1668 | |
1669 | === modified file 'rc/qml/EventsOverview.qml' |
1670 | --- rc/qml/EventsOverview.qml 2014-11-07 12:51:32 +0000 |
1671 | +++ rc/qml/EventsOverview.qml 2015-11-05 19:26:06 +0000 |
1672 | @@ -1,5 +1,5 @@ |
1673 | /* |
1674 | - * Copyright (C) 2012 Canonical Ltd |
1675 | + * Copyright (C) 2012-2015 Canonical Ltd |
1676 | * |
1677 | * This program is free software: you can redistribute it and/or modify |
1678 | * it under the terms of the GNU General Public License version 3 as |
1679 | @@ -14,11 +14,11 @@ |
1680 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1681 | */ |
1682 | |
1683 | -import QtQuick 2.0 |
1684 | -import Ubuntu.Components 0.1 |
1685 | -import Ubuntu.Components.Popups 0.1 |
1686 | +import QtQuick 2.4 |
1687 | +import Ubuntu.Components 1.3 |
1688 | +import Ubuntu.Components.Popups 1.3 |
1689 | import Gallery 1.0 |
1690 | -import Ubuntu.Content 0.1 |
1691 | +import Ubuntu.Content 1.3 |
1692 | import "Components" |
1693 | import "OrganicView" |
1694 | import "Utility" |
1695 | @@ -102,9 +102,61 @@ |
1696 | } |
1697 | } |
1698 | |
1699 | - property Item overviewTools: PhotosToolbarActions { |
1700 | - selection: organicEventView.selection |
1701 | - } |
1702 | + property list<Action> overviewActions: [ |
1703 | + Action { |
1704 | + objectName: "selectButton" |
1705 | + text: i18n.tr("Select") |
1706 | + iconName: "select" |
1707 | + enabled: selection !== null |
1708 | + onTriggered: selection.inSelectionMode = true; |
1709 | + }, |
1710 | + Action { |
1711 | + objectName: "cameraButton" |
1712 | + text: i18n.tr("Camera") |
1713 | + visible: !APP.desktopMode |
1714 | + iconName: "camera-app-symbolic" |
1715 | + onTriggered: Qt.openUrlExternally("appid://com.ubuntu.camera/camera/current-user-version") |
1716 | + } |
1717 | + ] |
1718 | + |
1719 | + property list<Action> selectActions: [ |
1720 | + Action { |
1721 | + id: addButton |
1722 | + objectName: "addButton" |
1723 | + |
1724 | + text: i18n.tr("Add") |
1725 | + iconName: "add" |
1726 | + enabled: selection.selectedCount > 0 |
1727 | + onTriggered: __albumPicker = PopupUtils.open(Qt.resolvedUrl("Components/PopupAlbumPicker.qml"), |
1728 | + null, |
1729 | + {contentHeight: organicEventView.__pickerContentHeight}); |
1730 | + |
1731 | + }, |
1732 | + Action { |
1733 | + objectName: "deleteButton" |
1734 | + |
1735 | + text: i18n.tr("Delete") |
1736 | + iconName: "delete" |
1737 | + enabled: selection.selectedCount > 0 |
1738 | + onTriggered: PopupUtils.open(deleteDialog, null); |
1739 | + }, |
1740 | + Action { |
1741 | + objectName: "shareButton" |
1742 | + text: i18n.tr("Share") |
1743 | + iconName: "share" |
1744 | + enabled: selection.selectedMediaCount == 1 |
1745 | + onTriggered: { |
1746 | + overview.pushPage(sharePicker) |
1747 | + sharePicker.visible = true; |
1748 | + } |
1749 | + } |
1750 | + ] |
1751 | + |
1752 | + property Action selectBackAction: Action { |
1753 | + text: i18n.tr("Cancel") |
1754 | + iconName: "back" |
1755 | + onTriggered: organicEventView.leaveSelectionMode(); |
1756 | + } |
1757 | |
1758 | property int __pickerContentHeight: height - units.gu(20) |
1759 | property PopupAlbumPicker __albumPicker |
1760 | @@ -116,29 +168,10 @@ |
1761 | } |
1762 | } |
1763 | |
1764 | - property Item selectionTools: SelectionToolbarAction { |
1765 | - selection: organicEventView.selection |
1766 | - |
1767 | - onCancelClicked: { |
1768 | - organicEventView.leaveSelectionMode(); |
1769 | - } |
1770 | - onAddClicked: { |
1771 | - __albumPicker = PopupUtils.open(Qt.resolvedUrl("Components/PopupAlbumPicker.qml"), |
1772 | - null, |
1773 | - {contentHeight: organicEventView.__pickerContentHeight}); |
1774 | - } |
1775 | - onDeleteClicked: { |
1776 | - PopupUtils.open(deleteDialog, null); |
1777 | - } |
1778 | - |
1779 | - onShareClicked: { |
1780 | - overview.pushPage(sharePicker); |
1781 | - sharePicker.visible = true; |
1782 | - } |
1783 | - } |
1784 | - |
1785 | property bool selectionMode: selection.inSelectionMode |
1786 | - tools: selectionMode ? selectionTools : overviewTools |
1787 | + |
1788 | + head.actions: selectionMode ? selectActions : overviewActions |
1789 | + head.backAction: selectionMode ? selectBackAction : null |
1790 | |
1791 | Component { |
1792 | id: contentItemComp |
1793 | |
1794 | === modified file 'rc/qml/GalleryApplication.qml' |
1795 | --- rc/qml/GalleryApplication.qml 2015-02-02 18:54:14 +0000 |
1796 | +++ rc/qml/GalleryApplication.qml 2015-11-05 19:26:06 +0000 |
1797 | @@ -1,5 +1,5 @@ |
1798 | /* |
1799 | - * Copyright (C) 2011 Canonical Ltd |
1800 | + * Copyright (C) 2011-2015 Canonical Ltd |
1801 | * |
1802 | * This program is free software: you can redistribute it and/or modify |
1803 | * it under the terms of the GNU General Public License version 3 as |
1804 | @@ -19,10 +19,10 @@ |
1805 | * Charles Lindsay <chaz@yorba.org |
1806 | */ |
1807 | |
1808 | -import QtQuick 2.0 |
1809 | -import QtQuick.Window 2.0 |
1810 | +import QtQuick 2.4 |
1811 | +import QtQuick.Window 2.2 |
1812 | import "../js/Gallery.js" as Gallery |
1813 | -import Ubuntu.Components 0.1 // Necessary to make filename@GU.ext images load |
1814 | +import Ubuntu.Components 1.3 // Necessary to make filename@GU.ext images load |
1815 | |
1816 | Item { |
1817 | id: application |
1818 | |
1819 | === modified file 'rc/qml/LoadingScreen.qml' |
1820 | --- rc/qml/LoadingScreen.qml 2014-09-12 13:41:48 +0000 |
1821 | +++ rc/qml/LoadingScreen.qml 2015-11-05 19:26:06 +0000 |
1822 | @@ -1,5 +1,5 @@ |
1823 | /* |
1824 | - * Copyright (C) 2012 Canonical Ltd |
1825 | + * Copyright (C) 2012-2015 Canonical Ltd |
1826 | * |
1827 | * This program is free software: you can redistribute it and/or modify |
1828 | * it under the terms of the GNU General Public License version 3 as |
1829 | @@ -17,19 +17,12 @@ |
1830 | * Charles Lindsay <chaz@yorba.org |
1831 | */ |
1832 | |
1833 | -import QtQuick 2.0 |
1834 | -import Ubuntu.Components 0.1 |
1835 | - |
1836 | +import QtQuick 2.4 |
1837 | +import Ubuntu.Components 1.3 |
1838 | |
1839 | Page { |
1840 | id: loadingScreen |
1841 | |
1842 | - Image { |
1843 | - anchors.fill: parent |
1844 | - source: "../img/background-paper.png" |
1845 | - fillMode: Image.Tile |
1846 | - } |
1847 | - |
1848 | Column { |
1849 | anchors.centerIn: parent |
1850 | width: parent.width |
1851 | |
1852 | === modified file 'rc/qml/MainScreen.qml' |
1853 | --- rc/qml/MainScreen.qml 2015-08-05 22:55:43 +0000 |
1854 | +++ rc/qml/MainScreen.qml 2015-11-05 19:26:06 +0000 |
1855 | @@ -17,8 +17,8 @@ |
1856 | * Charles Lindsay <chaz@yorba.org |
1857 | */ |
1858 | |
1859 | -import QtQuick 2.0 |
1860 | -import Ubuntu.Components 0.1 |
1861 | +import QtQuick 2.4 |
1862 | +import Ubuntu.Components 1.3 |
1863 | import Ubuntu.Unity.Action 1.0 as UnityActions |
1864 | import Gallery 1.0 |
1865 | import "../js/GalleryUtility.js" as GalleryUtility |
1866 | @@ -29,8 +29,6 @@ |
1867 | id: overview |
1868 | objectName: "overview" |
1869 | |
1870 | - useDeprecatedToolbar: false |
1871 | - |
1872 | anchors.fill: parent |
1873 | applicationName: "com.ubuntu.gallery" |
1874 | automaticOrientation: application.automaticOrientation |
1875 | @@ -73,19 +71,6 @@ |
1876 | } |
1877 | } |
1878 | |
1879 | - function setHeaderVisibility(visible, toggleFullscreen) |
1880 | - { |
1881 | - toggleFullscreen = typeof toggleFullscreen !== 'undefined' ? toggleFullscreen : true |
1882 | - header.visible = visible; |
1883 | - if (!APP.desktopMode && toggleFullscreen) |
1884 | - setFullScreenTimer.start(); |
1885 | - } |
1886 | - |
1887 | - function toggleHeaderVisibility() |
1888 | - { |
1889 | - setHeaderVisibility(!header.visible); |
1890 | - } |
1891 | - |
1892 | Component.onCompleted: { |
1893 | pageStack.push(tabs); |
1894 | } |
1895 | @@ -113,7 +98,7 @@ |
1896 | eventsOverviewLoader.item.positionViewAtBeginning(); |
1897 | } |
1898 | |
1899 | - setHeaderVisibility(true); |
1900 | + header.visible = true; |
1901 | |
1902 | tabs.selectedTabIndex = 1; |
1903 | } |
1904 | @@ -177,7 +162,18 @@ |
1905 | id: eventsOverview |
1906 | anchors.fill: parent |
1907 | |
1908 | + Connections { |
1909 | + target: photoViewerLoader.item |
1910 | + onCloseRequested: { |
1911 | + eventsOverview.head.visible = true; |
1912 | + eventsOverview.head.locked = false; |
1913 | + } |
1914 | + } |
1915 | + |
1916 | onMediaSourcePressed: { |
1917 | + eventsOverview.head.visible = false; |
1918 | + eventsOverview.head.locked = true; |
1919 | + |
1920 | photoViewerLoader.load(); |
1921 | overview.mediaCurrentlyInView = mediaSource.path; |
1922 | |
1923 | @@ -220,9 +216,16 @@ |
1924 | Connections { |
1925 | target: photoViewerLoader.item |
1926 | onSelected: positionViewAtSelected(index); |
1927 | + onCloseRequested: { |
1928 | + photosOverview.head.visible = true; |
1929 | + photosOverview.head.locked = false; |
1930 | + } |
1931 | } |
1932 | |
1933 | onMediaSourcePressed: { |
1934 | + photosOverview.head.visible = false; |
1935 | + photosOverview.head.locked = true; |
1936 | + |
1937 | photoViewerLoader.load(); |
1938 | overview.mediaCurrentlyInView = mediaSource.path; |
1939 | |
1940 | |
1941 | === modified file 'rc/qml/MediaViewer/ExtrasPhotoEditorPage.qml' |
1942 | --- rc/qml/MediaViewer/ExtrasPhotoEditorPage.qml 2015-02-27 15:28:54 +0000 |
1943 | +++ rc/qml/MediaViewer/ExtrasPhotoEditorPage.qml 2015-11-05 19:26:06 +0000 |
1944 | @@ -1,9 +1,5 @@ |
1945 | -import QtQuick 2.0 |
1946 | -import Ubuntu.Components 1.1 |
1947 | -import Ubuntu.Components.Extras 0.2 as Extras |
1948 | - |
1949 | /* |
1950 | - * Copyright (C) 2014 Canonical Ltd |
1951 | + * Copyright (C) 2014-2015 Canonical Ltd |
1952 | * |
1953 | * This program is free software: you can redistribute it and/or modify |
1954 | * it under the terms of the GNU General Public License version 3 as |
1955 | @@ -18,6 +14,10 @@ |
1956 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1957 | */ |
1958 | |
1959 | +import QtQuick 2.4 |
1960 | +import Ubuntu.Components 1.3 |
1961 | +import Ubuntu.Components.Extras 0.2 as Extras |
1962 | + |
1963 | Page { |
1964 | id: page |
1965 | property string photo |
1966 | |
1967 | === modified file 'rc/qml/MediaViewer/GalleryPhotoComponent.qml' |
1968 | --- rc/qml/MediaViewer/GalleryPhotoComponent.qml 2015-07-03 22:54:32 +0000 |
1969 | +++ rc/qml/MediaViewer/GalleryPhotoComponent.qml 2015-11-05 19:26:06 +0000 |
1970 | @@ -1,5 +1,5 @@ |
1971 | /* |
1972 | - * Copyright (C) 2011-2012 Canonical Ltd |
1973 | + * Copyright (C) 2011-2015 Canonical Ltd |
1974 | * |
1975 | * This program is free software: you can redistribute it and/or modify |
1976 | * it under the terms of the GNU General Public License version 3 as |
1977 | @@ -19,7 +19,7 @@ |
1978 | * Eric Gregory <eric@yorba.org> |
1979 | */ |
1980 | |
1981 | -import QtQuick 2.0 |
1982 | +import QtQuick 2.4 |
1983 | |
1984 | // Basic photo component. Can be used on its own, or as a delegate |
1985 | // for PhotoViewer. |
1986 | |
1987 | === modified file 'rc/qml/MediaViewer/GalleryPhotoEditorPage.qml' |
1988 | --- rc/qml/MediaViewer/GalleryPhotoEditorPage.qml 2015-02-27 20:13:30 +0000 |
1989 | +++ rc/qml/MediaViewer/GalleryPhotoEditorPage.qml 2015-11-05 19:26:06 +0000 |
1990 | @@ -1,8 +1,5 @@ |
1991 | -import QtQuick 2.0 |
1992 | -import Ubuntu.Components 1.1 |
1993 | - |
1994 | /* |
1995 | - * Copyright (C) 2014 Canonical Ltd |
1996 | + * Copyright (C) 2014-2015 Canonical Ltd |
1997 | * |
1998 | * This program is free software: you can redistribute it and/or modify |
1999 | * it under the terms of the GNU General Public License version 3 as |
2000 | @@ -17,6 +14,9 @@ |
2001 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2002 | */ |
2003 | |
2004 | +import QtQuick 2.4 |
2005 | +import Ubuntu.Components 1.3 |
2006 | + |
2007 | Page { |
2008 | id: page |
2009 | property string photo |
2010 | |
2011 | === modified file 'rc/qml/MediaViewer/MediaListView.qml' |
2012 | --- rc/qml/MediaViewer/MediaListView.qml 2014-04-08 00:27:12 +0000 |
2013 | +++ rc/qml/MediaViewer/MediaListView.qml 2015-11-05 19:26:06 +0000 |
2014 | @@ -1,5 +1,5 @@ |
2015 | /* |
2016 | - * Copyright (C) 2011-2012 Canonical Ltd |
2017 | + * Copyright (C) 2011-2015 Canonical Ltd |
2018 | * |
2019 | * This program is free software: you can redistribute it and/or modify |
2020 | * it under the terms of the GNU General Public License version 3 as |
2021 | @@ -19,8 +19,8 @@ |
2022 | * Eric Gregory <eric@yorba.org> |
2023 | */ |
2024 | |
2025 | -import QtQuick 2.0 |
2026 | -import Ubuntu.Components 0.1 |
2027 | +import QtQuick 2.4 |
2028 | +import Ubuntu.Components 1.3 |
2029 | import "../Components" |
2030 | |
2031 | // Displays a flickable photo stream. |
2032 | |
2033 | === modified file 'rc/qml/MediaViewer/MediaViewer.qml' |
2034 | --- rc/qml/MediaViewer/MediaViewer.qml 2015-03-18 00:14:57 +0000 |
2035 | +++ rc/qml/MediaViewer/MediaViewer.qml 2015-11-05 19:26:06 +0000 |
2036 | @@ -18,12 +18,12 @@ |
2037 | * Lucas Beeler <lucas@yorba.org> |
2038 | */ |
2039 | |
2040 | -import QtQuick 2.0 |
2041 | +import QtQuick 2.4 |
2042 | import Gallery 1.0 |
2043 | -import Ubuntu.Components 1.1 |
2044 | -import Ubuntu.Components.Popups 0.1 |
2045 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
2046 | -import Ubuntu.Content 0.1 |
2047 | +import Ubuntu.Components 1.3 |
2048 | +import Ubuntu.Components.Popups 1.3 |
2049 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
2050 | +import Ubuntu.Content 1.3 |
2051 | import "../Components" |
2052 | import "../Utility" |
2053 | import "../../js/Gallery.js" as Gallery |
2054 | @@ -74,6 +74,9 @@ |
2055 | */ |
2056 | signal editRequested(variant photo) |
2057 | |
2058 | + signal setHeaderVisibilityRequested(bool visibility) |
2059 | + signal toggleHeaderVisibilityRequested() |
2060 | + |
2061 | /*! |
2062 | */ |
2063 | function setCurrentIndex(index) { |
2064 | @@ -163,7 +166,7 @@ |
2065 | return 1.0 - Math.abs((galleryPhotoViewer.contentX - x) / width); |
2066 | } |
2067 | |
2068 | - onClicked: overview.toggleHeaderVisibility() |
2069 | + onClicked: viewerWrapper.toggleHeaderVisibilityRequested() |
2070 | } |
2071 | |
2072 | // Don't allow flicking while the chrome is actively displaying a popup |
2073 | @@ -177,22 +180,23 @@ |
2074 | ContentItem {} |
2075 | } |
2076 | |
2077 | - Rectangle { |
2078 | + Page { |
2079 | id: sharePicker |
2080 | - anchors.fill: parent |
2081 | visible: false |
2082 | + title: i18n.tr("Share to") |
2083 | |
2084 | - onVisibleChanged: overview.setHeaderVisibility(!visible, false) |
2085 | + onVisibleChanged: viewerWrapper.setHeaderVisibilityRequested(!visible) |
2086 | |
2087 | ContentPeerPicker { |
2088 | objectName: "sharePicker" |
2089 | + showTitle: false |
2090 | anchors.fill: parent |
2091 | - visible: parent.visible |
2092 | contentType: galleryPhotoViewer.media.type === MediaSource.Video ? ContentType.Videos : ContentType.Pictures |
2093 | handler: ContentHandler.Share |
2094 | |
2095 | onPeerSelected: { |
2096 | - parent.visible = false; |
2097 | + overview.popPage(); |
2098 | + sharePicker.visible = false; |
2099 | var curTransfer = peer.request(); |
2100 | if (curTransfer.state === ContentTransfer.InProgress) |
2101 | { |
2102 | @@ -200,7 +204,10 @@ |
2103 | curTransfer.state = ContentTransfer.Charged; |
2104 | } |
2105 | } |
2106 | - onCancelPressed: parent.visible = false; |
2107 | + onCancelPressed: { |
2108 | + overview.popPage(); |
2109 | + sharePicker.visible = false; |
2110 | + } |
2111 | } |
2112 | } |
2113 | |
2114 | @@ -317,7 +324,7 @@ |
2115 | path = path.replace("file://", "") |
2116 | var editor; |
2117 | try { |
2118 | - Qt.createQmlObject('import QtQuick 2.0; import Ubuntu.Components.Extras 0.2; Item {}', viewerWrapper); |
2119 | + Qt.createQmlObject('import QtQuick 2.4; import Ubuntu.Components.Extras 0.2; Item {}', viewerWrapper); |
2120 | console.log("Loading PhotoEditor Components from Extras"); |
2121 | editor = overview.pushPage(Qt.resolvedUrl("ExtrasPhotoEditorPage.qml"), { photo: path }); |
2122 | } catch (e) { |
2123 | @@ -356,11 +363,15 @@ |
2124 | text: i18n.tr("Share") |
2125 | iconName: "share" |
2126 | visible: !APP.desktopMode |
2127 | - onTriggered: sharePicker.visible = true; |
2128 | + onTriggered: { |
2129 | + overview.pushPage(sharePicker) |
2130 | + sharePicker.visible = true; |
2131 | + } |
2132 | } |
2133 | ] |
2134 | |
2135 | property Action backAction: Action { |
2136 | + objectName: "backButton" |
2137 | iconName: "back" |
2138 | onTriggered: { |
2139 | galleryPhotoViewer.currentItem.reset(); |
2140 | |
2141 | === modified file 'rc/qml/MediaViewer/PhotoEditor.qml' |
2142 | --- rc/qml/MediaViewer/PhotoEditor.qml 2015-03-02 14:55:22 +0000 |
2143 | +++ rc/qml/MediaViewer/PhotoEditor.qml 2015-11-05 19:26:06 +0000 |
2144 | @@ -1,5 +1,5 @@ |
2145 | /* |
2146 | - * Copyright (C) 2014 Canonical Ltd |
2147 | + * Copyright (C) 2014-2015 Canonical Ltd |
2148 | * |
2149 | * This program is free software: you can redistribute it and/or modify |
2150 | * it under the terms of the GNU General Public License version 3 as |
2151 | @@ -14,9 +14,9 @@ |
2152 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2153 | */ |
2154 | |
2155 | -import QtQuick 2.3 |
2156 | -import Ubuntu.Components 1.1 |
2157 | -import Ubuntu.Components.Popups 1.0 |
2158 | +import QtQuick 2.4 |
2159 | +import Ubuntu.Components 1.3 |
2160 | +import Ubuntu.Components.Popups 1.3 |
2161 | import Gallery 1.0 |
2162 | import "PhotoEditor" |
2163 | |
2164 | |
2165 | === modified file 'rc/qml/MediaViewer/PhotoEditor/ActionsBar.qml' |
2166 | --- rc/qml/MediaViewer/PhotoEditor/ActionsBar.qml 2015-02-26 21:00:19 +0000 |
2167 | +++ rc/qml/MediaViewer/PhotoEditor/ActionsBar.qml 2015-11-05 19:26:06 +0000 |
2168 | @@ -1,5 +1,5 @@ |
2169 | /* |
2170 | - * Copyright (C) 2014 Canonical Ltd |
2171 | + * Copyright (C) 2014-2015 Canonical Ltd |
2172 | * |
2173 | * This program is free software: you can redistribute it and/or modify |
2174 | * it under the terms of the GNU General Public License version 3 as |
2175 | @@ -14,9 +14,9 @@ |
2176 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2177 | */ |
2178 | |
2179 | -import QtQuick 2.3 |
2180 | -import Ubuntu.Components 1.1 |
2181 | -import Ubuntu.Components.ListItems 1.0 as ListItem |
2182 | +import QtQuick 2.4 |
2183 | +import Ubuntu.Components 1.3 |
2184 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
2185 | |
2186 | Column { |
2187 | id: bar |
2188 | |
2189 | === modified file 'rc/qml/MediaViewer/PhotoEditor/BusyIndicator.qml' |
2190 | --- rc/qml/MediaViewer/PhotoEditor/BusyIndicator.qml 2015-02-26 21:00:19 +0000 |
2191 | +++ rc/qml/MediaViewer/PhotoEditor/BusyIndicator.qml 2015-11-05 19:26:06 +0000 |
2192 | @@ -14,8 +14,8 @@ |
2193 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2194 | */ |
2195 | |
2196 | -import QtQuick 2.0 |
2197 | -import Ubuntu.Components 0.1 |
2198 | +import QtQuick 2.4 |
2199 | +import Ubuntu.Components 1.3 |
2200 | |
2201 | Item { |
2202 | id: busy |
2203 | |
2204 | === modified file 'rc/qml/MediaViewer/PhotoEditor/CropCorner.qml' |
2205 | --- rc/qml/MediaViewer/PhotoEditor/CropCorner.qml 2015-02-26 21:00:19 +0000 |
2206 | +++ rc/qml/MediaViewer/PhotoEditor/CropCorner.qml 2015-11-05 19:26:06 +0000 |
2207 | @@ -1,5 +1,5 @@ |
2208 | /* |
2209 | - * Copyright (C) 2012 Canonical Ltd |
2210 | + * Copyright (C) 2012-2015 Canonical Ltd |
2211 | * |
2212 | * This program is free software: you can redistribute it and/or modify |
2213 | * it under the terms of the GNU General Public License version 3 as |
2214 | @@ -17,8 +17,8 @@ |
2215 | * Charles Lindsay <chaz@yorba.org> |
2216 | */ |
2217 | |
2218 | -import QtQuick 2.3 |
2219 | -import Ubuntu.Components 1.1 |
2220 | +import QtQuick 2.4 |
2221 | +import Ubuntu.Components 1.3 |
2222 | |
2223 | // A corner of a CropFrame. |
2224 | Item { |
2225 | |
2226 | === modified file 'rc/qml/MediaViewer/PhotoEditor/CropDragArea.qml' |
2227 | --- rc/qml/MediaViewer/PhotoEditor/CropDragArea.qml 2015-02-26 21:00:19 +0000 |
2228 | +++ rc/qml/MediaViewer/PhotoEditor/CropDragArea.qml 2015-11-05 19:26:06 +0000 |
2229 | @@ -1,5 +1,5 @@ |
2230 | /* |
2231 | - * Copyright (C) 2012 Canonical Ltd |
2232 | + * Copyright (C) 2012-2015 Canonical Ltd |
2233 | * |
2234 | * This program is free software: you can redistribute it and/or modify |
2235 | * it under the terms of the GNU General Public License version 3 as |
2236 | @@ -17,7 +17,7 @@ |
2237 | * Charles Lindsay <chaz@yorba.org> |
2238 | */ |
2239 | |
2240 | -import QtQuick 2.3 |
2241 | +import QtQuick 2.4 |
2242 | |
2243 | // A MouseArea meant to drag a corner/edge of a crop area. |
2244 | MouseArea { |
2245 | |
2246 | === modified file 'rc/qml/MediaViewer/PhotoEditor/CropInteractor.qml' |
2247 | --- rc/qml/MediaViewer/PhotoEditor/CropInteractor.qml 2015-02-26 21:00:19 +0000 |
2248 | +++ rc/qml/MediaViewer/PhotoEditor/CropInteractor.qml 2015-11-05 19:26:06 +0000 |
2249 | @@ -1,5 +1,5 @@ |
2250 | /* |
2251 | - * Copyright (C) 2012 Canonical Ltd |
2252 | + * Copyright (C) 2012-2015 Canonical Ltd |
2253 | * |
2254 | * This program is free software: you can redistribute it and/or modify |
2255 | * it under the terms of the GNU General Public License version 3 as |
2256 | @@ -18,8 +18,8 @@ |
2257 | * Lucas Beeler <lucas@yorba.org> |
2258 | */ |
2259 | |
2260 | -import QtQuick 2.3 |
2261 | -import Ubuntu.Components 1.1 |
2262 | +import QtQuick 2.4 |
2263 | +import Ubuntu.Components 1.3 |
2264 | import "GraphicsRoutines.js" as GraphicsRoutines |
2265 | |
2266 | /*! |
2267 | |
2268 | === modified file 'rc/qml/MediaViewer/PhotoEditor/CropOverlay.qml' |
2269 | --- rc/qml/MediaViewer/PhotoEditor/CropOverlay.qml 2015-02-26 21:00:19 +0000 |
2270 | +++ rc/qml/MediaViewer/PhotoEditor/CropOverlay.qml 2015-11-05 19:26:06 +0000 |
2271 | @@ -1,5 +1,5 @@ |
2272 | /* |
2273 | - * Copyright (C) 2012 Canonical Ltd |
2274 | + * Copyright (C) 2012-2015 Canonical Ltd |
2275 | * |
2276 | * This program is free software: you can redistribute it and/or modify |
2277 | * it under the terms of the GNU General Public License version 3 as |
2278 | @@ -18,8 +18,8 @@ |
2279 | * Lucas Beeler <lucas@yorba.org> |
2280 | */ |
2281 | |
2282 | -import QtQuick 2.3 |
2283 | -import Ubuntu.Components 1.1 |
2284 | +import QtQuick 2.4 |
2285 | +import Ubuntu.Components 1.3 |
2286 | import "GraphicsRoutines.js" as GraphicsRoutines |
2287 | |
2288 | /* A CropOverlay is a semi-transparent surface that floats over the photo. It |
2289 | |
2290 | === modified file 'rc/qml/MediaViewer/PhotoEditor/EditStack.qml' |
2291 | --- rc/qml/MediaViewer/PhotoEditor/EditStack.qml 2015-02-26 21:00:19 +0000 |
2292 | +++ rc/qml/MediaViewer/PhotoEditor/EditStack.qml 2015-11-05 19:26:06 +0000 |
2293 | @@ -1,5 +1,5 @@ |
2294 | /* |
2295 | - * Copyright (C) 2014 Canonical Ltd |
2296 | + * Copyright (C) 2014-2015 Canonical Ltd |
2297 | * |
2298 | * This program is free software: you can redistribute it and/or modify |
2299 | * it under the terms of the GNU General Public License version 3 as |
2300 | @@ -14,8 +14,8 @@ |
2301 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2302 | */ |
2303 | |
2304 | -import QtQuick 2.3 |
2305 | -import Ubuntu.Components 1.1 |
2306 | +import QtQuick 2.4 |
2307 | +import Ubuntu.Components 1.3 |
2308 | import Gallery 1.0 |
2309 | |
2310 | Item { |
2311 | |
2312 | === modified file 'rc/qml/MediaViewer/PhotoEditor/ExposureAdjuster.qml' |
2313 | --- rc/qml/MediaViewer/PhotoEditor/ExposureAdjuster.qml 2015-02-26 21:00:19 +0000 |
2314 | +++ rc/qml/MediaViewer/PhotoEditor/ExposureAdjuster.qml 2015-11-05 19:26:06 +0000 |
2315 | @@ -1,5 +1,5 @@ |
2316 | /* |
2317 | - * Copyright (C) 2014 Canonical Ltd |
2318 | + * Copyright (C) 2014-2015 Canonical Ltd |
2319 | * |
2320 | * This program is free software: you can redistribute it and/or modify |
2321 | * it under the terms of the GNU General Public License version 3 as |
2322 | @@ -14,8 +14,8 @@ |
2323 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2324 | */ |
2325 | |
2326 | -import QtQuick 2.3 |
2327 | -import Ubuntu.Components 1.1 |
2328 | +import QtQuick 2.4 |
2329 | +import Ubuntu.Components 1.3 |
2330 | |
2331 | // When the photo editor uses a proper PageStack this will switch back to being |
2332 | // an Item as it will not need to cover what is below it. |
2333 | |
2334 | === modified file 'rc/qml/MediaViewer/PhotoViewerTransition.qml' |
2335 | --- rc/qml/MediaViewer/PhotoViewerTransition.qml 2013-06-20 11:54:49 +0000 |
2336 | +++ rc/qml/MediaViewer/PhotoViewerTransition.qml 2015-11-05 19:26:06 +0000 |
2337 | @@ -1,5 +1,5 @@ |
2338 | /* |
2339 | - * Copyright (C) 2011 Canonical Ltd |
2340 | + * Copyright (C) 2011-2015 Canonical Ltd |
2341 | * |
2342 | * This program is free software: you can redistribute it and/or modify |
2343 | * it under the terms of the GNU General Public License version 3 as |
2344 | @@ -17,7 +17,7 @@ |
2345 | * Charles Lindsay <chaz@yorba.org> |
2346 | */ |
2347 | |
2348 | -import QtQuick 2.0 |
2349 | +import QtQuick 2.4 |
2350 | import "../Utility" |
2351 | import "../../js/GraphicsRoutines.js" as GraphicsRoutines |
2352 | |
2353 | |
2354 | === modified file 'rc/qml/MediaViewer/PopupPhotoViewer.qml' |
2355 | --- rc/qml/MediaViewer/PopupPhotoViewer.qml 2015-02-12 13:48:42 +0000 |
2356 | +++ rc/qml/MediaViewer/PopupPhotoViewer.qml 2015-11-05 19:26:06 +0000 |
2357 | @@ -1,5 +1,5 @@ |
2358 | /* |
2359 | - * Copyright (C) 2011 Canonical Ltd |
2360 | + * Copyright (C) 2011-2015 Canonical Ltd |
2361 | * |
2362 | * This program is free software: you can redistribute it and/or modify |
2363 | * it under the terms of the GNU General Public License version 3 as |
2364 | @@ -17,8 +17,8 @@ |
2365 | * Charles Lindsay <chaz@yorba.org> |
2366 | */ |
2367 | |
2368 | -import QtQuick 2.0 |
2369 | -import Ubuntu.Components 1.1 |
2370 | +import QtQuick 2.4 |
2371 | +import Ubuntu.Components 1.3 |
2372 | import "../Utility" |
2373 | |
2374 | // A PhotoViewer that is opened and closed with the PhotoViewerTransition. |
2375 | @@ -89,12 +89,21 @@ |
2376 | viewer.closeMediaViewer(); |
2377 | } |
2378 | |
2379 | - head.actions: { |
2380 | - if (selection && selection.inSelectionMode) |
2381 | - return selectActions; |
2382 | - return viewer.actions; |
2383 | + head.visible: false |
2384 | + head.locked: true |
2385 | + |
2386 | + header: PageHeader { |
2387 | + objectName: "photoViewerHeader" |
2388 | + |
2389 | + title: popupPhotoViewer.title |
2390 | + trailingActionBar.actions: { |
2391 | + if (selection && selection.inSelectionMode) |
2392 | + return selectActions; |
2393 | + return viewer.actions; |
2394 | + } |
2395 | + |
2396 | + leadingActionBar.actions: viewer.backAction |
2397 | } |
2398 | - head.backAction: viewer.backAction |
2399 | |
2400 | MediaViewer { |
2401 | id: viewer |
2402 | @@ -114,6 +123,13 @@ |
2403 | onIsReadyChanged: updateVisibility() |
2404 | onOpenCompletedChanged: updateVisibility() |
2405 | |
2406 | + onSetHeaderVisibilityRequested: popupPhotoViewer.header.visible = visibility |
2407 | + onToggleHeaderVisibilityRequested: { |
2408 | + popupPhotoViewer.header.visible = !popupPhotoViewer.header.visible |
2409 | + if (!APP.desktopMode) |
2410 | + setFullScreen(!popupPhotoViewer.header.visible); |
2411 | + } |
2412 | + |
2413 | // Internal |
2414 | function updateVisibility() { |
2415 | if (isReady && openCompleted) { |
2416 | @@ -135,9 +151,9 @@ |
2417 | setFullScreen(true); |
2418 | overview.pushPage(popupPhotoViewer); |
2419 | if (selection && selection.inSelectionMode) |
2420 | - overview.setHeaderVisibility(true); |
2421 | + popupPhotoViewer.header.visible = true; |
2422 | else |
2423 | - overview.setHeaderVisibility(false); |
2424 | + popupPhotoViewer.header.visible = false; |
2425 | opened(); |
2426 | } |
2427 | |
2428 | |
2429 | === modified file 'rc/qml/MediaViewer/SingleMediaViewer.qml' |
2430 | --- rc/qml/MediaViewer/SingleMediaViewer.qml 2015-09-15 17:12:45 +0000 |
2431 | +++ rc/qml/MediaViewer/SingleMediaViewer.qml 2015-11-05 19:26:06 +0000 |
2432 | @@ -1,5 +1,5 @@ |
2433 | /* |
2434 | - * Copyright 2014 Canonical Ltd. |
2435 | + * Copyright 2014-2015 Canonical Ltd. |
2436 | * |
2437 | * This program is free software; you can redistribute it and/or modify |
2438 | * it under the terms of the GNU General Public License as published by |
2439 | @@ -14,12 +14,12 @@ |
2440 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2441 | */ |
2442 | |
2443 | -import QtQuick 2.2 |
2444 | +import QtQuick 2.4 |
2445 | import QtMultimedia 5.0 |
2446 | -import Ubuntu.Components 1.0 |
2447 | -import Ubuntu.Components.ListItems 1.0 as ListItems |
2448 | -import Ubuntu.Components.Popups 1.0 |
2449 | -import Ubuntu.Content 0.1 |
2450 | +import Ubuntu.Components 1.3 |
2451 | +import Ubuntu.Components.ListItems 1.3 as ListItems |
2452 | +import Ubuntu.Components.Popups 1.3 |
2453 | +import Ubuntu.Content 1.3 |
2454 | import Ubuntu.Thumbnailer 0.1 |
2455 | import Gallery 1.0 |
2456 | import "../Components" |
2457 | |
2458 | === modified file 'rc/qml/OrganicView/OrganicAlbumView.qml' |
2459 | --- rc/qml/OrganicView/OrganicAlbumView.qml 2013-06-26 08:59:08 +0000 |
2460 | +++ rc/qml/OrganicView/OrganicAlbumView.qml 2015-11-05 19:26:06 +0000 |
2461 | @@ -1,5 +1,5 @@ |
2462 | /* |
2463 | - * Copyright (C) 2012 Canonical Ltd |
2464 | + * Copyright (C) 2012-2015 Canonical Ltd |
2465 | * |
2466 | * This program is free software: you can redistribute it and/or modify |
2467 | * it under the terms of the GNU General Public License version 3 as |
2468 | @@ -17,7 +17,7 @@ |
2469 | * Charles Lindsay <chaz@yorba.org> |
2470 | */ |
2471 | |
2472 | -import QtQuick 2.0 |
2473 | +import QtQuick 2.4 |
2474 | import Gallery 1.0 |
2475 | import "../Utility" |
2476 | import "../../js/GalleryUtility.js" as GalleryUtility |
2477 | |
2478 | === modified file 'rc/qml/OrganicView/OrganicItemInteraction.qml' |
2479 | --- rc/qml/OrganicView/OrganicItemInteraction.qml 2015-02-16 16:25:08 +0000 |
2480 | +++ rc/qml/OrganicView/OrganicItemInteraction.qml 2015-11-05 19:26:06 +0000 |
2481 | @@ -1,5 +1,5 @@ |
2482 | /* |
2483 | - * Copyright (C) 2012 Canonical Ltd |
2484 | + * Copyright (C) 2012-2015 Canonical Ltd |
2485 | * |
2486 | * This program is free software: you can redistribute it and/or modify |
2487 | * it under the terms of the GNU General Public License version 3 as |
2488 | @@ -17,8 +17,8 @@ |
2489 | * Charles Lindsay <chaz@yorba.org> |
2490 | */ |
2491 | |
2492 | -import QtQuick 2.0 |
2493 | -import Ubuntu.Components 0.1 |
2494 | +import QtQuick 2.4 |
2495 | +import Ubuntu.Components 1.3 |
2496 | import "../Utility" |
2497 | |
2498 | // The user interaction and selection handling for items in the |
2499 | |
2500 | === modified file 'rc/qml/OrganicView/OrganicMediaList.qml' |
2501 | --- rc/qml/OrganicView/OrganicMediaList.qml 2015-07-27 22:48:49 +0000 |
2502 | +++ rc/qml/OrganicView/OrganicMediaList.qml 2015-11-05 19:26:06 +0000 |
2503 | @@ -1,5 +1,5 @@ |
2504 | /* |
2505 | - * Copyright (C) 2012 Canonical Ltd |
2506 | + * Copyright (C) 2012-2015 Canonical Ltd |
2507 | * |
2508 | * This program is free software: you can redistribute it and/or modify |
2509 | * it under the terms of the GNU General Public License version 3 as |
2510 | @@ -17,9 +17,9 @@ |
2511 | * Charles Lindsay <chaz@yorba.org> |
2512 | */ |
2513 | |
2514 | -import QtQuick 2.0 |
2515 | +import QtQuick 2.4 |
2516 | import Gallery 1.0 |
2517 | -import Ubuntu.Components 0.1 |
2518 | +import Ubuntu.Components 1.3 |
2519 | import Ubuntu.Thumbnailer 0.1 |
2520 | import "../Components" |
2521 | import "../Utility" |
2522 | @@ -132,7 +132,7 @@ |
2523 | UbuntuShape { |
2524 | id: thumbnail |
2525 | |
2526 | - property bool isLoading: image.status === Image.Loading |
2527 | + property bool isLoading: source.status === Image.Loading |
2528 | |
2529 | x: __photoX[patternPhoto] |
2530 | y: __photosTopMargin + __photoY[patternPhoto] |
2531 | @@ -164,11 +164,12 @@ |
2532 | } |
2533 | } |
2534 | |
2535 | - visible: image.status === Image.Ready |
2536 | + visible: source.status === Image.Ready |
2537 | |
2538 | radius: "medium" |
2539 | |
2540 | - image: Image { |
2541 | + sourceFillMode: UbuntuShape.PreserveAspectCrop |
2542 | + source: Image { |
2543 | id: thumbImage |
2544 | source: "image://thumbnailer/" + model.mediaSource.path + "?at=" + Date.now() |
2545 | asynchronous: true |
2546 | |
2547 | === modified file 'rc/qml/OrganicView/OrganicView.qml' |
2548 | --- rc/qml/OrganicView/OrganicView.qml 2014-11-07 12:51:32 +0000 |
2549 | +++ rc/qml/OrganicView/OrganicView.qml 2015-11-05 19:26:06 +0000 |
2550 | @@ -1,5 +1,5 @@ |
2551 | /* |
2552 | - * Copyright (C) 2012 Canonical Ltd |
2553 | + * Copyright (C) 2012-2015 Canonical Ltd |
2554 | * |
2555 | * This program is free software: you can redistribute it and/or modify |
2556 | * it under the terms of the GNU General Public License version 3 as |
2557 | @@ -17,8 +17,8 @@ |
2558 | * Charles Lindsay <chaz@yorba.org> |
2559 | */ |
2560 | |
2561 | -import QtQuick 2.0 |
2562 | -import Ubuntu.Components 1.1 |
2563 | +import QtQuick 2.4 |
2564 | +import Ubuntu.Components 1.3 |
2565 | import "../Utility" |
2566 | import "../../js/Gallery.js" as Gallery |
2567 | |
2568 | @@ -61,13 +61,6 @@ |
2569 | positionEventsAtBeginning() |
2570 | } |
2571 | |
2572 | - Image { |
2573 | - anchors.fill: parent |
2574 | - |
2575 | - source: "../../img/background-paper.png" |
2576 | - fillMode: Image.Tile |
2577 | - } |
2578 | - |
2579 | ListView { |
2580 | id: organicList |
2581 | |
2582 | |
2583 | === modified file 'rc/qml/PhotosOverview.qml' |
2584 | --- rc/qml/PhotosOverview.qml 2015-02-12 13:48:42 +0000 |
2585 | +++ rc/qml/PhotosOverview.qml 2015-11-05 19:26:06 +0000 |
2586 | @@ -1,5 +1,5 @@ |
2587 | /* |
2588 | - * Copyright (C) 2012 Canonical Ltd |
2589 | + * Copyright (C) 2012-2015 Canonical Ltd |
2590 | * |
2591 | * This program is free software: you can redistribute it and/or modify |
2592 | * it under the terms of the GNU General Public License version 3 as |
2593 | @@ -17,11 +17,11 @@ |
2594 | * Jim Nelson <jim@yorba.org> |
2595 | */ |
2596 | |
2597 | -import QtQuick 2.0 |
2598 | +import QtQuick 2.4 |
2599 | import Gallery 1.0 |
2600 | -import Ubuntu.Components 0.1 |
2601 | -import Ubuntu.Components.Popups 0.1 |
2602 | -import Ubuntu.Content 0.1 |
2603 | +import Ubuntu.Components 1.3 |
2604 | +import Ubuntu.Components.Popups 1.3 |
2605 | +import Ubuntu.Content 1.3 |
2606 | import "Components" |
2607 | import "OrganicView" |
2608 | import "Utility" |
2609 | @@ -59,14 +59,8 @@ |
2610 | |
2611 | property string pageTitle |
2612 | |
2613 | - tools: inSelectionMode ? d.selectionTools : d.overviewTools |
2614 | - |
2615 | - Image { |
2616 | - anchors.fill: parent |
2617 | - |
2618 | - source: "../img/background-paper.png" |
2619 | - fillMode: Image.Tile |
2620 | - } |
2621 | + head.actions: inSelectionMode ? d.selectActions : d.overviewActions |
2622 | + head.backAction: inSelectionMode ? d.selectBackAction : null |
2623 | |
2624 | MediaGrid { |
2625 | id: photosGrid |
2626 | @@ -128,30 +122,61 @@ |
2627 | model: photosOverview.model |
2628 | } |
2629 | |
2630 | - property Item overviewTools: PhotosToolbarActions { |
2631 | - selection: d.selection |
2632 | - } |
2633 | - |
2634 | - property Item selectionTools: SelectionToolbarAction { |
2635 | - selection: d.selection |
2636 | - |
2637 | - onCancelClicked: { |
2638 | - photosOverview.leaveSelectionMode(); |
2639 | - } |
2640 | - onAddClicked: { |
2641 | - __albumPicker = PopupUtils.open(Qt.resolvedUrl("Components/PopupAlbumPicker.qml"), |
2642 | - null, |
2643 | - {contentHeight: photosOverview.__pickerContentHeight}); |
2644 | - } |
2645 | - onDeleteClicked: { |
2646 | - PopupUtils.open(deleteDialog, null); |
2647 | - } |
2648 | - |
2649 | - onShareClicked: { |
2650 | - overview.pushPage(sharePicker) |
2651 | - sharePicker.visible = true; |
2652 | - } |
2653 | - } |
2654 | + property list<Action> overviewActions: [ |
2655 | + Action { |
2656 | + objectName: "selectButton" |
2657 | + text: i18n.tr("Select") |
2658 | + iconName: "select" |
2659 | + enabled: d.selection !== null |
2660 | + onTriggered: d.selection.inSelectionMode = true; |
2661 | + }, |
2662 | + Action { |
2663 | + objectName: "cameraButton" |
2664 | + text: i18n.tr("Camera") |
2665 | + visible: !APP.desktopMode |
2666 | + iconName: "camera-app-symbolic" |
2667 | + onTriggered: Qt.openUrlExternally("appid://com.ubuntu.camera/camera/current-user-version") |
2668 | + } |
2669 | + ] |
2670 | + |
2671 | + property list<Action> selectActions: [ |
2672 | + Action { |
2673 | + id: addButton |
2674 | + objectName: "addButton" |
2675 | + |
2676 | + text: i18n.tr("Add") |
2677 | + iconName: "add" |
2678 | + enabled: d.selection.selectedCount > 0 |
2679 | + onTriggered: __albumPicker = PopupUtils.open(Qt.resolvedUrl("Components/PopupAlbumPicker.qml"), |
2680 | + null, |
2681 | + {contentHeight: photosOverview.__pickerContentHeight}); |
2682 | + |
2683 | + }, |
2684 | + Action { |
2685 | + objectName: "deleteButton" |
2686 | + |
2687 | + text: i18n.tr("Delete") |
2688 | + iconName: "delete" |
2689 | + enabled: d.selection.selectedCount > 0 |
2690 | + onTriggered: PopupUtils.open(deleteDialog, null); |
2691 | + }, |
2692 | + Action { |
2693 | + objectName: "shareButton" |
2694 | + text: i18n.tr("Share") |
2695 | + iconName: "share" |
2696 | + enabled: d.selection.selectedMediaCount == 1 |
2697 | + onTriggered: { |
2698 | + overview.pushPage(sharePicker) |
2699 | + sharePicker.visible = true; |
2700 | + } |
2701 | + } |
2702 | + ] |
2703 | + |
2704 | + property Action selectBackAction: Action { |
2705 | + text: i18n.tr("Cancel") |
2706 | + iconName: "back" |
2707 | + onTriggered: photosOverview.leaveSelectionMode(); |
2708 | + } |
2709 | } |
2710 | |
2711 | Component { |
2712 | |
2713 | === modified file 'rc/qml/PickerScreen.qml' |
2714 | --- rc/qml/PickerScreen.qml 2015-02-09 19:48:24 +0000 |
2715 | +++ rc/qml/PickerScreen.qml 2015-11-05 19:26:06 +0000 |
2716 | @@ -1,5 +1,5 @@ |
2717 | /* |
2718 | - * Copyright (C) 2013 Canonical Ltd |
2719 | + * Copyright (C) 2013-2015 Canonical Ltd |
2720 | * |
2721 | * This program is free software: you can redistribute it and/or modify |
2722 | * it under the terms of the GNU General Public License version 3 as |
2723 | @@ -14,8 +14,8 @@ |
2724 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2725 | */ |
2726 | |
2727 | -import QtQuick 2.0 |
2728 | -import Ubuntu.Components 1.1 |
2729 | +import QtQuick 2.4 |
2730 | +import Ubuntu.Components 1.3 |
2731 | import Gallery 1.0 |
2732 | import "Components" |
2733 | import "OrganicView" |
2734 | @@ -30,8 +30,6 @@ |
2735 | id: overview |
2736 | objectName: "pickerMainView" |
2737 | |
2738 | - useDeprecatedToolbar: false |
2739 | - |
2740 | function setHeaderVisibility(visible) |
2741 | { |
2742 | header.visible = visible; |
2743 | @@ -173,12 +171,6 @@ |
2744 | onSelected: photosGrid.positionViewAtIndex(index, GridView.Contain); |
2745 | } |
2746 | |
2747 | - Image { |
2748 | - anchors.fill: parent |
2749 | - source: "../img/background-paper.png" |
2750 | - fillMode: Image.Tile |
2751 | - } |
2752 | - |
2753 | MediaGrid { |
2754 | id: photosGrid |
2755 | anchors.fill: parent |
2756 | |
2757 | === modified file 'rc/qml/Utility/DissolveAnimation.qml' |
2758 | --- rc/qml/Utility/DissolveAnimation.qml 2013-06-20 11:54:49 +0000 |
2759 | +++ rc/qml/Utility/DissolveAnimation.qml 2015-11-05 19:26:06 +0000 |
2760 | @@ -1,5 +1,5 @@ |
2761 | /* |
2762 | - * Copyright (C) 2011-2012 Canonical Ltd |
2763 | + * Copyright (C) 2011-2015 Canonical Ltd |
2764 | * |
2765 | * This program is free software: you can redistribute it and/or modify |
2766 | * it under the terms of the GNU General Public License version 3 as |
2767 | @@ -17,7 +17,7 @@ |
2768 | * Charles Lindsay <chaz@yorba.org> |
2769 | */ |
2770 | |
2771 | -import QtQuick 2.0 |
2772 | +import QtQuick 2.4 |
2773 | |
2774 | // Fades in the fadeInTarget while fading out the fadeOutTarget. |
2775 | /*! |
2776 | |
2777 | === modified file 'rc/qml/Utility/EditingHUD.qml' |
2778 | --- rc/qml/Utility/EditingHUD.qml 2013-09-09 09:52:01 +0000 |
2779 | +++ rc/qml/Utility/EditingHUD.qml 2015-11-05 19:26:06 +0000 |
2780 | @@ -1,5 +1,5 @@ |
2781 | /* |
2782 | - * Copyright (C) 2013 Canonical Ltd |
2783 | + * Copyright (C) 2013-2015 Canonical Ltd |
2784 | * |
2785 | * This program is free software: you can redistribute it and/or modify |
2786 | * it under the terms of the GNU General Public License version 3 as |
2787 | @@ -14,9 +14,9 @@ |
2788 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2789 | */ |
2790 | |
2791 | -import QtQuick 2.0 |
2792 | +import QtQuick 2.4 |
2793 | import Gallery 1.0 |
2794 | -import Ubuntu.Components 0.1 |
2795 | +import Ubuntu.Components 1.3 |
2796 | import Ubuntu.Unity.Action 1.0 as UnityActions |
2797 | |
2798 | /*! |
2799 | |
2800 | === modified file 'rc/qml/Utility/ExpandAnimation.qml' |
2801 | --- rc/qml/Utility/ExpandAnimation.qml 2013-06-20 11:54:49 +0000 |
2802 | +++ rc/qml/Utility/ExpandAnimation.qml 2015-11-05 19:26:06 +0000 |
2803 | @@ -1,5 +1,5 @@ |
2804 | /* |
2805 | - * Copyright (C) 2011 Canonical Ltd |
2806 | + * Copyright (C) 2011-2015 Canonical Ltd |
2807 | * |
2808 | * This program is free software: you can redistribute it and/or modify |
2809 | * it under the terms of the GNU General Public License version 3 as |
2810 | @@ -17,7 +17,7 @@ |
2811 | * Charles Lindsay <chaz@yorba.org> |
2812 | */ |
2813 | |
2814 | -import QtQuick 2.0 |
2815 | +import QtQuick 2.4 |
2816 | |
2817 | // Moves the position and size of the target to the end values. |
2818 | /*! |
2819 | |
2820 | === modified file 'rc/qml/Utility/FadeInAnimation.qml' |
2821 | --- rc/qml/Utility/FadeInAnimation.qml 2013-06-20 11:54:49 +0000 |
2822 | +++ rc/qml/Utility/FadeInAnimation.qml 2015-11-05 19:26:06 +0000 |
2823 | @@ -1,5 +1,5 @@ |
2824 | /* |
2825 | - * Copyright (C) 2011-2012 Canonical Ltd |
2826 | + * Copyright (C) 2011-2015 Canonical Ltd |
2827 | * |
2828 | * This program is free software: you can redistribute it and/or modify |
2829 | * it under the terms of the GNU General Public License version 3 as |
2830 | @@ -17,7 +17,7 @@ |
2831 | * Charles Lindsay <chaz@yorba.org> |
2832 | */ |
2833 | |
2834 | -import QtQuick 2.0 |
2835 | +import QtQuick 2.4 |
2836 | |
2837 | // Sets the target to visible at the startOpacity, animates to the endOpacity. |
2838 | SequentialAnimation { |
2839 | |
2840 | === modified file 'rc/qml/Utility/FadeOutAnimation.qml' |
2841 | --- rc/qml/Utility/FadeOutAnimation.qml 2013-06-20 11:54:49 +0000 |
2842 | +++ rc/qml/Utility/FadeOutAnimation.qml 2015-11-05 19:26:06 +0000 |
2843 | @@ -1,5 +1,5 @@ |
2844 | /* |
2845 | - * Copyright (C) 2011-2012 Canonical Ltd |
2846 | + * Copyright (C) 2011-2015 Canonical Ltd |
2847 | * |
2848 | * This program is free software: you can redistribute it and/or modify |
2849 | * it under the terms of the GNU General Public License version 3 as |
2850 | @@ -17,7 +17,7 @@ |
2851 | * Charles Lindsay <chaz@yorba.org> |
2852 | */ |
2853 | |
2854 | -import QtQuick 2.0 |
2855 | +import QtQuick 2.4 |
2856 | |
2857 | // Sets the target to visible at the startOpacity, animates to the endOpacity, |
2858 | // then returns the startOpacity but with visible set to false. |
2859 | |
2860 | === removed file 'rc/qml/Utility/PhotosToolbarActions.qml' |
2861 | --- rc/qml/Utility/PhotosToolbarActions.qml 2014-08-26 21:54:25 +0000 |
2862 | +++ rc/qml/Utility/PhotosToolbarActions.qml 1970-01-01 00:00:00 +0000 |
2863 | @@ -1,57 +0,0 @@ |
2864 | -/* |
2865 | - * Copyright (C) 2013 Canonical Ltd |
2866 | - * |
2867 | - * This program is free software: you can redistribute it and/or modify |
2868 | - * it under the terms of the GNU General Public License version 3 as |
2869 | - * published by the Free Software Foundation. |
2870 | - * |
2871 | - * This program is distributed in the hope that it will be useful, |
2872 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2873 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2874 | - * GNU General Public License for more details. |
2875 | - * |
2876 | - * You should have received a copy of the GNU General Public License |
2877 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2878 | - */ |
2879 | - |
2880 | -import QtQuick 2.0 |
2881 | -import Ubuntu.Components 0.1 |
2882 | - |
2883 | -/*! |
2884 | - The actions for the toolbar for the event and photos view |
2885 | - */ |
2886 | -ToolbarItems { |
2887 | - id: root |
2888 | - /// The selection state item to use for enable / disable the select mode |
2889 | - property SelectionState selection: null |
2890 | - |
2891 | - /// Emittedt when the camera action was triggered |
2892 | - signal startCamera() |
2893 | - |
2894 | - ToolbarButton { |
2895 | - action: Action { |
2896 | - objectName: "selectButton" |
2897 | - text: i18n.tr("Select") |
2898 | - iconSource: Qt.resolvedUrl("../../img/select.png") |
2899 | - enabled: root.selection !== null |
2900 | - onTriggered: root.selection.inSelectionMode = true; |
2901 | - } |
2902 | - } |
2903 | - ToolbarButton { |
2904 | - objectName: "importButton" |
2905 | - action: Action { |
2906 | - text: i18n.tr("Import") |
2907 | - iconSource: Qt.resolvedUrl("../../img/import-image.png") |
2908 | - visible: false |
2909 | - } |
2910 | - } |
2911 | - ToolbarButton { |
2912 | - action: Action { |
2913 | - objectName: "cameraButton" |
2914 | - text: i18n.tr("Camera") |
2915 | - visible: !APP.desktopMode |
2916 | - iconSource: Qt.resolvedUrl("../../img/camera.png") |
2917 | - onTriggered: Qt.openUrlExternally("appid://com.ubuntu.camera/camera/current-user-version") |
2918 | - } |
2919 | - } |
2920 | -} |
2921 | |
2922 | === modified file 'rc/qml/Utility/SelectionState.qml' |
2923 | --- rc/qml/Utility/SelectionState.qml 2014-10-06 19:47:10 +0000 |
2924 | +++ rc/qml/Utility/SelectionState.qml 2015-11-05 19:26:06 +0000 |
2925 | @@ -1,5 +1,5 @@ |
2926 | /* |
2927 | - * Copyright (C) 2012 Canonical Ltd |
2928 | + * Copyright (C) 2012-2015 Canonical Ltd |
2929 | * |
2930 | * This program is free software: you can redistribute it and/or modify |
2931 | * it under the terms of the GNU General Public License version 3 as |
2932 | @@ -17,7 +17,7 @@ |
2933 | * Charles Lindsay <chaz@yorba.org> |
2934 | */ |
2935 | |
2936 | -import QtQuick 2.0 |
2937 | +import QtQuick 2.4 |
2938 | import Gallery 1.0 |
2939 | |
2940 | // Holds all the state for selection between the Organic views, and some other |
2941 | |
2942 | === removed file 'rc/qml/Utility/SelectionToolbarAction.qml' |
2943 | --- rc/qml/Utility/SelectionToolbarAction.qml 2014-09-15 16:32:40 +0000 |
2944 | +++ rc/qml/Utility/SelectionToolbarAction.qml 1970-01-01 00:00:00 +0000 |
2945 | @@ -1,82 +0,0 @@ |
2946 | -/* |
2947 | - * Copyright (C) 2013 Canonical Ltd |
2948 | - * |
2949 | - * This program is free software: you can redistribute it and/or modify |
2950 | - * it under the terms of the GNU General Public License version 3 as |
2951 | - * published by the Free Software Foundation. |
2952 | - * |
2953 | - * This program is distributed in the hope that it will be useful, |
2954 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2955 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2956 | - * GNU General Public License for more details. |
2957 | - * |
2958 | - * You should have received a copy of the GNU General Public License |
2959 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2960 | - */ |
2961 | - |
2962 | -import QtQuick 2.0 |
2963 | -import Ubuntu.Components 0.1 |
2964 | -import Ubuntu.Components.Popups 0.1 |
2965 | - |
2966 | -/*! |
2967 | - The actions for the toolbar for the event and photos view in select mode |
2968 | - */ |
2969 | -ToolbarItems { |
2970 | - id: root |
2971 | - /// The selection state item |
2972 | - property SelectionState selection: null |
2973 | - |
2974 | - /// Emitted when cancel was clicked |
2975 | - signal cancelClicked() |
2976 | - /// Emitted when add was clicked |
2977 | - /// @param caller the item that caused the call (was clicked) |
2978 | - signal addClicked(var caller) |
2979 | - ///Emitted when delete was clicked |
2980 | - signal deleteClicked() |
2981 | - ///Emitted when share was clicked |
2982 | - signal shareClicked() |
2983 | - |
2984 | - // in selection mode, never hide the toolbar: |
2985 | - opened: true |
2986 | - locked: true |
2987 | - |
2988 | - ToolbarButton { |
2989 | - id: addButton |
2990 | - objectName: "addButton" |
2991 | - action: Action { |
2992 | - text: i18n.tr("Add") |
2993 | - iconName: "add" |
2994 | - enabled: root.selection.selectedCount > 0 |
2995 | - onTriggered: root.addClicked(addButton); |
2996 | - } |
2997 | - } |
2998 | - ToolbarButton { |
2999 | - action: Action { |
3000 | - objectName: "deleteButton" |
3001 | - text: i18n.tr("Delete") |
3002 | - iconName: "delete" |
3003 | - enabled: root.selection.selectedCount > 0 |
3004 | - onTriggered:root.deleteClicked(); |
3005 | - } |
3006 | - } |
3007 | - ToolbarButton { |
3008 | - action: Action { |
3009 | - objectName: "shareButton" |
3010 | - text: i18n.tr("Share") |
3011 | - iconName: "share" |
3012 | - enabled: root.selection.selectedMediaCount == 1 |
3013 | - onTriggered: root.shareClicked(); |
3014 | - } |
3015 | - } |
3016 | - |
3017 | - back: Button { |
3018 | - objectName: "cancelButton" |
3019 | - action: Action { |
3020 | - text: i18n.tr("Cancel") |
3021 | - iconName: "back" |
3022 | - onTriggered: { |
3023 | - root.cancelClicked(); |
3024 | - } |
3025 | - } |
3026 | - } |
3027 | -} |
3028 | |
3029 | === modified file 'src/photo/photo.cpp' |
3030 | --- src/photo/photo.cpp 2015-08-20 22:26:08 +0000 |
3031 | +++ src/photo/photo.cpp 2015-11-05 19:26:06 +0000 |
3032 | @@ -77,6 +77,7 @@ |
3033 | { |
3034 | QByteArray format = QImageReader(file.filePath()).format(); |
3035 | m_fileFormat = QString(format).toLower(); |
3036 | + Q_EMIT canBeEditedChanged(); |
3037 | if (m_fileFormat == "jpg") // Why does Qt expose two different names here? |
3038 | m_fileFormat = "jpeg"; |
3039 | } |
3040 | |
3041 | === modified file 'src/photo/photo.h' |
3042 | --- src/photo/photo.h 2015-01-19 11:45:31 +0000 |
3043 | +++ src/photo/photo.h 2015-11-05 19:26:06 +0000 |
3044 | @@ -35,7 +35,7 @@ |
3045 | { |
3046 | Q_OBJECT |
3047 | |
3048 | - Q_PROPERTY(bool canBeEdited READ canBeEdited) |
3049 | + Q_PROPERTY(bool canBeEdited READ canBeEdited NOTIFY canBeEditedChanged) |
3050 | public: |
3051 | explicit Photo(const QFileInfo& file); |
3052 | virtual ~Photo(); |
3053 | @@ -56,6 +56,9 @@ |
3054 | bool fileFormatHasMetadata() const; |
3055 | bool fileFormatHasOrientation() const; |
3056 | |
3057 | +signals: |
3058 | + void canBeEditedChanged(); |
3059 | + |
3060 | protected: |
3061 | virtual void destroySource(bool destroyBacking, bool asOrphan); |
3062 | |
3063 | |
3064 | === modified file 'tests/autopilot/gallery_app/emulators/album_view.py' |
3065 | --- tests/autopilot/gallery_app/emulators/album_view.py 2015-04-15 17:45:14 +0000 |
3066 | +++ tests/autopilot/gallery_app/emulators/album_view.py 2015-11-05 19:26:06 +0000 |
3067 | @@ -11,6 +11,7 @@ |
3068 | from testtools.matchers import GreaterThan, LessThan, Equals, Is |
3069 | from autopilot.matchers import Eventually |
3070 | |
3071 | +from autopilot.introspection.dbus import StateNotFoundError |
3072 | from autopilot import logging as autopilot_logging |
3073 | |
3074 | from gallery_app.emulators.gallery_utils import( |
3075 | @@ -219,3 +220,29 @@ |
3076 | i.source).split('?')[0] |
3077 | self.pointing_device.click_object(photo) |
3078 | return path |
3079 | + |
3080 | + def _get_header(self): |
3081 | + return self.app.select_single('PageHeader', |
3082 | + objectName='albumViewerHeader') |
3083 | + |
3084 | + def _open_overflow(self): |
3085 | + overflow_button = self._get_header().select_single( |
3086 | + objectName='overflow_action_button') |
3087 | + self.pointing_device.click_object(overflow_button) |
3088 | + return self.get_root_instance().wait_select_single( |
3089 | + objectName='actions_overflow_panel', |
3090 | + visible=True) |
3091 | + |
3092 | + def click_action_button(self, action_object_name): |
3093 | + header = self._get_header() |
3094 | + header.visible.wait_for(True) |
3095 | + |
3096 | + try: |
3097 | + object_name = action_object_name + "_action_button" |
3098 | + button = header.select_single(objectName=object_name) |
3099 | + self.pointing_device.click_object(button) |
3100 | + except StateNotFoundError: |
3101 | + object_name = action_object_name + "_button" |
3102 | + popover = self._open_overflow() |
3103 | + button = popover.select_single(objectName=object_name) |
3104 | + self.pointing_device.click_object(button) |
3105 | |
3106 | === modified file 'tests/autopilot/gallery_app/emulators/photo_viewer.py' |
3107 | --- tests/autopilot/gallery_app/emulators/photo_viewer.py 2015-04-16 22:01:54 +0000 |
3108 | +++ tests/autopilot/gallery_app/emulators/photo_viewer.py 2015-11-05 19:26:06 +0000 |
3109 | @@ -7,6 +7,7 @@ |
3110 | |
3111 | import logging |
3112 | |
3113 | +from autopilot.introspection.dbus import StateNotFoundError |
3114 | import autopilot.logging |
3115 | import ubuntuuitoolkit |
3116 | |
3117 | @@ -21,12 +22,42 @@ |
3118 | |
3119 | |
3120 | class PopupPhotoViewer(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
3121 | + def _get_header(self): |
3122 | + main = self.get_root_instance().select_single(main_screen.MainScreen) |
3123 | + return main.select_single('PageHeader', |
3124 | + objectName='photoViewerHeader') |
3125 | + |
3126 | + def _open_overflow(self): |
3127 | + overflow_button = self._get_header().select_single( |
3128 | + objectName='overflow_action_button') |
3129 | + self.pointing_device.click_object(overflow_button) |
3130 | + return self.get_root_instance().wait_select_single( |
3131 | + objectName='actions_overflow_panel', |
3132 | + visible=True) |
3133 | + |
3134 | + def click_action_button(self, action_object_name): |
3135 | + header = self._get_header() |
3136 | + if not header.visible: |
3137 | + main = self.get_root_instance().select_single( |
3138 | + main_screen.MainScreen) |
3139 | + x, y, w, h = main.globalRect |
3140 | + self.pointing_device.move(x + (w // 2), y + (h // 2)) |
3141 | + self.pointing_device.click() |
3142 | + header.visible.wait_for(True) |
3143 | + |
3144 | + try: |
3145 | + object_name = action_object_name + "_action_button" |
3146 | + button = header.select_single(objectName=object_name) |
3147 | + self.pointing_device.click_object(button) |
3148 | + except StateNotFoundError: |
3149 | + object_name = action_object_name + "_button" |
3150 | + popover = self._open_overflow() |
3151 | + button = popover.select_single(objectName=object_name) |
3152 | + self.pointing_device.click_object(button) |
3153 | |
3154 | @autopilot.logging.log_action(logger.info) |
3155 | def delete_current_photo(self, confirm=True): |
3156 | - header = self.get_root_instance().select_single( |
3157 | - main_screen.MainScreen).get_header() |
3158 | - header.click_action_button("deleteButton") |
3159 | + self.click_action_button("deleteButton") |
3160 | if confirm: |
3161 | self.confirm_delete_photo() |
3162 | else: |
3163 | @@ -66,17 +97,9 @@ |
3164 | return self.app.wait_select_single("PopupAlbumPicker", |
3165 | objectName="popupAlbumPicker") |
3166 | |
3167 | - def get_content_peer_picker_cancel_button(self): |
3168 | - """Returns the ContentPeerPicker cancel button.""" |
3169 | - return self.get_share_peer_picker().wait_select_single( |
3170 | - "Button", |
3171 | - objectName="contentPeerPickerCancelButton", |
3172 | - visible=True) |
3173 | - |
3174 | def get_share_peer_picker(self): |
3175 | """Returns the photo viewer share picker.""" |
3176 | - return self.app.wait_select_single("ContentPeerPicker10", |
3177 | - objectName="sharePicker", |
3178 | + return self.app.wait_select_single(objectName="sharePicker", |
3179 | visible=True) |
3180 | |
3181 | def get_photo_editor(self): |
3182 | |
3183 | === modified file 'tests/autopilot/gallery_app/emulators/picker_screen.py' |
3184 | --- tests/autopilot/gallery_app/emulators/picker_screen.py 2015-04-15 17:45:14 +0000 |
3185 | +++ tests/autopilot/gallery_app/emulators/picker_screen.py 2015-11-05 19:26:06 +0000 |
3186 | @@ -12,7 +12,7 @@ |
3187 | class PickerScreen(toolkit_emulators.MainView): |
3188 | |
3189 | def pick_button(self): |
3190 | - return self.select_single(objectName="pickButton_header_button") |
3191 | + return self.select_single(objectName="pickButton_action_button") |
3192 | |
3193 | def get_photos_tab_button(self): |
3194 | """Returns the photos tab.""" |
3195 | @@ -39,14 +39,14 @@ |
3196 | Return the Page object representing the photos |
3197 | """ |
3198 | self.switch_to_tab('photosTab') |
3199 | - return self.select_single(Page11, objectName='photosPage') |
3200 | + return self.select_single(Page, objectName='photosPage') |
3201 | |
3202 | def click_pick_button(self): |
3203 | """Click on the pick button""" |
3204 | self.pointing_device.click_object(self.pick_button()) |
3205 | |
3206 | |
3207 | -class Page11(PickerScreen): |
3208 | +class Page(PickerScreen): |
3209 | """Class to represent photos page view from picker screen""" |
3210 | |
3211 | def _get_named_photo_element(self, photo_name): |
3212 | |
3213 | === modified file 'tests/autopilot/gallery_app/tests/test_album_editor.py' |
3214 | --- tests/autopilot/gallery_app/tests/test_album_editor.py 2015-04-14 14:38:00 +0000 |
3215 | +++ tests/autopilot/gallery_app/tests/test_album_editor.py 2015-11-05 19:26:06 +0000 |
3216 | @@ -96,7 +96,7 @@ |
3217 | self.pointing_device.move(x + 40, y + h + 40) |
3218 | self.pointing_device.click() |
3219 | |
3220 | - self.main_view.get_header().click_custom_back_button() |
3221 | + self.album_view.click_action_button("backButton") |
3222 | self.album_view.ensure_album_view_fully_closed() |
3223 | |
3224 | # now open to add a photo |
3225 | |
3226 | === modified file 'tests/autopilot/gallery_app/tests/test_album_view.py' |
3227 | --- tests/autopilot/gallery_app/tests/test_album_view.py 2015-02-17 10:23:02 +0000 |
3228 | +++ tests/autopilot/gallery_app/tests/test_album_view.py 2015-11-05 19:26:06 +0000 |
3229 | @@ -15,6 +15,7 @@ |
3230 | from gallery_app.emulators.albums_view import AlbumsView |
3231 | from gallery_app.emulators.media_selector import MediaSelector |
3232 | from gallery_app.emulators.photo_viewer import PhotoViewer |
3233 | +from gallery_app.emulators.photo_viewer import PopupPhotoViewer |
3234 | from gallery_app.emulators import album_editor |
3235 | from gallery_app.tests import GalleryTestCase |
3236 | |
3237 | @@ -88,7 +89,7 @@ |
3238 | self.pointing_device.click() |
3239 | |
3240 | # open media selector but cancel |
3241 | - self.main_view.get_header().click_action_button("addButton") |
3242 | + self.album_view.click_action_button("addButton") |
3243 | self.media_selector.ensure_fully_open() |
3244 | |
3245 | self.main_view.get_header().click_custom_back_button() |
3246 | @@ -98,7 +99,7 @@ |
3247 | self.assertThat(num_photos, Equals(num_photos_start)) |
3248 | |
3249 | # open media selector and add a photo |
3250 | - self.main_view.get_header().click_action_button("addButton") |
3251 | + self.album_view.click_action_button("addButton") |
3252 | self.media_selector.ensure_fully_open() |
3253 | |
3254 | photo = self.media_selector.get_second_photo() |
3255 | @@ -123,7 +124,9 @@ |
3256 | photo_view = self.album_view.get_album_photo_view() |
3257 | self.assertThat(photo_view.visible, Eventually(Equals(True))) |
3258 | |
3259 | - self.main_view.get_header().click_action_button("deleteButton") |
3260 | + photo_viewer_popup = self.main_view.wait_select_single( |
3261 | + PopupPhotoViewer, visible=True) |
3262 | + photo_viewer_popup.click_action_button("deleteButton") |
3263 | self.album_view.click_remove_from_album_remove_button() |
3264 | |
3265 | self.assertThat(lambda: self.album_view.number_of_photos(), |
3266 | @@ -145,7 +148,9 @@ |
3267 | photo_view = self.album_view.get_album_photo_view() |
3268 | self.assertThat(photo_view.visible, Eventually(Equals(True))) |
3269 | |
3270 | - self.main_view.get_header().click_action_button("deleteButton") |
3271 | + photo_viewer_popup = self.main_view.wait_select_single( |
3272 | + PopupPhotoViewer, visible=True) |
3273 | + photo_viewer_popup.click_action_button("deleteButton") |
3274 | self.album_view.click_remove_from_album_delete_button() |
3275 | |
3276 | self.assertThat(lambda: self.album_view.number_of_photos(), |
3277 | @@ -167,10 +172,13 @@ |
3278 | photo_view = self.album_view.get_album_photo_view() |
3279 | self.assertThat(photo_view.visible, Eventually(Equals(True))) |
3280 | |
3281 | - self.main_view.get_header().click_action_button("deleteButton") |
3282 | + photo_viewer_popup = self.main_view.wait_select_single( |
3283 | + PopupPhotoViewer, visible=True) |
3284 | + photo_viewer_popup.click_action_button("deleteButton") |
3285 | + |
3286 | self.album_view.click_remove_from_album_cancel_button() |
3287 | |
3288 | - self.main_view.get_header().click_custom_back_button() |
3289 | + photo_viewer_popup.click_action_button("backButton") |
3290 | |
3291 | self.assertThat(lambda: self.album_view.number_of_photos(), |
3292 | Eventually(Equals(num_photos_start))) |
3293 | @@ -179,29 +187,29 @@ |
3294 | Eventually(Equals(True))) |
3295 | |
3296 | def test_add_photo_to_new_album(self): |
3297 | + albums = self.albums_view.number_of_albums_in_albums_view() |
3298 | self.main_view.get_header().click_action_button("addButton") |
3299 | self.ui_update() |
3300 | |
3301 | editor = self.app.select_single(album_editor.AlbumEditor) |
3302 | editor.ensure_fully_open() |
3303 | - editor.close() |
3304 | - |
3305 | - num_photos_start = self.album_view.number_of_photos() |
3306 | - self.assertThat(num_photos_start, Equals(0)) |
3307 | - |
3308 | - plus = self.album_view.get_plus_icon_empty_album() |
3309 | - self.click_item(plus) |
3310 | + editor.add_photos() |
3311 | self.media_selector.ensure_fully_open() |
3312 | |
3313 | photo = self.media_selector.get_second_photo() |
3314 | checkbox = photo.select_single(objectName="selectionCheckbox") |
3315 | self.click_item(checkbox) |
3316 | self.main_view.get_header().click_action_button("addButton") |
3317 | + self.ui_update() |
3318 | + self.assertThat( |
3319 | + lambda: self.albums_view.number_of_albums_in_albums_view(), |
3320 | + Eventually(Equals(albums+1)) |
3321 | + ) |
3322 | |
3323 | self.open_first_album() |
3324 | self.assertThat( |
3325 | lambda: self.album_view.number_of_photos(), |
3326 | - Eventually(Equals(num_photos_start + 1))) |
3327 | + Eventually(Equals(1))) |
3328 | |
3329 | @skip("Temporarily disable as it fails in some cases, supposedly due to " |
3330 | "problems with the infrastructure") |
3331 | |
3332 | === modified file 'tests/autopilot/gallery_app/tests/test_albums_view.py' |
3333 | --- tests/autopilot/gallery_app/tests/test_albums_view.py 2015-02-17 10:23:02 +0000 |
3334 | +++ tests/autopilot/gallery_app/tests/test_albums_view.py 2015-11-05 19:26:06 +0000 |
3335 | @@ -59,10 +59,9 @@ |
3336 | super(TestAlbumsView, self).tearDown() |
3337 | |
3338 | def check_header_button_exist(self, button): |
3339 | - header = self.main_view.get_header() |
3340 | - buttonName = button + "_header_button" |
3341 | + buttonName = button + "_action_button" |
3342 | try: |
3343 | - header.select_single(objectName=buttonName) |
3344 | + self.main_view.select_single(objectName=buttonName) |
3345 | except StateNotFoundError: |
3346 | return False |
3347 | return True |
3348 | |
3349 | === modified file 'tests/autopilot/gallery_app/tests/test_events_view.py' |
3350 | --- tests/autopilot/gallery_app/tests/test_events_view.py 2015-02-27 19:17:38 +0000 |
3351 | +++ tests/autopilot/gallery_app/tests/test_events_view.py 2015-11-05 19:26:06 +0000 |
3352 | @@ -62,10 +62,9 @@ |
3353 | self.main_view.get_header().click_action_button("selectButton") |
3354 | |
3355 | def check_header_button_exist(self, button): |
3356 | - header = self.main_view.get_header() |
3357 | - buttonName = button + "_header_button" |
3358 | + buttonName = button + "_action_button" |
3359 | try: |
3360 | - header.select_single(objectName=buttonName) |
3361 | + self.main_view.select_single(objectName=buttonName) |
3362 | except StateNotFoundError: |
3363 | return False |
3364 | return True |
3365 | |
3366 | === modified file 'tests/autopilot/gallery_app/tests/test_photo_viewer.py' |
3367 | --- tests/autopilot/gallery_app/tests/test_photo_viewer.py 2015-04-16 21:54:59 +0000 |
3368 | +++ tests/autopilot/gallery_app/tests/test_photo_viewer.py 2015-11-05 19:26:06 +0000 |
3369 | @@ -95,19 +95,21 @@ |
3370 | |
3371 | def test_nav_bar_back_button(self): |
3372 | """Clicking the back button must close the photo.""" |
3373 | - self.main_view.get_header().click_custom_back_button() |
3374 | - photo_viewer = self.photo_viewer.get_main_photo_viewer() |
3375 | - self.assertThat(photo_viewer.visible, Eventually(Equals(False))) |
3376 | + photo_viewer_popup = self.main_view.select_single( |
3377 | + photo_viewer.PopupPhotoViewer) |
3378 | + photo_viewer_popup.click_action_button("backButton") |
3379 | + viewer = self.photo_viewer.get_main_photo_viewer() |
3380 | + self.assertThat(viewer.visible, Eventually(Equals(False))) |
3381 | |
3382 | @skipIf(model() == 'Desktop', 'Share not supported on desktop') |
3383 | def test_share_button(self): |
3384 | """Clicking the share button must show the ContentPeerPicker.""" |
3385 | - self.main_view.get_header().click_action_button("shareButton") |
3386 | + photo_viewer_popup = self.main_view.select_single( |
3387 | + photo_viewer.PopupPhotoViewer) |
3388 | + photo_viewer_popup.click_action_button("shareButton") |
3389 | share_picker = self.photo_viewer.get_share_peer_picker() |
3390 | self.assertThat(share_picker.visible, Eventually(Equals(True))) |
3391 | - cancel_button = \ |
3392 | - self.photo_viewer.get_content_peer_picker_cancel_button() |
3393 | - self.click_item(cancel_button) |
3394 | + self.main_view.get_header().click_back_button() |
3395 | self.assertThat(share_picker.visible, Eventually(Equals(False))) |
3396 | |
3397 | def test_delete_photo_must_remove_it_from_filesystem(self): |
3398 | @@ -147,7 +149,9 @@ |
3399 | |
3400 | def test_nav_bar_album_picker_button(self): |
3401 | """Clicking the album picker must show the picker dialog.""" |
3402 | - self.main_view.get_header().click_action_button("addButton") |
3403 | + photo_viewer_popup = self.main_view.select_single( |
3404 | + photo_viewer.PopupPhotoViewer) |
3405 | + photo_viewer_popup.click_action_button("addButton") |
3406 | album_picker = self.photo_viewer.get_popup_album_picker() |
3407 | self.assertThat(album_picker.visible, Eventually(Equals(True))) |
3408 | |
3409 | @@ -228,7 +232,9 @@ |
3410 | self.media_view = self.app.select_single(MediaViewer) |
3411 | |
3412 | def click_edit_button(self): |
3413 | - self.main_view.get_header().click_action_button("editButton") |
3414 | + photo_viewer_popup = self.main_view.select_single( |
3415 | + photo_viewer.PopupPhotoViewer) |
3416 | + photo_viewer_popup.click_action_button("editButton") |
3417 | photo_editor = self.photo_viewer.get_photo_editor() |
3418 | self.assertThat(photo_editor.visible, (Eventually(Equals(True)))) |
3419 | self.assertThat(photo_editor.opacity, (Eventually(Equals(1)))) |
3420 | |
3421 | === modified file 'tests/autopilot/gallery_app/tests/test_photos_view.py' |
3422 | --- tests/autopilot/gallery_app/tests/test_photos_view.py 2015-02-16 16:27:44 +0000 |
3423 | +++ tests/autopilot/gallery_app/tests/test_photos_view.py 2015-11-05 19:26:06 +0000 |
3424 | @@ -63,10 +63,9 @@ |
3425 | self.click_item(checkbox) |
3426 | |
3427 | def check_header_button_exist(self, button): |
3428 | - header = self.main_view.get_header() |
3429 | - buttonName = button + "_header_button" |
3430 | + buttonName = button + "_action_button" |
3431 | try: |
3432 | - header.select_single(objectName=buttonName) |
3433 | + self.main_view.select_single(objectName=buttonName) |
3434 | except StateNotFoundError: |
3435 | return False |
3436 | return True |
FAILED: Continuous integration, rev:1246 jenkins. qa.ubuntu. com/job/ gallery- app-ci/ 1192/ jenkins. qa.ubuntu. com/job/ gallery- app-vivid- amd64-ci/ 120 jenkins. qa.ubuntu. com/job/ gallery- app-vivid- armhf-ci/ 120/console jenkins. qa.ubuntu. com/job/ gallery- app-vivid- i386-ci/ 120 jenkins. qa.ubuntu. com/job/ generic- click-autopilot -vivid- touch/286 jenkins. qa.ubuntu. com/job/ generic- click-autopilot -runner- mako/940 jenkins. qa.ubuntu. com/job/ generic- click-builder- vivid-armhf/ 771 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 24714
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/gallery- app-ci/ 1192/rebuild
http://