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